OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
osgUtil::PickVisitor Class Reference

#include <IntersectVisitor.h>

Inheritance diagram for osgUtil::PickVisitor:
Inheritance graph
[legend]
Collaboration diagram for osgUtil::PickVisitor:
Collaboration graph
[legend]

Public Member Functions

 PickVisitor (const osg::Viewport *viewport, const osg::Matrixd &proj, const osg::Matrixd &view, float mx, float my)
 
void runNestedPickVisitor (osg::Node &node, const osg::Viewport *viewport, const osg::Matrix &proj, const osg::Matrix &view, float mx, float my)
 
void apply (osg::Projection &projection)
 
void apply (osg::Camera &camera)
 
- Public Member Functions inherited from osgUtil::IntersectVisitor
 IntersectVisitor ()
 
virtual ~IntersectVisitor ()
 
 META_NodeVisitor (osgUtil, IntersectVisitor) void reset()
 
void addLineSegment (osg::LineSegment *seg)
 
HitListgetHitList (const osg::LineSegment *seg)
 
int getNumHits (const osg::LineSegment *seg)
 
LineSegmentHitListMapgetSegHitList ()
 
bool hits ()
 
void setLODSelectionMode (LODSelectionMode mode)
 
LODSelectionMode getLODSelectionMode () const
 
void setEyePoint (const osg::Vec3 &eye)
 
virtual osg::Vec3 getEyePoint () const
 
virtual float getDistanceToEyePoint (const osg::Vec3 &pos, bool withLODScale) const
 
virtual void apply (osg::Node &)
 
virtual void apply (osg::Drawable &)
 
virtual void apply (osg::Geode &node)
 
virtual void apply (osg::Billboard &node)
 
virtual void apply (osg::Group &node)
 
virtual void apply (osg::Transform &node)
 
virtual void apply (osg::Switch &node)
 
virtual void apply (osg::LOD &node)
 
- Public Member Functions inherited from osg::NodeVisitor
 NodeVisitor (TraversalMode tm=TRAVERSE_NONE)
 
 NodeVisitor (VisitorType type, TraversalMode tm=TRAVERSE_NONE)
 
 NodeVisitor (const NodeVisitor &nv, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual ~NodeVisitor ()
 
 META_Object (osg, NodeVisitor) virtual NodeVisitor *asNodeVisitor()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual void reset ()
 
void setVisitorType (VisitorType type)
 
VisitorType getVisitorType () const
 
void setTraversalNumber (unsigned int fn)
 
unsigned int getTraversalNumber () const
 
void setFrameStamp (FrameStamp *fs)
 
const FrameStampgetFrameStamp () const
 
void setTraversalMask (Node::NodeMask mask)
 
Node::NodeMask getTraversalMask () const
 
void setNodeMaskOverride (Node::NodeMask mask)
 
Node::NodeMask getNodeMaskOverride () const
 
bool validNodeMask (const osg::Node &node) const
 
void setTraversalMode (TraversalMode mode)
 
TraversalMode getTraversalMode () const
 
void traverse (Node &node)
 
void pushOntoNodePath (Node *node)
 
void popFromNodePath ()
 
NodePathgetNodePath ()
 
const NodePathgetNodePath () const
 
virtual osg::Vec3 getViewPoint () const
 
virtual float getDistanceFromEyePoint (const Vec3 &, bool) const
 
virtual float getDistanceToViewPoint (const Vec3 &, bool) const
 
virtual void apply (Geometry &geometry)
 
virtual void apply (ProxyNode &node)
 
virtual void apply (CoordinateSystemNode &node)
 
virtual void apply (ClipNode &node)
 
virtual void apply (TexGenNode &node)
 
virtual void apply (LightSource &node)
 
virtual void apply (CameraView &node)
 
virtual void apply (MatrixTransform &node)
 
virtual void apply (PositionAttitudeTransform &node)
 
virtual void apply (Sequence &node)
 
virtual void apply (PagedLOD &node)
 
virtual void apply (ClearNode &node)
 
virtual void apply (OccluderNode &node)
 
virtual void apply (OcclusionQueryNode &node)
 
void setDatabaseRequestHandler (DatabaseRequestHandler *handler)
 
DatabaseRequestHandlergetDatabaseRequestHandler ()
 
const DatabaseRequestHandlergetDatabaseRequestHandler () const
 
void setImageRequestHandler (ImageRequestHandler *handler)
 
ImageRequestHandlergetImageRequestHandler ()
 
const ImageRequestHandlergetImageRequestHandler () const
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject
UCharValueObject
UShortValueObject
UIntValueObject
DoubleValueObject
Vec3fValueObject
Vec2dValueObject
Vec4dValueObject
PlaneValueObject
MatrixdValueObject
BoundingBoxdValueObject
BoundingSpheredValueObject
bool 
getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Attributes

float _mx
 
float _my
 
osg::ref_ptr< const osg::Viewport_lastViewport
 
osg::Matrixd _lastProjectionMatrix
 
osg::Matrixd _lastViewMatrix
 
- Protected Attributes inherited from osgUtil::IntersectVisitor
IntersectStateStack _intersectStateStack
 
LineSegmentHitListMap _segHitList
 
LODSelectionMode _lodSelectionMode
 
osg::Vec3 _pseudoEyePoint
 
- Protected Attributes inherited from osg::NodeVisitor
VisitorType _visitorType
 
unsigned int _traversalNumber
 
ref_ptr< FrameStamp_frameStamp
 
TraversalMode _traversalMode
 
Node::NodeMask _traversalMask
 
Node::NodeMask _nodeMaskOverride
 
NodePath _nodePath
 
ref_ptr< DatabaseRequestHandler_databaseRequestHandler
 
ref_ptr< ImageRequestHandler_imageRequestHandler
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Public Types inherited from osgUtil::IntersectVisitor
enum  LODSelectionMode { USE_HIGHEST_LEVEL_OF_DETAIL, USE_SEGMENT_START_POINT_AS_EYE_POINT_FOR_LOD_LEVEL_SELECTION }
 
typedef std::vector< HitHitList
 
typedef std::map< const
osg::LineSegment *, HitList
LineSegmentHitListMap
 
- Public Types inherited from osg::NodeVisitor
enum  TraversalMode { TRAVERSE_NONE, TRAVERSE_PARENTS, TRAVERSE_ALL_CHILDREN, TRAVERSE_ACTIVE_CHILDREN }
 
enum  VisitorType {
  NODE_VISITOR = 0, UPDATE_VISITOR, EVENT_VISITOR, COLLECT_OCCLUDER_VISITOR,
  CULL_VISITOR, INTERSECTION_VISITOR
}
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 
- Protected Types inherited from osgUtil::IntersectVisitor
typedef std::vector
< osg::ref_ptr< IntersectState > > 
IntersectStateStack
 
- Protected Member Functions inherited from osgUtil::IntersectVisitor
bool intersect (osg::Drawable &gset)
 
void pushMatrix (osg::RefMatrix *matrix, osg::Transform::ReferenceFrame rf)
 
void popMatrix ()
 
bool enterNode (osg::Node &node)
 
void leaveNode ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Detailed Description

Picking intersection visitor specialises the IntersectVistor to allow more convenient handling of mouse picking.

Definition at line 204 of file IntersectVisitor.h.

Constructor & Destructor Documentation

osgUtil::PickVisitor::PickVisitor ( const osg::Viewport viewport,
const osg::Matrixd proj,
const osg::Matrixd view,
float  mx,
float  my 
)

Member Function Documentation

void osgUtil::PickVisitor::apply ( osg::Projection projection)
virtual

Reimplemented from osg::NodeVisitor.

void osgUtil::PickVisitor::apply ( osg::Camera camera)
virtual

Reimplemented from osg::NodeVisitor.

void osgUtil::PickVisitor::runNestedPickVisitor ( osg::Node node,
const osg::Viewport viewport,
const osg::Matrix proj,
const osg::Matrix view,
float  mx,
float  my 
)

Member Data Documentation

osg::Matrixd osgUtil::PickVisitor::_lastProjectionMatrix
protected

Definition at line 222 of file IntersectVisitor.h.

osg::Matrixd osgUtil::PickVisitor::_lastViewMatrix
protected

Definition at line 223 of file IntersectVisitor.h.

osg::ref_ptr<const osg::Viewport> osgUtil::PickVisitor::_lastViewport
protected

Definition at line 221 of file IntersectVisitor.h.

float osgUtil::PickVisitor::_mx
protected

Definition at line 218 of file IntersectVisitor.h.

float osgUtil::PickVisitor::_my
protected

Definition at line 219 of file IntersectVisitor.h.


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