64 virtual bool removeChildren(
unsigned int pos,
unsigned int numChildrenToRemove=1);
75 UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED
89 inline void setCenter(
const vec_type& center) {
if (_centerMode!=UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED) { _centerMode=USER_DEFINED_CENTER; } _userDefinedCenter = center; }
92 inline const vec_type&
getCenter()
const {
if ((_centerMode==USER_DEFINED_CENTER)||(_centerMode==UNION_OF_BOUNDING_SPHERE_AND_USER_DEFINED))
return _userDefinedCenter;
else return getBound().center(); }
121 void setRange(
unsigned int childNo,
float min,
float max);
124 inline float getMinRange(
unsigned int childNo)
const {
return _rangeList[childNo].first; }
127 inline float getMaxRange(
unsigned int childNo)
const {
return _rangeList[childNo].second; }
131 inline unsigned int getNumRanges()
const {
return static_cast<unsigned int>(_rangeList.size()); }
Definition BoundingSphere:35
VT vec_type
Definition BoundingSphere:37
VT::value_type value_type
Definition BoundingSphere:38
virtual bool addChild(Node *child)
void setCenterMode(CenterMode mode)
Definition LOD:79
RangeMode _rangeMode
Definition LOD:148
virtual bool addChild(Node *child)
const vec_type & getCenter() const
Definition LOD:92
RangeMode
Definition LOD:107
@ DISTANCE_FROM_EYE_POINT
Definition LOD:108
RangeList _rangeList
Definition LOD:149
virtual bool removeChildren(unsigned int pos, unsigned int numChildrenToRemove=1)
const RangeList & getRangeList() const
Definition LOD:137
value_type getRadius() const
Definition LOD:103
void setCenter(const vec_type ¢er)
Definition LOD:89
virtual bool addChild(Node *child, float rmin, float rmax)
RangeMode getRangeMode() const
Definition LOD:116
virtual ~LOD()
Definition LOD:142
std::pair< float, float > MinMaxPair
Definition LOD:66
void setRange(unsigned int childNo, float min, float max)
virtual BoundingSphere computeBound() const
osg::BoundingSphere::vec_type vec_type
Definition LOD:51
float getMinRange(unsigned int childNo) const
Definition LOD:124
CenterMode _centerMode
Definition LOD:144
float getMaxRange(unsigned int childNo) const
Definition LOD:127
LOD(const LOD &, const CopyOp ©op=CopyOp::SHALLOW_COPY)
void setRangeMode(RangeMode mode)
Definition LOD:113
unsigned int getNumRanges() const
Definition LOD:131
void setRadius(value_type radius)
Definition LOD:100
osg::BoundingSphere::value_type value_type
Definition LOD:52
void setRangeList(const RangeList &rangeList)
Definition LOD:134
CenterMode
Definition LOD:72
@ USER_DEFINED_CENTER
Uses the user defined center as the center of object; the bounding sphere is determined by the user d...
Definition LOD:74
@ USE_BOUNDING_SPHERE_CENTER
Uses the bounding sphere's center as the center of object and the geometrical bounding sphere of the ...
Definition LOD:73
CenterMode getCenterMode() const
Definition LOD:82
bool addChild(const ref_ptr< T > &child, float rmin, float rmax)
Definition LOD:62
virtual void traverse(NodeVisitor &nv)
vec_type _userDefinedCenter
Definition LOD:145
std::vector< MinMaxPair > RangeList
Definition LOD:67
value_type _radius
Definition LOD:146
Definition NodeVisitor:82
T * get() const
Definition ref_ptr:117
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
#define OSG_EXPORT
Definition osg/Export:39