RobWorkProject  23.9.11-
Classes | Public Types | Public Member Functions | List of all members
Raycaster Class Reference

a raycast implementation that relies on a collision strategy for finding the collision between the ray and the scene. More...

#include <Raycaster.hpp>

Classes

struct  QueryResult
 result of a Raycast query. All contact information are described in ray coordinate frame. More...
 

Public Types

enum  QueryType { CLOSEST_HIT , ALL_HITS }
 result structure of ray cast
 

Public Member Functions

 Raycaster (double ray_length=100.0)
 constructor - only the frames in the vector are tested against each other.
 
 Raycaster (rw::proximity::CollisionStrategy::Ptr cdstrategy, double ray_length=100.0)
 constructor - only the frames in the vector are tested against each other.
 
virtual ~Raycaster ()
 destructor
 
void setRayFrame (rw::core::Ptr< rw::kinematics::Frame > rayframe)
 
void add (rw::core::Ptr< rw::geometry::Geometry > geom)
 
void add (rw::core::Ptr< rw::models::Object > object)
 
void add (rw::core::Ptr< rw::models::WorkCell > wc)
 
bool shoot (const rw::math::Vector3D< double > &pos, const rw::math::Vector3D< double > &direction, QueryResult &result, const rw::kinematics::State &state)
 shoots a ray in the direction of the vector direction starting from the position vector pos. The frame associated with the geometry that is hit first by the ray is returned along with the intersection point described in world frame.
 
void setCalculateNormals (bool enabled)
 set to true if normals should also be calculated More...
 

Detailed Description

a raycast implementation that relies on a collision strategy for finding the collision between the ray and the scene.

Member Function Documentation

◆ setCalculateNormals()

void setCalculateNormals ( bool  enabled)
inline

set to true if normals should also be calculated

Parameters
enabled

The documentation for this class was generated from the following file: