24#ifndef _SO_SPLIT_GEOMETRY_ACTION_H
25#define _SO_SPLIT_GEOMETRY_ACTION_H
27#include <Inventor/actions/SoSubAction.h>
28#include <Inventor/nodes/SoSeparator.h>
29#include <Inventor/nodes/SoIndexedShape.h>
44 int divAlongX,
int divAlongY,
int divAlongZ,
void* userData);
141#ifndef HIDDEN_FROM_DOC
252 SbBool obeys_rules = FALSE) {
256 static void initClass();
257 static void exitClass();
260 virtual void beginTraversal(
SoNode *node);
261 void increaseCurrentNumOfDiv(
void);
262 void resetCurrentNumOfDiv(
void);
263 int getCurrentNumOfDiv(
void);
266 void commonConstructor(
void);
267 int getNumberOfDivisions(
void);
280 void splitStrip1Dimension(
SoNode* node,
int div,
int axe,
float &lastRed,
float &lastGreen,
float &lastBlue);
281 void splitFace1Dimension(
SoNode* node,
int div,
int axe,
float &lastRed,
float &lastGreen,
float &lastBlue);
283 void replaceNode(
SoNode* substitute);
285 SbBool areEqual(
float,
float);
308 SbBool keepVertexOrdering;
312 static void *userData;
318 int whoHasToBeTraversed;
Abstract base class for all actions.
virtual void apply(SoNode *node)
Initiates an action on the graph defined by a node.
Abstract base class for all indexed vertex-based shapes.
Abstract base class for all database nodes.
Path that points to a list of hierarchical nodes.
Maintains a list of pointers to paths.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Split large geom...
void setMaintainVertexOrdering(SbBool enable)
If the initial geometry is composed of SoIndexedTriangleStripSet and uses an SoShapeHints with a know...
int getNumObjFound(void)
Returns how many objects the action has split.
void setMaximumDivisionWarning(SbBool enable)
There is a maximum number of division to divide an object because this object is composed by some pri...
void setNumDivisions(int numX, int numY)
Specifies the number of divisions for splitting an object in 2D.
void getNumDivisions(int &numX, int &numY)
Returns the current division values to split an object in 2D.
SbBool isSmartSplitting(void)
Returns TRUE if smart splitting is enabled.
int isTraverseAllSoSwitchChildren(void)
Returns TRUE if traverse all SoSwitch children is enabled.
SbBool isMaintainVertexOrdering(void)
Returns TRUE if the option to maintain initial vertex ordering is on.
SoSplitGeometryAction(int divAlongX, int divAlongY)
SbBool isDistinguishSplitParts(void)
Returns TRUE if distinguish split parts is enabled.
void SoSplitGeometryActionCB(const SoSplitGeometryAction *action, SoNode *objectToSplit, const int objectId, int divAlongX, int divAlongY, int divAlongZ, void *userData)
User pre-split callback.
SbBool isKeepOriginalGeometry(void)
Returns TRUE if keep original geometry is enabled.
void setKeepOriginalGeometry(SbBool enable)
By default, the action modifies the scene graph by replacing the original node it has split with a ne...
static void setSplitGeometryActionPreCB(SoSplitGeometryActionCB *, void *)
These add a callback function to call when a node of the given type is encountered during traversal.
void setDistinguishSplitParts(SbBool enable)
Calling this method before applying the action allows you to see how the action has split the objects...
void setTraverseAllSoSwitchChildren(SbBool enable)
By default the action will only traverse the active child of SoSwitch nodes.
virtual void apply(SoNode *node)
Initiates an action on the graph defined by a node.
virtual void apply(const SoPathList &path_list, SbBool obeys_rules=FALSE)
Initiates an action on the graph defined by a list of paths.
void setSmartSplitting(SbBool enable)
If this option is set before the action is applied, objects will be split by dividing the greatest bo...
virtual void apply(SoPath *path)
Initiates an action on the graph defined by a path.
SoSplitGeometryAction(int divAlongX, int divAlongY, int divAlongZ)
void setNumDivisions(int numX, int numY, int numZ)
Specifies the number of divisions for splitting an object in 3D.
void getNumDivisions(int &numX, int &numY, int &numZ)
Returns the current division values to split an object in 3D.