Open Inventor.NET

OIV.SolidViz Namespaces |

Real-time rendering of CSG models.

Namespaces

Namespace | Description |
---|---|

OIV.SolidViz | Real-time rendering of CSG models. |

OIV.SolidViz.Actions | |

OIV.SolidViz.Nodes |

Remarks

** DEPRECATED**: SolidViz is deprecated and no longer supported since OIV 9.5.

**<font color="#0000FF">NOTE:</font>** The classes in this extension do not exist in Open Inventor 10.0 and later.

The SolidViz extension provides solid modeling nodes for describing 3D shapes as combinations of other shapes using Boolean operations such as merge, intersection, and subtraction.

** NOTE**: SolidViz is not a separately licensed extension. You must have an OpenInventor license string.

CSG stands for Constructive Solid Geometry. It is a powerful method for describing a 3D shape as a combination of simpler 3D shapes using the Boolean operations merge (union), intersection, and subtraction. For instance, the expression "(A-B)+C" means remove B from A, then merge the result with C. This is called a CSG expression, describing a CSG tree.

Actual computation of the geometry resulting from a CSG expression can be a slow process, at least not fast enough for real-time updates in interactive applications.

However a visual simulation of a CSG shape can be achieved in many cases at interactive speed by a special rendering method taking advantage of accelerated OpenGL rendering and the stencil buffer.

SolidViz implements a visual simulation of CSG shapes.

A new group node (SoCSGGroup) allows the specification of a CSG expression.

Note: Some additional classes for computing the actual geometry are provided on an "as-is" basis, with no support or warranty. See the SolidViz directory $OIVHOME/examples/source/SolidViz/examples/csgAction and $OIVHOME/examples/source/SolidViz/examples/csgOperation.

SoSolidViz Initialization class

Used to initialize and get information about the SolidViz module.

SoCSGGroup Group node for interactive CSG rendering

Performs a Constructive Solid Geometry (CSG) rendering.

This group node performs a Constructive Solid Geometry (CSG) rendering. The children of this group define the solids that are involved in the CSG models.

The steps required to realize an interactive rendering of a CSG shape are the following:

Initialize SolidViz module (SoSolidViz.initClass()).

Create an SoCSGGroup.

Add as many children to the SoCSGGroup as there are solid shapes.

Specify the expression (though the expression field) of the SoCSGGroup.

Add the SoCSGGroup to the scene graph.

The example program $OIVHOME/examples/source/SolidViz/examples/csgGroup.cxx shows these steps.

CSG rendering

**requires**that an**OpenGL stencil buffer**exist for the Open Inventor drawing window. For best performance, the graphics accelerator should do stencil buffer operations in hardware.[Win32] You can "hint" to the Pixel Format chooser that stencil buffer support is important by setting the environment variable OIV_REQUIRE_STENCIL.

A good

**graphics accelerator**is highly recommended. CSG rendering requires two or (potentially many) more rendering passes, which will reduce performance. The number of passes is related to the complexity of the CSG expression and to the convexity of the geometry.**Picking**on a CSG rendering may not work as expected. SoCSGGroup produces the visual effect of the specified CSG operations, but the actual geometry is not modified. Open Inventor picking operates on the actual geometry. For example, if a cube has a cylindrical "hole" cut out of it using CSG rendering, picking on the "hole" will return a pick path to the geometry used to cut out the hole.CSG rendering requires a specific ordering of operators in the CSG expression.

**"Normalization"**of arbitrary expressions is currently left to the application (see SoCSGGroup documentation for more details).