Dragger
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V.
#ifndef OSGMANIPULATOR_DRAGGER
#define OSGMANIPULATOR_DRAGGER 1
#include <osgManipulator/Constraint>
#include <osgManipulator/Command>
#include <osg/BoundingSphere>
#include <osg/MatrixTransform>
#include <osgUtil/SceneView>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>
namespace osgManipulator
{
class CompositeDragger;
class MotionCommand;
class TranslateInLineCommand;
class TranslateInPlaneCommand;
class Scale1DCommand;
class Scale2DCommand;
class ScaleUniformCommand;
class Rotate3DCommand;
extern OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node& node, osg::NodePath& np);
class OSGMANIPULATOR_EXPORT DraggerTransformCallback : public DraggerCallback
{
public:
enum HandleCommandMask
{
HANDLE_TRANSLATE_IN_LINE = 1<<0,
HANDLE_TRANSLATE_IN_PLANE = 1<<1,
HANDLE_SCALED_1D = 1<<2,
HANDLE_SCALED_2D = 1<<3,
HANDLE_SCALED_UNIFORM = 1<<4,
HANDLE_ROTATE_3D = 1<<5,
HANDLE_ALL = 0x8ffffff
};
DraggerTransformCallback(osg::MatrixTransform* transform, int handleCommandMask = HANDLE_ALL);
virtual bool receive(const MotionCommand&);
virtual bool receive(const TranslateInLineCommand& command);
virtual bool receive(const TranslateInPlaneCommand& command);
virtual bool receive(const Scale1DCommand& command);
virtual bool receive(const Scale2DCommand& command);
virtual bool receive(const ScaleUniformCommand& command);
virtual bool receive(const Rotate3DCommand& command);
osg::MatrixTransform* getTransform() { return _transform.get(); }
const osg::MatrixTransform* getTransform() const { return _transform.get(); }
protected:
unsigned int _handleCommandMask;
osg::observer_ptr<osg::MatrixTransform> _transform;
osg::Matrix _startMotionMatrix;
osg::Matrix _localToWorld;
osg::Matrix _worldToLocal;
};
class OSGMANIPULATOR_EXPORT PointerInfo
{
public:
PointerInfo();
PointerInfo(const PointerInfo& rhs):
_hitList(rhs._hitList),
_nearPoint(rhs._nearPoint),
_farPoint(rhs._farPoint),
_eyeDir(rhs._eyeDir)
{
_hitIter = _hitList.begin();
}
void reset()
{
_hitList.clear();
_hitIter = _hitList.begin();
setCamera(0);
}
bool completed() const { return _hitIter==_hitList.end(); }
void next()
{
if (!completed()) ++_hitIter;
}
typedef std::pair<osg::NodePath, osg::Vec3d> NodePathIntersectionPair;
typedef std::list< NodePathIntersectionPair> IntersectionList;
osg::Vec3d getLocalIntersectPoint() const { return _hitIter->second; }
void setNearFarPoints (osg::Vec3d nearPoint, osg::Vec3d farPoint) {
_nearPoint = nearPoint;
_farPoint=farPoint;
_eyeDir = farPoint - nearPoint;
}
const osg::Vec3d& getEyeDir() const {return _eyeDir;}
void getNearFarPoints( osg::Vec3d& nearPoint, osg::Vec3d& farPoint) const {
nearPoint = _nearPoint;
farPoint = _farPoint;
}
bool contains(const osg::Node* node) const;
void setCamera(osg::Camera* camera)
{
if (camera)
{
_MVPW = camera->getViewMatrix() * camera->getProjectionMatrix();
if (camera->getViewport()) _MVPW.postMult(camera->getViewport()->computeWindowMatrix());
_inverseMVPW.invert(_MVPW);
osg::Vec3d eye, center, up;
camera->getViewMatrix().getLookAt(eye, center, up);
_eyeDir = eye - center;
}
else
{
_MVPW.makeIdentity();
_inverseMVPW.makeIdentity();
_eyeDir = osg::Vec3d(0,0,1);
}
}
void addIntersection(const osg::NodePath& nodePath, const osg::Vec3d& intersectionPoint)
{
bool needToResetHitIter = _hitList.empty();
_hitList.push_back(NodePathIntersectionPair(nodePath, intersectionPoint));
if (needToResetHitIter) _hitIter = _hitList.begin();
}
void setMousePosition(float pixel_x, float pixel_y)
{
projectWindowXYIntoObject(osg::Vec2d(pixel_x, pixel_y), _nearPoint, _farPoint);
}
protected:
bool projectWindowXYIntoObject(const osg::Vec2d& windowCoord, osg::Vec3d& nearPoint, osg::Vec3d& farPoint) const;
public:
IntersectionList _hitList;
IntersectionList::const_iterator _hitIter;
protected:
osg::Vec3d _nearPoint,_farPoint;
osg::Vec3d _eyeDir;
osg::Matrix _MVPW;
osg::Matrix _inverseMVPW;
};
class OSGMANIPULATOR_EXPORT Dragger : public osg::MatrixTransform
{
public:
META_Node(osgManipulator,Dragger);
virtual void setParentDragger(Dragger* parent) { _parentDragger = parent; }
Dragger* getParentDragger() { return _parentDragger; }
const Dragger* getParentDragger() const { return _parentDragger; }
virtual const CompositeDragger* getComposite() const { return 0; }
virtual CompositeDragger* getComposite() { return 0; }
void setHandleEvents(bool flag);
bool getHandleEvents() const { return _handleEvents; }
void setActivationModKeyMask(unsigned int mask) { _activationModKeyMask = mask; }
unsigned int getActivationModKeyMask() const { return _activationModKeyMask; }
void setActivationMouseButtonMask(unsigned int mask) { _activationMouseButtonMask = mask; }
unsigned int getActivationMouseButtonMask() const { return _activationMouseButtonMask; }
void setActivationKeyEvent(int key) { _activationKeyEvent = key; }
int getActivationKeyEvent() const { return _activationKeyEvent; }
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&) { return false; }
typedef std::vector< osg::ref_ptr<Constraint> > Constraints;
void addConstraint(Constraint* constraint);
template<class T> void addConstraint(const osg::ref_ptr<T>& c) { addConstraint(c.get()); }
void removeConstraint(Constraint* constraint);
template<class T> void removeConstraint(const osg::ref_ptr<T>& c) { removeConstraint(c.get()); }
Constraints& getConstraints() { return _constraints; }
const Constraints& getConstraints() const { return _constraints; }
typedef std::vector< osg::ref_ptr<DraggerCallback> > DraggerCallbacks;
void addDraggerCallback(DraggerCallback* dc);
template<class T> void addDraggerCallback(const osg::ref_ptr<T>& dc) { addDraggerCallback(dc.get()); }
void removeDraggerCallback(DraggerCallback* dc);
template<class T> void removeDraggerCallback(const osg::ref_ptr<T>& dc) { removeDraggerCallback(dc.get()); }
DraggerCallbacks& getDraggerCallbacks() { return _draggerCallbacks; }
const DraggerCallbacks& getDraggerCallbacks() const { return _draggerCallbacks; }
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) { _draggerActive = active; }
bool getDraggerActive() const { return _draggerActive; }
virtual void setIntersectionMask(osg::Node::NodeMask intersectionMask) { _intersectionMask = intersectionMask; }
osg::Node::NodeMask getIntersectionMask() const { return _intersectionMask; }
bool inverted() const;
void applyAppropriateFrontFace(osg::StateSet* ss) const;
protected:
Dragger();
Dragger(const Dragger& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
virtual ~Dragger();
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;
};
class OSGMANIPULATOR_EXPORT CompositeDragger : public Dragger
{
public:
META_Node(osgManipulator,CompositeDragger);
typedef std::vector< osg::ref_ptr<Dragger> > DraggerList;
virtual const CompositeDragger* getComposite() const { return this; }
virtual CompositeDragger* getComposite() { return this; }
virtual void setParentDragger(Dragger* parent);
virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);
// Composite-specific methods below
virtual bool addDragger(Dragger* dragger);
template<class T> bool addDragger(const osg::ref_ptr<T>& dc) { return addDragger(dc.get()); }
virtual bool removeDragger(Dragger* dragger);
template<class T> bool removeDragger(const osg::ref_ptr<T>& dc) { return removeDragger(dc.get()); }
unsigned int getNumDraggers() const { return _draggerList.size(); }
Dragger* getDragger(unsigned int i) { return _draggerList[i].get(); }
const Dragger* getDragger(unsigned int i) const { return _draggerList[i].get(); }
bool containsDragger(const Dragger* dragger) const;
template<class T> bool containsDragger(const osg::ref_ptr<T>& dc) const { return containsDragger(dc.get()); }
DraggerList::iterator findDragger(const Dragger* dragger);
virtual void setIntersectionMask(osg::Node::NodeMask intersectionMask);
protected:
CompositeDragger() {}
CompositeDragger(const CompositeDragger& rhs, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
virtual ~CompositeDragger() {}
DraggerList _draggerList;
};
void OSGMANIPULATOR_EXPORT setDrawableToAlwaysCull(osg::Drawable& drawable);
void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4& color, osg::Node& node);
}
#endif
BoundingSphere
Command
Constraint
GUIActionAdapter
GUIEventAdapter
MatrixTransform
SceneView
osgGA::GUIActionAdapter
Definition GUIActionAdapter:62
osgGA::GUIEventAdapter
Definition GUIEventAdapter:82
osgManipulator::CompositeDragger
Definition Dragger:319
osgManipulator::CompositeDragger::containsDragger
bool containsDragger(const osg::ref_ptr< T > &dc) const
Definition Dragger:346
osgManipulator::CompositeDragger::~CompositeDragger
virtual ~CompositeDragger()
Definition Dragger:357
osgManipulator::CompositeDragger::DraggerList
std::vector< osg::ref_ptr< Dragger > > DraggerList
Definition Dragger:324
osgManipulator::CompositeDragger::containsDragger
bool containsDragger(const Dragger *dragger) const
osgManipulator::CompositeDragger::setParentDragger
virtual void setParentDragger(Dragger *parent)
osgManipulator::CompositeDragger::META_Node
META_Node(osgManipulator, CompositeDragger)
osgManipulator::CompositeDragger::CompositeDragger
CompositeDragger(const CompositeDragger &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgManipulator::CompositeDragger::getComposite
virtual CompositeDragger * getComposite()
Definition Dragger:327
osgManipulator::CompositeDragger::_draggerList
DraggerList _draggerList
Definition Dragger:359
osgManipulator::CompositeDragger::handle
virtual bool handle(const PointerInfo &pi, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
osgManipulator::CompositeDragger::addDragger
virtual bool addDragger(Dragger *dragger)
osgManipulator::CompositeDragger::getDragger
const Dragger * getDragger(unsigned int i) const
Definition Dragger:343
osgManipulator::CompositeDragger::removeDragger
bool removeDragger(const osg::ref_ptr< T > &dc)
Definition Dragger:338
osgManipulator::CompositeDragger::CompositeDragger
CompositeDragger()
Definition Dragger:354
osgManipulator::CompositeDragger::getDragger
Dragger * getDragger(unsigned int i)
Definition Dragger:342
osgManipulator::CompositeDragger::getComposite
virtual const CompositeDragger * getComposite() const
Definition Dragger:326
osgManipulator::CompositeDragger::findDragger
DraggerList::iterator findDragger(const Dragger *dragger)
osgManipulator::CompositeDragger::removeDragger
virtual bool removeDragger(Dragger *dragger)
osgManipulator::CompositeDragger::addDragger
bool addDragger(const osg::ref_ptr< T > &dc)
Definition Dragger:335
osgManipulator::CompositeDragger::setIntersectionMask
virtual void setIntersectionMask(osg::Node::NodeMask intersectionMask)
osgManipulator::CompositeDragger::getNumDraggers
unsigned int getNumDraggers() const
Definition Dragger:340
osgManipulator::Constraint
Definition Constraint:60
osgManipulator::DraggerCallback
Definition Constraint:36
osgManipulator::DraggerCallback::DraggerCallback
DraggerCallback()
Definition Constraint:38
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const MotionCommand &)
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const Scale2DCommand &command)
osgManipulator::DraggerTransformCallback::getTransform
const osg::MatrixTransform * getTransform() const
Definition Dragger:69
osgManipulator::DraggerTransformCallback::HandleCommandMask
HandleCommandMask
Definition Dragger:48
osgManipulator::DraggerTransformCallback::HANDLE_SCALED_UNIFORM
@ HANDLE_SCALED_UNIFORM
Definition Dragger:53
osgManipulator::DraggerTransformCallback::HANDLE_ROTATE_3D
@ HANDLE_ROTATE_3D
Definition Dragger:54
osgManipulator::DraggerTransformCallback::HANDLE_SCALED_2D
@ HANDLE_SCALED_2D
Definition Dragger:52
osgManipulator::DraggerTransformCallback::HANDLE_SCALED_1D
@ HANDLE_SCALED_1D
Definition Dragger:51
osgManipulator::DraggerTransformCallback::HANDLE_ALL
@ HANDLE_ALL
Definition Dragger:55
osgManipulator::DraggerTransformCallback::HANDLE_TRANSLATE_IN_PLANE
@ HANDLE_TRANSLATE_IN_PLANE
Definition Dragger:50
osgManipulator::DraggerTransformCallback::HANDLE_TRANSLATE_IN_LINE
@ HANDLE_TRANSLATE_IN_LINE
Definition Dragger:49
osgManipulator::DraggerTransformCallback::_worldToLocal
osg::Matrix _worldToLocal
Definition Dragger:79
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const TranslateInPlaneCommand &command)
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const Rotate3DCommand &command)
osgManipulator::DraggerTransformCallback::_transform
osg::observer_ptr< osg::MatrixTransform > _transform
Definition Dragger:75
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const TranslateInLineCommand &command)
osgManipulator::DraggerTransformCallback::DraggerTransformCallback
DraggerTransformCallback(osg::MatrixTransform *transform, int handleCommandMask=HANDLE_ALL)
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const Scale1DCommand &command)
osgManipulator::DraggerTransformCallback::getTransform
osg::MatrixTransform * getTransform()
Definition Dragger:68
osgManipulator::DraggerTransformCallback::receive
virtual bool receive(const ScaleUniformCommand &command)
osgManipulator::DraggerTransformCallback::_startMotionMatrix
osg::Matrix _startMotionMatrix
Definition Dragger:76
osgManipulator::DraggerTransformCallback::_localToWorld
osg::Matrix _localToWorld
Definition Dragger:78
osgManipulator::DraggerTransformCallback::_handleCommandMask
unsigned int _handleCommandMask
Definition Dragger:73
osgManipulator::Dragger::_constraints
Constraints _constraints
Definition Dragger:307
osgManipulator::Dragger::getConstraints
const Constraints & getConstraints() const
Definition Dragger:245
osgManipulator::Dragger::_pointer
osgManipulator::PointerInfo _pointer
Definition Dragger:302
osgManipulator::Dragger::_activationPermittedByKeyEvent
bool _activationPermittedByKeyEvent
Definition Dragger:300
osgManipulator::Dragger::setupDefaultGeometry
virtual void setupDefaultGeometry()
Definition Dragger:263
osgManipulator::Dragger::_activationModKeyMask
unsigned int _activationModKeyMask
Definition Dragger:295
osgManipulator::Dragger::getParentDragger
Dragger * getParentDragger()
Definition Dragger:207
osgManipulator::Dragger::setIntersectionMask
virtual void setIntersectionMask(osg::Node::NodeMask intersectionMask)
Definition Dragger:275
osgManipulator::Dragger::_activationPermittedByModKeyMask
bool _activationPermittedByModKeyMask
Definition Dragger:298
osgManipulator::Dragger::removeTransformUpdating
void removeTransformUpdating(MatrixTransform *transform)
osgManipulator::Dragger::_intersectionMask
osg::Node::NodeMask _intersectionMask
Definition Dragger:309
osgManipulator::Dragger::getComposite
virtual const CompositeDragger * getComposite() const
Definition Dragger:211
osgManipulator::Dragger::handle
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
osgManipulator::Dragger::setActivationMouseButtonMask
void setActivationMouseButtonMask(unsigned int mask)
Definition Dragger:223
osgManipulator::Dragger::getDraggerActive
bool getDraggerActive() const
Definition Dragger:269
osgManipulator::Dragger::inverted
bool inverted() const
osgManipulator::Dragger::addTransformUpdating
void addTransformUpdating(MatrixTransform *transform, int handleCommandMask=DraggerTransformCallback::HANDLE_ALL)
osgManipulator::Dragger::Dragger
Dragger()
osgManipulator::Dragger::_activationKeyEvent
int _activationKeyEvent
Definition Dragger:297
osgManipulator::Dragger::traverse
virtual void traverse(osg::NodeVisitor &nv)
osgManipulator::Dragger::removeConstraint
void removeConstraint(const osg::ref_ptr< T > &c)
Definition Dragger:242
osgManipulator::Dragger::_draggerCallbacks
DraggerCallbacks _draggerCallbacks
Definition Dragger:308
osgManipulator::Dragger::receive
virtual bool receive(const MotionCommand &command)
osgManipulator::Dragger::_draggerActive
bool _draggerActive
Definition Dragger:293
osgManipulator::Dragger::addConstraint
void addConstraint(Constraint *constraint)
osgManipulator::Dragger::getActivationMouseButtonMask
unsigned int getActivationMouseButtonMask() const
Definition Dragger:224
osgManipulator::Dragger::setHandleEvents
void setHandleEvents(bool flag)
osgManipulator::Dragger::_parentDragger
Dragger * _parentDragger
Definition Dragger:304
osgManipulator::Dragger::addDraggerCallback
void addDraggerCallback(DraggerCallback *dc)
osgManipulator::Dragger::getDraggerCallbacks
const DraggerCallbacks & getDraggerCallbacks() const
Definition Dragger:257
osgManipulator::Dragger::dispatch
virtual void dispatch(MotionCommand &command)
osgManipulator::Dragger::getActivationModKeyMask
unsigned int getActivationModKeyMask() const
Definition Dragger:221
osgManipulator::Dragger::removeConstraint
void removeConstraint(Constraint *constraint)
osgManipulator::Dragger::setActivationKeyEvent
void setActivationKeyEvent(int key)
Definition Dragger:226
osgManipulator::Dragger::getActivationKeyEvent
int getActivationKeyEvent() const
Definition Dragger:227
osgManipulator::Dragger::addConstraint
void addConstraint(const osg::ref_ptr< T > &c)
Definition Dragger:239
osgManipulator::Dragger::getIntersectionMask
osg::Node::NodeMask getIntersectionMask() const
Definition Dragger:276
osgManipulator::Dragger::handle
virtual bool handle(const PointerInfo &, const osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &)
Definition Dragger:233
osgManipulator::Dragger::getHandleEvents
bool getHandleEvents() const
Definition Dragger:218
osgManipulator::Dragger::META_Node
META_Node(osgManipulator, Dragger)
osgManipulator::Dragger::_selfUpdater
osg::ref_ptr< DraggerCallback > _selfUpdater
Definition Dragger:306
osgManipulator::Dragger::Dragger
Dragger(const Dragger &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
osgManipulator::Dragger::getDraggerCallbacks
DraggerCallbacks & getDraggerCallbacks()
Definition Dragger:256
osgManipulator::Dragger::addDraggerCallback
void addDraggerCallback(const osg::ref_ptr< T > &dc)
Definition Dragger:251
osgManipulator::Dragger::getParentDragger
const Dragger * getParentDragger() const
Definition Dragger:208
osgManipulator::Dragger::setActivationModKeyMask
void setActivationModKeyMask(unsigned int mask)
Definition Dragger:220
osgManipulator::Dragger::DraggerCallbacks
std::vector< osg::ref_ptr< DraggerCallback > > DraggerCallbacks
Definition Dragger:248
osgManipulator::Dragger::getConstraints
Constraints & getConstraints()
Definition Dragger:244
osgManipulator::Dragger::_activationMouseButtonMask
unsigned int _activationMouseButtonMask
Definition Dragger:296
osgManipulator::Dragger::getComposite
virtual CompositeDragger * getComposite()
Definition Dragger:214
osgManipulator::Dragger::~Dragger
virtual ~Dragger()
osgManipulator::Dragger::removeDraggerCallback
void removeDraggerCallback(DraggerCallback *dc)
osgManipulator::Dragger::removeDraggerCallback
void removeDraggerCallback(const osg::ref_ptr< T > &dc)
Definition Dragger:254
osgManipulator::Dragger::Constraints
std::vector< osg::ref_ptr< Constraint > > Constraints
Definition Dragger:236
osgManipulator::Dragger::setDraggerActive
void setDraggerActive(bool active)
Definition Dragger:268
osgManipulator::Dragger::setParentDragger
virtual void setParentDragger(Dragger *parent)
Definition Dragger:205
osgManipulator::Dragger::_handleEvents
bool _handleEvents
Definition Dragger:292
osgManipulator::Dragger::applyAppropriateFrontFace
void applyAppropriateFrontFace(osg::StateSet *ss) const
osgManipulator::Dragger::_activationPermittedByMouseButtonMask
bool _activationPermittedByMouseButtonMask
Definition Dragger:299
osgManipulator::MotionCommand
Definition Command:31
osgManipulator::PointerInfo
Definition Dragger:84
osgManipulator::PointerInfo::next
void next()
Definition Dragger:108
osgManipulator::PointerInfo::setCamera
void setCamera(osg::Camera *camera)
Definition Dragger:136
osgManipulator::PointerInfo::setMousePosition
void setMousePosition(float pixel_x, float pixel_y)
Definition Dragger:165
osgManipulator::PointerInfo::_MVPW
osg::Matrix _MVPW
Definition Dragger:182
osgManipulator::PointerInfo::_hitIter
IntersectionList::const_iterator _hitIter
Definition Dragger:175
osgManipulator::PointerInfo::_eyeDir
osg::Vec3d _eyeDir
Definition Dragger:180
osgManipulator::PointerInfo::_nearPoint
osg::Vec3d _nearPoint
Definition Dragger:179
osgManipulator::PointerInfo::_hitList
IntersectionList _hitList
Definition Dragger:174
osgManipulator::PointerInfo::IntersectionList
std::list< NodePathIntersectionPair > IntersectionList
Definition Dragger:114
osgManipulator::PointerInfo::_inverseMVPW
osg::Matrix _inverseMVPW
Definition Dragger:183
osgManipulator::PointerInfo::getEyeDir
const osg::Vec3d & getEyeDir() const
Definition Dragger:127
osgManipulator::PointerInfo::getNearFarPoints
void getNearFarPoints(osg::Vec3d &nearPoint, osg::Vec3d &farPoint) const
Definition Dragger:129
osgManipulator::PointerInfo::addIntersection
void addIntersection(const osg::NodePath &nodePath, const osg::Vec3d &intersectionPoint)
Definition Dragger:158
osgManipulator::PointerInfo::NodePathIntersectionPair
std::pair< osg::NodePath, osg::Vec3d > NodePathIntersectionPair
Definition Dragger:113
osgManipulator::PointerInfo::setNearFarPoints
void setNearFarPoints(osg::Vec3d nearPoint, osg::Vec3d farPoint)
Definition Dragger:121
osgManipulator::PointerInfo::projectWindowXYIntoObject
bool projectWindowXYIntoObject(const osg::Vec2d &windowCoord, osg::Vec3d &nearPoint, osg::Vec3d &farPoint) const
osgManipulator::PointerInfo::_farPoint
osg::Vec3d _farPoint
Definition Dragger:179
osgManipulator::PointerInfo::PointerInfo
PointerInfo()
osgManipulator::PointerInfo::getLocalIntersectPoint
osg::Vec3d getLocalIntersectPoint() const
Definition Dragger:117
osgManipulator::PointerInfo::reset
void reset()
Definition Dragger:98
osgManipulator::PointerInfo::PointerInfo
PointerInfo(const PointerInfo &rhs)
Definition Dragger:89
osgManipulator::PointerInfo::contains
bool contains(const osg::Node *node) const
osgManipulator::PointerInfo::completed
bool completed() const
Definition Dragger:106
osgManipulator::Rotate3DCommand
Definition Command:309
osgManipulator::Scale1DCommand
Definition Command:183
osgManipulator::Scale2DCommand
Definition Command:228
osgManipulator::ScaleUniformCommand
Definition Command:273
osgManipulator::TranslateInLineCommand
Definition Command:105
osgManipulator::TranslateInPlaneCommand
Definition Command:142
osg::Camera
Definition Camera:45
osg::Camera::getProjectionMatrix
osg::Matrixd & getProjectionMatrix()
Definition Camera:216
osg::Camera::getViewport
const Viewport * getViewport() const
Definition Camera:156
osg::Camera::getViewMatrix
osg::Matrixd & getViewMatrix()
Definition Camera:250
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Drawable
Definition Drawable:89
osg::MatrixTransform
Definition MatrixTransform:26
osg::MatrixTransform::MatrixTransform
MatrixTransform()
osg::Matrixd::getLookAt
void getLookAt(Vec3f &eye, Vec3f &center, Vec3f &up, value_type lookDistance=1.0f) const
osg::NodeVisitor
Definition NodeVisitor:82
osg::Node
Definition Node:72
osg::Node::NodeMask
unsigned int NodeMask
Definition Node:363
osg::StateSet
Definition StateSet:46
osg::Vec2d
Definition Vec2d:29
osg::Vec3d
Definition Vec3d:30
osg::Viewport::computeWindowMatrix
const osg::Matrix computeWindowMatrix() const
Definition Viewport:129
osg::observer_ptr
Definition observer_ptr:39
osg::ref_ptr
Definition ref_ptr:32
osg::ref_ptr::get
T * get() const
Definition ref_ptr:117
osgManipulator
Definition AntiSquish:23
osgManipulator::setDrawableToAlwaysCull
void OSGMANIPULATOR_EXPORT setDrawableToAlwaysCull(osg::Drawable &drawable)
osgManipulator::setMaterialColor
void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4 &color, osg::Node &node)
osgManipulator::computeNodePathToRoot
OSGMANIPULATOR_EXPORT void computeNodePathToRoot(osg::Node &node, osg::NodePath &np)
osg::Matrix
Matrixd Matrix
Definition Matrix:27
osg::Vec4
Vec4f Vec4
Definition Vec4:21
osg::NodePath
std::vector< Node * > NodePath
Definition Node:47
OSGMANIPULATOR_EXPORT
#define OSGMANIPULATOR_EXPORT
Definition osgManipulator/Export:27