25#ifndef _SO_GET_PRIMITIVE_COUNT_ACTION_
26#define _SO_GET_PRIMITIVE_COUNT_ACTION_
182 float percentage = 1.0);
198 { treatText3AsTris = treatAsTris; };
212 { canApproximate = onOff; };
221 void addNumTriangles(int32_t num) { numTriangles += num; };
222 void addNumLines(int32_t num) { numLines += num; };
223 void addNumPoints(int32_t num) { numPoints += num; };
224 void addNumText(int32_t num) { numText += num; };
225 void addNumImage(int32_t num) { numImage += num; };
226 void incNumTriangles() { numTriangles++; };
227 void incNumLines() { numLines++; };
228 void incNumPoints() { numPoints++; };
229 void incNumText() { numText++; };
230 void incNumImage() { numImage++; };
233 static void initClass();
234 static void exitClass();
238 virtual void beginTraversal(
SoNode *node);
241 int32_t numTriangles;
#define SO_ACTION_HEADER(className)
Abstract base class for all actions.
Type
These are the available decimation types.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
int32_t getLineCount() const
Returns counted number of primitives (lines).
SbBool canApproximateCount()
Returns whether shapes are allowed to approximate their count.
virtual ~SoGetPrimitiveCountAction()
Destructor.
void setDecimationValue(SoDecimationTypeElement::Type type, float percentage=1.0)
Sets decimation type and percentage.
int32_t getTriangleCount() const
Returns counted number of primitives (triangles).
SoGetPrimitiveCountAction()
Constructor.
void setCount3DTextAsTriangles(SbBool treatAsTris)
SoText3 can be counted two ways: as a triangle-based shape or as a text-based shape.
void setCanApproximate(SbBool onOff)
Some shapes may be able to guess an approximate number of triangles without actually counting.
float getDecimationPercentage()
Gets decimation percentage.
int32_t getTextCount() const
Returns counted number of primitives (text).
SbBool containsNoPrimitives()
Returns TRUE if scene contains no primitives of any kind.
int32_t getPointCount() const
Returns counted number of primitives (points).
SbBool is3DTextCountedAsTriangles()
Returns how SoText3 should be counted: as a triangle-based shape (TRUE) or as a text-based shape (FAL...
int32_t getImageCount() const
Returns counted number of primitives (images).
SbBool containsNonTriangleShapes()
Returns TRUE if scene contains some primitives that are not triangles.
SoDecimationTypeElement::Type getDecimationType()
Gets decimation type.
Abstract base class for all database nodes.