diff --git a/include/osg/Billboard b/include/osg/Billboard index c785fea68..36d72b448 100644 --- a/include/osg/Billboard +++ b/include/osg/Billboard @@ -55,11 +55,18 @@ class SG_EXPORT Billboard : public Geode inline const Vec3& getNormal() const { return _normal; } +#ifdef USE_DEPRECTATED_API /** Set the position of specified drawable. */ inline void setPos(unsigned int i,const Vec3& pos) { _positionList[i] = pos; } /** Get the position of specified drawable. */ inline const Vec3& getPos(unsigned int i) const { return _positionList[i]; } +#endif + /** Set the position of specified drawable. */ + inline void setPosition(unsigned int i,const Vec3& pos) { _positionList[i] = pos; } + /** Get the position of specified drawable. */ + inline const Vec3& getPosition(unsigned int i) const { return _positionList[i]; } + /** PositionList represents a list of pivot points for each drawable.*/ typedef std::vector PositionList; diff --git a/src/osgPlugins/ive/Billboard.cpp b/src/osgPlugins/ive/Billboard.cpp index de4ae0e23..f4e3cc091 100644 --- a/src/osgPlugins/ive/Billboard.cpp +++ b/src/osgPlugins/ive/Billboard.cpp @@ -40,7 +40,7 @@ void Billboard::write(DataOutputStream* out){ int size = _positionList.size(); out->writeInt(size); for(int i=0;iwriteVec3(getPos(i)); + out->writeVec3(getPosition(i)); } } @@ -68,7 +68,7 @@ void Billboard::read(DataInputStream* in){ // Read positions int size = in->readInt(); for(int i=0;ireadVec3()); + setPosition(i,in->readVec3()); } } diff --git a/src/osgPlugins/txp/TXPParser.cpp b/src/osgPlugins/txp/TXPParser.cpp index 3e0afe3ef..100542651 100644 --- a/src/osgPlugins/txp/TXPParser.cpp +++ b/src/osgPlugins/txp/TXPParser.cpp @@ -854,7 +854,7 @@ void* labelRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf) billboard->setAxis(osg::Vec3(0.0f,0.0,1.0f) ); billboard->setNormal(osg::Vec3(0.0f,-1.0,0.0f)); billboard->setMode(osg::Billboard::AXIAL_ROT); - billboard->setPos(0,pos); + billboard->setPosition(0,pos); _parse->getCurrTop()->addChild(billboard.get()); } @@ -1314,7 +1314,7 @@ void* geomRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf) geometry->dirtyBound(); billboard->addDrawable(geometry); - billboard->setPos(0, center); + billboard->setPosition(0, center); } break; case trpgBillboard::Group: @@ -1330,7 +1330,7 @@ void* geomRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf) geometry->dirtyBound(); billboard->addDrawable(geometry); - billboard->setPos(0, center); + billboard->setPosition(0, center); } break; default: diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 08a96eecf..7c70721ea 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -787,7 +787,7 @@ void CullVisitor::apply(Billboard& node) for(unsigned int i=0;igetNumDrawables();++i) { - billboard->setPos(i,billboard->getPos(i)*matrix); + billboard->setPosition(i,billboard->getPosition(i)*matrix); billboard->getDrawable(i)->accept(tf); billboard->getDrawable(i)->dirtyBound(); }