RotateSphereDragger
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_ROTATESPHEREDRAGGER
#define OSGMANIPULATOR_ROTATESPHEREDRAGGER 1
#include <osgManipulator/Dragger>
#include <osgManipulator/Projector>
namespace osgManipulator {
class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger
{
public:
RotateSphereDragger();
META_OSGMANIPULATOR_Object(osgManipulator,RotateSphereDragger)
virtual bool handle(const PointerInfo&, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
void setupDefaultGeometry();
inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
inline const osg::Vec4& getColor() const { return _color; }
inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
inline const osg::Vec4& getPickColor() const { return _pickColor; }
protected:
virtual ~RotateSphereDragger();
osg::ref_ptr<SpherePlaneProjector> _projector;
osg::Vec3d _prevWorldProjPt;
bool _prevPtOnSphere;
osg::Matrix _startLocalToWorld, _startWorldToLocal;
osg::Quat _prevRotation;
osg::Vec4 _color;
osg::Vec4 _pickColor;
};
}
#endif
Dragger
Projector
osgManipulator::Dragger::handle
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
osgManipulator::Dragger::Dragger
Dragger()
osgManipulator::PointerInfo
Definition Dragger:84
osgManipulator::RotateSphereDragger::~RotateSphereDragger
virtual ~RotateSphereDragger()
osgManipulator::RotateSphereDragger::ea
const osgGA::GUIEventAdapter & ea
Definition RotateSphereDragger:37
osgManipulator::RotateSphereDragger::_startWorldToLocal
osg::Matrix _startWorldToLocal
Definition RotateSphereDragger:62
osgManipulator::RotateSphereDragger::META_OSGMANIPULATOR_Object
META_OSGMANIPULATOR_Object(osgManipulator, RotateSphereDragger) virtual bool handle(const PointerInfo &
osgManipulator::RotateSphereDragger::_prevPtOnSphere
bool _prevPtOnSphere
Definition RotateSphereDragger:61
osgManipulator::RotateSphereDragger::setColor
void setColor(const osg::Vec4 &color)
Definition RotateSphereDragger:43
osgManipulator::RotateSphereDragger::setPickColor
void setPickColor(const osg::Vec4 &color)
Definition RotateSphereDragger:51
osgManipulator::RotateSphereDragger::_projector
osg::ref_ptr< SpherePlaneProjector > _projector
Definition RotateSphereDragger:58
osgManipulator::RotateSphereDragger::_prevWorldProjPt
osg::Vec3d _prevWorldProjPt
Definition RotateSphereDragger:60
osgManipulator::RotateSphereDragger::_color
osg::Vec4 _color
Definition RotateSphereDragger:65
osgManipulator::RotateSphereDragger::setupDefaultGeometry
void setupDefaultGeometry()
osgManipulator::RotateSphereDragger::getColor
const osg::Vec4 & getColor() const
Definition RotateSphereDragger:44
osgManipulator::RotateSphereDragger::RotateSphereDragger
RotateSphereDragger()
osgManipulator::RotateSphereDragger::_prevRotation
osg::Quat _prevRotation
Definition RotateSphereDragger:63
osgManipulator::RotateSphereDragger::getPickColor
const osg::Vec4 & getPickColor() const
Definition RotateSphereDragger:52
osgManipulator::RotateSphereDragger::_pickColor
osg::Vec4 _pickColor
Definition RotateSphereDragger:66
osgManipulator::RotateSphereDragger::_startLocalToWorld
osg::Matrix _startLocalToWorld
Definition RotateSphereDragger:62
osgManipulator::RotateSphereDragger::us
const osgGA::GUIEventAdapter osgGA::GUIActionAdapter & us
Definition RotateSphereDragger:37
osg::Quat
Definition Quat:30
osg::Vec3d
Definition Vec3d:30
osg::ref_ptr
Definition ref_ptr:32
osgGA
Definition Callback:21
osgManipulator
Definition AntiSquish:23
osgManipulator::setMaterialColor
void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4 &color, osg::Node &node)
osg
Definition AlphaFunc:19
osg::Matrix
Matrixd Matrix
Definition Matrix:27
osg::Vec4
Vec4f Vec4
Definition Vec4:21
OSGMANIPULATOR_EXPORT
#define OSGMANIPULATOR_EXPORT
Definition osgManipulator/Export:27