raisim::CollisionDefinition
struct · #include <raisim/object/ArticulatedSystem/JointAndBodies.hpp>
collision definition that is stored in Articulated System (see ArticulatedSystem::getCollisionBodies()). CollisionBody stores how the collision body should be displayed as well. This only stores physics part
Constructors & destructor
CollisionDefinition
CollisionDefinition(
const raisim::Mat<3, 3> &rotOffsetI,
const raisim::Vec<3> &posOffsetI,
size_t localIdxI,
std::string nameI)Parameters
| Parameter | Description |
|---|---|
rotOffsetI (in) | orientation offset relative to the body frame |
posOffsetI (in) | position offset in the body frame [m] |
localIdxI (in) | body index |
nameI (in) | collision body name |
Public member functions
setMaterial
void setMaterial(const std::string &material)Set the contact material (see World::setMaterialPairProp()).
Parameters
| Parameter | Description |
|---|---|
material (in) | material name |
getMaterial
const std::string &getMaterial()Returns the contact material name
getCollisionBody
CollisionBodyHandleConstPtr getCollisionBody() constReturns pointer to the collision body (owned by this definition)
CollisionBodyHandlePtr getCollisionBody()Returns pointer to the collision body (owned by this definition)
setCollisionGroup
void setCollisionGroup(CollisionGroup group)Parameters
| Parameter | Description |
|---|---|
group (in) | collision group bits of this body |
setCollisionMask
void setCollisionMask(CollisionGroup mask)Parameters
| Parameter | Description |
|---|---|
mask (in) | collision mask bits (groups this body can collide with) |
getCollisionGroup
CollisionGroup getCollisionGroup() constReturns collision group bits
getCollisionMask
CollisionGroup getCollisionMask() constReturns collision mask bits
Public attributes
rotOffset
raisim::Mat<3, 3> rotOffsetRotation offset from the body frame to the collision frame.
posOffset
raisim::Vec<3> posOffsetPosition offset from the body frame to the collision frame, expressed in the body frame [m].
localIdx
size_t localIdxBody index within the articulated system.
colBody
CollisionBodyHandle colBodyCollision body handle for this definition.
shape
Shape::Type shapeShape type for the collision geometry.
shapeParam
raisim::Vec<4> shapeParamShape parameters [m]: box {x, y, z} (full lengths), sphere {radius}, cylinder/capsule {radius, length}.
scale
raisim::Vec<3> scalePer-axis scale (used for mesh shapes).
meshIndex
int meshIndexInternal: mesh index into the articulated system mesh list (-1 for primitives).