14#ifndef OSGUTIL_INTERSECTIONVISITOR
15#define OSGUTIL_INTERSECTIONVISITOR 1
27class IntersectionVisitor;
Vec3f Vec3
Definition Vec3:21
RefMatrixd RefMatrix
Definition Matrix:28
The osgUtil library provides general purpose utility classes such as update, cull and draw traverses,...
Definition NodeVisitor:25
Billboard is a derived form of Geode that orients its osg::Drawable children to face the eye point.
Definition Billboard:27
Camera - is a subclass of Transform which represents encapsulates the settings of a Camera.
Definition Camera:45
Pure virtual base class for drawable geometry.
Definition Drawable:89
A Geode is a "geometry node", that is, a leaf node on the scene graph that can have "renderable thing...
Definition Geode:29
General group node which maintains a list of children.
Definition Group:29
LOD - Level Of Detail group node which allows switching between children depending on distance from e...
Definition LOD:36
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
PagedLOD.
Definition PagedLOD:24
Projection nodes set up the frustum/orthographic projection used when rendering the scene.
Definition Projection:25
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Base class for providing reference counted objects.
Definition Referenced:44
A Transform is a group node for which all children are transformed by a 4x4 matrix.
Definition Transform:75
Encapsulate OpenGL glViewport.
Definition Viewport:24
const osg::Matrix computeWindowMatrix() const
Compute the Window Matrix which takes projected coords into Window coordinates.
Definition Viewport:129
Pure virtual base class for implementing custom intersection technique.
Definition IntersectionVisitor:34
bool reachedLimit()
Definition IntersectionVisitor:85
virtual Intersector * clone(osgUtil::IntersectionVisitor &iv)=0
virtual void reset()
Definition IntersectionVisitor:75
CoordinateFrame _coordinateFrame
Definition IntersectionVisitor:102
virtual void intersect(osgUtil::IntersectionVisitor &iv, osg::Drawable *drawable)=0
void incrementDisabledCount()
Definition IntersectionVisitor:81
virtual bool containsIntersections()=0
IntersectionLimit
Definition IntersectionVisitor:46
@ NO_LIMIT
Definition IntersectionVisitor:47
@ LIMIT_ONE
Definition IntersectionVisitor:49
@ LIMIT_ONE_PER_DRAWABLE
Definition IntersectionVisitor:48
@ LIMIT_NEAREST
Definition IntersectionVisitor:50
unsigned int _disabledCount
Definition IntersectionVisitor:104
void setCoordinateFrame(CoordinateFrame cf)
Definition IntersectionVisitor:59
PrecisionHint
Hint to precision used in the internal intersections calculations.
Definition IntersectionVisitor:89
@ USE_FLOAT_CALCULATIONS
Definition IntersectionVisitor:91
@ USE_DOUBLE_CALCULATIONS
Definition IntersectionVisitor:90
bool disabled() const
Definition IntersectionVisitor:79
CoordinateFrame
Definition IntersectionVisitor:38
@ WINDOW
Definition IntersectionVisitor:39
@ MODEL
Definition IntersectionVisitor:42
@ VIEW
Definition IntersectionVisitor:41
@ PROJECTION
Definition IntersectionVisitor:40
void decrementDisabledCount()
Definition IntersectionVisitor:83
IntersectionLimit _intersectionLimit
Definition IntersectionVisitor:103
CoordinateFrame getCoordinateFrame() const
Definition IntersectionVisitor:61
virtual bool enter(const osg::Node &node)=0
PrecisionHint getPrecisionHint() const
Get the hint to what precision should be used in the intersections calculations.
Definition IntersectionVisitor:98
IntersectionLimit getIntersectionLimit() const
Definition IntersectionVisitor:65
void setPrecisionHint(PrecisionHint hint)
Set the hint to what precision to use in the intersections calculations.
Definition IntersectionVisitor:95
PrecisionHint _precisionHint
Definition IntersectionVisitor:105
void setIntersectionLimit(IntersectionLimit limit)
Definition IntersectionVisitor:63
Intersector(CoordinateFrame cf=MODEL, IntersectionLimit il=NO_LIMIT)
Definition IntersectionVisitor:53
virtual void intersect(osgUtil::IntersectionVisitor &iv, osg::Drawable *drawable)
virtual Intersector * clone(osgUtil::IntersectionVisitor &iv)
std::vector< osg::ref_ptr< Intersector > > Intersectors
Definition IntersectionVisitor:120
Intersectors _intersectors
Definition IntersectionVisitor:144
Intersectors & getIntersectors()
Get the list of intersector.
Definition IntersectionVisitor:123
void addIntersector(Intersector *intersector)
Add an Intersector.
virtual bool containsIntersections()
virtual bool enter(const osg::Node &node)
void clear()
Clear the list of intersectors.
IntersectionVisitor is used to testing for intersections with the scene, traversing the scene using g...
Definition IntersectionVisitor:152
osg::Vec3 _referenceEyePoint
Definition IntersectionVisitor:300
void setReadCallback(ReadCallback *rc)
Set the read callback.
Definition IntersectionVisitor:202
virtual void apply(osg::Projection &projection)
LODSelectionMode getLODSelectionMode() const
Get the LOD selection scheme.
Definition IntersectionVisitor:259
MatrixStack _modelStack
Definition IntersectionVisitor:298
void popWindowMatrix()
Definition IntersectionVisitor:213
void setLODSelectionMode(LODSelectionMode mode)
Set the LOD selection scheme.
Definition IntersectionVisitor:256
virtual void apply(osg::Node &node)
virtual void apply(osg::Transform &transform)
void popProjectionMatrix()
Definition IntersectionVisitor:218
virtual void apply(osg::Geode &geode)
void popModelMatrix()
Definition IntersectionVisitor:228
virtual void reset()
Method to call to reset visitor.
MatrixStack _viewStack
Definition IntersectionVisitor:297
bool getDoDummyTraversal() const
Definition IntersectionVisitor:198
osg::RefMatrix * getViewMatrix()
Definition IntersectionVisitor:224
virtual void apply(osg::Camera &camera)
void pushViewMatrix(osg::RefMatrix *matrix)
Definition IntersectionVisitor:222
LODSelectionMode _lodSelectionMode
Definition IntersectionVisitor:302
Intersector::CoordinateFrame getReferenceEyePointCoordinateFrame() const
Get the coordinate frame of the reference eye point.
Definition IntersectionVisitor:243
virtual void apply(osg::PagedLOD &lod)
bool _useKdTreesWhenAvailable
Definition IntersectionVisitor:289
Intersector * getIntersector()
Get the intersector that will be used to intersect with the scene, and to store any hits that occur.
Definition IntersectionVisitor:185
void push_clone()
Definition IntersectionVisitor:283
virtual void apply(osg::Billboard &geode)
MatrixStack _windowStack
Definition IntersectionVisitor:295
Intersector::CoordinateFrame _referenceEyePointCoordinateFrame
Definition IntersectionVisitor:301
void leave()
Definition IntersectionVisitor:281
osg::Vec3 _eyePoint
Definition IntersectionVisitor:305
bool _eyePointDirty
Definition IntersectionVisitor:304
std::list< osg::ref_ptr< osg::RefMatrix > > MatrixStack
Definition IntersectionVisitor:294
virtual osg::Vec3 getEyePoint() const
Get the eye point in the local coordinate frame a given traversal point.
osg::RefMatrix * getModelMatrix()
Definition IntersectionVisitor:229
void pushProjectionMatrix(osg::RefMatrix *matrix)
Definition IntersectionVisitor:217
ReadCallback * getReadCallback()
Get the read callback.
Definition IntersectionVisitor:205
virtual void apply(osg::Group &group)
bool getUseKdTreeWhenAvailable() const
Set whether the intersectors should use KdTrees.
Definition IntersectionVisitor:195
osg::RefMatrix * getProjectionMatrix()
Definition IntersectionVisitor:219
void pushWindowMatrix(osg::Viewport *viewport)
Definition IntersectionVisitor:212
virtual void apply(osg::LOD &lod)
void setUseKdTreeWhenAvailable(bool useKdTrees)
Set whether the intersectors should use KdTrees when they are found on the scene graph.
Definition IntersectionVisitor:192
osg::ref_ptr< ReadCallback > _readCallback
Definition IntersectionVisitor:292
const osg::Vec3 & getReferenceEyePoint() const
Get the reference eye point.
Definition IntersectionVisitor:237
const Intersector * getIntersector() const
Get the const intersector that will be used to intersect with the scene, and to store any hits that o...
Definition IntersectionVisitor:188
const osg::RefMatrix * getWindowMatrix() const
Definition IntersectionVisitor:215
void setIntersector(Intersector *intersector)
Set the intersector that will be used to intersect with the scene, and to store any hits that occur.
const osg::RefMatrix * getProjectionMatrix() const
Definition IntersectionVisitor:220
META_NodeVisitor(osgUtil, IntersectionVisitor) virtual osgUtil
Convert 'this' into a osgUtil::IntersectionVisitor pointer if Object is a IntersectionVisitor,...
Definition IntersectionVisitor:168
virtual void apply(osg::Drawable &drawable)
MatrixStack _projectionStack
Definition IntersectionVisitor:296
bool _dummyTraversal
Definition IntersectionVisitor:290
const ReadCallback * getReadCallback() const
Get the const read callback.
Definition IntersectionVisitor:208
void setReferenceEyePointCoordinateFrame(Intersector::CoordinateFrame cf)
Set the coordinate frame of the reference eye point.
Definition IntersectionVisitor:240
void pushWindowMatrix(osg::RefMatrix *matrix)
Definition IntersectionVisitor:211
void pushModelMatrix(osg::RefMatrix *matrix)
Definition IntersectionVisitor:227
const osg::RefMatrix * getViewMatrix() const
Definition IntersectionVisitor:225
void pop_clone()
Definition IntersectionVisitor:284
void setDoDummyTraversal(bool dummy)
Definition IntersectionVisitor:197
LODSelectionMode
Definition IntersectionVisitor:250
@ USE_HIGHEST_LEVEL_OF_DETAIL
Definition IntersectionVisitor:251
@ USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION
Definition IntersectionVisitor:252
bool enter(const osg::Node &node)
Definition IntersectionVisitor:280
std::list< osg::ref_ptr< Intersector > > IntersectorStack
Definition IntersectionVisitor:286
IntersectionVisitor(Intersector *intersector=0, ReadCallback *readCallback=0)
osg::RefMatrix * getWindowMatrix()
Definition IntersectionVisitor:214
void intersect(osg::Drawable *drawable)
Definition IntersectionVisitor:282
void setReferenceEyePoint(const osg::Vec3 &ep)
Set the reference eye point that is used for nodes that require an eye point to position themselves,...
Definition IntersectionVisitor:234
virtual const osgUtil::IntersectionVisitor * asIntersectionVisitor() const
convert 'const this' into a const osgUtil::IntersectionVisitor pointer if Object is a IntersectionVis...
Definition IntersectionVisitor:176
void popViewMatrix()
Definition IntersectionVisitor:223
const osg::RefMatrix * getModelMatrix() const
Definition IntersectionVisitor:230
IntersectorStack _intersectorStack
Definition IntersectionVisitor:287
virtual float getDistanceToEyePoint(const osg::Vec3 &pos, bool withLODScale) const
Get the distance from a point to the eye point, distance value in local coordinate system.
Callback used to implement the reading of external files, allowing support for paged databases to be ...
Definition IntersectionVisitor:161
virtual osg::ref_ptr< osg::Node > readNodeFile(const std::string &filename)=0
#define OSGUTIL_EXPORT
Definition Export:40