#include <RayIntersectTraverser.h>
Collaboration diagram for nvtraverser::Intersection:
Public Member Functions | |
NVSG_API | Intersection (const nvsg::Path *pPath, const nvsg::Drawable *pDrawable, const nvmath::Vec3f &isp, const float &dist) |
Contructor. | |
NVSG_API | Intersection (const Intersection &rhs) |
Copy constructor. | |
virtual NVSG_API | ~Intersection (void) |
Default destructor. | |
NVSG_API Intersection & | operator= (const Intersection &rhs) |
Assignment operator. | |
NVSG_API const nvsg::Path * | getPath () const |
Get the Path to the intersected drawable. | |
NVSG_API const nvsg::Drawable * | getDrawable () const |
Get the intersected drawable. | |
NVSG_API const nvmath::Vec3f & | getIsp () const |
Get the intersection point on the intersected drawable. | |
NVSG_API const float & | getDist () const |
Get the distance from the ray origin to the intersection point. | |
Protected Member Functions | |
NVSG_API | Intersection (void) |
Default contructor. | |
NVSG_API void | clone (const Intersection &rhs) |
Clone the whole object. | |
Protected Attributes | |
const nvsg::Drawable * | m_pDrawable |
Intersected drawable. | |
const nvsg::Path * | m_pPath |
Path to the intersected drawable. | |
nvmath::Vec3f | m_isp |
Intersection point on the intersected drawable. | |
float | m_dist |
Distance from the ray origin to the intersection point. |
This class is used to store intersection results generated by the RayIntersectTraverser. It should only be used with classes derived from RayIntersectTraveser because some information like the distance makes sense only when knowing the ray data.
|
Contructor. This contructor creates an intersection object from the given data. It also performs an addRef() on the given path and drawable.
|
|
Copy constructor. Creates a new Intersection object from the given one.
|
|
Default destructor.
|
|
Default contructor. The user has to use the other constructors! |
|
Assignment operator.
|
|
Get the Path to the intersected drawable.
|
|
Get the intersected drawable.
|
|
Get the intersection point on the intersected drawable.
|
|
Get the distance from the ray origin to the intersection point.
|
|
Clone the whole object. Use this, for example, for the copy constructor.
|
|
Intersected drawable.
|
|
Path to the intersected drawable.
|
|
Intersection point on the intersected drawable.
|
|
Distance from the ray origin to the intersection point.
|