diff --git a/include/osgManipulator/AntiSquish b/include/osgManipulator/AntiSquish index 350279549..a87ed77d7 100644 --- a/include/osgManipulator/AntiSquish +++ b/include/osgManipulator/AntiSquish @@ -45,7 +45,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast(obj)!=NULL; } void setPivot(const osg::Vec3& pvt) - { + { _pivot = pvt; _usePivot = true; _dirty = true; @@ -54,7 +54,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform const osg::Vec3& getPivot() { return _pivot; } void setPosition(const osg::Vec3& pos) - { + { _position = pos; _usePosition = true; _dirty = true; @@ -68,7 +68,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform protected: - osg::NodeCallback* _asqCallback; + osg::NodeCallback* _asqCallback; osg::Vec3 _pivot; bool _usePivot; diff --git a/include/osgManipulator/Command b/include/osgManipulator/Command index 0f51a3ff8..919c55ca0 100644 --- a/include/osgManipulator/Command +++ b/include/osgManipulator/Command @@ -34,10 +34,10 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced public: /** - * Motion command are based on click-drag-release actions. So each - * command needs to indicate which stage of the motion the command - * represents. - */ + * Motion command are based on click-drag-release actions. So each + * command needs to indicate which stage of the motion the command + * represents. + */ enum Stage { NONE, @@ -61,24 +61,24 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced virtual void applyConstraint(const Constraint*) = 0; /** - * Add Selection (receiver) to the command. The command will be - * executed on all the selections. - */ + * Add Selection (receiver) to the command. The command will be + * executed on all the selections. + */ void addSelection(Selection*); /** Remove Selection (receiver) from the command. */ void removeSelection(Selection*); /** - * Gets the matrix for transforming the Selection. This matrix is in the - * command's coordinate systems. - */ + * Gets the matrix for transforming the Selection. This matrix is in the + * command's coordinate systems. + */ virtual osg::Matrix getMotionMatrix() const = 0; /** - * Sets the matrix for transforming the command's local coordinate - * system to the world/object coordinate system. - */ + * Sets the matrix for transforming the command's local coordinate + * system to the world/object coordinate system. + */ void setLocalToWorldAndWorldToLocal(const osg::Matrix& localToWorld, const osg::Matrix& worldToLocal) { _localToWorld = localToWorld; @@ -86,15 +86,15 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced } /** - * Gets the matrix for transforming the command's local coordinate - * system to the world/object coordinate system. - */ + * Gets the matrix for transforming the command's local coordinate + * system to the world/object coordinate system. + */ inline const osg::Matrix& getLocalToWorld() const { return _localToWorld; } /** - * Gets the matrix for transforming the command's world/object - * coordinate system to the command's local coordinate system. - */ + * Gets the matrix for transforming the command's world/object + * coordinate system to the command's local coordinate system. + */ inline const osg::Matrix& getWorldToLocal() const { return _worldToLocal; } void setStage(const Stage s) { _stage = s; } @@ -114,7 +114,7 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced Stage _stage; - SelectionList _selectionList; + SelectionList _selectionList; }; diff --git a/include/osgManipulator/Projector b/include/osgManipulator/Projector index b92dc1e97..084e65d9b 100644 --- a/include/osgManipulator/Projector +++ b/include/osgManipulator/Projector @@ -35,9 +35,9 @@ class OSGMANIPULATOR_EXPORT Projector : public osg::Referenced /** * Calculates the object/world coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto some shape or - * geometry (implemented in derived classes). SceneView in used for i - * projecting window coordinates into object coordinates and vice versa. + * coordinate (pointToProject) when projected onto some shape or + * geometry (implemented in derived classes). SceneView in used for i + * projecting window coordinates into object coordinates and vice versa. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const = 0; @@ -104,7 +104,7 @@ class OSGMANIPULATOR_EXPORT LineProjector : public Projector /** * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given line. + * coordinate (pointToProject) when projected onto the given line. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const; @@ -132,7 +132,7 @@ class OSGMANIPULATOR_EXPORT PlaneProjector : public Projector /** * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given plane. + * coordinate (pointToProject) when projected onto the given plane. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const; @@ -160,15 +160,15 @@ class OSGMANIPULATOR_EXPORT SphereProjector : public Projector /** * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given sphere. + * coordinate (pointToProject) when projected onto the given sphere. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const; /** - * Returns true is the point is in front of the cylinder given the eye - * direction. - */ + * Returns true is the point is in front of the cylinder given the eye + * direction. + */ bool isPointInFront(const PointerInfo& pi, const osg::Matrix& localToWorld) const; void setFront(bool front) { _front = front; } @@ -195,19 +195,19 @@ class OSGMANIPULATOR_EXPORT SpherePlaneProjector : public SphereProjector /** * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given sphere. + * coordinate (pointToProject) when projected onto the given sphere. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const; /** - * Returns true if the previous projection was on the sphere and false - * if the projection was on the plane. - */ + * Returns true if the previous projection was on the sphere and false + * if the projection was on the plane. + */ bool isProjectionOnSphere() const { return _onSphere; } osg::Quat getRotation(const osg::Vec3& p1, bool p1OnSphere, - const osg::Vec3& p2, bool p2OnSphere, + const osg::Vec3& p2, bool p2OnSphere, float radialFactor = 0.0f) const; protected: @@ -239,16 +239,16 @@ class OSGMANIPULATOR_EXPORT CylinderProjector : public Projector /** * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given plane. + * coordinate (pointToProject) when projected onto the given plane. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const; /** - * Returns true is the point is in front of the cylinder given the eye - * direction. - */ + * Returns true is the point is in front of the cylinder given the eye + * direction. + */ bool isPointInFront(const PointerInfo& pi, const osg::Matrix& localToWorld) const; void setFront(bool front) { _front = front; } @@ -275,15 +275,15 @@ class OSGMANIPULATOR_EXPORT CylinderPlaneProjector : public CylinderProjector /** * Calculates the object coordinates (projectedPoint) of a window - * coordinate (pointToProject) when projected onto the given plane. + * coordinate (pointToProject) when projected onto the given plane. * Returns true on successful projection. */ virtual bool project(const PointerInfo& pi, osg::Vec3& projectedPoint) const; /** - * Returns true if the previous projection was on the cylinder and - * false if the projection was on the plane. - */ + * Returns true if the previous projection was on the cylinder and + * false if the projection was on the plane. + */ bool isProjectionOnCylinder() const { return _onCylinder; } osg::Quat getRotation(const osg::Vec3& p1, bool p1OnCyl, const osg::Vec3& p2, bool p2OnCyl) const; diff --git a/include/osgManipulator/RotateCylinderDragger b/include/osgManipulator/RotateCylinderDragger index e53940b7a..bfe1a071d 100644 --- a/include/osgManipulator/RotateCylinderDragger +++ b/include/osgManipulator/RotateCylinderDragger @@ -30,8 +30,8 @@ class OSGMANIPULATOR_EXPORT RotateCylinderDragger : public Dragger RotateCylinderDragger(); /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ + * Handle pick events on dragger and generate TranslateInLine commands. + */ virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); /** Setup default geometry for dragger. */ @@ -42,10 +42,10 @@ class OSGMANIPULATOR_EXPORT RotateCylinderDragger : public Dragger inline const osg::Vec4 getColor() const { return _color; } /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ + * Set/Get pick color for dragger. Pick color is color of the dragger + * when picked. It gives a visual feedback to show that the dragger has + * been picked. + */ inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } inline const osg::Vec4 getPickColor() const { return _pickColor; } diff --git a/include/osgManipulator/RotateSphereDragger b/include/osgManipulator/RotateSphereDragger index 0ce14dadc..d6c3bb198 100644 --- a/include/osgManipulator/RotateSphereDragger +++ b/include/osgManipulator/RotateSphereDragger @@ -30,8 +30,8 @@ class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger RotateSphereDragger(); /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ + * Handle pick events on dragger and generate TranslateInLine commands. + */ virtual bool handle(const PointerInfo&, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); /** Setup default geometry for dragger. */ @@ -42,10 +42,10 @@ class OSGMANIPULATOR_EXPORT RotateSphereDragger : public Dragger inline const osg::Vec4 getColor() const { return _color; } /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ + * Set/Get pick color for dragger. Pick color is color of the dragger + * when picked. It gives a visual feedback to show that the dragger has + * been picked. + */ inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } inline const osg::Vec4 getPickColor() const { return _pickColor; } diff --git a/include/osgManipulator/Scale1DDragger b/include/osgManipulator/Scale1DDragger index 5a661078c..e80a36c71 100644 --- a/include/osgManipulator/Scale1DDragger +++ b/include/osgManipulator/Scale1DDragger @@ -36,8 +36,8 @@ class OSGMANIPULATOR_EXPORT Scale1DDragger : public Dragger Scale1DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT); /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ + * Handle pick events on dragger and generate TranslateInLine commands. + */ virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); /** Setup default geometry for dragger. */ @@ -52,10 +52,10 @@ class OSGMANIPULATOR_EXPORT Scale1DDragger : public Dragger inline const osg::Vec4 getColor() const { return _color; } /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ + * Set/Get pick color for dragger. Pick color is color of the dragger + * when picked. It gives a visual feedback to show that the dragger has + * been picked. + */ inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } inline const osg::Vec4 getPickColor() const { return _pickColor; } diff --git a/include/osgManipulator/Scale2DDragger b/include/osgManipulator/Scale2DDragger index 38bbe14e8..93a89cbb1 100644 --- a/include/osgManipulator/Scale2DDragger +++ b/include/osgManipulator/Scale2DDragger @@ -36,8 +36,8 @@ class OSGMANIPULATOR_EXPORT Scale2DDragger : public Dragger Scale2DDragger(ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT); /** - * Handle pick events on dragger and generate TranslateInLine commands. - */ + * Handle pick events on dragger and generate TranslateInLine commands. + */ virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us); /** Setup default geometry for dragger. */ @@ -52,10 +52,10 @@ class OSGMANIPULATOR_EXPORT Scale2DDragger : public Dragger inline const osg::Vec4 getColor() const { return _color; } /** - * Set/Get pick color for dragger. Pick color is color of the dragger - * when picked. It gives a visual feedback to show that the dragger has - * been picked. - */ + * Set/Get pick color for dragger. Pick color is color of the dragger + * when picked. It gives a visual feedback to show that the dragger has + * been picked. + */ inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } inline const osg::Vec4 getPickColor() const { return _pickColor; } diff --git a/include/osgManipulator/ScaleAxisDragger b/include/osgManipulator/ScaleAxisDragger index b5acd4303..bf16499ae 100644 --- a/include/osgManipulator/ScaleAxisDragger +++ b/include/osgManipulator/ScaleAxisDragger @@ -35,9 +35,9 @@ class OSGMANIPULATOR_EXPORT ScaleAxisDragger : public CompositeDragger virtual ~ScaleAxisDragger(); - osg::ref_ptr< Scale1DDragger > _xDragger; - osg::ref_ptr< Scale1DDragger > _yDragger; - osg::ref_ptr< Scale1DDragger > _zDragger; + osg::ref_ptr< Scale1DDragger > _xDragger; + osg::ref_ptr< Scale1DDragger > _yDragger; + osg::ref_ptr< Scale1DDragger > _zDragger; }; diff --git a/include/osgManipulator/Selection b/include/osgManipulator/Selection index 3e13027b8..75acb1686 100644 --- a/include/osgManipulator/Selection +++ b/include/osgManipulator/Selection @@ -41,9 +41,9 @@ class OSGMANIPULATOR_EXPORT Selection : public osg::MatrixTransform Selection(); /** - * Receive motion commands and set the MatrixTransform accordingly to - * transform selections. Returns true on success. - */ + * Receive motion commands and set the MatrixTransform accordingly to + * transform selections. Returns true on success. + */ virtual bool receive(const MotionCommand&); virtual bool receive(const TranslateInLineCommand& command) { return receive((MotionCommand&)command); } virtual bool receive(const TranslateInPlaneCommand& command) { return receive((MotionCommand&)command); } diff --git a/include/osgManipulator/Translate1DDragger b/include/osgManipulator/Translate1DDragger index b7bf799d7..ce6ff3288 100644 --- a/include/osgManipulator/Translate1DDragger +++ b/include/osgManipulator/Translate1DDragger @@ -43,7 +43,7 @@ class OSGMANIPULATOR_EXPORT Translate1DDragger : public Dragger inline const osg::Vec4 getColor() const { return _color; } /** Set/Get pick color for dragger. Pick color is color of the dragger when picked. - It gives a visual feedback to show that the dragger has been picked. */ + It gives a visual feedback to show that the dragger has been picked. */ inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } inline const osg::Vec4 getPickColor() const { return _pickColor; } diff --git a/include/osgManipulator/Translate2DDragger b/include/osgManipulator/Translate2DDragger index f969c0f80..83e2ca5c1 100644 --- a/include/osgManipulator/Translate2DDragger +++ b/include/osgManipulator/Translate2DDragger @@ -44,7 +44,7 @@ class OSGMANIPULATOR_EXPORT Translate2DDragger : public Dragger inline const osg::Vec4 getColor() const { return _color; } /** Set/Get pick color for dragger. Pick color is color of the dragger when picked. - It gives a visual feedback to show that the dragger has been picked. */ + It gives a visual feedback to show that the dragger has been picked. */ inline void setPickColor(const osg::Vec4& color) { _pickColor = color; } inline const osg::Vec4 getPickColor() const { return _pickColor; } diff --git a/include/osgManipulator/TranslateAxisDragger b/include/osgManipulator/TranslateAxisDragger index 90b3422d6..6c8949865 100644 --- a/include/osgManipulator/TranslateAxisDragger +++ b/include/osgManipulator/TranslateAxisDragger @@ -35,9 +35,9 @@ class OSGMANIPULATOR_EXPORT TranslateAxisDragger : public CompositeDragger virtual ~TranslateAxisDragger(); - osg::ref_ptr< Translate1DDragger > _xDragger; - osg::ref_ptr< Translate1DDragger > _yDragger; - osg::ref_ptr< Translate1DDragger > _zDragger; + osg::ref_ptr< Translate1DDragger > _xDragger; + osg::ref_ptr< Translate1DDragger > _yDragger; + osg::ref_ptr< Translate1DDragger > _zDragger; }; diff --git a/src/osgManipulator/Command.cpp b/src/osgManipulator/Command.cpp index 75291dd96..fc7923a6d 100644 --- a/src/osgManipulator/Command.cpp +++ b/src/osgManipulator/Command.cpp @@ -67,8 +67,8 @@ TranslateInLineCommand::~TranslateInLineCommand() bool TranslateInLineCommand::execute() { for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*this); } @@ -82,8 +82,8 @@ bool TranslateInLineCommand::unexecute() inverse->setTranslation(-_translation); for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*inverse); } @@ -115,8 +115,8 @@ TranslateInPlaneCommand::~TranslateInPlaneCommand() bool TranslateInPlaneCommand::execute() { for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*this); } @@ -130,8 +130,8 @@ bool TranslateInPlaneCommand::unexecute() inverse->setTranslation(-_translation); for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*inverse); } @@ -159,8 +159,8 @@ Scale1DCommand::~Scale1DCommand() bool Scale1DCommand::execute() { for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*this); } @@ -174,8 +174,8 @@ bool Scale1DCommand::unexecute() if (_scale) inverse->setScale(1.0/_scale); for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*inverse); } @@ -203,8 +203,8 @@ Scale2DCommand::~Scale2DCommand() bool Scale2DCommand::execute() { for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*this); } @@ -219,8 +219,8 @@ bool Scale2DCommand::unexecute() inverse->setScale(osg::Vec2(1.0/_scale[0],1.0/_scale[1])); for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*inverse); } @@ -248,8 +248,8 @@ ScaleUniformCommand::~ScaleUniformCommand() bool ScaleUniformCommand::execute() { for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*this); } @@ -263,8 +263,8 @@ bool ScaleUniformCommand::unexecute() if (_scale) inverse->setScale(1.0/_scale); for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*inverse); } @@ -292,8 +292,8 @@ Rotate3DCommand::~Rotate3DCommand() bool Rotate3DCommand::execute() { for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*this); } @@ -307,8 +307,8 @@ bool Rotate3DCommand::unexecute() inverse->setRotation(_rotation.inverse()); for (SelectionList::iterator iter = getSelectionList().begin(); - iter != getSelectionList().end(); - ++iter) + iter != getSelectionList().end(); + ++iter) { (*iter)->receive(*inverse); } diff --git a/src/osgManipulator/RotateCylinderDragger.cpp b/src/osgManipulator/RotateCylinderDragger.cpp index 89b2efa67..9c85e3274 100644 --- a/src/osgManipulator/RotateCylinderDragger.cpp +++ b/src/osgManipulator/RotateCylinderDragger.cpp @@ -128,7 +128,7 @@ bool RotateCylinderDragger::handle(const PointerInfo& pointer, const osgGA::GUIE cmd->setStage(MotionCommand::FINISH); cmd->setLocalToWorldAndWorldToLocal(_startLocalToWorld,_startWorldToLocal); - + // Dispatch command. if (_commandManager) { @@ -138,7 +138,7 @@ bool RotateCylinderDragger::handle(const PointerInfo& pointer, const osgGA::GUIE // Reset color. setMaterialColor(_color,*this); - + aa.requestRedraw(); return true; diff --git a/src/osgManipulator/RotateSphereDragger.cpp b/src/osgManipulator/RotateSphereDragger.cpp index af6690909..381b852fc 100644 --- a/src/osgManipulator/RotateSphereDragger.cpp +++ b/src/osgManipulator/RotateSphereDragger.cpp @@ -130,7 +130,7 @@ bool RotateSphereDragger::handle(const PointerInfo& pointer, const osgGA::GUIEve cmd->setStage(MotionCommand::FINISH); cmd->setLocalToWorldAndWorldToLocal(_startLocalToWorld,_startWorldToLocal); - + // Dispatch command. if (_commandManager) { @@ -140,7 +140,7 @@ bool RotateSphereDragger::handle(const PointerInfo& pointer, const osgGA::GUIEve // Reset color. setMaterialColor(_color,*this); - + aa.requestRedraw(); return true; diff --git a/src/osgManipulator/Scale1DDragger.cpp b/src/osgManipulator/Scale1DDragger.cpp index bee18d09b..716161cab 100644 --- a/src/osgManipulator/Scale1DDragger.cpp +++ b/src/osgManipulator/Scale1DDragger.cpp @@ -141,7 +141,7 @@ bool Scale1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda cmd->setStage(MotionCommand::FINISH); cmd->setLocalToWorldAndWorldToLocal(_projector->getLocalToWorld(),_projector->getWorldToLocal()); - + // Dispatch command. if (_commandManager) { @@ -151,7 +151,7 @@ bool Scale1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda // Reset color. setMaterialColor(_color,*this); - + aa.requestRedraw(); return true; diff --git a/src/osgManipulator/Scale2DDragger.cpp b/src/osgManipulator/Scale2DDragger.cpp index a1936f82b..4f64be872 100644 --- a/src/osgManipulator/Scale2DDragger.cpp +++ b/src/osgManipulator/Scale2DDragger.cpp @@ -164,7 +164,7 @@ bool Scale2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda cmd->setStage(MotionCommand::FINISH); cmd->setReferencePoint(_referencePoint); cmd->setLocalToWorldAndWorldToLocal(_projector->getLocalToWorld(),_projector->getWorldToLocal()); - + // Dispatch command. if (_commandManager) { @@ -174,7 +174,7 @@ bool Scale2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda // Reset color. setMaterialColor(_color,*this); - + aa.requestRedraw(); return true; diff --git a/src/osgManipulator/TabPlaneDragger.cpp b/src/osgManipulator/TabPlaneDragger.cpp index d483fda4a..55aa8edf8 100644 --- a/src/osgManipulator/TabPlaneDragger.cpp +++ b/src/osgManipulator/TabPlaneDragger.cpp @@ -117,7 +117,7 @@ void createCornerScaleDraggerGeometry(Scale2DDragger* cornerScaleDragger, osg::N } void createEdgeScaleDraggerGeometry(Scale1DDragger* horzEdgeScaleDragger, Scale1DDragger* vertEdgeScaleDragger, - osg::Node* handleNode, float handleScaleFactor) + osg::Node* handleNode, float handleScaleFactor) { // Create a left box. { diff --git a/src/osgManipulator/Translate2DDragger.cpp b/src/osgManipulator/Translate2DDragger.cpp index c87c77fc3..28137bd71 100644 --- a/src/osgManipulator/Translate2DDragger.cpp +++ b/src/osgManipulator/Translate2DDragger.cpp @@ -50,7 +50,7 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven switch (ea.getEventType()) { - // Pick start. + // Pick start. case (osgGA::GUIEventAdapter::PUSH): { // Get the LocalToWorld matrix for this node and set it for the projector. @@ -81,10 +81,10 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven aa.requestRedraw(); } - return true; + return true; } - // Pick move. + // Pick move. case (osgGA::GUIEventAdapter::DRAG): { osg::Vec3 projectedPoint; @@ -107,32 +107,32 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven aa.requestRedraw(); } - return true; + return true; } - // Pick finish. + // Pick finish. case (osgGA::GUIEventAdapter::RELEASE): { - osg::ref_ptr cmd = new TranslateInPlaneCommand(_projector->getPlane()); + osg::ref_ptr cmd = new TranslateInPlaneCommand(_projector->getPlane()); - cmd->setStage(MotionCommand::FINISH); + cmd->setStage(MotionCommand::FINISH); cmd->setReferencePoint(_startProjectedPoint); cmd->setLocalToWorldAndWorldToLocal(_projector->getLocalToWorld(),_projector->getWorldToLocal()); - - // Dispatch command. - if (_commandManager) - { + + // Dispatch command. + if (_commandManager) + { _commandManager->addSelectionsToCommand(*cmd, *getParentDragger()); - _commandManager->dispatch(*cmd); - } + _commandManager->dispatch(*cmd); + } - // Reset color. - setMaterialColor(_color,*this); + // Reset color. + setMaterialColor(_color,*this); getOrCreateStateSet()->removeAttribute(_polygonOffset.get()); - + aa.requestRedraw(); - return true; + return true; } default: return false;