Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvtraverser::Intersection Class Reference

Intersection class. More...

#include <RayIntersectTraverser.h>

Collaboration diagram for nvtraverser::Intersection:

Collaboration graph
[legend]
List of all members.

Public Methods

NVSG_API Intersection (const nvsg::Path *pPath, const nvsg::Drawable *pDrawable, const nvmath::Vec3f &isp, const float &dist)
 Contructor. More...

NVSG_API Intersection (const Intersection &rhs)
 Copy constructor. More...

virtual NVSG_API ~Intersection (void)
 Default destructor. More...

NVSG_API Intersection & operator= (const Intersection &rhs)
 Assignment operator. More...

NVSG_API const nvsg::PathgetPath () const
 Get the Path to the intersected drawable. More...

NVSG_API const nvsg::DrawablegetDrawable () const
 Get the intersected drawable. More...

NVSG_API const nvmath::Vec3fgetIsp () const
 Get the intersection point on the intersected drawable. More...

NVSG_API const float & getDist () const
 Get the distance from the ray origin to the intersection point. More...


Protected Methods

NVSG_API Intersection (void)
 Default contructor. More...

NVSG_API void clone (const Intersection &rhs)
 Clone the whole object. More...


Protected Attributes

const nvsg::Drawablem_pDrawable
 Intersected drawable. More...

const nvsg::Pathm_pPath
 Path to the intersected drawable. More...

nvmath::Vec3f m_isp
 Intersection point on the intersected drawable. More...

float m_dist
 Distance from the ray origin to the intersection point. More...


Detailed Description

Intersection class.

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.


Constructor & Destructor Documentation

nvtraverser::Intersection::Intersection const nvsg::Path   pPath,
const nvsg::Drawable   pDrawable,
const nvmath::Vec3f   isp,
const float &    dist
[inline]
 

Contructor.

This contructor creates an intersection object from the given data. It also performs an addRef() on the given path and drawable.

Parameters:
pPath  Path to the intersected drawable.
pDrawable  Intersected drawable.
isp  Intersection point on the drawable.
dist  Distance from the ray origin to the drawable.

nvtraverser::Intersection::Intersection const Intersection &    rhs [inline]
 

Copy constructor.

Creates a new Intersection object from the given one.

Parameters:
rhs  Intersection object to copy from.

nvtraverser::Intersection::~Intersection void    [inline, virtual]
 

Default destructor.

NVSG_API nvtraverser::Intersection::Intersection void    [inline, protected]
 

Default contructor.

The user has to use the other constructors!


Member Function Documentation

Intersection & nvtraverser::Intersection::operator= const Intersection &    rhs [inline]
 

Assignment operator.

const nvsg::Path * nvtraverser::Intersection::getPath   const [inline]
 

Get the Path to the intersected drawable.

Returns:
Path to the drawable.

const nvsg::Drawable * nvtraverser::Intersection::getDrawable   const [inline]
 

Get the intersected drawable.

Returns:
Intersected drawable.

const nvmath::Vec3f & nvtraverser::Intersection::getIsp   const [inline]
 

Get the intersection point on the intersected drawable.

Returns:
Intersection Point.

const float & nvtraverser::Intersection::getDist   const [inline]
 

Get the distance from the ray origin to the intersection point.

Returns:
Distance from ray origin to intersection point.

void nvtraverser::Intersection::clone const Intersection &    rhs [inline, protected]
 

Clone the whole object.

Use this, for example, for the copy constructor.

Parameters:
rhs  Object to clone.


Member Data Documentation

const nvsg::Drawable* nvtraverser::Intersection::m_pDrawable [protected]
 

Intersected drawable.

const nvsg::Path* nvtraverser::Intersection::m_pPath [protected]
 

Path to the intersected drawable.

nvmath::Vec3f nvtraverser::Intersection::m_isp [protected]
 

Intersection point on the intersected drawable.

float nvtraverser::Intersection::m_dist [protected]
 

Distance from the ray origin to the intersection point.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:39 2005 for NVSGSDK by NVIDIA