From 538ced579e8961507e706d7fc7e944621ca4fc5c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 9 May 2005 13:09:07 +0000 Subject: [PATCH] Removed deprecated API in preparation for 0.9.9 release. --- examples/osgforest/osgforest.cpp | 2 +- .../osgparticleeffects/osgparticleeffects.cpp | 2 +- .../osgshadowtexture/osgshadowtexture.cpp | 2 +- examples/osgshape/osgshape.cpp | 2 +- .../osgspheresegment/osgspheresegment.cpp | 2 +- examples/osgspotlight/osgspotlight.cpp | 2 +- include/osg/AnimationPath | 3 +-- include/osg/Billboard | 7 ----- include/osg/LightSource | 5 ---- include/osg/Shape | 3 --- include/osg/StateSet | 27 ------------------- include/osg/Texture2D | 8 ------ include/osg/Transform | 5 ---- include/osgProducer/OsgCameraGroup | 6 ----- include/osgText/Font | 7 ----- include/osgText/Text | 8 ------ include/osgUtil/RenderBin | 2 -- include/osgUtil/RenderStage | 2 -- include/osgUtil/SceneView | 8 ------ src/osgPlugins/osg/Shape.cpp | 2 +- src/osgWrappers/osg/Shape.cpp | 1 - src/osgWrappers/osg/Texture2D.cpp | 1 - 22 files changed, 8 insertions(+), 99 deletions(-) diff --git a/examples/osgforest/osgforest.cpp b/examples/osgforest/osgforest.cpp index d5420367c..0d7b789b2 100644 --- a/examples/osgforest/osgforest.cpp +++ b/examples/osgforest/osgforest.cpp @@ -385,7 +385,7 @@ osg::Geode* ForestTechniqueManager::createTerrain(const osg::Vec3& origin, const { osg::HeightField* grid = new osg::HeightField; - grid->allocateGrid(numColumns,numRows); + grid->allocate(numColumns,numRows); grid->setOrigin(origin); grid->setXInterval(size.x()/(float)(numColumns-1)); grid->setYInterval(size.y()/(float)(numRows-1)); diff --git a/examples/osgparticleeffects/osgparticleeffects.cpp b/examples/osgparticleeffects/osgparticleeffects.cpp index b18fb68ff..9bd901137 100644 --- a/examples/osgparticleeffects/osgparticleeffects.cpp +++ b/examples/osgparticleeffects/osgparticleeffects.cpp @@ -161,7 +161,7 @@ void build_world(osg::Group *root) float z_scale = scale*3.0f; osg::HeightField* grid = new osg::HeightField; - grid->allocateGrid(38,39); + grid->allocate(38,39); grid->setXInterval(scale); grid->setYInterval(scale); diff --git a/examples/osgshadowtexture/osgshadowtexture.cpp b/examples/osgshadowtexture/osgshadowtexture.cpp index 929f82434..80d577b43 100644 --- a/examples/osgshadowtexture/osgshadowtexture.cpp +++ b/examples/osgshadowtexture/osgshadowtexture.cpp @@ -69,7 +69,7 @@ osg::Node* createBase(const osg::Vec3& center,float radius) osg::HeightField* grid = new osg::HeightField; - grid->allocateGrid(38,39); + grid->allocate(38,39); grid->setOrigin(center+osg::Vec3(-radius,-radius,0.0f)); grid->setXInterval(radius*2.0f/(float)(38-1)); grid->setYInterval(radius*2.0f/(float)(39-1)); diff --git a/examples/osgshape/osgshape.cpp b/examples/osgshape/osgshape.cpp index a8f9d4edb..3cca5bb6b 100644 --- a/examples/osgshape/osgshape.cpp +++ b/examples/osgshape/osgshape.cpp @@ -46,7 +46,7 @@ osg::Geode* createShapes( char* img_filename ) geode->addDrawable(new osg::ShapeDrawable(new osg::Capsule(osg::Vec3(8.0f,0.0f,0.0f),radius,height),hints)); osg::HeightField* grid = new osg::HeightField; - grid->allocateGrid(38,39); + grid->allocate(38,39); grid->setXInterval(0.28f); grid->setYInterval(0.28f); diff --git a/examples/osgspheresegment/osgspheresegment.cpp b/examples/osgspheresegment/osgspheresegment.cpp index 98525917a..9c63de8fa 100644 --- a/examples/osgspheresegment/osgspheresegment.cpp +++ b/examples/osgspheresegment/osgspheresegment.cpp @@ -192,7 +192,7 @@ void build_world(osg::Group *root) float z_scale = scale*3.0f; osg::HeightField* grid = new osg::HeightField; - grid->allocateGrid(38,39); + grid->allocate(38,39); grid->setXInterval(scale); grid->setYInterval(scale); diff --git a/examples/osgspotlight/osgspotlight.cpp b/examples/osgspotlight/osgspotlight.cpp index 861f872a0..6974d88fc 100644 --- a/examples/osgspotlight/osgspotlight.cpp +++ b/examples/osgspotlight/osgspotlight.cpp @@ -159,7 +159,7 @@ osg::Node* createBase(const osg::Vec3& center,float radius) osg::HeightField* grid = new osg::HeightField; - grid->allocateGrid(38,39); + grid->allocate(38,39); grid->setOrigin(center+osg::Vec3(-radius,-radius,0.0f)); grid->setXInterval(radius*2.0f/(float)(38-1)); grid->setYInterval(radius*2.0f/(float)(39-1)); diff --git a/include/osg/AnimationPath b/include/osg/AnimationPath index 15c7283b5..62b744df8 100644 --- a/include/osg/AnimationPath +++ b/include/osg/AnimationPath @@ -109,9 +109,8 @@ class OSG_EXPORT AnimationPath : public virtual osg::Object matrix.preMult(osg::Matrixd::translate(-_position)); } - #ifdef USE_DEPRECATED_API protected: -#endif + osg::Vec3d _position; osg::Quat _rotation; osg::Vec3d _scale; diff --git a/include/osg/Billboard b/include/osg/Billboard index 6f40fb0e6..bea3509e1 100644 --- a/include/osg/Billboard +++ b/include/osg/Billboard @@ -57,13 +57,6 @@ class OSG_EXPORT Billboard : public Geode inline const Vec3& getNormal() const { return _normal; } -#ifdef USE_DEPRECATED_API - /** Set the specified child Drawable's position. */ - inline void setPos(unsigned int i,const Vec3& pos) { _positionList[i] = pos; } - /** Get the specified child Drawable's position. */ - inline const Vec3& getPos(unsigned int i) const { return _positionList[i]; } -#endif - /** Set the specified child Drawable's position. */ inline void setPosition(unsigned int i,const Vec3& pos) { _positionList[i] = pos; } /** Get the specified child Drawable's position. */ diff --git a/include/osg/LightSource b/include/osg/LightSource index c7164d56f..6a15b7223 100644 --- a/include/osg/LightSource +++ b/include/osg/LightSource @@ -40,11 +40,6 @@ class OSG_EXPORT LightSource : public Group { RELATIVE_RF, ABSOLUTE_RF -#ifdef USE_DEPRECATED_API - , - RELATIVE_TO_PARENTS=RELATIVE_RF, - RELATIVE_TO_ABSOLUTE=ABSOLUTE_RF, -#endif }; /** Set the light sources's ReferenceFrame, either to be relative to its diff --git a/include/osg/Shape b/include/osg/Shape index 4ae2a0801..ff2371fa1 100644 --- a/include/osg/Shape +++ b/include/osg/Shape @@ -504,9 +504,6 @@ class OSG_EXPORT HeightField : public Shape void allocate(unsigned int numColumns,unsigned int numRows); - // deprecated. - void allocateGrid(unsigned int numColumns,unsigned int numRows) { allocate(numColumns,numRows); } - inline unsigned int getNumColumns() const { return _columns; } inline unsigned int getNumRows() const { return _rows; } diff --git a/include/osg/StateSet b/include/osg/StateSet index b8aa6445c..338a9c94c 100644 --- a/include/osg/StateSet +++ b/include/osg/StateSet @@ -96,12 +96,6 @@ class OSG_EXPORT StateSet : public Object complete state, typically used for a default global state.*/ void setGlobalDefaults(); -#ifdef USE_DEPRECATED_API - /** Set all the modes to inherit, typically used to signify - nodes which inherit all of their modes for the global state.*/ - void setAllToInherit() { clear(); } -#endif - /** Clear the StateSet of all modes and attributes.*/ void clear(); @@ -123,11 +117,6 @@ class OSG_EXPORT StateSet : public Object */ void setMode(StateAttribute::GLMode mode, StateAttribute::GLModeValue value); -#ifdef USE_DEPRECATED_API - /** Set this StateSet to inherit specified GLMode type from parents. - * Has the effect of deleting any GLMode of specified type from StateSet.*/ - void setModeToInherit(StateAttribute::GLMode mode) { removeMode(mode); } -#endif /** Remove \c mode from this \c StateSet. * @note Don't use this method to remove modes related to textures. For * this purpose, use \c removeTextureMode(), that accepts an extra @@ -173,11 +162,6 @@ class OSG_EXPORT StateSet : public Object /** Set this StateSet to contain specified attribute and set the associated GLMode's to specified value.*/ void setAttributeAndModes(StateAttribute *attribute, StateAttribute::GLModeValue value=StateAttribute::ON); -#ifdef USE_DEPRECATED_API - /** Set this StateSet to inherit specified attribute type from parents. - * has the effect of deleting any state attributes of specified type from StateSet.*/ - void setAttributeToInherit(StateAttribute::Type type) { removeAttribute(type); } -#endif /** remove attribute of specified type from StateSet.*/ void removeAttribute(StateAttribute::Type type, unsigned int member=0); @@ -218,11 +202,6 @@ class OSG_EXPORT StateSet : public Object */ void setTextureMode(unsigned int unit,StateAttribute::GLMode mode, StateAttribute::GLModeValue value); -#ifdef USE_DEPRECATED_API - /** Set this StateSet to inherit specified GLMode type from parents. - * has the effect of deleting any GLMode of specified type from StateSet.*/ - void setTextureModeToInherit(unsigned int unit,StateAttribute::GLMode mode) { removeTextureMode(unit,mode); } -#endif /** Remove texture mode from StateSet.*/ void removeTextureMode(unsigned int unit,StateAttribute::GLMode mode); @@ -247,12 +226,6 @@ class OSG_EXPORT StateSet : public Object /** Set this StateSet to contain specified attribute and set the associated GLMode's to specified value.*/ void setTextureAttributeAndModes(unsigned int unit,StateAttribute *attribute, StateAttribute::GLModeValue value=StateAttribute::ON); -#ifdef USE_DEPRECATED_API - /** Set this StateSet to inherit specified attribute type from parents. - * Has the effect of deleting any state attributes of specified type from StateSet.*/ - void setTextureAttributeToInherit(unsigned int unit,StateAttribute::Type type) { removeTextureAttribute(unit,type); } -#endif - /** remove texture attribute of specified type from StateSet.*/ void removeTextureAttribute(unsigned int unit, StateAttribute::Type type); diff --git a/include/osg/Texture2D b/include/osg/Texture2D index e66871e02..dd060556a 100644 --- a/include/osg/Texture2D +++ b/include/osg/Texture2D @@ -87,14 +87,6 @@ class OSG_EXPORT Texture2D : public Texture void setTextureHeight(int height) { _textureHeight=height; } int getTextureHeight() const { return _textureHeight; } - /** Deprecated. */ - inline void getTextureSize(int& width, int& height) const - { - width = _textureWidth; - height = _textureHeight; - } - - class OSG_EXPORT SubloadCallback : public Referenced { public: diff --git a/include/osg/Transform b/include/osg/Transform index 1b73e5ef3..1f8c8984f 100644 --- a/include/osg/Transform +++ b/include/osg/Transform @@ -91,11 +91,6 @@ class OSG_EXPORT Transform : public Group { RELATIVE_RF, ABSOLUTE_RF -#ifdef USE_DEPRECATED_API - , - RELATIVE_TO_PARENTS=RELATIVE_RF, - RELATIVE_TO_ABSOLUTE=ABSOLUTE_RF, -#endif }; /** Set the transform's ReferenceFrame, either to be relative to its diff --git a/include/osgProducer/OsgCameraGroup b/include/osgProducer/OsgCameraGroup index 0372577b9..ee83e678c 100644 --- a/include/osgProducer/OsgCameraGroup +++ b/include/osgProducer/OsgCameraGroup @@ -120,12 +120,6 @@ class OSGPRODUCER_EXPORT OsgCameraGroup : public Producer::CameraGroup const osg::StateSet *getGlobalStateSet() const { return _global_stateset.get(); } -#ifdef USE_DEPRECATED_API - void setBackgroundColor( const osg::Vec4& backgroundColor) { setClearColor(backgroundColor); } - - const osg::Vec4& getBackgroundColor() const { return getClearColor(); } -#endif - void setClearColor( const osg::Vec4& clearColor ); const osg::Vec4& getClearColor() const; diff --git a/include/osgText/Font b/include/osgText/Font index 67048e18f..420f0eae5 100644 --- a/include/osgText/Font +++ b/include/osgText/Font @@ -64,13 +64,6 @@ public: virtual std::string getFileName() const; -#ifdef USE_DEPRECATED_API - virtual void setSize(unsigned int width, unsigned int height) { setFontResolution(width,height); } - - unsigned int getWidth() const { return getFontWidth(); } - unsigned int getHeight() const { return getFontHeight(); } -#endif - /** Set the pixel width and height hint.*/ virtual void setFontResolution(unsigned int width, unsigned int height); diff --git a/include/osgText/Text b/include/osgText/Text index d7a8f4a15..48e4f256d 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -48,14 +48,6 @@ public: /** Get the font. Return 0 if default is being used.*/ const Font* getFont() const { return _font.get(); } -#ifdef USE_DEPRECATED_API - - /* deprecated */ - void setFontSize(unsigned int width, unsigned int height) - { - setFontResolution(width,height); - } -#endif /** Set the Font reference width and height resolution in texels. * Note, the size may not be supported by current font, diff --git a/include/osgUtil/RenderBin b/include/osgUtil/RenderBin index 927c2fa64..9e30e3bbf 100644 --- a/include/osgUtil/RenderBin +++ b/include/osgUtil/RenderBin @@ -130,9 +130,7 @@ class OSGUTIL_EXPORT RenderBin : public osg::Object void getPrims(Statistics* primStats); bool getPrims(Statistics* primStats, int nbin); -#ifndef USE_DEPRECATED_API protected: -#endif virtual ~RenderBin(); diff --git a/include/osgUtil/RenderStage b/include/osgUtil/RenderStage index ab9bf225f..492779ab2 100644 --- a/include/osgUtil/RenderStage +++ b/include/osgUtil/RenderStage @@ -133,9 +133,7 @@ class OSGUTIL_EXPORT RenderStage : public RenderBin /** Extract stats for current draw list. */ bool getStats(Statistics* primStats); -#ifndef USE_DEPRECATED_API protected: -#endif virtual ~RenderStage(); diff --git a/include/osgUtil/SceneView b/include/osgUtil/SceneView index dd1f5d617..6a958d07b 100644 --- a/include/osgUtil/SceneView +++ b/include/osgUtil/SceneView @@ -108,14 +108,6 @@ class OSGUTIL_EXPORT SceneView : public osg::Referenced, public osg::CullSetting inline osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); } -#ifdef USE_DEPRECATED_API - /** Set the background color used in glClearColor(). - Defaults to an off blue color.*/ - void setBackgroundColor(const osg::Vec4& color) { _clearColor=color; } - /** Get the background color.*/ - const osg::Vec4& getBackgroundColor() const { return _clearColor; } -#endif - /** Set the color used in glClearColor(). Defaults to an off blue color.*/ void setClearColor(const osg::Vec4& color) { _clearColor=color; } diff --git a/src/osgPlugins/osg/Shape.cpp b/src/osgPlugins/osg/Shape.cpp index ada94e568..d3a97e168 100644 --- a/src/osgPlugins/osg/Shape.cpp +++ b/src/osgPlugins/osg/Shape.cpp @@ -473,7 +473,7 @@ bool HeightField_readLocalData(Object& obj, Input& fr) int numcolumns,numrows; fr[1].getInt(numcolumns); fr[2].getInt(numrows); - heightfield.allocateGrid(numcolumns,numrows); + heightfield.allocate(numcolumns,numrows); fr+=3; iteratorAdvanced = true; } diff --git a/src/osgWrappers/osg/Shape.cpp b/src/osgWrappers/osg/Shape.cpp index dd0c001a1..5779fc807 100644 --- a/src/osgWrappers/osg/Shape.cpp +++ b/src/osgWrappers/osg/Shape.cpp @@ -206,7 +206,6 @@ BEGIN_OBJECT_REFLECTOR(osg::HeightField) Method1(void, accept, IN, osg::ShapeVisitor &, sv); Method1(void, accept, IN, osg::ConstShapeVisitor &, csv); Method2(void, allocate, IN, unsigned int, numColumns, IN, unsigned int, numRows); - Method2(void, allocateGrid, IN, unsigned int, numColumns, IN, unsigned int, numRows); Method0(unsigned int, getNumColumns); Method0(unsigned int, getNumRows); Method1(void, setOrigin, IN, const osg::Vec3 &, origin); diff --git a/src/osgWrappers/osg/Texture2D.cpp b/src/osgWrappers/osg/Texture2D.cpp index 90a42984b..f330b2497 100644 --- a/src/osgWrappers/osg/Texture2D.cpp +++ b/src/osgWrappers/osg/Texture2D.cpp @@ -42,7 +42,6 @@ BEGIN_ABSTRACT_OBJECT_REFLECTOR(osg::Texture2D) Method0(int, getTextureWidth); Method1(void, setTextureHeight, IN, int, height); Method0(int, getTextureHeight); - Method2(void, getTextureSize, IN, int &, width, IN, int &, height); Method1(void, setSubloadCallback, IN, osg::Texture2D::SubloadCallback *, cb); Method0(osg::Texture2D::SubloadCallback *, getSubloadCallback); Method0(const osg::Texture2D::SubloadCallback *, getSubloadCallback);