SoGetPrimitiveCountAction Class Reference
[Actions]
The SoGetPrimitiveCountAction class counts the primitives in a scene.
Apply this action to a scene if you need to know the number of primitives present in a scenegraph, or parts of a scenegraph.
More...
#include <Inventor/actions/SoGetPrimitiveCountAction.h>
Inheritance diagram for SoGetPrimitiveCountAction:
List of all members.
Detailed Description
The SoGetPrimitiveCountAction class counts the primitives in a scene.
Apply this action to a scene if you need to know the number of primitives present in a scenegraph, or parts of a scenegraph.
One common mistake to make when using this action is to think that it traverses just the parts currently in view, like SoGLRenderAction does. (SoGLRenderAction culls away the scenegraph parts outside the camera view volume and does not traverse those.) Like most other action classes, SoGetPrimitiveCountAction actually traverses the complete scenegraph, not just the parts currently in view.
- Since:
- Coin 1.0
TGS Inventor 2.5
Constructor & Destructor Documentation
SoGetPrimitiveCountAction::SoGetPrimitiveCountAction |
( |
void |
|
) |
|
|
SoGetPrimitiveCountAction::~SoGetPrimitiveCountAction |
( |
|
) |
[virtual] |
|
Member Function Documentation
void SoGetPrimitiveCountAction::initClass |
( |
void |
|
) |
[static] |
|
|
Initializes the run-time type system for this class, and sets up the enabled elements and action method list.
Reimplemented from SoAction. |
int SoGetPrimitiveCountAction::getTriangleCount |
( |
void |
|
) |
const |
|
|
Returns number of triangles in graph. |
int SoGetPrimitiveCountAction::getLineCount |
( |
void |
|
) |
const |
|
|
Returns number of lines in graph. |
int SoGetPrimitiveCountAction::getPointCount |
( |
void |
|
) |
const |
|
|
Returns number of points in graph. |
int SoGetPrimitiveCountAction::getTextCount |
( |
void |
|
) |
const |
|
|
Returns number of texts in the graph. |
int SoGetPrimitiveCountAction::getImageCount |
( |
void |
|
) |
const |
|
|
Returns the number of images in the graph. |
SbBool SoGetPrimitiveCountAction::containsNoPrimitives |
( |
void |
|
) |
|
|
|
Returns whether there are any primitives in graph or not. |
SbBool SoGetPrimitiveCountAction::containsNonTriangleShapes |
( |
void |
|
) |
|
|
|
Returns whether there are non-triangular primitives in graph. |
SbBool SoGetPrimitiveCountAction::is3DTextCountedAsTriangles |
( |
void |
|
) |
|
|
void SoGetPrimitiveCountAction::setCount3DTextAsTriangles |
( |
const SbBool |
flag |
) |
|
|
|
Sets whether SoText3 nodes are counted as the triangles of the fonts in the text strings or the text itself. The default is to count as triangles.
- See also:
- is3DTextCountedAsTriangles()
|
SbBool SoGetPrimitiveCountAction::canApproximateCount |
( |
void |
|
) |
|
|
|
Returns whether shapes can use an approximate value when counting primitives. This is faster than doing an accurate count. The default is to not approximate.
- See also:
- setCanApproximate()
|
void SoGetPrimitiveCountAction::setCanApproximate |
( |
const SbBool |
flag |
) |
|
|
void SoGetPrimitiveCountAction::setDecimationValue |
( |
SoDecimationTypeElement::Type |
type, |
|
|
float |
percentage = 1.0 |
|
) |
|
|
|
Set up the decimation parameters for the traversal.
On-the-fly decimation is supported in Coin yet, so this call will not have any effect until this feature has been implemented. |
SoDecimationTypeElement::Type SoGetPrimitiveCountAction::getDecimationType |
( |
void |
|
) |
|
|
|
Returns decimation type used during the traversal count. |
float SoGetPrimitiveCountAction::getDecimationPercentage |
( |
void |
|
) |
|
|
|
Returns decimation percentage used during the traversal count. |
void SoGetPrimitiveCountAction::addNumTriangles |
( |
const int |
num |
) |
|
|
|
Adds num triangles to total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::addNumLines |
( |
const int |
num |
) |
|
|
|
Adds num lines to total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::addNumPoints |
( |
const int |
num |
) |
|
|
|
Adds num points to total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::addNumText |
( |
const int |
num |
) |
|
|
|
Adds num texts to total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::addNumImage |
( |
const int |
num |
) |
|
|
|
Adds num texture image maps to total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::incNumTriangles |
( |
void |
|
) |
|
|
|
Adds a single triangle to the total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::incNumLines |
( |
void |
|
) |
|
|
|
Adds a single line to the total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::incNumPoints |
( |
void |
|
) |
|
|
|
Adds a single point to the total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::incNumText |
( |
void |
|
) |
|
|
|
Adds a single text to the total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::incNumImage |
( |
void |
|
) |
|
|
|
Adds a single texture image map to the total count. Used by node instances in the scene graph during traversal. |
void SoGetPrimitiveCountAction::beginTraversal |
( |
SoNode * |
node |
) |
[protected, virtual] |
|
|
This virtual method is called from SoAction::apply(), and is the entry point for the actual scenegraph traversal.
It can be overridden to initialize the action at traversal start, for specific initializations in the action subclasses inheriting SoAction.
Default method just calls traverse(), which any overridden implementation of the method must do too (or call SoAction::beginTraversal()) to trigger the scenegraph traversal.
Reimplemented from SoAction. |
The documentation for this class was generated from the following files:
Generated on Thu Jan 12 00:15:56 2006 for Coin by
1.4.6