Translate2DDragger
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_TRANSLATE2DDRAGGER
#define OSGMANIPULATOR_TRANSLATE2DDRAGGER 1
#include <osgManipulator/Dragger>
#include <osgManipulator/Projector>
#include <osg/PolygonOffset>
namespace osgManipulator {
class OSGMANIPULATOR_EXPORT Translate2DDragger : public Dragger
{
public:
Translate2DDragger();
Translate2DDragger(const osg::Plane& plane);
META_OSGMANIPULATOR_Object(osgManipulator,Translate2DDragger)
virtual bool handle(const PointerInfo& pi, 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 ~Translate2DDragger();
osg::ref_ptr< PlaneProjector > _projector;
osg::Vec3d _startProjectedPoint;
osg::Vec4 _color;
osg::Vec4 _pickColor;
osg::ref_ptr<osg::PolygonOffset> _polygonOffset;
};
}
#endif
Dragger
PolygonOffset
Projector
osgManipulator::Dragger::handle
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
osgManipulator::Dragger::Dragger
Dragger()
osgManipulator::PointerInfo
Definition Dragger:84
osgManipulator::Translate2DDragger::META_OSGMANIPULATOR_Object
META_OSGMANIPULATOR_Object(osgManipulator, Translate2DDragger) virtual bool handle(const PointerInfo &pi
osgManipulator::Translate2DDragger::~Translate2DDragger
virtual ~Translate2DDragger()
osgManipulator::Translate2DDragger::_color
osg::Vec4 _color
Definition Translate2DDragger:60
osgManipulator::Translate2DDragger::Translate2DDragger
Translate2DDragger()
osgManipulator::Translate2DDragger::ea
const osgGA::GUIEventAdapter & ea
Definition Translate2DDragger:39
osgManipulator::Translate2DDragger::setColor
void setColor(const osg::Vec4 &color)
Definition Translate2DDragger:45
osgManipulator::Translate2DDragger::_startProjectedPoint
osg::Vec3d _startProjectedPoint
Definition Translate2DDragger:58
osgManipulator::Translate2DDragger::getPickColor
const osg::Vec4 & getPickColor() const
Definition Translate2DDragger:51
osgManipulator::Translate2DDragger::us
const osgGA::GUIEventAdapter osgGA::GUIActionAdapter & us
Definition Translate2DDragger:39
osgManipulator::Translate2DDragger::_projector
osg::ref_ptr< PlaneProjector > _projector
Definition Translate2DDragger:57
osgManipulator::Translate2DDragger::_polygonOffset
osg::ref_ptr< osg::PolygonOffset > _polygonOffset
Definition Translate2DDragger:62
osgManipulator::Translate2DDragger::setupDefaultGeometry
void setupDefaultGeometry()
osgManipulator::Translate2DDragger::getColor
const osg::Vec4 & getColor() const
Definition Translate2DDragger:46
osgManipulator::Translate2DDragger::Translate2DDragger
Translate2DDragger(const osg::Plane &plane)
osgManipulator::Translate2DDragger::_pickColor
osg::Vec4 _pickColor
Definition Translate2DDragger:61
osgManipulator::Translate2DDragger::setPickColor
void setPickColor(const osg::Vec4 &color)
Definition Translate2DDragger:50
osg::Plane
A plane class. It can be used to represent an infinite plane.
Definition Plane:34
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::Vec4
Vec4f Vec4
Definition Vec4:21
OSGMANIPULATOR_EXPORT
#define OSGMANIPULATOR_EXPORT
Definition osgManipulator/Export:27