![]() |
VR-Forces 4.6.1 Class Documentation
|
A Hierarchical paged LOD is a paged LOD which pages in a single file when the cull visitor is with-in a certain distance. More...

Classes | |
| class | PagedFileRoot |
| Paged file root node, used to change the file state when the file is paged-in. More... | |
Public Types | |
| typedef boost::unordered_map < DtUniqueID, DtSceneObject * > | SceneObjectMap |
Public Member Functions | |
| DtHierarchicalPagedLod (DtDe &de, const std::string &filename, float distanceNear, float distanceFar, float tileRadius, float childTileRadius, const osg::Vec3d &fileCenter, const osg::Vec3d &childrenCenter, bool sparseChildren, bool substitutiveChildren, const osg::Matrixd &fileTranslation, osgDB::Options *options) | |
| CTOR to create a paged LOD. | |
| virtual | ~DtHierarchicalPagedLod () |
| Destructor. | |
| virtual const char * | className () const |
| void | addChildHierarchy (DtHierarchicalPagedLod *child) |
| Add a child node. | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| Traverse the LOD with a node visitor. | |
| virtual void | traverseAll (osg::NodeVisitor &nv) |
| Traversal of all children, called based on mode of visitor. | |
| virtual void | traverseActive (osg::NodeVisitor &nv) |
| Traversal of only active children,, called based on mode of visitor. | |
| virtual void | cullActive (osg::NodeVisitor &nv) |
| Traversal of active children by a cull visitor. | |
| void | cullActive2D (DtOsgCullVisitor &nv) |
| Called by cullActive() to do 2D (ortho) culling. | |
| void | cullActive3D (osg::NodeVisitor &nv) |
| Called by cullActive() to do 3D (perspective) culling. | |
| virtual osg::BoundingSphere | computeBound () const |
| Compute a bound for the LOD. | |
| virtual void | traverseFile (osg::NodeVisitor &nv, float distance) |
| Traverse the local file. | |
| virtual void | traverseChildren (osg::NodeVisitor &nv) |
| Traverse the children. | |
| virtual bool | fileInRange (float distance) const |
| Check to see if the file should be visible. | |
| virtual float | fileRangeDistance (osg::NodeVisitor &nv) const |
| Calculate the distances from the LOD to the node visitor. | |
| virtual float | childRangeDistance (osg::NodeVisitor &nv) const |
| Calculate the distances from the LOD to the node visitor. | |
| void | pageInFile (osg::NodeVisitor &nv, float distance) |
| Page in my file. The file may not be immediately loaded. | |
| void | pageOutFile (int lastCullTime, osg::NodeList &toRemove) |
| Page out my file. | |
| bool | fileNotLoaded () const |
| The file has three states, not-loaded, paging, and loaded. | |
| bool | fileIsPaging () const |
| Check to see if the file is paging in. | |
| bool | fileIsLoaded () const |
| Check to see if the file is loaded. | |
| virtual bool | fileInChildRange (float distance) const |
| Check to see if any children could be visible. | |
| void | pageInChildren (osg::NodeVisitor &nv, float distance) |
| Cause all children to page in their files. | |
| void | pageOutChildren (int lastCullTime, osg::NodeList &toRemove) |
| Cause all children to page out their files. | |
| bool | childrenLoaded () const |
| Check to see if all children have loaded their files. | |
| osg::ref_ptr< osg::Node > | fileNode () |
| Get the file node, this will be null if the file is not loaded or paging in. | |
| virtual bool | addPagedInChild (Node *child) |
| Called to add paged in child. | |
| int | getNumChildrenPagedIn () |
| If we page in tiles, increase the paged-in count with parents. | |
| void | increaseCountUpToParents () |
| If we page in tiles, increase the paged-in count with parents. | |
| void | decreaseCountUpToParents (int amount) |
| If we page out tiles, decrease the paged-in count with the parents. | |
| virtual void | adjustLOD (Node *child) |
| Called to find and remove the first LOD. | |
| float | fileRangeCullDistance2D (DtOsgCullVisitor &nv) |
| Get a culling range based on a 2D projection. | |
| bool | fileInRange2D (float distance, float cull) |
| Determine if the file is in cull range as well as LOD range. | |
| float | childRangeCullDistance2D (DtOsgCullVisitor &nv) |
| Get a culling range for the child center based on a 2D projection. | |
| bool | fileInChildRange2D (float cull, float lod) |
| Determine if the children are in cull range as well as LOD range. | |
| void | setThreadSafeRefUnref (bool threadSafe) |
| Set whether to use a mutex to ensure ref() and unref() are thread safe. | |
| virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
| Resize any per context GLObject buffers to specified size. | |
| virtual void | releaseGLObjects (osg::State *state) const |
| If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. | |
| virtual std::string | fileName () const |
| virtual const std::vector < osg::ref_ptr < DtHierarchicalPagedLod > > & | children () const |
| virtual const osg::Matrix & | fileTranslation () const |
| float | getTileRadius () |
| Get tile radius (has 20% padding so bounds are not too tight) | |
Public Member Functions inherited from makVrv::DtFastGroup | |
| DtFastGroup () | |
| DtFastGroup (const DtFastGroup &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| Copy constructor using CopyOp to manage deep vs shallow copy. | |
| virtual bool | removeChildren (unsigned int pos, unsigned int numChildrenToRemove) |
| Override removeChildren with optimized version. | |
Public Attributes | |
| boost::signal< void(osg::Group *page, osg::Node *child)> | signal_childPagedIn |
| signal when a child of 'page' is paged in (i.e. | |
| boost::signal< void(osg::Group *page, osg::Node *child)> | signal_childAboutToPageOut |
| signal when a child is about to be paged out (i.e. | |
Protected Types | |
| enum | FileState { NotLoaded = 0, Paging, Loaded } |
Protected Attributes | |
| osg::Vec3d | myFileCenter |
| osg::Vec3d | myChildrenCenter |
| const float | myRangeNear |
| const float | myRangeFar |
| const float | myTileRadius |
| const float | myChildTileRadius |
| const bool | myChildrenAreSparse |
| const bool | myChildrenAreSubstitutive |
| volatile int | myCullTracking |
| std::string | myFileName |
| FileState | myFileState |
| osg::ref_ptr< PagedFileRoot > | myFileRoot |
| std::vector< osg::ref_ptr < DtHierarchicalPagedLod > > | myChildren |
| osg::ref_ptr< osg::Referenced > | myPageRef |
| osg::ref_ptr< osgDB::Options > | myOptions |
| int | myPagedInCount |
| DtDe & | myDe |
| SceneObjectMap | mySceneObjs |
A Hierarchical paged LOD is a paged LOD which pages in a single file when the cull visitor is with-in a certain distance.
It will also display child nodes if they are loaded.
| typedef boost::unordered_map<DtUniqueID, DtSceneObject* > makVrv::DtHierarchicalPagedLod::SceneObjectMap |
|
protected |
| makVrv::DtHierarchicalPagedLod::DtHierarchicalPagedLod | ( | DtDe & | de, |
| const std::string & | filename, | ||
| float | distanceNear, | ||
| float | distanceFar, | ||
| float | tileRadius, | ||
| float | childTileRadius, | ||
| const osg::Vec3d & | fileCenter, | ||
| const osg::Vec3d & | childrenCenter, | ||
| bool | sparseChildren, | ||
| bool | substitutiveChildren, | ||
| const osg::Matrixd & | fileTranslation, | ||
| osgDB::Options * | options | ||
| ) |
CTOR to create a paged LOD.
|
virtual |
Destructor.
|
inlinevirtual |
| void makVrv::DtHierarchicalPagedLod::addChildHierarchy | ( | DtHierarchicalPagedLod * | child | ) |
Add a child node.
These children are not stored in the Group's child nodes but in a separate list.
| DtInvalidInput | if the child distance is greater than the parent distance. |
|
virtual |
Traverse the LOD with a node visitor.
|
virtual |
Traversal of all children, called based on mode of visitor.
|
virtual |
Traversal of only active children,, called based on mode of visitor.
|
virtual |
Traversal of active children by a cull visitor.
The cull visitor is the only visitor to page in and out data.
| void makVrv::DtHierarchicalPagedLod::cullActive2D | ( | DtOsgCullVisitor & | nv | ) |
Called by cullActive() to do 2D (ortho) culling.
| void makVrv::DtHierarchicalPagedLod::cullActive3D | ( | osg::NodeVisitor & | nv | ) |
Called by cullActive() to do 3D (perspective) culling.
|
virtual |
Compute a bound for the LOD.
|
virtual |
Traverse the local file.
This happens when children should not be traversed
|
virtual |
Traverse the children.
This happens when children should not be traversed
|
virtual |
Check to see if the file should be visible.
|
virtual |
Calculate the distances from the LOD to the node visitor.
|
virtual |
Calculate the distances from the LOD to the node visitor.
| void makVrv::DtHierarchicalPagedLod::pageInFile | ( | osg::NodeVisitor & | nv, |
| float | distance | ||
| ) |
Page in my file. The file may not be immediately loaded.
| void makVrv::DtHierarchicalPagedLod::pageOutFile | ( | int | lastCullTime, |
| osg::NodeList & | toRemove | ||
| ) |
Page out my file.
The file will not be rendered any more but memory may not be immediately freed.
| bool makVrv::DtHierarchicalPagedLod::fileNotLoaded | ( | ) | const |
The file has three states, not-loaded, paging, and loaded.
Check to see if the file is not loaded.
| bool makVrv::DtHierarchicalPagedLod::fileIsPaging | ( | ) | const |
Check to see if the file is paging in.
| bool makVrv::DtHierarchicalPagedLod::fileIsLoaded | ( | ) | const |
Check to see if the file is loaded.
|
virtual |
Check to see if any children could be visible.
| void makVrv::DtHierarchicalPagedLod::pageInChildren | ( | osg::NodeVisitor & | nv, |
| float | distance | ||
| ) |
Cause all children to page in their files.
| void makVrv::DtHierarchicalPagedLod::pageOutChildren | ( | int | lastCullTime, |
| osg::NodeList & | toRemove | ||
| ) |
Cause all children to page out their files.
| bool makVrv::DtHierarchicalPagedLod::childrenLoaded | ( | ) | const |
Check to see if all children have loaded their files.
| osg::ref_ptr<osg::Node> makVrv::DtHierarchicalPagedLod::fileNode | ( | ) |
Get the file node, this will be null if the file is not loaded or paging in.
Called to add paged in child.
|
inline |
If we page in tiles, increase the paged-in count with parents.
| void makVrv::DtHierarchicalPagedLod::increaseCountUpToParents | ( | ) |
If we page in tiles, increase the paged-in count with parents.
| void makVrv::DtHierarchicalPagedLod::decreaseCountUpToParents | ( | int | amount | ) |
If we page out tiles, decrease the paged-in count with the parents.
|
virtual |
Called to find and remove the first LOD.
| float makVrv::DtHierarchicalPagedLod::fileRangeCullDistance2D | ( | DtOsgCullVisitor & | nv | ) |
Get a culling range based on a 2D projection.
| bool makVrv::DtHierarchicalPagedLod::fileInRange2D | ( | float | distance, |
| float | cull | ||
| ) |
Determine if the file is in cull range as well as LOD range.
| float makVrv::DtHierarchicalPagedLod::childRangeCullDistance2D | ( | DtOsgCullVisitor & | nv | ) |
Get a culling range for the child center based on a 2D projection.
| bool makVrv::DtHierarchicalPagedLod::fileInChildRange2D | ( | float | cull, |
| float | lod | ||
| ) |
Determine if the children are in cull range as well as LOD range.
| void makVrv::DtHierarchicalPagedLod::setThreadSafeRefUnref | ( | bool | threadSafe | ) |
Set whether to use a mutex to ensure ref() and unref() are thread safe.
Resize any per context GLObject buffers to specified size.
|
virtual |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context.
Otherwise, releases OpenGL objects for all graphics contexts.
|
virtual |
|
virtual |
|
virtual |
|
inline |
Get tile radius (has 20% padding so bounds are not too tight)
| boost::signal<void(osg::Group* page, osg::Node* child)> makVrv::DtHierarchicalPagedLod::signal_childPagedIn |
signal when a child of 'page' is paged in (i.e.
added to the scenegraph) 'child' can be other pages or indeed any node type (e.g. a transform with a proxy node as a child whose data was just loaded). Interested clients can traverse the child to find out nodes of interest (child included) Note: The 'page' here is not the DtHierarchicalPagedLod, but a node that in essence represents the parent of contents/file data associated with the DtHierarchicalPagedLod node.
| boost::signal<void(osg::Group* page, osg::Node* child)> makVrv::DtHierarchicalPagedLod::signal_childAboutToPageOut |
signal when a child is about to be paged out (i.e.
data corresponding to it unloaded and the child removed from the scenegraph)
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |