Click or drag to resize
SoCSGGroup Class

Note: This API is now obsolete.

Group node for Constructive Solid Geometry rendering.

Inheritance Hierarchy

Namespace: OIV.SolidViz.Nodes
Assembly: OIV.SolidViz (in OIV.SolidViz.dll) Version: 9.9.13.0 (9.9.13.0)
Syntax
[ObsoleteAttribute("See documentation for more details")]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public class SoCSGGroup : SoGroup

The SoCSGGroup type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAddChild

Adds a child as last one in group.

(Inherited from SoGroup.)
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoNode.)
Public methodCallback
(Inherited from SoGroup.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
(Inherited from SoGroup.)
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodFindChild

Finds index of given child within group.

(Inherited from SoGroup.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBoundingBox
(Inherited from SoGroup.)
Public methodGetChild

Returns pointer the child node with the given index.

(Inherited from SoGroup.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetGeometry
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetMatrix
(Inherited from SoGroup.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetNumChildren

Returns number of children.

(Inherited from SoGroup.)
Public methodGetPrimitiveCount
(Inherited from SoGroup.)
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetStringName (Inherited from SoBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGLRender
Public methodGLRenderBelowPath
(Inherited from SoNode.)
Public methodGLRenderInPath
(Inherited from SoNode.)
Public methodGLRenderOffPath
(Inherited from SoNode.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
(Inherited from SoGroup.)
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodInsertChild

Adds a child so that it becomes the one with the given index.

(Inherited from SoGroup.)
Public methodIsBoundingBoxIgnoring

Used by BoundingBoxAction to known if bounding box computation should be ignored or not.

(Inherited from SoGroup.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverride

Returns the state of the override flag.

(Inherited from SoNode.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodPick
(Inherited from SoGroup.)
Public methodRayPick
(Inherited from SoNode.)
Public methodRemoveAllChildren

Removes all children from group.

(Inherited from SoGroup.)
Public methodRemoveChild(Int32)

Removes child with given index from group.

(Inherited from SoGroup.)
Public methodRemoveChild(SoNode)

Removes first instance of given child from group.

(Inherited from SoGroup.)
Public methodReplaceChild(Int32, SoNode)

Replaces child with given index with new child.

(Inherited from SoGroup.)
Public methodReplaceChild(SoNode, SoNode)

Replaces first instance of given child with new child.

(Inherited from SoGroup.)
Public methodSearch
(Inherited from SoGroup.)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetName (Inherited from SoBase.)
Public methodSetOverride

Turns the override flag on or off.

(Inherited from SoNode.)
Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodWrite
(Inherited from SoGroup.)
Top
Properties
  NameDescription
Public propertyboundingBoxIgnoring

Whether to ignore this node during bounding box traversal.

(Inherited from SoGroup.)
Public propertyboundingBoxPruningEnabled

Indicates if the CSG tree is pruned by the following rules:

Public propertyexpression

Expression which defines the CSG tree.

Public propertyisActive

Indicates if CSG rendering should be done.

Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertyisShapesBefore

This flag indicates if there are any shapes before the CSGGroup in the scene graph.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Remarks

This group node performs a Constructive Solid Geometry (CSG) rendering. The children of this group define the solids that are involved in the CSG rendering. It is important to know that all children of this group are assumed to be solid (i.e., having a closed surface). Otherwise the results may be incorrect.

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 )

If the CSG expression exceeds a certain length, a save/restore of the Z-Buffer is needed. This operation is time consuming. An environment variable, OIV_CSG_BUFFER_REGION [Win 32 only], allows the algorithm to use the OpenGL Buffer Region extension to speed up save/restore of Z-buffer task. Standard save and restore of the Z-buffer (glDrawPixels/glReadPixels) is used if this variable is not defined or the extension is not available.

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.

FILE FORMAT/DEFAULT

CSGGroup {
expression ""
isShapesBefore false
isActive true
boundingBoxPruningEnabled false
}

See Also