56 virtual bool addChild(
Node *child,
float rmin,
float rmax,
const std::string& filename,
float priorityOffset=0.0f,
float priorityScale=1.0f);
58 template<
class T>
bool addChild(
const ref_ptr<T>& child,
float rmin,
float rmax,
const std::string& filename,
float priorityOffset=0.0f,
float priorityScale=1.0f) {
return addChild(child.
get(), rmin, rmax, filename, priorityOffset, priorityScale); }
60 virtual bool removeChildren(
unsigned int pos,
unsigned int numChildrenToRemove=1);
The core osg library provides the basic scene graph classes such as Nodes, State and Drawables,...
Definition AlphaFunc:19
std::vector< ref_ptr< Node > > NodeList
Definition Group:22
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
virtual bool addChild(Node *child)
Add Node to Group.
LOD()
Default constructor The default constructor sets.
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
std::string _databasePath
Definition PagedLOD:177
PagedLOD()
Default constructor The default constructor sets.
osg::ref_ptr< osg::Referenced > & getDatabaseRequest(unsigned int childNo)
Return the DatabaseRequest object used by the DatabasePager to keep track of file load requests being...
Definition PagedLOD:136
void setFileName(unsigned int childNo, const std::string &filename)
Definition PagedLOD:99
PagedLOD(const PagedLOD &, const CopyOp ©op=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
osg::Referenced * getDatabaseOptions()
Get the optional database osgDB::Options object used when reading children.
Definition PagedLOD:67
virtual bool addChild(Node *child, float rmin, float rmax, const std::string &filename, float priorityOffset=0.0f, float priorityScale=1.0f)
void setFrameNumber(unsigned int childNo, unsigned int frameNumber)
Definition PagedLOD:127
bool addChild(const ref_ptr< T > &child, float rmin, float rmax, const std::string &filename, float priorityOffset=0.0f, float priorityScale=1.0f)
Definition PagedLOD:58
float getPriorityOffset(unsigned int childNo) const
Definition PagedLOD:105
void expandPerRangeDataTo(unsigned int pos)
bool getDisableExternalChildrenPaging() const
Definition PagedLOD:160
void setDatabaseOptions(osg::Referenced *options)
Set the optional database osgDB::Options object to use when reading children.
Definition PagedLOD:64
const osg::ref_ptr< osg::Referenced > & getDatabaseRequest(unsigned int childNo) const
Return the const DatabaseRequest object.
Definition PagedLOD:139
unsigned int getNumPriorityOffsets() const
Definition PagedLOD:106
void setPriorityOffset(unsigned int childNo, float priorityOffset)
Definition PagedLOD:104
const std::string & getDatabasePath() const
Get the database path used to prepend to children's filenames.
Definition PagedLOD:77
unsigned int getMinimumExpiryFrames(unsigned int childNo) const
Definition PagedLOD:119
float getPriorityScale(unsigned int childNo) const
Definition PagedLOD:109
double getTimeStamp(unsigned int childNo) const
Definition PagedLOD:124
unsigned int getNumTimeStamps() const
Definition PagedLOD:125
bool addChild(const ref_ptr< T > &child, float rmin, float rmax)
Definition PagedLOD:54
void setFrameNumberOfLastTraversal(unsigned int frameNumber)
Set the frame number of the last time that this PageLOD node was traversed.
Definition PagedLOD:145
const std::string & getFileName(unsigned int childNo) const
Definition PagedLOD:100
void setMinimumExpiryTime(unsigned int childNo, double minTime)
Sets the minimum amount of time, in seconds, that must pass without a child being traversed before it...
Definition PagedLOD:113
double getMinimumExpiryTime(unsigned int childNo) const
Definition PagedLOD:114
void setDisableExternalChildrenPaging(bool flag)
Set whether you want to disable the paging in of external nodes.
Definition PagedLOD:158
virtual bool addChild(Node *child, float rmin, float rmax)
PerRangeDataList _perRangeDataList
Definition PagedLOD:183
bool _disableExternalChildrenPaging
Definition PagedLOD:181
void setTimeStamp(unsigned int childNo, double timeStamp)
Definition PagedLOD:123
unsigned int _frameNumberOfLastTraversal
Definition PagedLOD:179
unsigned int _numChildrenThatCannotBeExpired
Definition PagedLOD:180
unsigned int getNumMinimumExpiryTimes() const
Definition PagedLOD:115
unsigned int getNumPriorityScales() const
Definition PagedLOD:110
virtual bool addChild(Node *child)
Add Node to Group.
void setMinimumExpiryFrames(unsigned int childNo, unsigned int minFrames)
Sets the minimum number of frames that must be rendered without a child being traversed before it can...
Definition PagedLOD:118
unsigned getFrameNumber(unsigned int childNo) const
Definition PagedLOD:128
std::vector< PerRangeData > PerRangeDataList
Definition PagedLOD:97
virtual bool removeExpiredChildren(double expiryTime, unsigned int expiryFrame, NodeList &removedChildren)
Remove the children from the PagedLOD which haven't been visited since specified expiry time and expi...
unsigned int getFrameNumberOfLastTraversal() const
Get the frame number of the last time that this PageLOD node was traversed.
Definition PagedLOD:148
unsigned int getNumFrameNumbers() const
Definition PagedLOD:129
void setPriorityScale(unsigned int childNo, float priorityScale)
Definition PagedLOD:108
void setDatabasePath(const std::string &path)
Set the database path to prepend to children's filenames.
unsigned int getNumFileNames() const
Definition PagedLOD:101
unsigned int getNumChildrenThatCannotBeExpired() const
Get the number of children that the PagedLOD must keep around, even if they are older than their expi...
Definition PagedLOD:155
const osg::Referenced * getDatabaseOptions() const
Get the optional database osgDB::Options object used when reading children.
Definition PagedLOD:70
virtual void traverse(NodeVisitor &nv)
Traverse downwards : calls children's accept method with NodeVisitor.
virtual bool removeChildren(unsigned int pos, unsigned int numChildrenToRemove=1)
Remove children from Group.
unsigned int getNumMinimumExpiryFrames() const
Definition PagedLOD:120
void setNumChildrenThatCannotBeExpired(unsigned int num)
Set the number of children that the PagedLOD must keep around, even if they are older than their expi...
Definition PagedLOD:152
ref_ptr< Referenced > _databaseOptions
Definition PagedLOD:176
unsigned int _frameNumberOfLastReleaseGLObjects
Definition PagedLOD:93
double _minExpiryTime
Definition PagedLOD:89
float _priorityScale
Definition PagedLOD:88
unsigned int _minExpiryFrames
Definition PagedLOD:90
osg::ref_ptr< osg::Referenced > _databaseRequest
Definition PagedLOD:94
float _priorityOffset
Definition PagedLOD:87
unsigned int _frameNumber
Definition PagedLOD:92
std::string _filename
Definition PagedLOD:86
PerRangeData(const PerRangeData &prd)
double _timeStamp
Definition PagedLOD:91
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
Base class for providing reference counted objects.
Definition Referenced:44
#define OSG_EXPORT
Definition Export:39