- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgManipulator/Translate2DDragger.cpp
r10431 r13041 30 30 setPickColor(osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f)); 31 31 } 32 32 33 33 Translate2DDragger::Translate2DDragger(const osg::Plane& plane) 34 34 { … … 58 58 osg::Matrix localToWorld = osg::computeLocalToWorld(nodePathToRoot); 59 59 _projector->setLocalToWorld(localToWorld); 60 60 61 61 if (_projector->project(pointer, _startProjectedPoint)) 62 62 { … … 77 77 aa.requestRedraw(); 78 78 } 79 return true; 79 return true; 80 80 } 81 81 82 82 // Pick move. 83 83 case (osgGA::GUIEventAdapter::DRAG): … … 99 99 aa.requestRedraw(); 100 100 } 101 return true; 101 return true; 102 102 } 103 103 … … 133 133 { 134 134 osg::Geometry* geometry = new osg::Geometry(); 135 135 136 136 osg::Vec3Array* vertices = new osg::Vec3Array(2); 137 137 (*vertices)[0] = osg::Vec3(0.0f,0.0f,-0.5f); … … 159 159 geode->addDrawable(new osg::ShapeDrawable(cone)); 160 160 } 161 161 162 162 // Create right cone. 163 163 { … … 198 198 xform->addChild(arrow); 199 199 } 200 200 201 201 // Rotate the xform so that the geometry lies on the plane. 202 202 { … … 205 205 xform->setMatrix(osg::Matrix(rotation)); 206 206 } 207 207 208 208 addChild(xform); 209 209 }
