14#ifndef OSGUTIL_INTERSECTVISITOR
15#define OSGUTIL_INTERSECTVISITOR 1
45 bool operator < (
const Hit& hit)
const
Vec3f Vec3
Definition Vec3:21
BoundingBoxd BoundingBox
Definition BoundingBox:257
BoundingSphered BoundingSphere
Definition BoundingSphere:308
Matrixd Matrix
Definition Matrix:27
std::vector< Node * > NodePath
A vector of Nodes pointers which is used to describe the path from a root node to a descendant.
Definition Node:47
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
LineSegment class for representing a line segment.
Definition LineSegment:25
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
virtual void reset()
Method to call to reset visitor.
Definition NodeVisitor:167
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
Switch is a Group node that allows switching between children.
Definition Switch:27
A Transform is a group node for which all children are transformed by a 4x4 matrix.
Definition Transform:75
ReferenceFrame
Definition Transform:98
Encapsulate OpenGL glViewport.
Definition Viewport:24
osg::ref_ptr< osg::Geode > _geode
Definition IntersectVisitor:78
const VecIndexList & getVecIndexList() const
Definition IntersectVisitor:70
osg::ref_ptr< osg::LineSegment > _originalLineSegment
Definition IntersectVisitor:75
const osg::Drawable * getDrawable() const
Definition IntersectVisitor:67
int _primitiveIndex
Definition IntersectVisitor:84
osg::NodePath & getNodePath()
Definition IntersectVisitor:62
osg::ref_ptr< osg::Drawable > _drawable
Definition IntersectVisitor:79
const osg::Vec3 getWorldIntersectNormal() const
const osg::NodePath & getNodePath() const
Definition IntersectVisitor:63
int getPrimitiveIndex() const
Definition IntersectVisitor:71
osg::ref_ptr< osg::RefMatrix > _inverse
Definition IntersectVisitor:81
osg::Drawable * getDrawable()
Definition IntersectVisitor:66
float getRatio() const
Definition IntersectVisitor:59
const osg::RefMatrix * getMatrix() const
Definition IntersectVisitor:68
const osg::Vec3 & getLocalIntersectPoint() const
Definition IntersectVisitor:53
float _ratio
Definition IntersectVisitor:74
const osg::LineSegment * getLocalLineSegment() const
Definition IntersectVisitor:61
std::vector< int > VecIndexList
Definition IntersectVisitor:43
osg::Vec3 _intersectNormal
Definition IntersectVisitor:86
osg::ref_ptr< osg::RefMatrix > _matrix
Definition IntersectVisitor:80
const osg::LineSegment * getOriginalLineSegment() const
Definition IntersectVisitor:60
const osg::RefMatrix * getInverseMatrix() const
Definition IntersectVisitor:69
osg::ref_ptr< osg::LineSegment > _localLineSegment
Definition IntersectVisitor:76
VecIndexList _vecIndexList
Definition IntersectVisitor:83
osg::Geode * getGeode()
Definition IntersectVisitor:64
const osg::Vec3 getWorldIntersectPoint() const
Definition IntersectVisitor:56
osg::NodePath _nodePath
Definition IntersectVisitor:77
const osg::Geode * getGeode() const
Definition IntersectVisitor:65
osg::Vec3 _intersectPoint
Definition IntersectVisitor:85
const osg::Vec3 & getLocalIntersectNormal() const
Definition IntersectVisitor:54
Deprecated - use IntersectionVisitor instead.
Definition IntersectVisitor:94
virtual void apply(osg::Billboard &node)
void setEyePoint(const osg::Vec3 &eye)
Set the eye point in local coordinates.
Definition IntersectVisitor:134
META_NodeVisitor(osgUtil, IntersectVisitor) void reset()
virtual void apply(osg::LOD &node)
osg::Vec3 _pseudoEyePoint
Definition IntersectVisitor:200
std::vector< Hit > HitList
Definition IntersectVisitor:110
virtual void apply(osg::Node &)
virtual void apply(osg::Drawable &)
void pushMatrix(osg::RefMatrix *matrix, osg::Transform::ReferenceFrame rf)
LODSelectionMode getLODSelectionMode() const
Definition IntersectVisitor:128
std::vector< osg::ref_ptr< IntersectState > > IntersectStateStack
Definition IntersectVisitor:193
int getNumHits(const osg::LineSegment *seg)
Definition IntersectVisitor:115
bool intersect(osg::Drawable &gset)
virtual void apply(osg::Switch &node)
virtual osg::Vec3 getEyePoint() const
Get the eye point in local coordinates.
virtual ~IntersectVisitor()
virtual void apply(osg::Geode &node)
LineSegmentHitListMap _segHitList
Definition IntersectVisitor:197
void addLineSegment(osg::LineSegment *seg)
Add a line segment to use for intersection testing during scene traversal.
LineSegmentHitListMap & getSegHitList()
Definition IntersectVisitor:117
LODSelectionMode _lodSelectionMode
Definition IntersectVisitor:199
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.
IntersectStateStack _intersectStateStack
Definition IntersectVisitor:195
void setLODSelectionMode(LODSelectionMode mode)
Definition IntersectVisitor:127
bool enterNode(osg::Node &node)
virtual void apply(osg::Transform &node)
LODSelectionMode
Definition IntersectVisitor:122
@ USE_HIGHEST_LEVEL_OF_DETAIL
Definition IntersectVisitor:123
@ USE_SEGMENT_START_POINT_AS_EYE_POINT_FOR_LOD_LEVEL_SELECTION
Definition IntersectVisitor:124
virtual void apply(osg::Group &node)
std::map< const osg::LineSegment *, HitList > LineSegmentHitListMap
Definition IntersectVisitor:111
HitList & getHitList(const osg::LineSegment *seg)
Definition IntersectVisitor:113
void addLineSegment(osg::LineSegment *seg)
osg::ref_ptr< osg::RefMatrix > _view_inverse
Definition IntersectVisitor:162
std::vector< LineSegmentPair > LineSegmentList
Definition IntersectVisitor:167
osg::ref_ptr< osg::RefMatrix > _model_inverse
Definition IntersectVisitor:164
unsigned int LineSegmentMask
Definition IntersectVisitor:170
LineSegmentList _segList
Definition IntersectVisitor:168
osg::ref_ptr< osg::RefMatrix > _view_matrix
Definition IntersectVisitor:161
osg::ref_ptr< osg::RefMatrix > _model_matrix
Definition IntersectVisitor:163
LineSegmentMaskStack _segmentMaskStack
Definition IntersectVisitor:172
std::pair< osg::ref_ptr< osg::LineSegment >, osg::ref_ptr< osg::LineSegment > > LineSegmentPair
Definition IntersectVisitor:166
bool isCulled(const osg::BoundingBox &bb, LineSegmentMask &segMaskOut)
std::vector< LineSegmentMask > LineSegmentMaskStack
Definition IntersectVisitor:171
bool isCulled(const osg::BoundingSphere &bs, LineSegmentMask &segMaskOut)
PickVisitor(const osg::Viewport *viewport, const osg::Matrixd &proj, const osg::Matrixd &view, float mx, float my)
osg::ref_ptr< const osg::Viewport > _lastViewport
Definition IntersectVisitor:221
osg::Matrixd _lastViewMatrix
Definition IntersectVisitor:223
float _my
Definition IntersectVisitor:219
void runNestedPickVisitor(osg::Node &node, const osg::Viewport *viewport, const osg::Matrix &proj, const osg::Matrix &view, float mx, float my)
float _mx
Definition IntersectVisitor:218
void apply(osg::Camera &camera)
osg::Matrixd _lastProjectionMatrix
Definition IntersectVisitor:222
void apply(osg::Projection &projection)
#define OSGUTIL_EXPORT
Definition Export:40