distance3d.hydroelastic_contact.RigidBody¶
- class distance3d.hydroelastic_contact.RigidBody(body2origin, vertices, tetrahedra, potentials, youngs_modulus=1.0)[source]¶
Rigid body represented by tetrahedral mesh.
- Parameters:
- body2originarray, shape (4, 4)
Pose of the mesh.
- verticesarray, shape (n_vertices, 3)
Vertices of the mesh.
- tetrahedraarray, shape (n_tetrahedra, 4)
Indices of vertices that form tetrahedra of the mesh.
- potentialsarray, shape (n_vertices,)
Potential of each vertex. Shortest distance to surface.
- youngs_modulusfloat, optional (default: 1.0)
The stiffness of the material the rigidbody is made out of.
- Attributes:
aabb_tree
The aabb_tree for broad phase collision detection
aabbs
The aabbs for broad phase collision detection
artist_
The artist to visualize the rigid body as a wireframe.
com
Center of mass.
tetrahedra_points
All points of all tetrahedra in body frame.
tetrahedra_potentials
Potentials of tetrahedra.
youngs_modulus
Get the young’s modulus of the Object.
Methods
aabb
()The aabb of the rigidbody
express_in
(new_body2origin)Express tetrahedral meshes in another frame.
make_artist
([c])Creates a new artist.
make_box
(box2origin, size)Create box.
make_capsule
(capsule2origin, radius, height)Create capsule.
make_cube
(cube2origin, size)Create cube.
make_cylinder
(cylinder2origin, radius, length)Create cylinder.
make_ellipsoid
(ellipsoid2origin, radii[, order])Create ellipsoid.
make_sphere
(center, radius[, order])Create sphere.
update_pose
(body2origin)Set new pose.
Methods
__init__
(body2origin, vertices, tetrahedra, ...)aabb
()The aabb of the rigidbody
express_in
(new_body2origin)Express tetrahedral meshes in another frame.
make_artist
([c])Creates a new artist.
make_box
(box2origin, size)Create box.
make_capsule
(capsule2origin, radius, height)Create capsule.
make_cube
(cube2origin, size)Create cube.
make_cylinder
(cylinder2origin, radius, length)Create cylinder.
make_ellipsoid
(ellipsoid2origin, radii[, order])Create ellipsoid.
make_sphere
(center, radius[, order])Create sphere.
update_pose
(body2origin)Set new pose.
Attributes
aabb_tree
The aabb_tree for broad phase collision detection
aabbs
The aabbs for broad phase collision detection
artist_
The artist to visualize the rigid body as a wireframe.
com
Center of mass.
tetrahedra_points
All points of all tetrahedra in body frame.
tetrahedra_potentials
Potentials of tetrahedra.
youngs_modulus
Get the young's modulus of the Object.