Simulation Handles

This page documents the core handle classes used in the simulation system, including both object handles (e.g., soft bodies and rigid bodies) and constraint handles (e.g., joints). These handles encapsulate metadata, indexing information, and linkage between simulated entities, and serve as essential interfaces for constructing and managing simulation scenes.

class warp_ipc.utils.constants.BodyType(value)

Bases: Enum

An enumeration.

AFFINE = 2
SOFT_SHELL_LIKE = 0
SOFT_VOLUMETRIC = 1
class warp_ipc.body_handle.TriMeshBodyHandle(x_num: int, x_offset: int, surf_x_num: int, surf_x_offset_num: int, surf_tri_num: int, surf_tri_offset: int, surf_edge_num: int, surf_edge_offset: int, flipped: bool, is_closed: bool, is_affine: bool, body_type: BodyType, ABD_center: ndarray[Any, dtype[_ScalarType_co]], body_index: int, E: float, mu: float, nu: float, xi: float, volume: float | None = None, mass: float | None = None, wp_mesh: Mesh | None = None)

Bases: object

ABD_center: ndarray[Any, dtype[_ScalarType_co]]
E: float
body_index: int
body_type: BodyType
flipped: bool
is_affine: bool
is_closed: bool
mass: float | None
mu: float
nu: float
surf_edge_num: int
surf_edge_offset: int
surf_tri_num: int
surf_tri_offset: int
surf_x_num: int
surf_x_offset_num: int
volume: float | None
wp_mesh: Mesh | None
x_num: int
x_offset: int
xi: float
class warp_ipc.body_handle.TetMeshBodyHandle(surf_handle: TriMeshBodyHandle, tets_num: int, tets_offset: int)

Bases: object

property ABD_center
property body_index
property body_type
property is_affine
property mass
surf_handle: TriMeshBodyHandle
property surf_tri_num
property surf_tri_offset
tets_num: int
tets_offset: int
property volume
property x_num
property x_offset
warp_ipc.body_handle.BodyHandle

alias of TetMeshBodyHandle | TriMeshBodyHandle

class warp_ipc.joint_handle.JointType(value)

Bases: Enum

An enumeration.

BEZIER = 3
HELICAL = 2
PRISMATIC = 1
REVOLUTE = 0
class warp_ipc.joint_handle.WorldJointHandle(body_handle: TetMeshBodyHandle | TriMeshBodyHandle, joint_type: JointType)

Bases: object

body_handle: TetMeshBodyHandle | TriMeshBodyHandle
joint_type: JointType
class warp_ipc.joint_handle.LocalJointHandle(parent_handle: TetMeshBodyHandle | TriMeshBodyHandle, child_handle: TetMeshBodyHandle | TriMeshBodyHandle, joint_type: JointType, joint_origin_transform: ndarray[Any, dtype[_ScalarType_co]], joint_axis: ndarray[Any, dtype[_ScalarType_co]])

Bases: object

child_handle: TetMeshBodyHandle | TriMeshBodyHandle
joint_axis: ndarray[Any, dtype[_ScalarType_co]]
joint_origin_transform: ndarray[Any, dtype[_ScalarType_co]]
joint_type: JointType
parent_handle: TetMeshBodyHandle | TriMeshBodyHandle