Class uipc::constitution::AffineBodyPrismaticJoint
ClassList > uipc > constitution > AffineBodyPrismaticJoint
Inherits the following classes: uipc::constitution::InterAffineBodyConstitution
Public Types
| Type | Name |
|---|---|
| typedef std::tuple< S< geometry::SimplicialComplexSlot >, S< geometry::SimplicialComplexSlot > > | SlotTuple |
Public Functions
| Type | Name |
|---|---|
| AffineBodyPrismaticJoint (const Json & config=default_config()) |
|
| void | apply_to (geometry::SimplicialComplex & edges, span< SlotTuple > geo_slots, Float strength_ratio=Float{100}) Deprecated: Apply prismatic joint to edges connecting affine bodies. |
| void | apply_to (geometry::SimplicialComplex & edges, span< S< geometry::SimplicialComplexSlot > > l_geo_slots, span< S< geometry::SimplicialComplexSlot > > r_geo_slots, Float strength_ratio=Float{100}) Apply prismatic joint to edges connecting affine bodies (single-instance mode). |
| void | apply_to (geometry::SimplicialComplex & edges, span< S< geometry::SimplicialComplexSlot > > l_geo_slots, span< IndexT > l_instance_id, span< S< geometry::SimplicialComplexSlot > > r_geo_slots, span< IndexT > r_instance_id, span< Float > strength_ratio) Apply prismatic joint to edges connecting affine bodies (multi-instance mode). |
| virtual | ~AffineBodyPrismaticJoint () |
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 Types Documentation
typedef SlotTuple
using uipc::constitution::AffineBodyPrismaticJoint::SlotTuple = std::tuple<S<geometry::SimplicialComplexSlot>, S<geometry::SimplicialComplexSlot> >;
Public Functions Documentation
function AffineBodyPrismaticJoint
uipc::constitution::AffineBodyPrismaticJoint::AffineBodyPrismaticJoint (
const Json & config=default_config()
)
function apply_to [1/3]
Deprecated: Apply prismatic joint to edges connecting affine bodies.
void uipc::constitution::AffineBodyPrismaticJoint::apply_to (
geometry::SimplicialComplex & edges,
span< SlotTuple > geo_slots,
Float strength_ratio=Float{100}
)
This method is deprecated. Use the new apply_to methods with instance IDs for multi-instance support.
Parameters:
edgesThe simplicial complex containing the edges representing the joints.geo_slotsPairs of geometry slots representing the connected bodies.strength_ratioThe strength ratio of the joint constraint (default: 100).
function apply_to [2/3]
Apply prismatic joint to edges connecting affine bodies (single-instance mode).
void uipc::constitution::AffineBodyPrismaticJoint::apply_to (
geometry::SimplicialComplex & edges,
span< S< geometry::SimplicialComplexSlot > > l_geo_slots,
span< S< geometry::SimplicialComplexSlot > > r_geo_slots,
Float strength_ratio=Float{100}
)
This method assumes each geometry has exactly one instance (instance 0). All joints use the same strength ratio.
Parameters:
edgesThe simplicial complex containing the edges representing the joints.l_geo_slotsLeft geometry slots for each joint.r_geo_slotsRight geometry slots for each joint.strength_ratioThe strength ratio of the joint constraint applied to all joints (default: 100).
function apply_to [3/3]
Apply prismatic joint to edges connecting affine bodies (multi-instance mode).
void uipc::constitution::AffineBodyPrismaticJoint::apply_to (
geometry::SimplicialComplex & edges,
span< S< geometry::SimplicialComplexSlot > > l_geo_slots,
span< IndexT > l_instance_id,
span< S< geometry::SimplicialComplexSlot > > r_geo_slots,
span< IndexT > r_instance_id,
span< Float > strength_ratio
)
This method supports geometries with multiple instances. Each joint can specify which instance of each geometry to connect, and can have its own strength ratio.
Parameters:
edgesThe simplicial complex containing the edges representing the joints.l_geo_slotsLeft geometry slots for each joint.l_instance_idInstance IDs for the left geometries (must be in range [0, instances().size())).r_geo_slotsRight geometry slots for each joint.r_instance_idInstance IDs for the right geometries (must be in range [0, instances().size())).strength_ratioThe strength ratio for each joint (one per edge).
function ~AffineBodyPrismaticJoint
Public Static Functions Documentation
function default_config
The documentation for this class was generated from the following file include/uipc/constitution/affine_body_prismatic_joint.h