Moved the radius parameter from PageLOD into LOD.

This commit is contained in:
Robert Osfield
2004-07-01 13:53:30 +00:00
parent a8ee967f14
commit 0c38189018
9 changed files with 63 additions and 39 deletions

View File

@@ -76,6 +76,15 @@ class SG_EXPORT LOD : public Group
inline const Vec3& getCenter() const { if (_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else return getBound().center(); }
/** Set the object-space reference radius of the volume enclosed by the LOD.
* Used to detmine the bounding sphere of the LOD in the absense of any children.*/
inline void setRadius(float radius) { _radius = radius; }
/** Get the object-space radius of the volume enclosed by the LOD.*/
inline float getRadius() const { return _radius; }
/** Modes that control how the range values should be intepreted when computing which child is active.*/
enum RangeMode
{
@@ -110,6 +119,8 @@ class SG_EXPORT LOD : public Group
protected :
virtual ~LOD() {}
virtual bool computeBound() const;
virtual void childRemoved(unsigned int pos, unsigned int numChildrenToRemove);
virtual void childInserted(unsigned int pos);
@@ -118,6 +129,7 @@ class SG_EXPORT LOD : public Group
CenterMode _centerMode;
Vec3 _userDefinedCenter;
float _radius;
RangeMode _rangeMode;
RangeList _rangeList;

View File

@@ -77,14 +77,6 @@ class SG_EXPORT PagedLOD : public LOD
unsigned int getNumTimeStamps() const { return _perRangeDataList.size(); }
/** Set the object-space reference radius of the volume enclosed by the PagedLOD.
* Used to detmine the bounding sphere of the PagedLOD in the absense of any children.*/
inline void setRadius(float radius) { _radius = radius; }
/** Get the object-space radius of the volume enclosed by the PagedLOD.*/
inline float getRadius() const { return _radius; }
/** Set the number of children that the PagedLOD must keep around, even if thay are older than their expiry time.*/
inline void setNumChildrenThatCannotBeExpired(unsigned int num) { _numChildrenThatCannotBeExpired = num; }
@@ -100,8 +92,6 @@ class SG_EXPORT PagedLOD : public LOD
virtual ~PagedLOD() {}
virtual bool computeBound() const;
virtual void childRemoved(unsigned int pos, unsigned int numChildrenToRemove);
virtual void childInserted(unsigned int pos);
@@ -110,7 +100,6 @@ class SG_EXPORT PagedLOD : public LOD
void expandPerRangeDataTo(unsigned int pos);
float _radius;
unsigned int _numChildrenThatCannotBeExpired;
PerRangeDataList _perRangeDataList;