raisim::ProjectileHit
struct · #include <raisim/Explosion.hpp>
A projectile striking an object.
Public attributes
id
cpp
size_t idIncreasing identifier, unique within the world.
projectileId
cpp
size_t projectileIdIdentifier of the projectile.
objectIndex
cpp
size_t objectIndexWorld index of the object hit (Object::getIndexInWorld() when it happened).
localIdx
cpp
size_t localIdxLocal body index of the body hit within that object.
position
cpp
Vec<3> positionPoint of impact in the world frame (m).
normal
cpp
Vec<3> normalSurface normal at the point of impact, pointing toward the side the projectile came from.
velocity
cpp
Vec<3> velocityVelocity of the projectile at impact (m/s).
mass
cpp
double massMass of the projectile (kg).
time
cpp
double timeWorld time of the impact (s).
detonated
cpp
bool detonatedThe projectile detonated there.