public class SoCSGGroup extends SoGroup
An expression defines the operations between these solids. Possible operations are: intersection (indicated as "." in the expression), union ("+"), and subtraction ("-"). A solid is identified by a letter (or a group of letters) in the expression and corresponds to the child number as follows: 'A' corresponds to child 0, 'B' corresponds to child 1, "AA" corresponds to child 26, "AZ" corresponds to child 51, and so forth. The expression is not case sensitive. If you decide for example to use "AA", you must have previously created children 0-25 (A through Z).
A letter can be followed by a number to indicate the convexity of the solid. The convexity of a solid is defined as the maximum numbers of pairs of front and back surfaces. For instance, the convexity of a cube is 1 whereas the convexity of a torus is 2. The convexity of a solid is assumed to be 1 if no digit follows the corresponding letter in the expression. The maximum allowable convexity value is 128.
The more complex the expression, the slower the performance. The same holds true for the convexity of an object - greater convexity implies slower performance.
For best performance, the graphics accelerator should perform stencil buffer operations in hardware.
Example of CSG Tree:
In this example, "myShape1" is 'A', "Separator1" is B, and "Separator2" is C. A CSG expression could be: "A . B - C + A" and corresponds to the following CSG tree:
The CSG tree defined by
expression is assumed to be in normal form (normalized). A CSG tree is in normal form when all intersection and subtraction operators have a left subtree that contains no union operator and a right subtree that is simply a shape. For example, the tree shown above is in normal form.
A CSG tree can be converted to normal form by repeatedly applying the following set of production rules to the tree and then its subtrees:
|A - ( B + C )||=>||( A - B ) - C|
|A . ( B + C )||=>||( A . B ) + ( A . C )|
|A - ( B . C )||=>||( A - B ) + ( A - C )|
|A . ( B . C )||=>||( A . B ) . C|
|A - ( B - C )||=>||( A - B ) + ( A . C )|
|A . ( B - C )||=>||( A . B ) - C|
|( A - B ) . C||=>||( A . C ) - B|
|( A + B ) - C||=>||( A - C ) + ( B - C )|
|( A + B ) . C||=>||( A . C ) + ( B . C )|
Because there are two Buffer Region extensions, the value of this environment variable can be:
KTX_BUFFER_REGION: Uses the GL_KTX_buffer_region extension.
ARB_BUFFER_REGION: Uses the WGL_ARB_buffer_region extension.
SoSolidVizDeprecated since Open Inventor 9500
No longer supported.
|Modifier and Type||Field and Description|
Indicates if the CSG tree is pruned by the following rules: A.B = 0 if BoundingBox(A) does not intersect BoundingBox(B).
Expression which defines the CSG tree.
Indicates if CSG rendering should be done.
This flag indicates if there are any shapes before the CSGGroup in the scene graph.
|Constructor and Description|
|Modifier and Type||Method and Description|
addChild, findChild, getChild, getNumChildren, insertChild, removeAllChildren, removeChild, removeChild, replaceChild, replaceChild
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getEXTERNPROTO, getName, getPROTO, isDisposable, isSynchronizable, setName, setSynchronizable
getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public final SoSFString expression
public final SoSFBool isShapesBefore
public final SoSFBool isActive
public final SoSFBool boundingBoxPruningEnabled
These rules can potentially speed up the rendering in case of a complex CSG expression by simplifying the CSG tree.
public SoCSGGroup(int nChildren)
public SoNode getGeometry()
Generated on September 3, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com