14#ifndef OSGUTIL_INTERSECTIONVISITOR
15#define OSGUTIL_INTERSECTIONVISITOR 1
27class IntersectionVisitor;
252 USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION
280 inline bool enter(
const osg::Node& node) {
return _intersectorStack.empty() ? false : _intersectorStack.back()->enter(node); }
281 inline void leave() { _intersectorStack.back()->leave(); }
283 inline void push_clone() { _intersectorStack.push_back ( _intersectorStack.front()->clone(*
this) ); }
284 inline void pop_clone() {
if (_intersectorStack.size()>=2) _intersectorStack.pop_back(); }
Definition IntersectionVisitor:152
osg::Vec3 _referenceEyePoint
Definition IntersectionVisitor:300
void setReadCallback(ReadCallback *rc)
Definition IntersectionVisitor:202
virtual void apply(osg::Projection &projection)
LODSelectionMode getLODSelectionMode() const
Definition IntersectionVisitor:259
MatrixStack _modelStack
Definition IntersectionVisitor:298
void popWindowMatrix()
Definition IntersectionVisitor:213
void setLODSelectionMode(LODSelectionMode mode)
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
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
Definition IntersectionVisitor:243
virtual void apply(osg::PagedLOD &lod)
bool _useKdTreesWhenAvailable
Definition IntersectionVisitor:289
Intersector * getIntersector()
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
osg::RefMatrix * getModelMatrix()
Definition IntersectionVisitor:229
void pushProjectionMatrix(osg::RefMatrix *matrix)
Definition IntersectionVisitor:217
ReadCallback * getReadCallback()
Definition IntersectionVisitor:205
virtual void apply(osg::Group &group)
bool getUseKdTreeWhenAvailable() const
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)
Definition IntersectionVisitor:192
osg::ref_ptr< ReadCallback > _readCallback
Definition IntersectionVisitor:292
const osg::Vec3 & getReferenceEyePoint() const
Definition IntersectionVisitor:237
const Intersector * getIntersector() const
Definition IntersectionVisitor:188
const osg::RefMatrix * getWindowMatrix() const
Definition IntersectionVisitor:215
void setIntersector(Intersector *intersector)
const osg::RefMatrix * getProjectionMatrix() const
Definition IntersectionVisitor:220
META_NodeVisitor(osgUtil, IntersectionVisitor) virtual osgUtil
Definition IntersectionVisitor:168
virtual void apply(osg::Drawable &drawable)
MatrixStack _projectionStack
Definition IntersectionVisitor:296
bool _dummyTraversal
Definition IntersectionVisitor:290
const ReadCallback * getReadCallback() const
Definition IntersectionVisitor:208
void setReferenceEyePointCoordinateFrame(Intersector::CoordinateFrame cf)
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
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)
Definition IntersectionVisitor:234
virtual const osgUtil::IntersectionVisitor * asIntersectionVisitor() const
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
Definition IntersectionVisitor:112
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()
Definition IntersectionVisitor:123
void addIntersector(Intersector *intersector)
virtual bool containsIntersections()
virtual bool enter(const osg::Node &node)
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
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
Definition IntersectionVisitor:98
IntersectionLimit getIntersectionLimit() const
Definition IntersectionVisitor:65
void setPrecisionHint(PrecisionHint hint)
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
Definition NodeVisitor:82
const osg::Matrix computeWindowMatrix() const
Definition Viewport:129
Shader generator framework.
Definition NodeVisitor:25
#define OSGUTIL_EXPORT
Definition osgUtil/Export:40
Definition IntersectionVisitor:161
virtual osg::ref_ptr< osg::Node > readNodeFile(const std::string &filename)=0