version 3.3

VRS::IntersectionInfo Class Reference

An IntersectionInfo is the result of an Ray Request It contains a variety of information concerning the shape that was hit by a ray. More...

#include <vrs/intersectioninfo.h>

Inheritance diagram for VRS::IntersectionInfo:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 VRS_TYPEINFO (IntersectionInfo, SharedObj)
 VRS_SERIALIZABLE (IntersectionInfo)
 IntersectionInfo (SO< Shape > shape, const Vector &point, const Vector &normal, const Ray &ray, const Matrix &modelview, const Matrix &orientation, const Matrix &projection, int hint=0, unsigned int instanceInfo=0, UINT32 id=0)
void setShape (SO< Shape > hitShape)
SO< ShapegetShape () const
 Get/set the intersected shape.
void setPoint (const Vector &)
Vector getPoint () const
 Get/set the intersection point.
void setNormal (const Vector &)
Vector getNormal () const
 Get/set the normal at the intersection point.
void setRay (const Ray &ray)
Ray getRay () const
 Get/set the ray used for the intersection in the object's coord system.
void setInstanceInfo (unsigned int instanceInfo)
unsigned int instanceInfo () const
 Get/set the instance info for shapes that do support instanceing (e.g. PolygonSet and MappedVertexAttributeShapeGL).
void setID (UINT32 id)
UINT32 getID () const
 Get/set the ID for shapes that support per vertex IDs (PolygonSet and MappedVertexAttributeShapeGL).
void setModelviewMatrix (const Matrix &)
Matrix getModelviewMatrix () const
Matrix getInverseModelviewMatrix () const
 Get/set the modelview matrix that was applied to the shape.
void setOrientationMatrix (const Matrix &)
Matrix getOrientationMatrix () const
Matrix getInverseOrientationMatrix () const
 Get/set the orientation matrix that was applied to the shape.
void setProjectionMatrix (const Matrix &)
Matrix getProjectionMatrix () const
Matrix getInverseProjectionMatrix () const
 Get/set the projection matrix that was applied to the shape.
void setHint (int hint)
int getHint () const
 Get/set the hint.

Protected Member Functions

 IntersectionInfo ()


Detailed Description

An IntersectionInfo is the result of an Ray Request It contains a variety of information concerning the shape that was hit by a ray.

Shape, hit point in object coordinates, normal in object coordinates the ray, which caused th intersection, and the matrices are always contained. Hint, instanceInfo and id are only contained if a shape is hit that supports this kind of data (at the moment PolygonSet and MappedVertexAttributeShapeGL). The hint for a PolygonSet consisting of a single range of triangles is the triangle number, otherwise the range number as before. The id can be passed as idIterator per Vertex for appropriate shapes.


Constructor & Destructor Documentation

VRS::IntersectionInfo::IntersectionInfo ( SO< Shape shape,
const Vector point,
const Vector normal,
const Ray ray,
const Matrix modelview,
const Matrix orientation,
const Matrix projection,
int  hint = 0,
unsigned int  instanceInfo = 0,
UINT32  id = 0 
)

VRS::IntersectionInfo::IntersectionInfo (  )  [protected]


Member Function Documentation

VRS::IntersectionInfo::VRS_TYPEINFO ( IntersectionInfo  ,
SharedObj   
)

VRS::IntersectionInfo::VRS_SERIALIZABLE ( IntersectionInfo   ) 

void VRS::IntersectionInfo::setShape ( SO< Shape hitShape  )  [inline]

SO< Shape > VRS::IntersectionInfo::getShape (  )  const [inline]

Get/set the intersected shape.

void VRS::IntersectionInfo::setPoint ( const Vector p  )  [inline]

Vector VRS::IntersectionInfo::getPoint (  )  const [inline]

Get/set the intersection point.

void VRS::IntersectionInfo::setNormal ( const Vector n  )  [inline]

Vector VRS::IntersectionInfo::getNormal (  )  const [inline]

Get/set the normal at the intersection point.

void VRS::IntersectionInfo::setRay ( const Ray ray  )  [inline]

Ray VRS::IntersectionInfo::getRay (  )  const [inline]

Get/set the ray used for the intersection in the object's coord system.

void VRS::IntersectionInfo::setInstanceInfo ( unsigned int  instanceInfo  )  [inline]

unsigned int VRS::IntersectionInfo::instanceInfo (  )  const [inline]

Get/set the instance info for shapes that do support instanceing (e.g. PolygonSet and MappedVertexAttributeShapeGL).

void VRS::IntersectionInfo::setID ( UINT32  id  )  [inline]

UINT32 VRS::IntersectionInfo::getID (  )  const [inline]

Get/set the ID for shapes that support per vertex IDs (PolygonSet and MappedVertexAttributeShapeGL).

void VRS::IntersectionInfo::setModelviewMatrix ( const Matrix m  )  [inline]

Matrix VRS::IntersectionInfo::getModelviewMatrix (  )  const [inline]

Matrix VRS::IntersectionInfo::getInverseModelviewMatrix (  )  const

Get/set the modelview matrix that was applied to the shape.

void VRS::IntersectionInfo::setOrientationMatrix ( const Matrix m  )  [inline]

Matrix VRS::IntersectionInfo::getOrientationMatrix (  )  const [inline]

Matrix VRS::IntersectionInfo::getInverseOrientationMatrix (  )  const

Get/set the orientation matrix that was applied to the shape.

void VRS::IntersectionInfo::setProjectionMatrix ( const Matrix m  )  [inline]

Matrix VRS::IntersectionInfo::getProjectionMatrix (  )  const [inline]

Matrix VRS::IntersectionInfo::getInverseProjectionMatrix (  )  const

Get/set the projection matrix that was applied to the shape.

void VRS::IntersectionInfo::setHint ( int  hint  )  [inline]

int VRS::IntersectionInfo::getHint (  )  const [inline]

Get/set the hint.


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

Generated on Mon May 20 06:00:26 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact