Skip to content

raisim::World::SensorRayHit ​

struct · #include <raisim/World.hpp>

Surface found by rayTestSensor().

Public attributes ​

position ​

cpp
Vec<3> position

World-frame hit position (m).

normal ​

cpp
Vec<3> normal

World-frame unit surface normal, facing the start of the ray.

distance ​

cpp
double distance

Distance from the start of the ray (m).

cosIncidence ​

cpp
double cosIncidence

Absolute cosine of the angle between the ray and the normal.

object ​

cpp
const Object *object

Object hit.

localIdx ​

cpp
size_t localIdx

Local body index of the body hit within the object (0 for single bodies).

material ​

cpp
SensorMaterialProperties material

Sensor material of the surface.

returns ​

cpp
bool returns

False at a surface that ends the ray without a return (a mirror outside the glint angle).

RaiSim — physics for robotics and AI.