public

Inheritance Graph

graph BT
	RayCaster
	click RayCaster "classMinSG_1_1RayCasting_1_1RayCaster"

Description

Class to perform ray casting.

Public Types

   
   
typedef std::pair< GeometryNode *, value_t > intersection_t
   
typedef std::vector< intersection_t > intersection_packet_t
   
typedef Geometry::_Vec3 < value_t > vec_t
   
typedef Geometry::_Ray < vec_t > ray_t

Public Static Functions

   
   
intersection_packet_t castRays( GroupNode * scene, const std::vector< ray_t > & rays)
   
intersection_packet_t castRays( GeometryNode * geoNode, const std::vector< ray_t > & rays)

Documentation

typedef
MinSG::RayCasting::RayCaster::intersection_t

public
 
 
typedef std::pair< GeometryNode *, value_t > intersection_t

Defined in MinSG/Ext/RayCasting/RayCaster.h:34


typedef
MinSG::RayCasting::RayCaster::intersection_packet_t

public
 
 
typedef std::vector< intersection_t > intersection_packet_t

Defined in MinSG/Ext/RayCasting/RayCaster.h:35


typedef
MinSG::RayCasting::RayCaster::vec_t

public
 
 
typedef Geometry::_Vec3 < value_t > vec_t

Defined in MinSG/Ext/RayCasting/RayCaster.h:37


typedef
MinSG::RayCasting::RayCaster::ray_t

public
 
 
typedef Geometry::_Ray < vec_t > ray_t

Defined in MinSG/Ext/RayCasting/RayCaster.h:38


function
MinSG::RayCasting::RayCaster::castRays

public static
     
     
intersection_packet_t castRays( GroupNode * scene,
  const std::vector< ray_t > & rays
)    

Cast a packet of rays against a scene and return the first objects that are hit together with the intersection distance.

Parameters

scene
Root node of the scene that will be used for casting
rays
Array of rays, given in the world coordinate system

Returns

Array of intersection results. Each result contains the first object that is hit by the ray, ornullptrif no object is hit, as first entry. The intersection value for the point where an object is hit is stored in the second entry of the result.

Defined in MinSG/Ext/RayCasting/RayCaster.h:51


function
MinSG::RayCasting::RayCaster::castRays

public static
     
     
intersection_packet_t castRays( GeometryNode * geoNode,
  const std::vector< ray_t > & rays
)    

Cast a packet of rays against a single object and check if the object is hit.

Parameters

scene
Root node of the scene that will be used for casting
rays
Array of rays, given in the world coordinate system

Returns

Array of intersection results. Each result contains the object if it is hit by the ray, ornullptrif it is not hit, as first entry. The intersection value for the point where the object is hit is stored in the second entry of the result.

Defined in MinSG/Ext/RayCasting/RayCaster.h:65