24#if !defined _SO_CSG_SHAPE_H_
25#define _SO_CSG_SHAPE_H_
40namespace GetCacheDeps {
41class CachedElementsVector;
217 virtual void doAction(
SoAction *action );
240 static void initClass();
243 static void exitClass();
246 virtual void notify( SoNotList *list );
253 virtual void generatePrimitives (
SoAction *action );
266 void collapse(
const std::vector<SoPrimitiveVertex>& points,
float eps, std::vector<SbVec3f*>& indexedPoints, std::vector<SbVec3f>& remainingPoints)
const;
270 void shake(std::vector<SbVec3f>& points,
float shift)
const;
282 bool getCacheDependencies(
SoAction* action,
SoNode* node, GetCacheDeps::CachedElementsVector& elements);
285 void updateCache(
SoState *state,
const GetCacheDeps::CachedElementsVector& dependencies, SoCache*& cache );
288 bool isCacheValid(
SoState *state, SoCache* cache )
const;
305 static void pushTriangleCallback(
void* vec,
315 static CsgStatus computeCSG(
const std::vector<SoPrimitiveVertex>& trianglesLeft,
316 const std::vector<SoPrimitiveVertex>& trianglesRight,
318 std::vector<SoPrimitiveVertex>& trianglesResult);
323 std::vector<SoPrimitiveVertex> m_trianglesLeft;
327 std::vector<SoPrimitiveVertex> m_trianglesRight;
331 SoCache* m_leftCache;
335 SoCache* m_rightCache;
339 SoCache* m_resultCache;
347 bool m_expressedInWolrdSpace;
354 std::vector<SoPrimitiveVertex> m_triangles;
#define SO_NODE_HEADER(className)
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box with an a...
Abstract base class for all actions.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Shape defined by...
CsgStatus getStatus()
Returns status of csg operation.
SoSFNode rightOperand
Geometry scene graph to be used as right operand for the Boolean operation.
SoSFNode leftOperand
Geometry scene graph to be used as left operand for the Boolean operation.
void setMaxAttempt(int maxAttempt)
If the CSG Operation failed for any reason, it will be retried by applying a small random transformat...
SoSFEnum csgOperation
CSG boolean operation to apply.
static void setRescueOperation(CsgOperationType op)
Set operation to use if the CSG operation fails or CSGLib is not available.
CsgOperationType
CSG operation to be used.
@ RIGHT_ONLY
Keep only rightOperand.
@ LEFT_ONLY
Keep only leftOperand.
@ ADD
leftOperand union rightOperand.
@ NOTHING
Keep nothing (result will be empty).
@ INTERSECTION
LeftOperand intersect rightOperand.
@ ALL
Keep left and right primitives (concatenate all resulting faces).
@ SUB
LeftOperand - rightOperand.
CsgStatus
Status of CSG operation.
@ CSG_LIB_NOT_AVAILABLE
CSGLib is not available.
@ CSG_ERROR
an error occurred
Performs a generic traversal of a scene graph or path.
Polygonal face shape node.
Renders a scene graph using Open Inventor's Render Engine.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Abstract base class for all database nodes.
Represents a vertex of a generated primitive.
Intersects objects with a ray cast into scene.
Field containing an enumerated value.
Field containing a a node.
Abstract base class for all shape nodes.