OpenSceneGraph  3.4.0
Public Types | Public Member Functions | Protected Attributes
osgUtil::Intersector Class Reference

Pure virtual base class for implementing custom intersection technique. More...

Inheritance diagram for osgUtil::Intersector:
Inheritance graph
[legend]

List of all members.

Public Types

enum  CoordinateFrame { WINDOW, PROJECTION, VIEW, MODEL }
enum  IntersectionLimit { NO_LIMIT, LIMIT_ONE_PER_DRAWABLE, LIMIT_ONE, LIMIT_NEAREST }
enum  PrecisionHint { USE_DOUBLE_CALCULATIONS, USE_FLOAT_CALCULATIONS }
 Hint to precision used in the internal intersections calculations. More...

Public Member Functions

 Intersector (CoordinateFrame cf=MODEL, IntersectionLimit il=NO_LIMIT)
void setCoordinateFrame (CoordinateFrame cf)
CoordinateFrame getCoordinateFrame () const
void setIntersectionLimit (IntersectionLimit limit)
IntersectionLimit getIntersectionLimit () const
virtual Intersectorclone (osgUtil::IntersectionVisitor &iv)=0
virtual bool enter (const osg::Node &node)=0
virtual void leave ()=0
virtual void intersect (osgUtil::IntersectionVisitor &iv, osg::Drawable *drawable)=0
virtual void reset ()
virtual bool containsIntersections ()=0
bool disabled () const
void incrementDisabledCount ()
void decrementDisabledCount ()
bool reachedLimit ()
void setPrecisionHint (PrecisionHint hint)
 Set the hint to what precision to use in the intersections calculations.
PrecisionHint getPrecisionHint () const
 Get the hint to what precision should be used in the intersections calculations.

Protected Attributes

CoordinateFrame _coordinateFrame
IntersectionLimit _intersectionLimit
unsigned int _disabledCount
PrecisionHint _precisionHint

Detailed Description

Pure virtual base class for implementing custom intersection technique.

To implement a specific intersection technique on must override all the pure virtual methods, concrete examples of how to do this can be seen in the LineSegmentIntersector.


Member Enumeration Documentation

Enumerator:
WINDOW 
PROJECTION 
VIEW 
MODEL 
Enumerator:
NO_LIMIT 
LIMIT_ONE_PER_DRAWABLE 
LIMIT_ONE 
LIMIT_NEAREST 

Hint to precision used in the internal intersections calculations.

Enumerator:
USE_DOUBLE_CALCULATIONS 
USE_FLOAT_CALCULATIONS 

Constructor & Destructor Documentation


Member Function Documentation

virtual bool osgUtil::Intersector::containsIntersections ( ) [pure virtual]

References _disabledCount.

bool osgUtil::Intersector::disabled ( ) const [inline]

References _disabledCount.

virtual bool osgUtil::Intersector::enter ( const osg::Node node) [pure virtual]

References _coordinateFrame.

References _intersectionLimit.

Get the hint to what precision should be used in the intersections calculations.

References _precisionHint.

References _disabledCount.

virtual void osgUtil::Intersector::intersect ( osgUtil::IntersectionVisitor iv,
osg::Drawable drawable 
) [pure virtual]
virtual void osgUtil::Intersector::leave ( ) [pure virtual]
virtual void osgUtil::Intersector::reset ( ) [inline, virtual]

References _coordinateFrame.

References _intersectionLimit.

Set the hint to what precision to use in the intersections calculations.

References _precisionHint.


Member Data Documentation

unsigned int osgUtil::Intersector::_disabledCount [protected]

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

osg logo
Generated at Tue Dec 8 2015 00:14:31 for the OpenSceneGraph by doxygen 1.7.6.1.