Skip to content

File affine_body_driving_prismatic_joint.h

File List > constitution > affine_body_driving_prismatic_joint.h

Go to the documentation of this file

#pragma once
#include <uipc/constitution/constraint.h>
#include <uipc/geometry/simplicial_complex.h>

namespace uipc::constitution
{
class UIPC_CONSTITUTION_API AffineBodyDrivingPrismaticJoint final : public Constraint
{
    using Base = Constraint;

  public:
    AffineBodyDrivingPrismaticJoint(const Json& config = default_config());

    ~AffineBodyDrivingPrismaticJoint() override;

    void apply_to(geometry::SimplicialComplex& sc, Float strength_ratio = Float{100});


    void apply_to(geometry::SimplicialComplex& sc, span<Float> strength_ratios);

    static Json default_config();

  private:
    virtual U64 get_uid() const noexcept override;
    Json        m_config;
};
}  // namespace uipc::constitution