Group node derived from SoRenderList that maintains a transparent octree organization of the shapes below it. More...
#include <Inventor/nodes/SoOctreeOrdering.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoOctreeOrdering () | |
SoOctreeOrdering (int numChildren) | |
void | setOctreeDrawing (SbBool enable) |
SbBool | isOctreeDrawing (void) |
SbBool | isChainingOn (void) |
void | setHandleTransparency (SbBool handle) |
SbBool | getHandleTransparency () |
void | reset () |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static void | setReportCB (SoReportCB *func, void *userData) |
Public Attributes | |
SoSFBool | dropCulling |
SoSFUInt32 | dropScreenArea |
SoSFBool | boundingBoxSubstitutes |
SoSFBool | useMovingQueue |
SoSFBool | adjustDecimation |
This speeds view frustum culling in large scenes in which the viewer moves through the scene and much of the scene is not visible at any given time.
The SoOctreeOrdering node uses the functionality from SoRenderList to create a list of paths to the shapes beneath it. It then reorganizes the list of shapes into an octree division of space. During action traversal, it traverses the octree instead of the scene graph. This results in a front to back traversal that quickly skips sections of space that would be culled by the view frustum.
NOTE: This class does not exist in Open Inventor 10.0 and later.The OctreeOrdering node draws a bounding box to replace cells in the octree that contain shapes but that are too small, based on an approximate screen size. If a larger shape had already been rendered that passes through this cell, the cell will be culled instead of using the bounding box so that no rendered geometry will be covered by a bounding box. This behavior can be altered by the fields listed below.
To specify the maximum depth during octree ordering, use environment variable IV_OCTREE_MAX_DEPTH. The default is 8.
To request an outline of the octree quadrants be drawn as a debugging aid to allow you to see how your scene is distributed throughout the octree, set environment variable OIV_DRAW_OCTREE to 1 or use the method setOctreeDrawing.
Note: If an SoOcclusionCulling node is inserted below the SoOctreeOrdering node, the latter can pass its view-frustum-culled renderObject list to the occlusion node, which will perform an occlusion culling test to reduce even further the number of objects to render. See the isHead field of SoRenderList for additional info.
dropCulling | TRUE |
dropScreenArea | 5 |
boundingBoxSubstitutes | TRUE |
useMovingQueue | TRUE |
adjustDecimation | TRUE |
renderCaching | AUTO |
boundingBoxCaching | AUTO |
renderCulling | AUTO |
pickCulling | AUTO |
fastEditing | DISABLE |
isHead | TRUE |
SoSplitGeometryAction, SoGetPrimitiveCountAction, SoLevelOfSimplification, SoRenderList, SoValueOrdering, SoOcclusionCulling
SoOctreeOrdering::SoOctreeOrdering | ( | ) |
Default constructor.
Note: Do not modify an instance of this node or any of its children unless this node has a ref count greater than zero. If the node is itself the child of a grouping node then the ref count is automatically greater than zero, otherwise you must explicitly increment the ref count by calling the ref() method.
SoOctreeOrdering::SoOctreeOrdering | ( | int | numChildren | ) |
Constructor that takes approximate number of children as a hint.
Note: Do not modify an instance of this node or any of its children unless this node has a ref count greater than zero. If the node is itself the child of a grouping node then the ref count is automatically greater than zero, otherwise you must explicitly increment the ref count by calling the ref() method.
static SoType SoOctreeOrdering::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoRenderList.
SbBool SoOctreeOrdering::getHandleTransparency | ( | ) |
virtual SoType SoOctreeOrdering::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoRenderList.
SbBool SoOctreeOrdering::isChainingOn | ( | void | ) | [inline] |
Returns TRUE if the octree is chained with another culling node.
SbBool SoOctreeOrdering::isOctreeDrawing | ( | void | ) |
Returns TRUE if octree drawing is enabled.
void SoOctreeOrdering::reset | ( | ) |
Allows to rebuild the octree from scratch.
void SoOctreeOrdering::setHandleTransparency | ( | SbBool | handle | ) |
If handle transparency is turned on, the octree will handle transparency and render cache transparent objects.
Default is TRUE;
void SoOctreeOrdering::setOctreeDrawing | ( | SbBool | enable | ) |
Enables/disables octree drawing.
Octree drawing will draw outlines around the octree quadrants, allowing you to see how your scene is distributed throughout the octree. This can be useful for debugging purposes.
static void SoOctreeOrdering::setReportCB | ( | SoReportCB * | func, | |
void * | userData | |||
) | [static] |
This callback can be used to get render statistics: the number of objects in the octree, and the number of objects actually rendered.
If the application is using an MP viewer, each render thread will call the callback function at the end of the octree traversal to let the application know how many objects it rendered. This is useful to see how the rendering work is distributed across the threads.
If TRUE, the octree will alter the decimation percentage for objects depending on how large they are in the view.
This causes objects closer to the camera to appear in more detail than objects further away.
Enables use of bounding boxes for cells in the octree that contain shapes, but would appear on the screen smaller than the dropScreenArea threshold.
Enables culling of shapes that are too small on the screen.
Sets threshold in pixels for drop culling and bounding box substitutes.
Sets how this node should handle moving render objects.
If TRUE, then the moving objects are kept in a separate render list, and are not sorted into the octree, meaning that they will not be drop culled. If FALSE, moving objects will be sorted into the octree after each motion, taking more time, but enabling drop and view frustum culling for the moving objects.