Translate1DDragger
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_TRANSLATE1DDRAGGER
#define OSGMANIPULATOR_TRANSLATE1DDRAGGER 1
#include <osgManipulator/Dragger>
#include <osgManipulator/Projector>
namespace osgManipulator {
class OSGMANIPULATOR_EXPORT Translate1DDragger : public Dragger
{
public:
Translate1DDragger();
META_OSGMANIPULATOR_Object(osgManipulator,Translate1DDragger);
Translate1DDragger(const osg::Vec3d& s, const osg::Vec3d& e);
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; }
inline void setCheckForNodeInNodePath(bool onOff) { _checkForNodeInNodePath = onOff; }
protected:
virtual ~Translate1DDragger();
osg::ref_ptr< LineProjector > _projector;
osg::Vec3d _startProjectedPoint;
osg::Vec4 _color;
osg::Vec4 _pickColor;
bool _checkForNodeInNodePath;
};
}
#endif
Dragger
Projector
osgGA::GUIActionAdapter
Definition GUIActionAdapter:62
osgGA::GUIEventAdapter
Definition GUIEventAdapter:82
osgManipulator::Dragger::Dragger
Dragger()
osgManipulator::PointerInfo
Definition Dragger:84
osgManipulator::Translate1DDragger::setCheckForNodeInNodePath
void setCheckForNodeInNodePath(bool onOff)
Definition Translate1DDragger:52
osgManipulator::Translate1DDragger::setPickColor
void setPickColor(const osg::Vec4 &color)
Definition Translate1DDragger:49
osgManipulator::Translate1DDragger::setupDefaultGeometry
void setupDefaultGeometry()
osgManipulator::Translate1DDragger::Translate1DDragger
Translate1DDragger(const osg::Vec3d &s, const osg::Vec3d &e)
osgManipulator::Translate1DDragger::_projector
osg::ref_ptr< LineProjector > _projector
Definition Translate1DDragger:58
osgManipulator::Translate1DDragger::~Translate1DDragger
virtual ~Translate1DDragger()
osgManipulator::Translate1DDragger::handle
virtual bool handle(const PointerInfo &pi, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
osgManipulator::Translate1DDragger::getColor
const osg::Vec4 & getColor() const
Definition Translate1DDragger:45
osgManipulator::Translate1DDragger::_checkForNodeInNodePath
bool _checkForNodeInNodePath
Definition Translate1DDragger:64
osgManipulator::Translate1DDragger::getPickColor
const osg::Vec4 & getPickColor() const
Definition Translate1DDragger:50
osgManipulator::Translate1DDragger::_pickColor
osg::Vec4 _pickColor
Definition Translate1DDragger:62
osgManipulator::Translate1DDragger::Translate1DDragger
Translate1DDragger()
osgManipulator::Translate1DDragger::setColor
void setColor(const osg::Vec4 &color)
Definition Translate1DDragger:44
osgManipulator::Translate1DDragger::_startProjectedPoint
osg::Vec3d _startProjectedPoint
Definition Translate1DDragger:59
osgManipulator::Translate1DDragger::META_OSGMANIPULATOR_Object
META_OSGMANIPULATOR_Object(osgManipulator, Translate1DDragger)
osgManipulator::Translate1DDragger::_color
osg::Vec4 _color
Definition Translate1DDragger:61
osg::Vec3d
Definition Vec3d:30
osg::ref_ptr
Definition ref_ptr:32
osgManipulator
Definition AntiSquish:23
osgManipulator::setMaterialColor
void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4 &color, osg::Node &node)
osg::Vec4
Vec4f Vec4
Definition Vec4:21
OSGMANIPULATOR_EXPORT
#define OSGMANIPULATOR_EXPORT
Definition osgManipulator/Export:27