Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -47,7 +47,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform
|
||||
void setPivot(const osg::Vec3d& pvt)
|
||||
{
|
||||
_pivot = pvt;
|
||||
_usePivot = true;
|
||||
_usePivot = true;
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform
|
||||
void setPosition(const osg::Vec3d& pos)
|
||||
{
|
||||
_position = pos;
|
||||
_usePosition = true;
|
||||
_usePosition = true;
|
||||
_dirty = true;
|
||||
}
|
||||
|
||||
const osg::Vec3d& getPosition() const { return _position; }
|
||||
|
||||
|
||||
virtual ~AntiSquish();
|
||||
|
||||
osg::Matrix computeUnSquishedMatrix(const osg::Matrix&, bool& flag);
|
||||
@@ -78,7 +78,7 @@ class OSGMANIPULATOR_EXPORT AntiSquish: public osg::MatrixTransform
|
||||
|
||||
bool _dirty;
|
||||
osg::Matrix _cachedLocalToWorld;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced
|
||||
{
|
||||
NONE,
|
||||
/** Click or pick start. */
|
||||
START,
|
||||
START,
|
||||
/** Drag or pick move. */
|
||||
MOVE,
|
||||
/** Release or pick finish. */
|
||||
@@ -54,7 +54,7 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced
|
||||
|
||||
/**
|
||||
* Gets the matrix for transforming the object being dragged. This matrix is in the
|
||||
* command's coordinate systems.
|
||||
* command's coordinate systems.
|
||||
*/
|
||||
virtual osg::Matrix getMotionMatrix() const = 0;
|
||||
|
||||
@@ -79,7 +79,7 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced
|
||||
|
||||
/**
|
||||
* Gets the matrix for transforming the command's world/object
|
||||
* coordinate system to the command's local coordinate system.
|
||||
* coordinate system to the command's local coordinate system.
|
||||
*/
|
||||
inline const osg::Matrix& getWorldToLocal() const { return _worldToLocal; }
|
||||
|
||||
@@ -89,7 +89,7 @@ class OSGMANIPULATOR_EXPORT MotionCommand : public osg::Referenced
|
||||
protected:
|
||||
|
||||
virtual ~MotionCommand();
|
||||
|
||||
|
||||
private:
|
||||
osg::Matrix _localToWorld;
|
||||
osg::Matrix _worldToLocal;
|
||||
@@ -121,7 +121,7 @@ class OSGMANIPULATOR_EXPORT TranslateInLineCommand : public MotionCommand
|
||||
inline void setTranslation(const osg::Vec3& t) { _translation = t; }
|
||||
inline const osg::Vec3d& getTranslation() const { return _translation; }
|
||||
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
{
|
||||
return osg::Matrix::translate(_translation);
|
||||
}
|
||||
@@ -161,7 +161,7 @@ class OSGMANIPULATOR_EXPORT TranslateInPlaneCommand : public MotionCommand
|
||||
inline void setReferencePoint(const osg::Vec3d& rp) { _referencePoint = rp; }
|
||||
inline const osg::Vec3d& getReferencePoint() const { return _referencePoint; }
|
||||
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
{
|
||||
return osg::Matrix::translate(_translation);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ class OSGMANIPULATOR_EXPORT Scale1DCommand : public MotionCommand
|
||||
inline void setMinScale(double min) { _minScale = min; }
|
||||
inline double getMinScale() const { return _minScale; }
|
||||
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
{
|
||||
return (osg::Matrix::translate(-_scaleCenter,0.0,0.0)
|
||||
* osg::Matrix::scale(_scale,1.0,1.0)
|
||||
@@ -248,7 +248,7 @@ class OSGMANIPULATOR_EXPORT Scale2DCommand : public MotionCommand
|
||||
inline void setMinScale(const osg::Vec2d& min) { _minScale = min; }
|
||||
inline const osg::Vec2d& getMinScale() const { return _minScale; }
|
||||
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
{
|
||||
return (osg::Matrix::translate(-_scaleCenter[0],0.0,-_scaleCenter[1])
|
||||
* osg::Matrix::scale(_scale[0],1.0,_scale[1])
|
||||
@@ -286,9 +286,9 @@ class OSGMANIPULATOR_EXPORT ScaleUniformCommand : public MotionCommand
|
||||
inline void setScaleCenter(const osg::Vec3d& center) { _scaleCenter = center; }
|
||||
inline const osg::Vec3d& getScaleCenter() const { return _scaleCenter; }
|
||||
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
{
|
||||
return (osg::Matrix::translate(-_scaleCenter)
|
||||
return (osg::Matrix::translate(-_scaleCenter)
|
||||
* osg::Matrix::scale(_scale,_scale,_scale)
|
||||
* osg::Matrix::translate(_scaleCenter));
|
||||
}
|
||||
@@ -319,7 +319,7 @@ class OSGMANIPULATOR_EXPORT Rotate3DCommand : public MotionCommand
|
||||
inline void setRotation(const osg::Quat& rotation) { _rotation = rotation; }
|
||||
inline const osg::Quat& getRotation() const { return _rotation; }
|
||||
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
virtual osg::Matrix getMotionMatrix() const
|
||||
{
|
||||
return osg::Matrix::rotate(_rotation);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class OSGMANIPULATOR_EXPORT DraggerTransformCallback : public DraggerCallback
|
||||
protected:
|
||||
|
||||
unsigned int _handleCommandMask;
|
||||
|
||||
|
||||
osg::observer_ptr<osg::MatrixTransform> _transform;
|
||||
osg::Matrix _startMotionMatrix;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class OSGMANIPULATOR_EXPORT Projector : public osg::Referenced
|
||||
|
||||
/**
|
||||
* Calculates the object/world coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto some shape or
|
||||
* 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.
|
||||
@@ -62,7 +62,7 @@ class OSGMANIPULATOR_EXPORT Projector : public osg::Referenced
|
||||
* Gets the matrix for transforming the world/object coordinate
|
||||
* system to the command's local coordinate system.
|
||||
*/
|
||||
inline const osg::Matrix& getWorldToLocal() const
|
||||
inline const osg::Matrix& getWorldToLocal() const
|
||||
{
|
||||
if (_worldToLocalDirty)
|
||||
{
|
||||
@@ -103,8 +103,8 @@ class OSGMANIPULATOR_EXPORT LineProjector : public Projector
|
||||
inline osg::LineSegment::vec_type& getLineEnd() { return _line->end(); }
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given line.
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given line.
|
||||
* Returns true on successful projection.
|
||||
*/
|
||||
virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const;
|
||||
@@ -131,8 +131,8 @@ class OSGMANIPULATOR_EXPORT PlaneProjector : public Projector
|
||||
inline const osg::Plane& getPlane() const { return _plane; }
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given plane.
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given plane.
|
||||
* Returns true on successful projection.
|
||||
*/
|
||||
virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const;
|
||||
@@ -159,8 +159,8 @@ class OSGMANIPULATOR_EXPORT SphereProjector : public Projector
|
||||
inline const osg::Sphere* getSphere() const { return _sphere.get(); }
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given sphere.
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given sphere.
|
||||
* Returns true on successful projection.
|
||||
*/
|
||||
virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const;
|
||||
@@ -194,19 +194,19 @@ class OSGMANIPULATOR_EXPORT SpherePlaneProjector : public SphereProjector
|
||||
SpherePlaneProjector(osg::Sphere* sphere);
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given sphere.
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given sphere.
|
||||
* Returns true on successful projection.
|
||||
*/
|
||||
virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const;
|
||||
|
||||
/**
|
||||
* Returns true if the previous projection was on the sphere and false
|
||||
* 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::Vec3d& p1, bool p1OnSphere,
|
||||
osg::Quat getRotation(const osg::Vec3d& p1, bool p1OnSphere,
|
||||
const osg::Vec3d& p2, bool p2OnSphere,
|
||||
float radialFactor = 0.0f) const;
|
||||
|
||||
@@ -238,15 +238,15 @@ class OSGMANIPULATOR_EXPORT CylinderProjector : public Projector
|
||||
inline const osg::Cylinder* getCylinder() const { return _cylinder.get(); }
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given plane.
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given plane.
|
||||
* Returns true on successful projection.
|
||||
*/
|
||||
virtual bool project(const PointerInfo& pi, osg::Vec3d& projectedPoint) const;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns true is the point is in front of the cylinder given the eye
|
||||
* 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;
|
||||
@@ -278,8 +278,8 @@ class OSGMANIPULATOR_EXPORT CylinderPlaneProjector : public CylinderProjector
|
||||
CylinderPlaneProjector(osg::Cylinder* cylinder);
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given plane.
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
* coordinate (pointToProject) when projected onto the given plane.
|
||||
* Returns true on successful projection.
|
||||
* \param[in] pi Incoming intersection information
|
||||
* \param[out] projectedPoint Point located on the given plane
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-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
|
||||
* 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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user