Qarning fixes, and updated the date in NEWS to reflect todays release of 0.8.45
This commit is contained in:
parent
2bd20f5c6f
commit
26d34ed6d6
2
NEWS
2
NEWS
@ -3,7 +3,7 @@ OSG News (most significant items from ChangeLog)
|
|||||||
================================================
|
================================================
|
||||||
|
|
||||||
|
|
||||||
22nd April 2002 - osg-0.8.45.tar.gz
|
26th April 2002 - osg-0.8.45.tar.gz
|
||||||
|
|
||||||
>>> Support added for Solaris, texture cube mapping & muliple projections.
|
>>> Support added for Solaris, texture cube mapping & muliple projections.
|
||||||
|
|
||||||
|
@ -78,18 +78,18 @@ class SG_EXPORT Drawable : public Object
|
|||||||
* @param i index of the parent to get.
|
* @param i index of the parent to get.
|
||||||
* @return the parent i.
|
* @return the parent i.
|
||||||
*/
|
*/
|
||||||
inline Node* getParent(const int i) { return _parents[i]; }
|
inline Node* getParent(const unsigned int i) { return _parents[i]; }
|
||||||
/** Get a single const parent of Drawable.
|
/** Get a single const parent of Drawable.
|
||||||
* @param i index of the parent to get.
|
* @param i index of the parent to get.
|
||||||
* @return the parent i.
|
* @return the parent i.
|
||||||
*/
|
*/
|
||||||
inline const Node* getParent(const int i) const { return _parents[i]; }
|
inline const Node* getParent(const unsigned int i) const { return _parents[i]; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of parents of node.
|
* Get the number of parents of node.
|
||||||
* @return the number of parents of this node.
|
* @return the number of parents of this node.
|
||||||
*/
|
*/
|
||||||
inline const int getNumParents() const { return _parents.size(); }
|
inline const unsigned int getNumParents() const { return _parents.size(); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,13 +57,13 @@ class SG_EXPORT Group : public Node
|
|||||||
virtual bool replaceChild( Node *origChild, Node* newChild );
|
virtual bool replaceChild( Node *origChild, Node* newChild );
|
||||||
|
|
||||||
/** return the number of chilren nodes.*/
|
/** return the number of chilren nodes.*/
|
||||||
inline const int getNumChildren() const { return _children.size(); }
|
inline const unsigned int getNumChildren() const { return _children.size(); }
|
||||||
|
|
||||||
/** return child node at position i.*/
|
/** return child node at position i.*/
|
||||||
inline Node *getChild( const int i ) { return _children[i].get(); }
|
inline Node *getChild( const unsigned int i ) { return _children[i].get(); }
|
||||||
|
|
||||||
/** return child node at position i.*/
|
/** return child node at position i.*/
|
||||||
inline const Node *getChild( const int i ) const { return _children[i].get(); }
|
inline const Node *getChild( const unsigned int i ) const { return _children[i].get(); }
|
||||||
|
|
||||||
/** return true if node is contained within Group.*/
|
/** return true if node is contained within Group.*/
|
||||||
inline bool containsNode( const Node* node ) const
|
inline bool containsNode( const Node* node ) const
|
||||||
|
@ -46,7 +46,7 @@ class SG_EXPORT LOD : public Group
|
|||||||
inline const float getRange(const unsigned int index) const { return _rangeList[index]; }
|
inline const float getRange(const unsigned int index) const { return _rangeList[index]; }
|
||||||
|
|
||||||
/** returns the number of ranges currently set.*/
|
/** returns the number of ranges currently set.*/
|
||||||
inline const int getNumRanges() const { return _rangeList.size(); }
|
inline const unsigned int getNumRanges() const { return _rangeList.size(); }
|
||||||
|
|
||||||
/** Sets the object-space point which defines the center of the osg::LOD.
|
/** Sets the object-space point which defines the center of the osg::LOD.
|
||||||
center is affected by any transforms in the hierarchy above the osg::LOD.*/
|
center is affected by any transforms in the hierarchy above the osg::LOD.*/
|
||||||
|
@ -83,13 +83,13 @@ class SG_EXPORT Node : public Object
|
|||||||
* prevent modification of the parent list.*/
|
* prevent modification of the parent list.*/
|
||||||
inline ParentList getParents() { return _parents; }
|
inline ParentList getParents() { return _parents; }
|
||||||
|
|
||||||
inline Group* getParent(const int i) { return _parents[i]; }
|
inline Group* getParent(const unsigned int i) { return _parents[i]; }
|
||||||
/**
|
/**
|
||||||
* Get a single const parent of node.
|
* Get a single const parent of node.
|
||||||
* @param i index of the parent to get.
|
* @param i index of the parent to get.
|
||||||
* @return the parent i.
|
* @return the parent i.
|
||||||
*/
|
*/
|
||||||
inline const Group* getParent(const int i) const { return _parents[i]; }
|
inline const Group* getParent(const unsigned int i) const { return _parents[i]; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of parents of node.
|
* Get the number of parents of node.
|
||||||
|
@ -28,7 +28,7 @@ extern osg::Node *makeClouds( void );
|
|||||||
struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback
|
struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback
|
||||||
{
|
{
|
||||||
/** Get the transformation matrix which moves from local coords to world coords.*/
|
/** Get the transformation matrix which moves from local coords to world coords.*/
|
||||||
virtual const bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform* transform, osg::NodeVisitor* nv) const
|
virtual const bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
|
||||||
{
|
{
|
||||||
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
||||||
if (cv)
|
if (cv)
|
||||||
@ -40,7 +40,7 @@ struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Get the transformation matrix which moves from world coords to local coords.*/
|
/** Get the transformation matrix which moves from world coords to local coords.*/
|
||||||
virtual const bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform* transform, osg::NodeVisitor* nv) const
|
virtual const bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
|
||||||
{
|
{
|
||||||
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
|
||||||
if (cv)
|
if (cv)
|
||||||
|
@ -52,7 +52,7 @@ bool Group_writeLocalData(const Object& obj, Output& fw)
|
|||||||
const Group& group = static_cast<const Group&>(obj);
|
const Group& group = static_cast<const Group&>(obj);
|
||||||
|
|
||||||
fw.indent() << "num_children " << group.getNumChildren() << std::endl;
|
fw.indent() << "num_children " << group.getNumChildren() << std::endl;
|
||||||
for(int i=0;i<group.getNumChildren();++i)
|
for(unsigned int i=0;i<group.getNumChildren();++i)
|
||||||
{
|
{
|
||||||
fw.writeObject(*group.getChild(i));
|
fw.writeObject(*group.getChild(i));
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ bool LOD_writeLocalData(const Object& obj, Output& fw)
|
|||||||
fw.indent() << "Ranges {"<< std::endl;
|
fw.indent() << "Ranges {"<< std::endl;
|
||||||
fw.moveIn();
|
fw.moveIn();
|
||||||
|
|
||||||
for(int i=0; i<lod.getNumRanges();++i)
|
for(unsigned int i=0; i<lod.getNumRanges();++i)
|
||||||
{
|
{
|
||||||
fw.indent() << lod.getRange(i) << std::endl;
|
fw.indent() << lod.getRange(i) << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -144,12 +144,12 @@ void InsertImpostorsVisitor::insertImpostors()
|
|||||||
osg::Impostor* impostor = osgNew Impostor;
|
osg::Impostor* impostor = osgNew Impostor;
|
||||||
|
|
||||||
// standard LOD settings
|
// standard LOD settings
|
||||||
for(int ci=0;ci<lod->getNumChildren();++ci)
|
for(unsigned int ci=0;ci<lod->getNumChildren();++ci)
|
||||||
{
|
{
|
||||||
impostor->addChild(lod->getChild(ci));
|
impostor->addChild(lod->getChild(ci));
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int ri=0;ri<lod->getNumRanges();++ri)
|
for(unsigned int ri=0;ri<lod->getNumRanges();++ri)
|
||||||
{
|
{
|
||||||
impostor->setRange(ri,lod->getRange(ri));
|
impostor->setRange(ri,lod->getRange(ri));
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ void Optimizer::FlattenStaticTransformsVisitor::doTransform(osg::Object* obj,osg
|
|||||||
lod->setCenter(lod->getCenter()*matrix);
|
lod->setCenter(lod->getCenter()*matrix);
|
||||||
|
|
||||||
// adjust ranges to new scale.
|
// adjust ranges to new scale.
|
||||||
for(int i=0;i<lod->getNumRanges();++i)
|
for(unsigned int i=0;i<lod->getNumRanges();++i)
|
||||||
{
|
{
|
||||||
lod->setRange(i,lod->getRange(i)*ratio);
|
lod->setRange(i,lod->getRange(i)*ratio);
|
||||||
}
|
}
|
||||||
@ -528,16 +528,15 @@ void Optimizer::FlattenStaticTransformsVisitor::removeTransforms()
|
|||||||
osg::ref_ptr<osg::Transform> transform = titr->first;
|
osg::ref_ptr<osg::Transform> transform = titr->first;
|
||||||
osg::ref_ptr<osg::Group> group = osgNew osg::Group;
|
osg::ref_ptr<osg::Group> group = osgNew osg::Group;
|
||||||
|
|
||||||
int i;
|
for(unsigned int i=0;i<transform->getNumChildren();++i)
|
||||||
for(i=0;i<transform->getNumChildren();++i)
|
|
||||||
{
|
{
|
||||||
for(int j=0;j<transform->getNumParents();++j)
|
for(unsigned int j=0;j<transform->getNumParents();++j)
|
||||||
{
|
{
|
||||||
group->addChild(transform->getChild(i));
|
group->addChild(transform->getChild(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=transform->getNumParents()-1;i>=0;--i)
|
for(int i=transform->getNumParents()-1;i>=0;--i)
|
||||||
{
|
{
|
||||||
transform->getParent(i)->replaceChild(transform.get(),group.get());
|
transform->getParent(i)->replaceChild(transform.get(),group.get());
|
||||||
}
|
}
|
||||||
@ -623,7 +622,7 @@ void Optimizer::RemoveRedundentNodesVisitor::removeRedundentNodes()
|
|||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
void Optimizer::CombineLODsVisitor::apply(osg::LOD& lod)
|
void Optimizer::CombineLODsVisitor::apply(osg::LOD& lod)
|
||||||
{
|
{
|
||||||
for(int i=0;i<lod.getNumParents();++i)
|
for(unsigned int i=0;i<lod.getNumParents();++i)
|
||||||
{
|
{
|
||||||
if (typeid(*lod.getParent(i))==typeid(osg::Group))
|
if (typeid(*lod.getParent(i))==typeid(osg::Group))
|
||||||
{
|
{
|
||||||
@ -646,7 +645,7 @@ void Optimizer::CombineLODsVisitor::combineLODs()
|
|||||||
|
|
||||||
LODSet lodChildren;
|
LODSet lodChildren;
|
||||||
|
|
||||||
for(int i=0;i<group->getNumChildren();++i)
|
for(unsigned int i=0;i<group->getNumChildren();++i)
|
||||||
{
|
{
|
||||||
osg::Node* child = group->getChild(i);
|
osg::Node* child = group->getChild(i);
|
||||||
osg::LOD* lod = dynamic_cast<osg::LOD*>(child);
|
osg::LOD* lod = dynamic_cast<osg::LOD*>(child);
|
||||||
@ -686,7 +685,7 @@ void Optimizer::CombineLODsVisitor::combineLODs()
|
|||||||
{
|
{
|
||||||
|
|
||||||
osg::LOD* lod = *lod_itr;
|
osg::LOD* lod = *lod_itr;
|
||||||
for(int i=0;i<lod->getNumRanges()-1;++i)
|
for(unsigned int i=0;i<lod->getNumRanges()-1;++i)
|
||||||
{
|
{
|
||||||
if (maxRange<lod->getRange(i+1)) maxRange = lod->getRange(i+1);
|
if (maxRange<lod->getRange(i+1)) maxRange = lod->getRange(i+1);
|
||||||
rangeMap.insert(RangeMap::value_type(RangePair(lod->getRange(i),lod->getRange(i+1)),lod->getChild(i)));
|
rangeMap.insert(RangeMap::value_type(RangePair(lod->getRange(i),lod->getRange(i+1)),lod->getChild(i)));
|
||||||
|
Loading…
Reference in New Issue
Block a user