Skip to content

Class uipc::constitution::AffineBodySphericalJoint

ClassList > uipc > constitution > AffineBodySphericalJoint

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

Public Functions

Type Name
AffineBodySphericalJoint (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 spherical 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 spherical joint geometry (multi-instance mode).
geometry::SimplicialComplex create_geometry (span< const Vector3 > 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 spherical joint geometry with world-space anchor positions.
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 spherical joint geometry with local-space anchor positions.
virtual ~AffineBodySphericalJoint ()

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 AffineBodySphericalJoint

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

function apply_to [1/2]

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

void uipc::constitution::AffineBodySphericalJoint::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 on vertices. Does NOT build geometry.


function apply_to [2/2]

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

void uipc::constitution::AffineBodySphericalJoint::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 on vertices. Does NOT build geometry.


function create_geometry [1/2]

Create spherical joint geometry with world-space anchor positions.

geometry::SimplicialComplex uipc::constitution::AffineBodySphericalJoint::create_geometry (
    span< const Vector3 > 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 vertices.position from positions. Does not write local position attributes.


function create_geometry [2/2]

Create spherical joint geometry with local-space anchor positions.

geometry::SimplicialComplex uipc::constitution::AffineBodySphericalJoint::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 ~AffineBodySphericalJoint

virtual uipc::constitution::AffineBodySphericalJoint::~AffineBodySphericalJoint () 

Public Static Functions Documentation

function default_config

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


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