OpenSceneGraph 3.6.5
Translate1DDragger
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13//osgManipulator - Copyright (C) 2007 Fugro-Jason B.V.
14
15#ifndef OSGMANIPULATOR_TRANSLATE1DDRAGGER
16#define OSGMANIPULATOR_TRANSLATE1DDRAGGER 1
17
20
21namespace osgManipulator {
22
23
28{
29 public:
30
32
34
36
38 virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
39
42
44 inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
45 inline const osg::Vec4& getColor() const { return _color; }
46
49 inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
50 inline const osg::Vec4& getPickColor() const { return _pickColor; }
51
52 inline void setCheckForNodeInNodePath(bool onOff) { _checkForNodeInNodePath = onOff; }
53
54 protected:
55
57
60
63
65};
66
67
68}
69
70#endif
Vec4f Vec4
Definition Vec4:21
The osgManipulator library is a NodeKit that extends the core scene graph to support 3D interactive m...
Definition AntiSquish:23
void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4 &color, osg::Node &node)
Convenience function for setting the material color on a node.
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
General purpose double triple for use as vertices, vectors and normals.
Definition Vec3d:30
Definition GUIActionAdapter:62
Event class for storing Keyboard, mouse and window events.
Definition GUIEventAdapter:82
Definition Dragger:84
void setCheckForNodeInNodePath(bool onOff)
Definition Translate1DDragger:52
void setPickColor(const osg::Vec4 &color)
Set/Get pick color for dragger.
Definition Translate1DDragger:49
void setupDefaultGeometry()
Setup default geometry for dragger.
Translate1DDragger(const osg::Vec3d &s, const osg::Vec3d &e)
osg::ref_ptr< LineProjector > _projector
Definition Translate1DDragger:58
virtual bool handle(const PointerInfo &pi, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
Handle pick events on dragger and generate TranslateInLine commands.
const osg::Vec4 & getColor() const
Definition Translate1DDragger:45
bool _checkForNodeInNodePath
Definition Translate1DDragger:64
const osg::Vec4 & getPickColor() const
Definition Translate1DDragger:50
osg::Vec4 _pickColor
Definition Translate1DDragger:62
void setColor(const osg::Vec4 &color)
Set/Get color for dragger.
Definition Translate1DDragger:44
osg::Vec3d _startProjectedPoint
Definition Translate1DDragger:59
META_OSGMANIPULATOR_Object(osgManipulator, Translate1DDragger)
osg::Vec4 _color
Definition Translate1DDragger:61
#define OSGMANIPULATOR_EXPORT
Definition Export:27

osg logo
Generated at Sun Jul 27 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.