Skip to content

Class uipc::constitution::AffineBodyFixedJoint

ClassList > uipc > constitution > AffineBodyFixedJoint

Inherits the following classes: uipc::constitution::InterAffineBodyConstitution

Public Functions

Type Name
AffineBodyFixedJoint (const Json & config=default_config())
void apply_to (geometry::SimplicialComplex & sc, span< S< geometry::SimplicialComplexSlot > > l_geo_slots, span< S< geometry::SimplicialComplexSlot > > r_geo_slots, Float strength_ratio=Float{100})
Bind affine body instances to existing fixed joint geometry (single-instance mode).
void apply_to (geometry::SimplicialComplex & sc, span< S< geometry::SimplicialComplexSlot > > l_geo_slots, span< IndexT > l_instance_ids, span< S< geometry::SimplicialComplexSlot > > r_geo_slots, span< IndexT > r_instance_ids, span< Float > strength_ratios)
Bind affine body instances to existing fixed joint geometry (multi-instance mode).
geometry::SimplicialComplex create_geometry (span< S< geometry::SimplicialComplexSlot > > l_geo_slots, span< IndexT > l_instance_ids, span< S< geometry::SimplicialComplexSlot > > r_geo_slots, span< IndexT > r_instance_ids, span< Float > strength_ratios)
Create fixed joint geometry with world-space positions derived from body transforms.
geometry::SimplicialComplex create_geometry (span< const Vector3 > l_positions, span< const Vector3 > r_positions, span< S< geometry::SimplicialComplexSlot > > l_geo_slots, span< IndexT > l_instance_ids, span< S< geometry::SimplicialComplexSlot > > r_geo_slots, span< IndexT > r_instance_ids, span< Float > strength_ratios)
Create fixed joint geometry with local-space positions.
virtual ~AffineBodyFixedJoint ()

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 inherited from uipc::constitution::IConstitution

See uipc::constitution::IConstitution

Type Name
virtual U64 get_uid () noexcept const = 0

Public Functions Documentation

function AffineBodyFixedJoint

uipc::constitution::AffineBodyFixedJoint::AffineBodyFixedJoint (
    const Json & config=default_config()
) 

function apply_to [1/2]

Bind affine body instances to existing fixed joint geometry (single-instance mode).

void uipc::constitution::AffineBodyFixedJoint::apply_to (
    geometry::SimplicialComplex & sc,
    span< S< geometry::SimplicialComplexSlot > > l_geo_slots,
    span< S< geometry::SimplicialComplexSlot > > r_geo_slots,
    Float strength_ratio=Float{100}
) 

Pure binding: writes constitution UID, geometry IDs, instance IDs, and strength ratios. Does NOT build geometry.


function apply_to [2/2]

Bind affine body instances to existing fixed joint geometry (multi-instance mode).

void uipc::constitution::AffineBodyFixedJoint::apply_to (
    geometry::SimplicialComplex & sc,
    span< S< geometry::SimplicialComplexSlot > > l_geo_slots,
    span< IndexT > l_instance_ids,
    span< S< geometry::SimplicialComplexSlot > > r_geo_slots,
    span< IndexT > r_instance_ids,
    span< Float > strength_ratios
) 

Pure binding: writes constitution UID, geometry IDs, instance IDs, and strength ratios. Does NOT build geometry.


function create_geometry [1/2]

Create fixed joint geometry with world-space positions derived from body transforms.

geometry::SimplicialComplex uipc::constitution::AffineBodyFixedJoint::create_geometry (
    span< S< geometry::SimplicialComplexSlot > > l_geo_slots,
    span< IndexT > l_instance_ids,
    span< S< geometry::SimplicialComplexSlot > > r_geo_slots,
    span< IndexT > r_instance_ids,
    span< Float > strength_ratios
) 

Builds a vertex-based SimplicialComplex (1 vertex per joint). Writes vertices.position as midpoint of the two body translations. Does not write local position attributes.


function create_geometry [2/2]

Create fixed joint geometry with local-space positions.

geometry::SimplicialComplex uipc::constitution::AffineBodyFixedJoint::create_geometry (
    span< const Vector3 > l_positions,
    span< const Vector3 > r_positions,
    span< S< geometry::SimplicialComplexSlot > > l_geo_slots,
    span< IndexT > l_instance_ids,
    span< S< geometry::SimplicialComplexSlot > > r_geo_slots,
    span< IndexT > r_instance_ids,
    span< Float > strength_ratios
) 

Builds a vertex-based SimplicialComplex (1 vertex per joint). Writes local position attributes (l_position, r_position) on vertices.


function ~AffineBodyFixedJoint

virtual uipc::constitution::AffineBodyFixedJoint::~AffineBodyFixedJoint () 

Public Static Functions Documentation

function default_config

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


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