diff --git a/include/osg/AnimationPath b/include/osg/AnimationPath index a49687335..9b2106cf0 100644 --- a/include/osg/AnimationPath +++ b/include/osg/AnimationPath @@ -45,7 +45,7 @@ class OSG_EXPORT AnimationPath : public virtual osg::Object class ControlPoint { - public: + public: ControlPoint(): _scale(1.0,1.0,1.0) {} @@ -64,14 +64,14 @@ class OSG_EXPORT AnimationPath : public virtual osg::Object _rotation(rotation), _scale(scale) {} - void setPosition(const osg::Vec3d& position) { _position = position; } - const osg::Vec3d& getPosition() const { return _position; } + void setPosition(const osg::Vec3d& position) { _position = position; } + const osg::Vec3d& getPosition() const { return _position; } - void setRotation(const osg::Quat& rotation) { _rotation = rotation; } - const osg::Quat& getRotation() const { return _rotation; } + void setRotation(const osg::Quat& rotation) { _rotation = rotation; } + const osg::Quat& getRotation() const { return _rotation; } - void setScale(const osg::Vec3d& scale) { _scale = scale; } - const osg::Vec3d& getScale() const { return _scale; } + void setScale(const osg::Vec3d& scale) { _scale = scale; } + const osg::Vec3d& getScale() const { return _scale; } inline void interpolate(float ratio,const ControlPoint& first, const ControlPoint& second) { @@ -116,8 +116,8 @@ class OSG_EXPORT AnimationPath : public virtual osg::Object matrix.preMult(osg::Matrixd::rotate(_rotation.inverse())); matrix.preMult(osg::Matrixd::translate(-_position)); } - - protected: + + protected: osg::Vec3d _position; osg::Quat _rotation; diff --git a/include/osg/Billboard b/include/osg/Billboard index 20d1a345e..2a03ee757 100644 --- a/include/osg/Billboard +++ b/include/osg/Billboard @@ -66,13 +66,13 @@ class OSG_EXPORT Billboard : public Geode typedef std::vector PositionList; /** Set the list of pivot point positions. */ - inline void setPositionList(PositionList& pl) { _positionList=pl; } + inline void setPositionList(PositionList& pl) { _positionList=pl; } /** Get the list of pivot point positions. */ - inline PositionList& getPositionList() { return _positionList; } + inline PositionList& getPositionList() { return _positionList; } /** Get a const list of pivot point positions. */ - inline const PositionList& getPositionList() const { return _positionList; } + inline const PositionList& getPositionList() const { return _positionList; } /** Add a Drawable with a default position of Vec3(0,0,0). * Call the base-class Geode::addDrawble() to add the given Drawable diff --git a/include/osg/ClipNode b/include/osg/ClipNode index 79f005556..176a8906c 100644 --- a/include/osg/ClipNode +++ b/include/osg/ClipNode @@ -33,7 +33,7 @@ class OSG_EXPORT ClipNode : public Group ClipNode(const ClipNode& es, const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(osg, ClipNode); - + /** Creates six clip planes corresponding to the given BoundingBox. */ void createClipBox(const BoundingBox& bb,unsigned int clipPlaneNumberBase=0); diff --git a/include/osg/ClipPlane b/include/osg/ClipPlane index 48e19d768..b9938643b 100644 --- a/include/osg/ClipPlane +++ b/include/osg/ClipPlane @@ -72,9 +72,9 @@ class OSG_EXPORT ClipPlane : public StateAttribute /** Set the clip plane with the given Plane. */ void setClipPlane(const Plane& plane) - { + { _clipPlane.set(plane[0],plane[1],plane[2],plane[3]); - } + } /** Defines the plane as [ a b c d ]. */ void setClipPlane(double a,double b,double c,double d) diff --git a/include/osg/ClusterCullingCallback b/include/osg/ClusterCullingCallback index 3495bce3c..90651f9db 100644 --- a/include/osg/ClusterCullingCallback +++ b/include/osg/ClusterCullingCallback @@ -34,7 +34,7 @@ class OSG_EXPORT ClusterCullingCallback : public Drawable::CullCallback, public META_Object(osg,ClusterCullingCallback); /** Computes the control point, normal, and deviation from the - * given drawable contents. */ + * given drawable contents. */ void computeFrom(const osg::Drawable* drawable); /** Transform the ClusterCullingCallback's positional members to a new coordinate frame.*/ diff --git a/include/osg/CollectOccludersVisitor b/include/osg/CollectOccludersVisitor index 8379e7b98..e8fd195f6 100644 --- a/include/osg/CollectOccludersVisitor +++ b/include/osg/CollectOccludersVisitor @@ -47,13 +47,13 @@ class OSG_EXPORT CollectOccludersVisitor : public osg::NodeVisitor, public osg:: virtual void apply(osg::OccluderNode& node); /** Sets the minimum shadow occluder volume that an active occluder - * must have. vol is units relative the clip space volume where 1.0 - * is the whole clip space. */ + * must have. vol is units relative the clip space volume where 1.0 + * is the whole clip space. */ void setMinimumShadowOccluderVolume(float vol) { _minimumShadowOccluderVolume = vol; } float getMinimumShadowOccluderVolume() const { return _minimumShadowOccluderVolume; } /** Sets the maximum number of occluders to have active for culling - * purposes. */ + * purposes. */ void setMaximumNumberOfActiveOccluders(unsigned int num) { _maximumNumberOfActiveOccluders = num; } unsigned int getMaximumNumberOfActiveOccluders() const { return _maximumNumberOfActiveOccluders; } @@ -65,7 +65,7 @@ class OSG_EXPORT CollectOccludersVisitor : public osg::NodeVisitor, public osg:: const ShadowVolumeOccluderSet& getCollectedOccluderSet() const { return _occluderSet; } /** Removes occluded occluders for the collected occluders list, then - * discards all but MaximumNumberOfActiveOccluders of occluders, + * discards all but MaximumNumberOfActiveOccluders of occluders, * discarding the occluders with the lowests shadow occluder volume. */ void removeOccludedOccluders(); diff --git a/include/osg/ConvexPlanarOccluder b/include/osg/ConvexPlanarOccluder index dd216ce05..7a6181ea6 100644 --- a/include/osg/ConvexPlanarOccluder +++ b/include/osg/ConvexPlanarOccluder @@ -39,7 +39,7 @@ class OSG_EXPORT ConvexPlanarOccluder : public Object void setOccluder(const ConvexPlanarPolygon& cpp) { _occluder = cpp; } ConvexPlanarPolygon& getOccluder() { return _occluder; } - + const ConvexPlanarPolygon& getOccluder() const { return _occluder; } @@ -50,9 +50,9 @@ class OSG_EXPORT ConvexPlanarOccluder : public Object void setHoleList(const HoleList& holeList) { _holeList=holeList; } - HoleList& getHoleList() { return _holeList; } + HoleList& getHoleList() { return _holeList; } - const HoleList& getHoleList() const { return _holeList; } + const HoleList& getHoleList() const { return _holeList; } protected: @@ -63,6 +63,6 @@ class OSG_EXPORT ConvexPlanarOccluder : public Object }; -} // end of namespace +} // end of namespace #endif diff --git a/include/osg/ConvexPlanarPolygon b/include/osg/ConvexPlanarPolygon index 5e87fd255..b5d8f7656 100644 --- a/include/osg/ConvexPlanarPolygon +++ b/include/osg/ConvexPlanarPolygon @@ -48,6 +48,6 @@ class OSG_EXPORT ConvexPlanarPolygon }; -} // end of namespace +} // end of namespace #endif diff --git a/include/osg/CopyOp b/include/osg/CopyOp index cb2920c34..8fa2cc296 100644 --- a/include/osg/CopyOp +++ b/include/osg/CopyOp @@ -40,19 +40,19 @@ class OSG_EXPORT CopyOp enum Options { - SHALLOW_COPY = 0, - DEEP_COPY_OBJECTS = 1, - DEEP_COPY_NODES = 2, - DEEP_COPY_DRAWABLES = 4, - DEEP_COPY_STATESETS = 8, - DEEP_COPY_STATEATTRIBUTES = 16, - DEEP_COPY_TEXTURES = 32, - DEEP_COPY_IMAGES = 64, - DEEP_COPY_ARRAYS = 128, - DEEP_COPY_PRIMITIVES = 256, - DEEP_COPY_SHAPES = 512, - DEEP_COPY_UNIFORMS = 1024, - DEEP_COPY_ALL = 0xffffffff + SHALLOW_COPY = 0, + DEEP_COPY_OBJECTS = 1, + DEEP_COPY_NODES = 2, + DEEP_COPY_DRAWABLES = 4, + DEEP_COPY_STATESETS = 8, + DEEP_COPY_STATEATTRIBUTES = 16, + DEEP_COPY_TEXTURES = 32, + DEEP_COPY_IMAGES = 64, + DEEP_COPY_ARRAYS = 128, + DEEP_COPY_PRIMITIVES = 256, + DEEP_COPY_SHAPES = 512, + DEEP_COPY_UNIFORMS = 1024, + DEEP_COPY_ALL = 0xffffffff }; typedef unsigned int CopyFlags; @@ -70,8 +70,8 @@ class OSG_EXPORT CopyOp virtual Image* operator() (const Image* image) const; virtual Array* operator() (const Array* array) const; virtual PrimitiveSet* operator() (const PrimitiveSet* primitives) const; - virtual Shape* operator() (const Shape* shape) const; - virtual Uniform* operator() (const Uniform* shape) const; + virtual Shape* operator() (const Shape* shape) const; + virtual Uniform* operator() (const Uniform* shape) const; protected: diff --git a/include/osg/CullSettings b/include/osg/CullSettings index 27bb6d0e2..cf945900a 100644 --- a/include/osg/CullSettings +++ b/include/osg/CullSettings @@ -228,7 +228,7 @@ class OSG_EXPORT CullSettings bool _impostorActive; bool _depthSortImpostorSprites; float _impostorPixelErrorThreshold; - int _numFramesToKeepImpostorSprites; + int _numFramesToKeepImpostorSprites; Node::NodeMask _cullMask; Node::NodeMask _cullMaskLeft; diff --git a/include/osg/CullStack b/include/osg/CullStack index 973f57148..10d6f2f1d 100644 --- a/include/osg/CullStack +++ b/include/osg/CullStack @@ -186,10 +186,10 @@ class OSG_EXPORT CullStack : public osg::CullSettings ref_ptr _identity; typedef std::vector< osg::ref_ptr > MatrixList; - MatrixList _reuseMatrixList; - unsigned int _currentReuseMatrixIndex; - - inline osg::RefMatrix* createOrReuseMatrix(const osg::Matrix& value); + MatrixList _reuseMatrixList; + unsigned int _currentReuseMatrixIndex; + + inline osg::RefMatrix* createOrReuseMatrix(const osg::Matrix& value); }; @@ -286,6 +286,6 @@ inline RefMatrix* CullStack::createOrReuseMatrix(const osg::Matrix& value) return matrix; } -} // end of namespace +} // end of namespace #endif diff --git a/include/osg/CullingSet b/include/osg/CullingSet index 8d1a71231..f5c220683 100644 --- a/include/osg/CullingSet +++ b/include/osg/CullingSet @@ -345,6 +345,6 @@ class OSG_EXPORT CullingSet : public Referenced }; -} // end of namespace +} // end of namespace #endif diff --git a/include/osg/Depth b/include/osg/Depth index 4f1684945..3c1c73c87 100644 --- a/include/osg/Depth +++ b/include/osg/Depth @@ -85,7 +85,7 @@ class OSG_EXPORT Depth : public StateAttribute inline void setZNear(double zNear) { _zNear=zNear; } inline double getZNear() const { return _zNear; } - + inline void setZFar(double zFar) { _zFar=zFar; } inline double getZFar() const { return _zFar; } diff --git a/include/osg/Export b/include/osg/Export index 2197472ba..e34269a66 100644 --- a/include/osg/Export +++ b/include/osg/Export @@ -31,15 +31,15 @@ #endif #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) - # if defined( _LIB ) || defined( USE_STATIC ) - # define OSG_EXPORT - # elif defined( OSG_LIBRARY ) - # define OSG_EXPORT __declspec(dllexport) - # else - # define OSG_EXPORT __declspec(dllimport) - # endif /* SG_LIBRARY */ + # if defined( _LIB ) || defined( USE_STATIC ) + # define OSG_EXPORT + # elif defined( OSG_LIBRARY ) + # define OSG_EXPORT __declspec(dllexport) + # else + # define OSG_EXPORT __declspec(dllimport) + # endif /* SG_LIBRARY */ #else - # define OSG_EXPORT + # define OSG_EXPORT #endif // set up define for whether member templates are supported by VisualStudio compilers. diff --git a/include/osg/FragmentProgram b/include/osg/FragmentProgram index f7b362673..41f55819f 100644 --- a/include/osg/FragmentProgram +++ b/include/osg/FragmentProgram @@ -157,7 +157,7 @@ class OSG_EXPORT FragmentProgram : public StateAttribute _fragmentProgram = program; dirtyFragmentProgramObject(); } - + /** Set the fragment program using C++ style string.*/ inline void setFragmentProgram( const std::string& program ) { @@ -286,7 +286,7 @@ class OSG_EXPORT FragmentProgram : public StateAttribute std::string _fragmentProgram; LocalParamList _programLocalParameters; - MatrixList _matrixList; + MatrixList _matrixList; }; diff --git a/include/osg/GLExtensions b/include/osg/GLExtensions index e52289523..e8f9ac1a5 100644 --- a/include/osg/GLExtensions +++ b/include/osg/GLExtensions @@ -55,13 +55,13 @@ inline void* getGLExtensionFuncPtr(const char *funcName) #elif defined(__APPLE__) std::string temp( "_" ); - temp += funcName; // Mac OS X prepends an underscore on function names + temp += funcName; // Mac OS X prepends an underscore on function names if ( NSIsSymbolNameDefined( temp.c_str() ) ) { NSSymbol symbol = NSLookupAndBindSymbol( temp.c_str() ); return NSAddressOfSymbol( symbol ); } else - return NULL; + return NULL; #elif defined (__sun) diff --git a/include/osg/Group b/include/osg/Group index 5a016447d..76aade8a6 100644 --- a/include/osg/Group +++ b/include/osg/Group @@ -110,7 +110,7 @@ class OSG_EXPORT Group : public Node /** Get the index number of child, return a value between * 0 and _children.size()-1 if found, if not found then * return _children.size(). - */ + */ inline unsigned int getChildIndex( const Node* node ) const { for (unsigned int childNum=0;childNum<_children.size();++childNum) diff --git a/include/osg/ImageStream b/include/osg/ImageStream index 826ddf090..2284eeeda 100644 --- a/include/osg/ImageStream +++ b/include/osg/ImageStream @@ -38,7 +38,7 @@ class OSG_EXPORT ImageStream : public Image /** Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. */ virtual int compare(const Image& rhs) const; - enum StreamStatus + enum StreamStatus { INVALID, PLAYING, diff --git a/include/osg/Light b/include/osg/Light index b930f737f..c3fbcbb7e 100644 --- a/include/osg/Light +++ b/include/osg/Light @@ -101,16 +101,16 @@ class OSG_EXPORT Light : public StateAttribute /** Get the specular component of the light. */ inline const Vec4& getSpecular() const { return _specular; } - /** Set the position of the light. */ + /** Set the position of the light. */ inline void setPosition( const Vec4& position ) { _position = position; } - /** Get the position of the light. */ + /** Get the position of the light. */ inline const Vec4& getPosition() const { return _position; } - /** Set the direction of the light. */ + /** Set the direction of the light. */ inline void setDirection( const Vec3& direction ) { _direction = direction; } - /** Get the direction of the light. */ + /** Get the direction of the light. */ inline const Vec3& getDirection() const { return _direction; } /** Set the constant attenuation of the light. */ diff --git a/include/osg/LineStipple b/include/osg/LineStipple index 25e29413c..cdf12929c 100644 --- a/include/osg/LineStipple +++ b/include/osg/LineStipple @@ -66,7 +66,7 @@ class OSG_EXPORT LineStipple : public StateAttribute virtual ~LineStipple(); GLint _factor; - GLushort _pattern; + GLushort _pattern; }; diff --git a/include/osg/Matrixd b/include/osg/Matrixd index 5ca325c05..0bb3a6a98 100644 --- a/include/osg/Matrixd +++ b/include/osg/Matrixd @@ -286,8 +286,8 @@ class OSG_EXPORT Matrixd inline Vec4d operator* ( const Vec4d& v ) const; void setTrans( value_type tx, value_type ty, value_type tz ); - void setTrans( const Vec3f& v ); - void setTrans( const Vec3d& v ); + void setTrans( const Vec3f& v ); + void setTrans( const Vec3d& v ); inline Vec3d getTrans() const { return Vec3d(_mat[3][0],_mat[3][1],_mat[3][2]); } @@ -616,42 +616,42 @@ inline Vec3d Matrixd::transform3x3(const Matrixd& m,const Vec3d& v) inline Vec3f operator* (const Vec3f& v, const Matrixd& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec3d operator* (const Vec3d& v, const Matrixd& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec4f operator* (const Vec4f& v, const Matrixd& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec4d operator* (const Vec4d& v, const Matrixd& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec3f Matrixd::operator* (const Vec3f& v) const { - return postMult(v); + return postMult(v); } inline Vec3d Matrixd::operator* (const Vec3d& v) const { - return postMult(v); + return postMult(v); } inline Vec4f Matrixd::operator* (const Vec4f& v) const { - return postMult(v); + return postMult(v); } inline Vec4d Matrixd::operator* (const Vec4d& v) const { - return postMult(v); + return postMult(v); } diff --git a/include/osg/Matrixf b/include/osg/Matrixf index 50c19cbb4..1d11b3aec 100644 --- a/include/osg/Matrixf +++ b/include/osg/Matrixf @@ -210,7 +210,7 @@ class OSG_EXPORT Matrixf void orthoNormalize(const Matrixf& rhs); //basic utility functions to create new matrices - inline static Matrixf identity( void ); + inline static Matrixf identity( void ); inline static Matrixf scale( const Vec3f& sv); inline static Matrixf scale( const Vec3d& sv); inline static Matrixf scale( value_type sx, value_type sy, value_type sz); @@ -287,8 +287,8 @@ class OSG_EXPORT Matrixf inline Vec4d operator* ( const Vec4d& v ) const; void setTrans( value_type tx, value_type ty, value_type tz ); - void setTrans( const Vec3f& v ); - void setTrans( const Vec3d& v ); + void setTrans( const Vec3f& v ); + void setTrans( const Vec3d& v ); inline Vec3d getTrans() const { return Vec3d(_mat[3][0],_mat[3][1],_mat[3][2]); } @@ -325,11 +325,11 @@ class OSG_EXPORT Matrixf } inline Matrixf operator * ( const Matrixf &m ) const - { - osg::Matrixf r; + { + osg::Matrixf r; r.mult(*this,m); - return r; - } + return r; + } protected: value_type _mat[4][4]; @@ -610,36 +610,36 @@ inline Vec3d Matrixf::transform3x3(const Matrixf& m,const Vec3d& v) inline Vec3f operator* (const Vec3f& v, const Matrixf& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec3d operator* (const Vec3d& v, const Matrixf& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec4f operator* (const Vec4f& v, const Matrixf& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec4d operator* (const Vec4d& v, const Matrixf& m ) { - return m.preMult(v); + return m.preMult(v); } inline Vec3f Matrixf::operator* (const Vec3f& v) const { - return postMult(v); + return postMult(v); } inline Vec3d Matrixf::operator* (const Vec3d& v) const { - return postMult(v); + return postMult(v); } inline Vec4f Matrixf::operator* (const Vec4f& v) const { - return postMult(v); + return postMult(v); } inline Vec4d Matrixf::operator* (const Vec4d& v) const { - return postMult(v); + return postMult(v); } diff --git a/include/osg/Multisample b/include/osg/Multisample index 1970d0500..644e2a75b 100644 --- a/include/osg/Multisample +++ b/include/osg/Multisample @@ -83,7 +83,7 @@ class OSG_EXPORT Multisample : public StateAttribute } inline void setCoverage(float coverage) { _coverage=coverage; } inline float getCoverage() const { return _coverage; } - + inline void setInvert(bool invert) { _invert=invert; } inline bool getInvert() const { return _invert; } diff --git a/include/osg/PointSprite b/include/osg/PointSprite index 3f5fbc263..f60073e8d 100644 --- a/include/osg/PointSprite +++ b/include/osg/PointSprite @@ -28,17 +28,17 @@ namespace osg { class OSG_EXPORT PointSprite : public osg::StateAttribute { public: - PointSprite() {} + PointSprite() {} - /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ - PointSprite(const PointSprite& texenv,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - StateAttribute(texenv,copyop) {} + /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ + PointSprite(const PointSprite& texenv,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): + StateAttribute(texenv,copyop) {} - META_StateAttribute(osg, PointSprite, POINTSPRITE); + META_StateAttribute(osg, PointSprite, POINTSPRITE); - /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ - virtual int compare(const StateAttribute& sa) const; + /** return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.*/ + virtual int compare(const StateAttribute& sa) const; virtual bool getModeUsage(ModeUsage& usage) const { @@ -46,14 +46,14 @@ public: return true; } - virtual bool isTextureAttribute() const { return true; } + virtual bool isTextureAttribute() const { return true; } - virtual void apply(osg::State& state) const; + virtual void apply(osg::State& state) const; - static bool isPointSpriteSupported(unsigned int context); + static bool isPointSpriteSupported(unsigned int context); protected: - virtual ~PointSprite( void ) {} + virtual ~PointSprite( void ) {} }; } diff --git a/include/osg/Polytope b/include/osg/Polytope index c054e7260..20d24d801 100644 --- a/include/osg/Polytope +++ b/include/osg/Polytope @@ -384,6 +384,6 @@ class OSG_EXPORT Polytope }; -} // end of namespace +} // end of namespace #endif diff --git a/include/osg/Referenced b/include/osg/Referenced index 9ce2acfd6..c006ea5bf 100644 --- a/include/osg/Referenced +++ b/include/osg/Referenced @@ -172,13 +172,13 @@ inline void Referenced::unref() const */ class OSG_EXPORT Referenced : public NoodleGlue::CBridgable { - public: - /** Method not used in NoodleGlue referencing - */ - inline void unref_nodelete() const { --_refCount; } - inline int referenceCount() const { return _refCount; } - protected: - virtual ~Referenced() {} + public: + /** Method not used in NoodleGlue referencing + */ + inline void unref_nodelete() const { --_refCount; } + inline int referenceCount() const { return _refCount; } + protected: + virtual ~Referenced() {} }; #endif //OSG_JAVA_BUILD diff --git a/include/osg/ShadowVolumeOccluder b/include/osg/ShadowVolumeOccluder index 104426a84..7f64e5049 100644 --- a/include/osg/ShadowVolumeOccluder +++ b/include/osg/ShadowVolumeOccluder @@ -167,6 +167,6 @@ inline void ShadowVolumeOccluder::popCurrentMask() //std::cout<<"ShadowVolumeOccluder::popCurrentMasks() - _occluderVolume.getMaskStack().size()="<<_occluderVolume.getMaskStack().size()<<" "<<_occluderVolume.getCurrentMask()<=0.0f; } - - inline void set(const Vec3& center,float radius) - { - _center = center; - _radius = radius; - } + _center(sphere._center), + _radius(sphere._radius) {} - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } + META_Shape(osg, Sphere); + + inline bool valid() const { return _radius>=0.0f; } + + inline void set(const Vec3& center,float radius) + { + _center = center; + _radius = radius; + } + + inline void setCenter(const Vec3& center) { _center = center; } + inline const Vec3& getCenter() const { return _center; } + + inline void setRadius(float radius) { _radius = radius; } + inline float getRadius() const { return _radius; } protected: - - virtual ~Sphere() {} - - Vec3 _center; - float _radius; - + + virtual ~Sphere() {} + + Vec3 _center; + float _radius; + }; class Box : public Shape { public: - + Box(): - _center(0.0f,0.0f,0.0f), - _halfLengths(0.5f,0.5f,0.5f) {} - + _center(0.0f,0.0f,0.0f), + _halfLengths(0.5f,0.5f,0.5f) {} + Box(const osg::Vec3& center,float width): - _center(center), - _halfLengths(width*0.5f,width*0.5f,width*0.5f) {} + _center(center), + _halfLengths(width*0.5f,width*0.5f,width*0.5f) {} Box(const osg::Vec3& center,float lengthX,float lengthY, float lengthZ): - _center(center), - _halfLengths(lengthX*0.5f,lengthY*0.5f,lengthZ*0.5f) {} + _center(center), + _halfLengths(lengthX*0.5f,lengthY*0.5f,lengthZ*0.5f) {} Box(const Box& box,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(box,copyop), - _center(box._center), - _halfLengths(box._halfLengths), - _rotation(box._rotation) {} - - META_Shape(osg, Box); - - inline bool valid() const { return _halfLengths.x()>=0.0f; } - - inline void set(const Vec3& center,const Vec3& halfLengths) - { - _center = center; - _halfLengths = halfLengths; - } + _center(box._center), + _halfLengths(box._halfLengths), + _rotation(box._rotation) {} - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setHalfLengths(const Vec3& halfLengths) { _halfLengths = halfLengths; } - inline const Vec3& getHalfLengths() const { return _halfLengths; } - - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - inline bool zeroRotation() const { return _rotation.zeroRotation(); } + META_Shape(osg, Box); + + inline bool valid() const { return _halfLengths.x()>=0.0f; } + + inline void set(const Vec3& center,const Vec3& halfLengths) + { + _center = center; + _halfLengths = halfLengths; + } + + inline void setCenter(const Vec3& center) { _center = center; } + inline const Vec3& getCenter() const { return _center; } + + inline void setHalfLengths(const Vec3& halfLengths) { _halfLengths = halfLengths; } + inline const Vec3& getHalfLengths() const { return _halfLengths; } + + inline void setRotation(const Quat& quat) { _rotation = quat; } + inline const Quat& getRotation() const { return _rotation; } + inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } + inline bool zeroRotation() const { return _rotation.zeroRotation(); } protected: - virtual ~Box() {} + virtual ~Box() {} - Vec3 _center; - Vec3 _halfLengths; - Quat _rotation; - + Vec3 _center; + Vec3 _halfLengths; + Quat _rotation; + }; @@ -241,188 +241,186 @@ class Box : public Shape class Cone : public Shape { public: - + Cone(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f), - _height(1.0f) {} - + _center(0.0f,0.0f,0.0f), + _radius(1.0f), + _height(1.0f) {} + Cone(const osg::Vec3& center,float radius,float height): - _center(center), - _radius(radius), - _height(height) {} + _center(center), + _radius(radius), + _height(height) {} Cone(const Cone& cone,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(cone,copyop), - _center(cone._center), - _radius(cone._radius), - _height(cone._height), - _rotation(cone._rotation) {} - - META_Shape(osg, Cone); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius, float height) - { - _center = center; - _radius = radius; - _height = height; - } + _center(cone._center), + _radius(cone._radius), + _height(cone._height), + _rotation(cone._rotation) {} - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } + META_Shape(osg, Cone); - inline void setHeight(float height) { _height = height; } - inline float getHeight() const { return _height; } + inline bool valid() const { return _radius>=0.0f; } - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - inline bool zeroRotation() const { return _rotation.zeroRotation(); } - - inline float getBaseOffsetFactor() const { return 0.25f; } - inline float getBaseOffset() const { return -getBaseOffsetFactor()*getHeight(); } + inline void set(const Vec3& center,float radius, float height) + { + _center = center; + _radius = radius; + _height = height; + } + + inline void setCenter(const Vec3& center) { _center = center; } + inline const Vec3& getCenter() const { return _center; } + + inline void setRadius(float radius) { _radius = radius; } + inline float getRadius() const { return _radius; } + + inline void setHeight(float height) { _height = height; } + inline float getHeight() const { return _height; } + + inline void setRotation(const Quat& quat) { _rotation = quat; } + inline const Quat& getRotation() const { return _rotation; } + inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } + inline bool zeroRotation() const { return _rotation.zeroRotation(); } + + inline float getBaseOffsetFactor() const { return 0.25f; } + inline float getBaseOffset() const { return -getBaseOffsetFactor()*getHeight(); } protected: - virtual ~Cone() {} + virtual ~Cone() {} - Vec3 _center; - float _radius; - float _height; - - Quat _rotation; + Vec3 _center; + float _radius; + float _height; + + Quat _rotation; }; class Cylinder : public Shape { public: - + Cylinder(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f), - _height(1.0f) {} - + _center(0.0f,0.0f,0.0f), + _radius(1.0f), + _height(1.0f) {} + Cylinder(const osg::Vec3& center,float radius,float height): - _center(center), - _radius(radius), - _height(height) {} + _center(center), + _radius(radius), + _height(height) {} Cylinder(const Cylinder& cylinder,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(cylinder,copyop), - _center(cylinder._center), - _radius(cylinder._radius), - _height(cylinder._height), - _rotation(cylinder._rotation) {} - - META_Shape(osg, Cylinder); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius, float height) - { - _center = center; - _radius = radius; - _height = height; - } + _center(cylinder._center), + _radius(cylinder._radius), + _height(cylinder._height), + _rotation(cylinder._rotation) {} - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } + META_Shape(osg, Cylinder); - inline void setHeight(float height) { _height = height; } - inline float getHeight() const { return _height; } + inline bool valid() const { return _radius>=0.0f; } - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - bool zeroRotation() const { return _rotation.zeroRotation(); } + inline void set(const Vec3& center,float radius, float height) + { + _center = center; + _radius = radius; + _height = height; + } + + inline void setCenter(const Vec3& center) { _center = center; } + inline const Vec3& getCenter() const { return _center; } + + inline void setRadius(float radius) { _radius = radius; } + inline float getRadius() const { return _radius; } + + inline void setHeight(float height) { _height = height; } + inline float getHeight() const { return _height; } + + inline void setRotation(const Quat& quat) { _rotation = quat; } + inline const Quat& getRotation() const { return _rotation; } + inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } + bool zeroRotation() const { return _rotation.zeroRotation(); } protected: - virtual ~Cylinder() {} - - Vec3 _center; - float _radius; - float _height; - - Quat _rotation; + virtual ~Cylinder() {} + + Vec3 _center; + float _radius; + float _height; + Quat _rotation; }; class Capsule : public Shape { public: - + Capsule(): - _center(0.0f,0.0f,0.0f), - _radius(1.0f), - _height(1.0f) {} - + _center(0.0f,0.0f,0.0f), + _radius(1.0f), + _height(1.0f) {} + Capsule(const osg::Vec3& center,float radius,float height): - _center(center), - _radius(radius), - _height(height) {} + _center(center), + _radius(radius), + _height(height) {} Capsule(const Capsule& capsule,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(capsule,copyop), - _center(capsule._center), - _radius(capsule._radius), - _height(capsule._height), - _rotation(capsule._rotation) {} - - META_Shape(osg, Capsule); - - inline bool valid() const { return _radius>=0.0f; } - - inline void set(const Vec3& center,float radius, float height) - { - _center = center; - _radius = radius; - _height = height; - } + _center(capsule._center), + _radius(capsule._radius), + _height(capsule._height), + _rotation(capsule._rotation) {} - inline void setCenter(const Vec3& center) { _center = center; } - inline const Vec3& getCenter() const { return _center; } - - inline void setRadius(float radius) { _radius = radius; } - inline float getRadius() const { return _radius; } + META_Shape(osg, Capsule); - inline void setHeight(float height) { _height = height; } - inline float getHeight() const { return _height; } + inline bool valid() const { return _radius>=0.0f; } - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - bool zeroRotation() const { return _rotation.zeroRotation(); } + inline void set(const Vec3& center,float radius, float height) + { + _center = center; + _radius = radius; + _height = height; + } + + inline void setCenter(const Vec3& center) { _center = center; } + inline const Vec3& getCenter() const { return _center; } + + inline void setRadius(float radius) { _radius = radius; } + inline float getRadius() const { return _radius; } + + inline void setHeight(float height) { _height = height; } + inline float getHeight() const { return _height; } + + inline void setRotation(const Quat& quat) { _rotation = quat; } + inline const Quat& getRotation() const { return _rotation; } + inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } + bool zeroRotation() const { return _rotation.zeroRotation(); } protected: - virtual ~Capsule() {} + virtual ~Capsule() {} - Vec3 _center; - float _radius; - float _height; - - Quat _rotation; + Vec3 _center; + float _radius; + float _height; + Quat _rotation; }; class InfinitePlane : public Shape, public Plane { public: - InfinitePlane() {} - + InfinitePlane() {} + InfinitePlane(const InfinitePlane& plane,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(plane,copyop), Plane(plane) {} - META_Shape(osg, InfinitePlane); - + META_Shape(osg, InfinitePlane); + protected: virtual ~InfinitePlane() {} @@ -432,101 +430,100 @@ class TriangleMesh : public Shape { public: - TriangleMesh() {} + TriangleMesh() {} TriangleMesh(const TriangleMesh& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(mesh,copyop), - _vertices(mesh._vertices), - _indices(mesh._indices) {} - - META_Shape(osg, TriangleMesh); - - - void setVertices(Vec3Array* vertices) { _vertices = vertices; } - Vec3Array* getVertices() { return _vertices.get(); } - const Vec3Array* getVertices() const { return _vertices.get(); } - - - void setIndices(IndexArray* indices) { _indices = indices; } - IndexArray* getIndices() { return _indices.get(); } - const IndexArray* getIndices() const { return _indices.get(); } - + _vertices(mesh._vertices), + _indices(mesh._indices) {} + + META_Shape(osg, TriangleMesh); + + + void setVertices(Vec3Array* vertices) { _vertices = vertices; } + Vec3Array* getVertices() { return _vertices.get(); } + const Vec3Array* getVertices() const { return _vertices.get(); } + + + void setIndices(IndexArray* indices) { _indices = indices; } + IndexArray* getIndices() { return _indices.get(); } + const IndexArray* getIndices() const { return _indices.get(); } + protected: - ~TriangleMesh() {} - - ref_ptr _vertices; - ref_ptr _indices; - + ~TriangleMesh() {} + + ref_ptr _vertices; + ref_ptr _indices; + }; class ConvexHull : public TriangleMesh { public: - ConvexHull() {} - + ConvexHull() {} + ConvexHull(const ConvexHull& hull,const CopyOp& copyop=CopyOp::SHALLOW_COPY): TriangleMesh(hull,copyop) {} - - META_Shape(osg, TriangleMesh); - + + META_Shape(osg, TriangleMesh); + protected: - ~ConvexHull() {} + ~ConvexHull() {} }; class OSG_EXPORT HeightField : public Shape { public: - HeightField(): - _columns(0), - _rows(0), - _origin(0.0f,0.0f,0.0f), - _dx(1.0f), - _dy(1.0f), + HeightField(): + _columns(0), + _rows(0), + _origin(0.0f,0.0f,0.0f), + _dx(1.0f), + _dy(1.0f), _skirtHeight(0.0f), _borderWidth(0) {} HeightField(const HeightField& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(mesh,copyop), - _columns(mesh._columns), - _rows(mesh._rows), - _origin(mesh._origin), - _dx(mesh._dx), - _dy(mesh._dy), + _columns(mesh._columns), + _rows(mesh._rows), + _origin(mesh._origin), + _dx(mesh._dx), + _dy(mesh._dy), _skirtHeight(mesh._skirtHeight), _borderWidth(mesh._borderWidth), _heights(mesh._heights) {} - META_Shape(osg, HeightField); + META_Shape(osg, HeightField); - typedef std::vector HeightList; + typedef std::vector HeightList; - void allocate(unsigned int numColumns,unsigned int numRows); + void allocate(unsigned int numColumns,unsigned int numRows); - inline unsigned int getNumColumns() const { return _columns; } - inline unsigned int getNumRows() const { return _rows; } + inline unsigned int getNumColumns() const { return _columns; } + inline unsigned int getNumRows() const { return _rows; } - inline void setOrigin(const osg::Vec3& origin) { _origin = origin; } - inline const osg::Vec3& getOrigin() const { return _origin; } + inline void setOrigin(const osg::Vec3& origin) { _origin = origin; } + inline const osg::Vec3& getOrigin() const { return _origin; } - inline void setXInterval(float dx) { _dx = dx; } - inline float getXInterval() const { return _dx; } + inline void setXInterval(float dx) { _dx = dx; } + inline float getXInterval() const { return _dx; } - inline void setYInterval(float dy) { _dy = dy; } - inline float getYInterval() const { return _dy; } + inline void setYInterval(float dy) { _dy = dy; } + inline float getYInterval() const { return _dy; } - /** Set the height of the skirt to render around the edge of HeightField. * The skirt is used as a means of disguising edge boundaries between adjacent HeightField, * particularly of ones with different resolutions.*/ void setSkirtHeight(float skirtHeight) { _skirtHeight = skirtHeight; } - + /** Get the height of the skirt to render around the edge of HeightField.*/ float getSkirtHeight() const { return _skirtHeight; } - + /** Set the width in number of cells in from the edge that the height field should be rendered from. * This exists to allow gradient and curvature continutity to be maintained between adjacent HeightField, where * the border cells will overlap adjacent HeightField.*/ @@ -535,31 +532,31 @@ class OSG_EXPORT HeightField : public Shape /** Get the width in number of cells in from the edge that the height field should be rendered from.*/ unsigned int getBorderWidth() const { return _borderWidth; } - inline void setRotation(const Quat& quat) { _rotation = quat; } - inline const Quat& getRotation() const { return _rotation; } - inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } - inline bool zeroRotation() const { return _rotation.zeroRotation(); } - - /* set a single height point in the height field */ - inline void setHeight(unsigned int c,unsigned int r,float value) - { - _heights[c+r*_columns] = value; - } + inline void setRotation(const Quat& quat) { _rotation = quat; } + inline const Quat& getRotation() const { return _rotation; } + inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } + inline bool zeroRotation() const { return _rotation.zeroRotation(); } - /* Get address of single height point in the height field, allows user to change. */ - inline float& getHeight(unsigned int c,unsigned int r) - { - return _heights[c+r*_columns]; - } + /* set a single height point in the height field */ + inline void setHeight(unsigned int c,unsigned int r,float value) + { + _heights[c+r*_columns] = value; + } - /* Get value of single height point in the height field, not editable. */ - inline float getHeight(unsigned int c,unsigned int r) const - { - return _heights[c+r*_columns]; - } + /* Get address of single height point in the height field, allows user to change. */ + inline float& getHeight(unsigned int c,unsigned int r) + { + return _heights[c+r*_columns]; + } - HeightList& getHeightList() { return _heights; } - const HeightList& getHeightList() const { return _heights; } + /* Get value of single height point in the height field, not editable. */ + inline float getHeight(unsigned int c,unsigned int r) const + { + return _heights[c+r*_columns]; + } + + HeightList& getHeightList() { return _heights; } + const HeightList& getHeightList() const { return _heights; } inline Vec3 getVertex(unsigned int c,unsigned int r) const { @@ -567,27 +564,27 @@ class OSG_EXPORT HeightField : public Shape _origin.y()+getYInterval()*(float)r, _origin.z()+_heights[c+r*_columns]); } - + Vec3 getNormal(unsigned int c,unsigned int r) const; Vec2 getHeightDelta(unsigned int c,unsigned int r) const; protected: - virtual ~HeightField(); + virtual ~HeightField(); - unsigned int _columns,_rows; + unsigned int _columns,_rows; + + osg::Vec3 _origin; + float _dx; + float _dy; - osg::Vec3 _origin; - float _dx; - float _dy; - float _skirtHeight; unsigned int _borderWidth; - Quat _rotation; - HeightList _heights; - + Quat _rotation; + HeightList _heights; + }; typedef HeightField Grid; @@ -599,43 +596,43 @@ class CompositeShape : public Shape - typedef std::vector< ref_ptr > ChildList; - - CompositeShape() {} + typedef std::vector< ref_ptr > ChildList; + + CompositeShape() {} CompositeShape(const CompositeShape& cs,const CopyOp& copyop=CopyOp::SHALLOW_COPY): Shape(cs,copyop), - _children(cs._children) {} - - META_Shape(osg, CompositeShape); + _children(cs._children) {} - /** Set the shape that encloses all of the children.*/ - void setShape(Shape* shape) { _shape = shape; } + META_Shape(osg, CompositeShape); - /** Get the shape that encloses all of the children.*/ - Shape* getShape() { return _shape.get(); } + /** Set the shape that encloses all of the children.*/ + void setShape(Shape* shape) { _shape = shape; } - /** Get the const shape that encloses all of the children.*/ - const Shape* getShape() const { return _shape.get(); } - - /** Get the number of children of this composite shape.*/ - unsigned int getNumChildren() const { return _children.size(); } - - /** Get a child.*/ - Shape* getChild(unsigned int i) { return _children[i].get(); } + /** Get the shape that encloses all of the children.*/ + Shape* getShape() { return _shape.get(); } - /** Get a const child.*/ - const Shape* getChild(unsigned int i) const { return _children[i].get(); } + /** Get the const shape that encloses all of the children.*/ + const Shape* getShape() const { return _shape.get(); } - /** Add a child to the list.*/ - void addChild(Shape* shape) { _children.push_back(shape); } - - /** remove a child from the list.*/ - void removeChild(unsigned int i) { _children.erase(_children.begin()+i); } + /** Get the number of children of this composite shape.*/ + unsigned int getNumChildren() const { return _children.size(); } - /** find the index number of child, if child is not found then it returns getNumChildren(), - * so should be used in similar style to STL's result!=end().*/ - unsigned int findChildNo(Shape* shape) const + /** Get a child.*/ + Shape* getChild(unsigned int i) { return _children[i].get(); } + + /** Get a const child.*/ + const Shape* getChild(unsigned int i) const { return _children[i].get(); } + + /** Add a child to the list.*/ + void addChild(Shape* shape) { _children.push_back(shape); } + + /** remove a child from the list.*/ + void removeChild(unsigned int i) { _children.erase(_children.begin()+i); } + + /** find the index number of child, if child is not found then it returns getNumChildren(), + * so should be used in similar style to STL's result!=end().*/ + unsigned int findChildNo(Shape* shape) const { for (unsigned int childNo=0;childNo<_children.size();++childNo) { @@ -644,13 +641,13 @@ class CompositeShape : public Shape return _children.size(); // node not found. } - + protected: - ~CompositeShape() {} + ~CompositeShape() {} - ref_ptr _shape; - ChildList _children; + ref_ptr _shape; + ChildList _children; }; diff --git a/include/osg/TexGenNode b/include/osg/TexGenNode index a6ebaf1f4..f10dbe4cc 100644 --- a/include/osg/TexGenNode +++ b/include/osg/TexGenNode @@ -31,7 +31,7 @@ class OSG_EXPORT TexGenNode : public Group TexGenNode(const TexGenNode& tgb, const CopyOp& copyop=CopyOp::SHALLOW_COPY); META_Node(osg, TexGenNode); - + enum ReferenceFrame { diff --git a/include/osg/Texture1D b/include/osg/Texture1D index 800f8f0a8..7a4c83b9b 100644 --- a/include/osg/Texture1D +++ b/include/osg/Texture1D @@ -130,8 +130,8 @@ class OSG_EXPORT Texture1D : public Texture /** It's not ideal that _image is mutable, but it's required since * Image::ensureDimensionsArePowerOfTwo() can only be called in a - * valid OpenGL context, and therefore within Texture::apply, which - * is const. */ + * valid OpenGL context, and therefore within Texture::apply, which + * is const. */ mutable ref_ptr _image; /** Subloaded images can have different texture and image sizes. */ diff --git a/include/osg/Texture2D b/include/osg/Texture2D index 5c0394d8b..54b72a36d 100644 --- a/include/osg/Texture2D +++ b/include/osg/Texture2D @@ -135,8 +135,8 @@ class OSG_EXPORT Texture2D : public Texture /** It's not ideal that _image is mutable, but it's required since * Image::ensureDimensionsArePowerOfTwo() can only be called in a - * valid OpenGL context, and therefore within Texture::apply, which - * is const. */ + * valid OpenGL context, and therefore within Texture::apply, which + * is const. */ ref_ptr _image; /** Subloaded images can have different texture and image sizes. */ diff --git a/include/osg/Transform b/include/osg/Transform index e6b4723aa..a991de748 100644 --- a/include/osg/Transform +++ b/include/osg/Transform @@ -104,7 +104,7 @@ class OSG_EXPORT Transform : public Group * deep in the scene graph. It is therefore recommended to only use * absolute Transforms at the top of the scene, for such things as * heads up displays. - */ + */ void setReferenceFrame(ReferenceFrame rf); ReferenceFrame getReferenceFrame() const { return _referenceFrame; } @@ -139,7 +139,7 @@ class OSG_EXPORT Transform : public Group * There is no need to override in subclasses from osg::Transform * since this computeBound() uses the underlying matrix (calling * computeMatrix if required). - */ + */ virtual BoundingSphere computeBound() const; protected : diff --git a/include/osg/TriangleFunctor b/include/osg/TriangleFunctor index 6b9e0dc87..bd44357b6 100644 --- a/include/osg/TriangleFunctor +++ b/include/osg/TriangleFunctor @@ -72,8 +72,8 @@ public: const Vec3* vptr = &_vertexArrayPtr[first]; for(GLsizei i=2;ioperator()(*(vptr),*(vptr+2),*(vptr+1),_treatVertexDataAsTemporary); - else this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); + if ((i%2)) this->operator()(*(vptr),*(vptr+2),*(vptr+1),_treatVertexDataAsTemporary); + else this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); } break; } @@ -138,8 +138,8 @@ public: IndexPointer iptr = indices; for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); + if ((i%2)) this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); + else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); } break; } @@ -207,8 +207,8 @@ public: IndexPointer iptr = indices; for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); + if ((i%2)) this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); + else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); } break; } @@ -274,8 +274,8 @@ public: IndexPointer iptr = indices; for(GLsizei i=2;ioperator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); - else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); + if ((i%2)) this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); + else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); } break; } @@ -328,7 +328,7 @@ public: * non vertex array primitives to vertex array based primitives. * This is done to simplify the implementation of primtive functor * subclasses - users only need override drawArray and drawElements. - */ + */ virtual void begin(GLenum mode) { _modeCache = mode; diff --git a/include/osg/TriangleIndexFunctor b/include/osg/TriangleIndexFunctor index c33b8fb08..ea003c347 100644 --- a/include/osg/TriangleIndexFunctor +++ b/include/osg/TriangleIndexFunctor @@ -74,8 +74,8 @@ public: unsigned int pos=first; for(GLsizei i=2;ioperator()(pos,pos+2,pos+1); - else this->operator()(pos,pos+1,pos+2); + if ((i%2)) this->operator()(pos,pos+2,pos+1); + else this->operator()(pos,pos+1,pos+2); } break; } @@ -139,8 +139,8 @@ public: IndexPointer iptr = indices; for(GLsizei i=2;ioperator()(*(iptr),*(iptr+2),*(iptr+1)); - else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); + if ((i%2)) this->operator()(*(iptr),*(iptr+2),*(iptr+1)); + else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); } break; } @@ -206,8 +206,8 @@ public: IndexPointer iptr = indices; for(GLsizei i=2;ioperator()(*(iptr),*(iptr+2),*(iptr+1)); - else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); + if ((i%2)) this->operator()(*(iptr),*(iptr+2),*(iptr+1)); + else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); } break; } @@ -273,8 +273,8 @@ public: IndexPointer iptr = indices; for(GLsizei i=2;ioperator()(*(iptr),*(iptr+2),*(iptr+1)); - else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); + if ((i%2)) this->operator()(*(iptr),*(iptr+2),*(iptr+1)); + else this->operator()(*(iptr),*(iptr+1),*(iptr+2)); } break; } diff --git a/include/osg/UByte4 b/include/osg/UByte4 index 19295ae9c..9b6709864 100644 --- a/include/osg/UByte4 +++ b/include/osg/UByte4 @@ -22,6 +22,6 @@ namespace osg { typedef UByte4 Vec4ub; #endif -} // end of namespace osg +} // end of namespace osg #endif diff --git a/include/osg/Vec2b b/include/osg/Vec2b index dae8f8029..362a7bd24 100644 --- a/include/osg/Vec2b +++ b/include/osg/Vec2b @@ -26,7 +26,7 @@ class Vec2b { public: - // Methods are defined here so that they are implicitly inlined + // Methods are defined here so that they are implicitly inlined /** Type of Vec class.*/ typedef char value_type; @@ -123,7 +123,7 @@ class Vec2b /** Unary vector add. Slightly more efficient because no temporary * intermediate object. - */ + */ inline Vec2b& operator += (const Vec2b& rhs) { _v[0] += rhs._v[0]; @@ -145,10 +145,10 @@ class Vec2b return *this; } -}; // end of class Vec2b +}; // end of class Vec2b -} // end of namespace osg +} // end of namespace osg #endif diff --git a/include/osg/Vec2d b/include/osg/Vec2d index c540779a2..71c9f4acd 100644 --- a/include/osg/Vec2d +++ b/include/osg/Vec2d @@ -51,7 +51,7 @@ class Vec2d inline bool operator != (const Vec2d& v) const { return _v[0]!=v._v[0] || _v[1]!=v._v[1]; } - inline bool operator < (const Vec2d& v) const + inline bool operator < (const Vec2d& v) const { if (_v[0]v._v[0]) return false; @@ -91,8 +91,8 @@ class Vec2d inline Vec2d& operator *= (value_type rhs) { _v[0]*=rhs; - _v[1]*=rhs; - return *this; + _v[1]*=rhs; + return *this; } /** Divide by scalar. */ @@ -105,8 +105,8 @@ class Vec2d inline Vec2d& operator /= (value_type rhs) { _v[0]/=rhs; - _v[1]/=rhs; - return *this; + _v[1]/=rhs; + return *this; } /** Binary vector add. */ @@ -117,12 +117,12 @@ class Vec2d /** Unary vector add. Slightly more efficient because no temporary * intermediate object. - */ + */ inline Vec2d& operator += (const Vec2d& rhs) { _v[0] += rhs._v[0]; _v[1] += rhs._v[1]; - return *this; + return *this; } /** Binary vector subtract. */ @@ -136,20 +136,20 @@ class Vec2d { _v[0]-=rhs._v[0]; _v[1]-=rhs._v[1]; - return *this; - } + return *this; + } /** Negation operator. Returns the negative of the Vec2d. */ inline const Vec2d operator - () const { - return Vec2d (-_v[0], -_v[1]); - } + return Vec2d (-_v[0], -_v[1]); + } /** Length of the vector = sqrt( vec . vec ) */ - inline value_type length() const - { - return sqrt( _v[0]*_v[0] + _v[1]*_v[1] ); - } + inline value_type length() const + { + return sqrt( _v[0]*_v[0] + _v[1]*_v[1] ); + } /** Length squared of the vector = vec . vec */ inline value_type length2( void ) const @@ -159,20 +159,20 @@ class Vec2d /** Normalize the vector so that it has length unity. * Returns the previous length of the vector. - */ - inline value_type normalize() - { - value_type norm = Vec2d::length(); + */ + inline value_type normalize() + { + value_type norm = Vec2d::length(); if (norm>0.0) { value_type inv = 1.0/norm; - _v[0] *= inv; - _v[1] *= inv; + _v[0] *= inv; + _v[1] *= inv; } - return( norm ); - } + return( norm ); + } -}; // end of class Vec2d +}; // end of class Vec2d -} // end of namespace osg +} // end of namespace osg #endif diff --git a/include/osg/Vec2f b/include/osg/Vec2f index 5797aba54..b58e72196 100644 --- a/include/osg/Vec2f +++ b/include/osg/Vec2f @@ -167,7 +167,7 @@ class Vec2f } return( norm ); } - + }; // end of class Vec2f } // end of namespace osg diff --git a/include/osg/Vec2s b/include/osg/Vec2s index d6252cf8d..2a04562ca 100644 --- a/include/osg/Vec2s +++ b/include/osg/Vec2s @@ -12,7 +12,7 @@ */ #ifndef OSG_VEC2S -#define OSG_VEC2S 1 +#define OSG_VEC2S 1 namespace osg { diff --git a/include/osg/Vec3b b/include/osg/Vec3b index 412f1c8fd..59cf64d7a 100644 --- a/include/osg/Vec3b +++ b/include/osg/Vec3b @@ -121,12 +121,12 @@ class Vec3b inline Vec3b operator + (const Vec3b& rhs) const { return Vec3b(_v[0]+rhs._v[0], _v[1]+rhs._v[1], - _v[2]+rhs._v[2]); + _v[2]+rhs._v[2]); } /** Unary vector add. Slightly more efficient because no temporary * intermediate object. - */ + */ inline Vec3b& operator += (const Vec3b& rhs) { _v[0] += rhs._v[0]; @@ -139,7 +139,7 @@ class Vec3b inline Vec3b operator - (const Vec3b& rhs) const { return Vec3b(_v[0]-rhs._v[0], _v[1]-rhs._v[1], - _v[2]-rhs._v[2]); + _v[2]-rhs._v[2]); } /** Unary vector subtract. */ @@ -151,10 +151,10 @@ class Vec3b return *this; } -}; // end of class Vec3b +}; // end of class Vec3b -} // end of namespace osg +} // end of namespace osg #endif diff --git a/include/osg/Vec3s b/include/osg/Vec3s index 851e4dca3..80a527ed3 100644 --- a/include/osg/Vec3s +++ b/include/osg/Vec3s @@ -12,7 +12,7 @@ */ #ifndef OSG_VEC3S -#define OSG_VEC3S 1 +#define OSG_VEC3S 1 namespace osg { diff --git a/include/osg/Vec4s b/include/osg/Vec4s index 2daed1227..ca173181c 100644 --- a/include/osg/Vec4s +++ b/include/osg/Vec4s @@ -12,7 +12,7 @@ */ #ifndef OSG_VEC4S -#define OSG_VEC4S 1 +#define OSG_VEC4S 1 namespace osg { @@ -52,7 +52,7 @@ class Vec4s else return (_v[3]> (std::istream& input, Vec2b& vec) @@ -152,7 +152,7 @@ inline std::ostream& operator << (std::ostream& output, const Vec3b& vec) output << (int)vec._v[0] << " " << (int)vec._v[1] << " " << (int)vec._v[2]; - return output; // to enable cascading + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Vec3b& vec) @@ -169,7 +169,7 @@ inline std::ostream& operator << (std::ostream& output, const Vec4b& vec) << (int)vec._v[1] << " " << (int)vec._v[2] << " " << (int)vec._v[3]; - return output; // to enable cascading + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Vec4b& vec) @@ -185,7 +185,7 @@ inline std::ostream& operator << (std::ostream& output, const Vec2s& vec) { output << (int)vec._v[0] << " " << (int)vec._v[1]; - return output; // to enable cascading + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Vec2s& vec) @@ -201,7 +201,7 @@ inline std::ostream& operator << (std::ostream& output, const Vec3s& vec) output << (int)vec._v[0] << " " << (int)vec._v[1] << " " << (int)vec._v[2]; - return output; // to enable cascading + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Vec3s& vec) @@ -218,7 +218,7 @@ inline std::ostream& operator << (std::ostream& output, const Vec4s& vec) << (int)vec._v[1] << " " << (int)vec._v[2] << " " << (int)vec._v[3]; - return output; // to enable cascading + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Vec4s& vec) @@ -267,7 +267,7 @@ inline std::ostream& operator << (std::ostream& output, const Vec4ub& vec) << (int)vec._v[1] << " " << (int)vec._v[2] << " " << (int)vec._v[3]; - return output; // to enable cascading + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Vec4ub& vec) @@ -301,10 +301,10 @@ inline std::istream& operator >> (std::istream& input, Quat& vec) inline std::ostream& operator << (std::ostream& output, const Plane& pl) { output << pl[0] << " " - << pl[1] << " " - << pl[2] << " " - << pl[3]; - return output; // to enable cascading + << pl[1] << " " + << pl[2] << " " + << pl[3]; + return output; // to enable cascading } inline std::istream& operator >> (std::istream& input, Plane& vec) diff --git a/include/osg/ref_ptr b/include/osg/ref_ptr index a5960d155..f70b3f2ea 100644 --- a/include/osg/ref_ptr +++ b/include/osg/ref_ptr @@ -76,9 +76,9 @@ class ref_ptr inline const T* operator->() const { return _ptr; } - inline bool operator!() const { return _ptr==0L; } + inline bool operator!() const { return _ptr==0L; } - inline bool valid() const { return _ptr!=0L; } + inline bool valid() const { return _ptr!=0L; } inline T* get() { return _ptr; } diff --git a/include/osgDB/DynamicLibrary b/include/osgDB/DynamicLibrary index 2451e7c15..7ed48e758 100644 --- a/include/osgDB/DynamicLibrary +++ b/include/osgDB/DynamicLibrary @@ -51,8 +51,8 @@ class OSGDB_EXPORT DynamicLibrary : public osg::Referenced protected: - /** get handle to library file */ - static HANDLE getLibraryHandle( const std::string& libraryName); + /** get handle to library file */ + static HANDLE getLibraryHandle( const std::string& libraryName); /** disallow default constructor.*/ DynamicLibrary():osg::Referenced() {} diff --git a/include/osgDB/Export b/include/osgDB/Export index 0119f47c6..fc7ea59bc 100644 --- a/include/osgDB/Export +++ b/include/osgDB/Export @@ -29,12 +29,12 @@ # if defined( _LIB ) || defined( USE_STATIC ) # define OSGDB_EXPORT # elif defined( OSGDB_LIBRARY ) - # define OSGDB_EXPORT __declspec(dllexport) - # else - # define OSGDB_EXPORT __declspec(dllimport) - # endif /* OSGDBSG_LIBRARY */ + # define OSGDB_EXPORT __declspec(dllexport) + # else + # define OSGDB_EXPORT __declspec(dllimport) + # endif /* OSGDBSG_LIBRARY */ #else - # define OSGDB_EXPORT + # define OSGDB_EXPORT #endif /** diff --git a/include/osgDB/Output b/include/osgDB/Output index e94df2ba8..090f30b31 100644 --- a/include/osgDB/Output +++ b/include/osgDB/Output @@ -46,8 +46,8 @@ class OSGDB_EXPORT Output : public std::ofstream Output& indent(); - /** wrap a string with "" quotes and use \" for any internal quotes.*/ - std::string wrapString(const std::string& str); + /** wrap a string with "" quotes and use \" for any internal quotes.*/ + std::string wrapString(const std::string& str); inline void setIndentStep(int step) { _indentStep = step; } inline int getIndentStep() const { return _indentStep; } diff --git a/include/osgGA/AnimationPathManipulator b/include/osgGA/AnimationPathManipulator index 092c51e22..7752bb37e 100644 --- a/include/osgGA/AnimationPathManipulator +++ b/include/osgGA/AnimationPathManipulator @@ -35,9 +35,9 @@ class OSGGA_EXPORT AnimationPathManipulator : public MatrixManipulator { public: - AnimationPathManipulator( osg::AnimationPath* animationPath=0 ); + AnimationPathManipulator( osg::AnimationPath* animationPath=0 ); - AnimationPathManipulator( const std::string& filename ); + AnimationPathManipulator( const std::string& filename ); virtual const char* className() const { return "AnimationPath"; } @@ -63,7 +63,7 @@ class OSGGA_EXPORT AnimationPathManipulator : public MatrixManipulator const osg::AnimationPath* getAnimationPath() const { return _animationPath.get(); } - bool valid() const { return _animationPath.valid(); } + bool valid() const { return _animationPath.valid(); } void init(const GUIEventAdapter& ea,GUIActionAdapter& us); @@ -77,13 +77,13 @@ class OSGGA_EXPORT AnimationPathManipulator : public MatrixManipulator protected: - bool _valid; + bool _valid; bool _printOutTiminInfo; - void handleFrame( double time ); + void handleFrame( double time ); - osg::ref_ptr _animationPath; + osg::ref_ptr _animationPath; double _timeOffset; double _timeScale; diff --git a/include/osgGA/DriveManipulator b/include/osgGA/DriveManipulator index ea08da520..2f71206c1 100644 --- a/include/osgGA/DriveManipulator +++ b/include/osgGA/DriveManipulator @@ -63,14 +63,14 @@ class OSGGA_EXPORT DriveManipulator : public MatrixManipulator /** Get the keyboard and mouse usage of this manipulator.*/ virtual void getUsage(osg::ApplicationUsage& usage) const; - void setModelScale( double in_ms ) { _modelScale = in_ms; } - double getModelScale() const { return _modelScale; } + void setModelScale( double in_ms ) { _modelScale = in_ms; } + double getModelScale() const { return _modelScale; } - void setVelocity( double in_vel ) { _velocity = in_vel; } - double getVelocity() const { return _velocity; } + void setVelocity( double in_vel ) { _velocity = in_vel; } + double getVelocity() const { return _velocity; } - void setHeight( double in_h ) { _height = in_h; } - double getHeight() const { return _height; } + void setHeight( double in_h ) { _height = in_h; } + double getHeight() const { return _height; } protected: diff --git a/include/osgGA/KeySwitchMatrixManipulator b/include/osgGA/KeySwitchMatrixManipulator index 062b8519e..1c550840d 100644 --- a/include/osgGA/KeySwitchMatrixManipulator +++ b/include/osgGA/KeySwitchMatrixManipulator @@ -45,9 +45,9 @@ public: */ void addMatrixManipulator(int key, std::string name, MatrixManipulator *cm); - /** - Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd. - */ + /** + Add a camera manipulator with an autogenerated keybinding which is '1' + previous number of camera's registerd. + */ void addNumberedMatrixManipulator(MatrixManipulator *cm); unsigned int getNumMatrixManipulators() const { return _manips.size(); } diff --git a/include/osgIntrospection/Comparator b/include/osgIntrospection/Comparator index cb024b83b..54d2382b0 100644 --- a/include/osgIntrospection/Comparator +++ b/include/osgIntrospection/Comparator @@ -19,48 +19,48 @@ namespace osgIntrospection { - class Value; + class Value; - struct Comparator - { - virtual bool isEqualTo(const Value& l, const Value& r) const = 0; - virtual bool isLessThanOrEqualTo(const Value& l, const Value& r) const = 0; - virtual ~Comparator() {} - }; - - template - struct TotalOrderComparator: Comparator - { - virtual bool isEqualTo(const Value& l, const Value& r) const - { - const T &vl = variant_cast(l); - const T &vr = variant_cast(r); - return vl <= vr && vr <= vl; - } + struct Comparator + { + virtual bool isEqualTo(const Value& l, const Value& r) const = 0; + virtual bool isLessThanOrEqualTo(const Value& l, const Value& r) const = 0; + virtual ~Comparator() {} + }; + + template + struct TotalOrderComparator: Comparator + { + virtual bool isEqualTo(const Value& l, const Value& r) const + { + const T &vl = variant_cast(l); + const T &vr = variant_cast(r); + return vl <= vr && vr <= vl; + } - virtual bool isLessThanOrEqualTo(const Value& l, const Value& r) const - { - return variant_cast(l) <= variant_cast(r); - } - - virtual ~TotalOrderComparator() {} - }; - - template - struct PartialOrderComparator: Comparator - { - virtual bool isEqualTo(const Value& l, const Value& r) const - { - return variant_cast(l) == variant_cast(r); - } + virtual bool isLessThanOrEqualTo(const Value& l, const Value& r) const + { + return variant_cast(l) <= variant_cast(r); + } + + virtual ~TotalOrderComparator() {} + }; + + template + struct PartialOrderComparator: Comparator + { + virtual bool isEqualTo(const Value& l, const Value& r) const + { + return variant_cast(l) == variant_cast(r); + } - virtual bool isLessThanOrEqualTo(const Value& , const Value& ) const - { - throw ComparisonOperatorNotSupportedException(typeid(T), "less than or equal to"); - } - - virtual ~PartialOrderComparator() {} - }; + virtual bool isLessThanOrEqualTo(const Value& , const Value& ) const + { + throw ComparisonOperatorNotSupportedException(typeid(T), "less than or equal to"); + } + + virtual ~PartialOrderComparator() {} + }; } diff --git a/include/osgProducer/EventAdapter b/include/osgProducer/EventAdapter index 79b239343..492d44464 100644 --- a/include/osgProducer/EventAdapter +++ b/include/osgProducer/EventAdapter @@ -84,7 +84,7 @@ class OSGPRODUCER_EXPORT EventAdapter : public osgGA::GUIEventAdapter void adaptResize(double t, float Xmin, float Ymin, float Xmax, float Ymax); /** method for adapting mouse scroll wheel events. */ - void adaptMouseScroll(double t, Producer::KeyboardMouseCallback::ScrollingMotion sm); + void adaptMouseScroll(double t, Producer::KeyboardMouseCallback::ScrollingMotion sm); /** method for adapting mouse motion events whilst mouse buttons are pressed.*/ void adaptMouseMotion(double t, float x, float y); @@ -125,8 +125,8 @@ class OSGPRODUCER_EXPORT EventAdapter : public osgGA::GUIEventAdapter // which required the mouse buttons state at the time of the event. static unsigned int _s_accumulatedButtonMask; - // used to store current button value - static int _s_button; + // used to store current button value + static int _s_button; // used to store window min and max values. static float _s_Xmin; diff --git a/include/osgProducer/Export b/include/osgProducer/Export index 5284dfc8a..0cf7d41fc 100644 --- a/include/osgProducer/Export +++ b/include/osgProducer/Export @@ -30,12 +30,12 @@ # if defined( _LIB ) || defined( USE_STATIC ) # define OSGPRODUCER_EXPORT # elif defined( OSGPRODUCER_LIBRARY ) - # define OSGPRODUCER_EXPORT __declspec(dllexport) - # else - # define OSGPRODUCER_EXPORT __declspec(dllimport) - #endif /* OSGPRODUCER_LIBRARY */ + # define OSGPRODUCER_EXPORT __declspec(dllexport) + # else + # define OSGPRODUCER_EXPORT __declspec(dllimport) + #endif /* OSGPRODUCER_LIBRARY */ #else - #define OSGPRODUCER_EXPORT + #define OSGPRODUCER_EXPORT #endif /** diff --git a/include/osgSim/Impostor b/include/osgSim/Impostor index 052f96c5f..06c5d2866 100644 --- a/include/osgSim/Impostor +++ b/include/osgSim/Impostor @@ -79,7 +79,7 @@ class OSGSIM_EXPORT Impostor : public osg::LOD /** Set the Impostor threshold distance. * For eye points further than this threshold the Imposter is used if appropriate, * otherwise the LOD children as chosen as per a standard LOD node. - */ + */ inline void setImpostorThreshold(float distance) { _impostorThreshold = distance; } /* Get the Impostor threshold distance. */ diff --git a/include/osgSim/ImpostorSprite b/include/osgSim/ImpostorSprite index 08185d9f6..fc6946556 100644 --- a/include/osgSim/ImpostorSprite +++ b/include/osgSim/ImpostorSprite @@ -121,7 +121,7 @@ class OSGSIM_EXPORT ImpostorSprite : public osg::Drawable void setTexture(osg::Texture2D* tex,int s,int t); osg::Texture2D* getTexture() { return _texture; } const osg::Texture2D* getTexture() const { return _texture; } - + int s() const { return _s; } int t() const { return _t; } diff --git a/include/osgTerrain/DataSet b/include/osgTerrain/DataSet index 76def058f..dad318589 100644 --- a/include/osgTerrain/DataSet +++ b/include/osgTerrain/DataSet @@ -932,7 +932,7 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced void setRadiusToMaxVisibleDistanceRatio(float ratio) { _radiusToMaxVisibleDistanceRatio = ratio; } float getRadiusToMaxVisibleDistanceRatio() const { return _radiusToMaxVisibleDistanceRatio; } - + void setVerticalScale(float verticalScale) { _verticalScale = verticalScale; } float getVerticalScale() const { return _verticalScale; } @@ -1117,7 +1117,7 @@ class OSGTERRAIN_EXPORT DataSet : public osg::Referenced unsigned int _maximumTileImageSize; unsigned int _maximumTileTerrainSize; float _maximumVisiableDistanceOfTopLevel; - float _radiusToMaxVisibleDistanceRatio; + float _radiusToMaxVisibleDistanceRatio; float _verticalScale; float _skirtRatio; diff --git a/include/osgText/Text b/include/osgText/Text index cb02e75a9..32b5b50b1 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -151,11 +151,11 @@ public: LEFT_BASE_LINE, CENTER_BASE_LINE, RIGHT_BASE_LINE, - + LEFT_BOTTOM_BASE_LINE, CENTER_BOTTOM_BASE_LINE, RIGHT_BOTTOM_BASE_LINE, - + BASE_LINE = LEFT_BASE_LINE /// default. };