Skip to content

Class uipc::constitution::SoftTransformConstraint

ClassList > uipc > constitution > SoftTransformConstraint

Inherits the following classes: uipc::constitution::Constraint

Public Functions

Type Name
SoftTransformConstraint (const Json & config=default_config()) noexcept
void apply_to (geometry::SimplicialComplex & sc, const Vector2 & strength_ratio) const
Apply the constraint to the simplicial complex instances.

Public Functions inherited from uipc::constitution::Constraint

See uipc::constitution::Constraint

Type Name
Constraint () noexcept

Public Functions inherited from uipc::constitution::IConstitution

See uipc::constitution::IConstitution

Type Name
std::string_view name () noexcept const
std::string_view type () noexcept const
U64 uid () noexcept const
const builtin::UIDInfo & uid_info () noexcept const
virtual ~IConstitution () = default

Public Static Functions

Type Name
Json default_config ()

Protected Functions

Type Name
virtual U64 get_uid () noexcept override const

Protected Functions inherited from uipc::constitution::Constraint

See uipc::constitution::Constraint

Type Name
void apply_to (geometry::SimplicialComplex & sc) const
virtual U64 get_uid () noexcept const = 0

Protected Functions inherited from uipc::constitution::IConstitution

See uipc::constitution::IConstitution

Type Name
virtual U64 get_uid () noexcept const = 0

Public Functions Documentation

function SoftTransformConstraint

uipc::constitution::SoftTransformConstraint::SoftTransformConstraint (
    const Json & config=default_config()
) noexcept

function apply_to

Apply the constraint to the simplicial complex instances.

void uipc::constitution::SoftTransformConstraint::apply_to (
    geometry::SimplicialComplex & sc,
    const Vector2 & strength_ratio
) const

Parameters:

  • sc The simplicial complex to apply the constraint to.
  • strength_ratio The strength ratio of the constraint, strength_ratio[0] is the strength of the translation, strength_ratio[1] is the strength of the rotation.
  • is_kinematic If the instances' kinetic energy is not considered.

Public Static Functions Documentation

function default_config

static Json uipc::constitution::SoftTransformConstraint::default_config () 

Protected Functions Documentation

function get_uid

virtual U64 uipc::constitution::SoftTransformConstraint::get_uid () noexcept override const

Implements uipc::constitution::Constraint::get_uid



The documentation for this class was generated from the following file include/uipc/constitution/soft_transform_constraint.h