Skip to content

Class uipc::constitution::AffineBodyRevoluteJoint

ClassList > uipc > constitution > AffineBodyRevoluteJoint

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
AffineBodyRevoluteJoint (const Json & config=default_config())
void apply_to (geometry::SimplicialComplex & edges, span< SlotTuple > geo_slots, Float strength_ratio=Float{100})
Deprecated: Apply revolute 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 revolute 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 revolute joint to edges connecting affine bodies (multi-instance mode).
virtual ~AffineBodyRevoluteJoint ()

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::AffineBodyRevoluteJoint::SlotTuple =  std::tuple<S<geometry::SimplicialComplexSlot>, S<geometry::SimplicialComplexSlot> >;

Public Functions Documentation

function AffineBodyRevoluteJoint

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

function apply_to [1/3]

Deprecated: Apply revolute joint to edges connecting affine bodies.

void uipc::constitution::AffineBodyRevoluteJoint::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:

  • edges The simplicial complex containing the edges representing the joints.
  • geo_slots Pairs of geometry slots representing the connected bodies.
  • strength_ratio The strength ratio of the joint constraint (default: 100).

function apply_to [2/3]

Apply revolute joint to edges connecting affine bodies (single-instance mode).

void uipc::constitution::AffineBodyRevoluteJoint::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:

  • edges The simplicial complex containing the edges representing the joints.
  • l_geo_slots Left geometry slots for each joint.
  • r_geo_slots Right geometry slots for each joint.
  • strength_ratio The strength ratio of the joint constraint applied to all joints (default: 100).

function apply_to [3/3]

Apply revolute joint to edges connecting affine bodies (multi-instance mode).

void uipc::constitution::AffineBodyRevoluteJoint::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:

  • edges The simplicial complex containing the edges representing the joints.
  • l_geo_slots Left geometry slots for each joint.
  • l_instance_id Instance IDs for the left geometries (must be in range [0, instances().size())).
  • r_geo_slots Right geometry slots for each joint.
  • r_instance_id Instance IDs for the right geometries (must be in range [0, instances().size())).
  • strength_ratio The strength ratio for each joint (one per edge).

function ~AffineBodyRevoluteJoint

virtual uipc::constitution::AffineBodyRevoluteJoint::~AffineBodyRevoluteJoint () 

Public Static Functions Documentation

function default_config

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


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