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

#include <Dragger.h>

Inheritance diagram for osgManipulator::Dragger:
Inheritance graph
[legend]
Collaboration diagram for osgManipulator::Dragger:
Collaboration graph
[legend]

Public Types

typedef std::vector
< osg::ref_ptr< Constraint > > 
Constraints
 
typedef std::vector
< osg::ref_ptr
< DraggerCallback > > 
DraggerCallbacks
 
- Public Types inherited from osg::Transform
enum  ReferenceFrame { RELATIVE_RF, ABSOLUTE_RF, ABSOLUTE_RF_INHERIT_VIEWPOINT }
 
- Public Types inherited from osg::Node
typedef std::vector< Group * > ParentList
 
typedef unsigned int NodeMask
 
typedef std::vector< std::string > DescriptionList
 
- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 

Public Member Functions

 META_Node (osgManipulator, Dragger) virtual void setParentDragger(Dragger *parent)
 
DraggergetParentDragger ()
 
const DraggergetParentDragger () const
 
virtual const CompositeDraggergetComposite () const
 
virtual CompositeDraggergetComposite ()
 
void setHandleEvents (bool flag)
 
bool getHandleEvents () const
 
void setActivationModKeyMask (unsigned int mask)
 
unsigned int getActivationModKeyMask () const
 
void setActivationMouseButtonMask (unsigned int mask)
 
unsigned int getActivationMouseButtonMask () const
 
void setActivationKeyEvent (int key)
 
int getActivationKeyEvent () const
 
virtual void traverse (osg::NodeVisitor &nv)
 
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
 
virtual bool handle (const PointerInfo &, const osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &)
 
void addConstraint (Constraint *constraint)
 
void removeConstraint (Constraint *constraint)
 
ConstraintsgetConstraints ()
 
const ConstraintsgetConstraints () const
 
void addDraggerCallback (DraggerCallback *dc)
 
void removeDraggerCallback (DraggerCallback *dc)
 
DraggerCallbacksgetDraggerCallbacks ()
 
const DraggerCallbacksgetDraggerCallbacks () const
 
void addTransformUpdating (MatrixTransform *transform, int handleCommandMask=DraggerTransformCallback::HANDLE_ALL)
 
void removeTransformUpdating (MatrixTransform *transform)
 
virtual void setupDefaultGeometry ()
 
virtual bool receive (const MotionCommand &command)
 
virtual void dispatch (MotionCommand &command)
 
void setDraggerActive (bool active)
 
bool getDraggerActive () const
 
virtual void setIntersectionMask (osg::Node::NodeMask intersectionMask)
 
osg::Node::NodeMask getIntersectionMask () const
 
- Public Member Functions inherited from osg::MatrixTransform
 MatrixTransform ()
 
 MatrixTransform (const MatrixTransform &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
 MatrixTransform (const Matrix &matix)
 
 META_Node (osg, MatrixTransform)
 
virtual MatrixTransformasMatrixTransform ()
 
virtual const MatrixTransformasMatrixTransform () const
 
void setMatrix (const Matrix &mat)
 
const MatrixgetMatrix () const
 
void preMult (const Matrix &mat)
 
void postMult (const Matrix &mat)
 
const MatrixgetInverseMatrix () const
 
virtual bool computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *) const
 
virtual bool computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *) const
 
- Public Member Functions inherited from osg::Transform
 Transform ()
 
 Transform (const Transform &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
 META_Node (osg, Transform)
 
virtual TransformasTransform ()
 
virtual const TransformasTransform () const
 
virtual PositionAttitudeTransformasPositionAttitudeTransform ()
 
virtual const
PositionAttitudeTransform
asPositionAttitudeTransform () const
 
void setReferenceFrame (ReferenceFrame rf)
 
ReferenceFrame getReferenceFrame () const
 
virtual BoundingSphere computeBound () const
 
- Public Member Functions inherited from osg::Group
 Group ()
 
 Group (const Group &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
 META_Node (osg, Group)
 
virtual GroupasGroup ()
 
virtual const GroupasGroup () const
 
virtual bool addChild (Node *child)
 
virtual bool insertChild (unsigned int index, Node *child)
 
virtual bool removeChild (Node *child)
 
bool removeChild (unsigned int pos, unsigned int numChildrenToRemove=1)
 
virtual bool removeChildren (unsigned int pos, unsigned int numChildrenToRemove)
 
virtual bool replaceChild (Node *origChild, Node *newChild)
 
virtual unsigned int getNumChildren () const
 
virtual bool setChild (unsigned int i, Node *node)
 
NodegetChild (unsigned int i)
 
const NodegetChild (unsigned int i) const
 
bool containsNode (const Node *node) const
 
unsigned int getChildIndex (const Node *node) const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 
virtual void releaseGLObjects (osg::State *=0) const
 
- Public Member Functions inherited from osg::Node
 Node ()
 
 Node (const Node &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const
 
virtual Objectclone (const CopyOp &copyop) const
 
virtual bool isSameKindAs (const Object *obj) const
 
virtual const char * libraryName () const
 
virtual const char * className () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual DrawableasDrawable ()
 
virtual const DrawableasDrawable () const
 
virtual GeometryasGeometry ()
 
virtual const GeometryasGeometry () const
 
virtual CameraasCamera ()
 
virtual const CameraasCamera () const
 
virtual SwitchasSwitch ()
 
virtual const SwitchasSwitch () const
 
virtual GeodeasGeode ()
 
virtual const GeodeasGeode () const
 
virtual osgTerrain::TerrainasTerrain ()
 
virtual const osgTerrain::TerrainasTerrain () const
 
virtual void accept (NodeVisitor &nv)
 
virtual void ascend (NodeVisitor &nv)
 
const ParentListgetParents () const
 
ParentList getParents ()
 
GroupgetParent (unsigned int i)
 
const GroupgetParent (unsigned int i) const
 
unsigned int getNumParents () const
 
NodePathList getParentalNodePaths (osg::Node *haltTraversalAtNode=0) const
 
MatrixList getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const
 
void setUpdateCallback (Callback *nc)
 
CallbackgetUpdateCallback ()
 
const CallbackgetUpdateCallback () const
 
void addUpdateCallback (Callback *nc)
 
void removeUpdateCallback (Callback *nc)
 
unsigned int getNumChildrenRequiringUpdateTraversal () const
 
void setEventCallback (Callback *nc)
 
CallbackgetEventCallback ()
 
const CallbackgetEventCallback () const
 
void addEventCallback (Callback *nc)
 
void removeEventCallback (Callback *nc)
 
unsigned int getNumChildrenRequiringEventTraversal () const
 
void setCullCallback (Callback *nc)
 
CallbackgetCullCallback ()
 
const CallbackgetCullCallback () const
 
void addCullCallback (Callback *nc)
 
void removeCullCallback (Callback *nc)
 
void setCullingActive (bool active)
 
bool getCullingActive () const
 
unsigned int getNumChildrenWithCullingDisabled () const
 
bool isCullingActive () const
 
unsigned int getNumChildrenWithOccluderNodes () const
 
bool containsOccluderNodes () const
 
void setNodeMask (NodeMask nm)
 
NodeMask getNodeMask () const
 
void setStateSet (osg::StateSet *stateset)
 
osg::StateSetgetOrCreateStateSet ()
 
osg::StateSetgetStateSet ()
 
const osg::StateSetgetStateSet () const
 
void setDescriptions (const DescriptionList &descriptions)
 
DescriptionListgetDescriptions ()
 
const DescriptionListgetDescriptions () const
 
const std::string & getDescription (unsigned int i) const
 
std::string & getDescription (unsigned int i)
 
unsigned int getNumDescriptions () const
 
void addDescription (const std::string &desc)
 
void setInitialBound (const osg::BoundingSphere &bsphere)
 
const BoundingSpheregetInitialBound () const
 
void dirtyBound ()
 
const BoundingSpheregetBound () const
 
void setComputeBoundingSphereCallback (ComputeBoundingSphereCallback *callback)
 
ComputeBoundingSphereCallbackgetComputeBoundingSphereCallback ()
 
const
ComputeBoundingSphereCallback
getComputeBoundingSphereCallback () const
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
std::string getCompoundClassName () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
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)
 
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 Member Functions

 Dragger ()
 
 Dragger (const Dragger &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual ~Dragger ()
 
- Protected Member Functions inherited from osg::MatrixTransform
virtual ~MatrixTransform ()
 
- Protected Member Functions inherited from osg::Transform
virtual ~Transform ()
 
- Protected Member Functions inherited from osg::Group
virtual ~Group ()
 
virtual void childRemoved (unsigned int, unsigned int)
 
virtual void childInserted (unsigned int)
 
- Protected Member Functions inherited from osg::Node
virtual ~Node ()
 
void addParent (osg::Group *parent)
 
void removeParent (osg::Group *parent)
 
void setNumChildrenRequiringUpdateTraversal (unsigned int num)
 
void setNumChildrenRequiringEventTraversal (unsigned int num)
 
void setNumChildrenWithCullingDisabled (unsigned int num)
 
void setNumChildrenWithOccluderNodes (unsigned int num)
 
- 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
 

Protected Attributes

bool _handleEvents
 
bool _draggerActive
 
unsigned int _activationModKeyMask
 
unsigned int _activationMouseButtonMask
 
int _activationKeyEvent
 
bool _activationPermittedByModKeyMask
 
bool _activationPermittedByMouseButtonMask
 
bool _activationPermittedByKeyEvent
 
osgManipulator::PointerInfo _pointer
 
Dragger_parentDragger
 
osg::ref_ptr< DraggerCallback_selfUpdater
 
Constraints _constraints
 
DraggerCallbacks _draggerCallbacks
 
osg::Node::NodeMask _intersectionMask
 
- Protected Attributes inherited from osg::MatrixTransform
Matrix _matrix
 
Matrix _inverse
 
bool _inverseDirty
 
- Protected Attributes inherited from osg::Transform
ReferenceFrame _referenceFrame
 
- Protected Attributes inherited from osg::Group
NodeList _children
 
- Protected Attributes inherited from osg::Node
BoundingSphere _initialBound
 
ref_ptr
< ComputeBoundingSphereCallback
_computeBoundCallback
 
BoundingSphere _boundingSphere
 
bool _boundingSphereComputed
 
ParentList _parents
 
ref_ptr< Callback_updateCallback
 
unsigned int _numChildrenRequiringUpdateTraversal
 
ref_ptr< Callback_eventCallback
 
unsigned int _numChildrenRequiringEventTraversal
 
ref_ptr< Callback_cullCallback
 
bool _cullingActive
 
unsigned int _numChildrenWithCullingDisabled
 
unsigned int _numChildrenWithOccluderNodes
 
NodeMask _nodeMask
 
ref_ptr< StateSet_stateset
 
- 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

- 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 ()
 

Detailed Description

Base class for draggers. Concrete draggers implement the pick event handler and generate motion commands (translate, rotate, ...) and sends these command to all the DraggerCallbacks & Transforms that are connected to the Dragger that generates the commands.

Definition at line 194 of file Dragger.h.

Member Typedef Documentation

Definition at line 236 of file Dragger.h.

Definition at line 245 of file Dragger.h.

Constructor & Destructor Documentation

osgManipulator::Dragger::Dragger ( )
protected
osgManipulator::Dragger::Dragger ( const Dragger rhs,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)
protected
virtual osgManipulator::Dragger::~Dragger ( )
protectedvirtual

Member Function Documentation

void osgManipulator::Dragger::addConstraint ( Constraint constraint)

Here is the caller graph for this function:

void osgManipulator::Dragger::addDraggerCallback ( DraggerCallback dc)
void osgManipulator::Dragger::addTransformUpdating ( MatrixTransform transform,
int  handleCommandMask = DraggerTransformCallback::HANDLE_ALL 
)

Here is the caller graph for this function:

virtual void osgManipulator::Dragger::dispatch ( MotionCommand command)
virtual
int osgManipulator::Dragger::getActivationKeyEvent ( ) const
inline

Definition at line 227 of file Dragger.h.

unsigned int osgManipulator::Dragger::getActivationModKeyMask ( ) const
inline

Definition at line 221 of file Dragger.h.

unsigned int osgManipulator::Dragger::getActivationMouseButtonMask ( ) const
inline

Definition at line 224 of file Dragger.h.

virtual const CompositeDragger* osgManipulator::Dragger::getComposite ( ) const
inlinevirtual

Returns 0 if this Dragger is not a CompositeDragger.

Reimplemented in osgManipulator::CompositeDragger.

Definition at line 211 of file Dragger.h.

virtual CompositeDragger* osgManipulator::Dragger::getComposite ( )
inlinevirtual

Returns 0 if this Dragger is not a CompositeDragger.

Reimplemented in osgManipulator::CompositeDragger.

Definition at line 214 of file Dragger.h.

Constraints& osgManipulator::Dragger::getConstraints ( )
inline

Definition at line 241 of file Dragger.h.

Here is the caller graph for this function:

const Constraints& osgManipulator::Dragger::getConstraints ( ) const
inline

Definition at line 242 of file Dragger.h.

bool osgManipulator::Dragger::getDraggerActive ( ) const
inline

Definition at line 263 of file Dragger.h.

DraggerCallbacks& osgManipulator::Dragger::getDraggerCallbacks ( )
inline

Definition at line 250 of file Dragger.h.

Here is the caller graph for this function:

const DraggerCallbacks& osgManipulator::Dragger::getDraggerCallbacks ( ) const
inline

Definition at line 251 of file Dragger.h.

bool osgManipulator::Dragger::getHandleEvents ( ) const
inline

Definition at line 218 of file Dragger.h.

osg::Node::NodeMask osgManipulator::Dragger::getIntersectionMask ( ) const
inline

Definition at line 270 of file Dragger.h.

Dragger* osgManipulator::Dragger::getParentDragger ( )
inline

Definition at line 207 of file Dragger.h.

const Dragger* osgManipulator::Dragger::getParentDragger ( ) const
inline

Definition at line 208 of file Dragger.h.

virtual bool osgManipulator::Dragger::handle ( const osgGA::GUIEventAdapter ea,
osgGA::GUIActionAdapter aa 
)
virtual
virtual bool osgManipulator::Dragger::handle ( const PointerInfo ,
const osgGA::GUIEventAdapter ,
osgGA::GUIActionAdapter  
)
inlinevirtual

Reimplemented in osgManipulator::CompositeDragger.

Definition at line 233 of file Dragger.h.

osgManipulator::Dragger::META_Node ( osgManipulator  ,
Dragger   
)
inline

Set/Get parent dragger. For simple draggers parent points to itself. For composite draggers parent points to the parent dragger that uses this dragger.

Definition at line 199 of file Dragger.h.

virtual bool osgManipulator::Dragger::receive ( const MotionCommand command)
virtual
void osgManipulator::Dragger::removeConstraint ( Constraint constraint)
void osgManipulator::Dragger::removeDraggerCallback ( DraggerCallback dc)
void osgManipulator::Dragger::removeTransformUpdating ( MatrixTransform transform)
void osgManipulator::Dragger::setActivationKeyEvent ( int  key)
inline

Definition at line 226 of file Dragger.h.

void osgManipulator::Dragger::setActivationModKeyMask ( unsigned int  mask)
inline

Definition at line 220 of file Dragger.h.

void osgManipulator::Dragger::setActivationMouseButtonMask ( unsigned int  mask)
inline

Definition at line 223 of file Dragger.h.

void osgManipulator::Dragger::setDraggerActive ( bool  active)
inline

Definition at line 262 of file Dragger.h.

void osgManipulator::Dragger::setHandleEvents ( bool  flag)
virtual void osgManipulator::Dragger::setIntersectionMask ( osg::Node::NodeMask  intersectionMask)
inlinevirtual

Set/Get the traversal mask used by this dragger when looking for intersections during event handling. This is useful to "hide" some geometry during event handling.

Reimplemented in osgManipulator::CompositeDragger.

Definition at line 269 of file Dragger.h.

virtual void osgManipulator::Dragger::setupDefaultGeometry ( )
inlinevirtual
virtual void osgManipulator::Dragger::traverse ( osg::NodeVisitor )
virtual

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.

Member Data Documentation

int osgManipulator::Dragger::_activationKeyEvent
protected

Definition at line 285 of file Dragger.h.

unsigned int osgManipulator::Dragger::_activationModKeyMask
protected

Definition at line 283 of file Dragger.h.

unsigned int osgManipulator::Dragger::_activationMouseButtonMask
protected

Definition at line 284 of file Dragger.h.

bool osgManipulator::Dragger::_activationPermittedByKeyEvent
protected

Definition at line 288 of file Dragger.h.

bool osgManipulator::Dragger::_activationPermittedByModKeyMask
protected

Definition at line 286 of file Dragger.h.

bool osgManipulator::Dragger::_activationPermittedByMouseButtonMask
protected

Definition at line 287 of file Dragger.h.

Constraints osgManipulator::Dragger::_constraints
protected

Definition at line 295 of file Dragger.h.

bool osgManipulator::Dragger::_draggerActive
protected

Definition at line 281 of file Dragger.h.

DraggerCallbacks osgManipulator::Dragger::_draggerCallbacks
protected

Definition at line 296 of file Dragger.h.

bool osgManipulator::Dragger::_handleEvents
protected

Definition at line 280 of file Dragger.h.

osg::Node::NodeMask osgManipulator::Dragger::_intersectionMask
protected

Definition at line 297 of file Dragger.h.

Dragger* osgManipulator::Dragger::_parentDragger
protected

Definition at line 292 of file Dragger.h.

osgManipulator::PointerInfo osgManipulator::Dragger::_pointer
protected

Definition at line 290 of file Dragger.h.

osg::ref_ptr<DraggerCallback> osgManipulator::Dragger::_selfUpdater
protected

Definition at line 294 of file Dragger.h.


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