SoShapeHints Class |
Node that provides hints about shapes.
Namespace: OIV.Inventor.Nodes
The SoShapeHints type exposes the following members.
Name | Description | |
---|---|---|
SoShapeHints | Creates a shape hints node with default settings. |
Name | Description | |
---|---|---|
AffectsState | Returns true if a node has an effect on the state during traversal. | |
Callback | (Overrides SoNodeCallback(SoCallbackAction).) | |
Copy | Calls Copy(false). (Inherited from SoNode.) | |
Copy(Boolean) | Creates and returns an exact copy of the node. | |
CopyFieldValues(SoFieldContainer) | Calls CopyFieldValues(fc, false). (Inherited from SoFieldContainer.) | |
CopyFieldValues(SoFieldContainer, Boolean) | Copies the contents of fc's fields into this object's fields. | |
Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) | |
Distribute | (Inherited from SoNode.) | |
DoAction | (Overrides SoNodeDoAction(SoAction).) | |
EnableNotify | Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false). | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
FieldsAreEqual | Returns true if this object's fields are exactly equal to fc's fields. | |
Get | Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
GetAllFields | Returns a list of fields, including the eventIn's and eventOut's. | |
GetAlternateRep | This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). | |
GetBoundingBox | (Overrides SoNodeGetBoundingBox(SoGetBoundingBoxAction).) | |
GetEventIn | Returns a the eventIn with the given name. | |
GetEventOut | Returns the eventOut with the given name. | |
GetField | Returns a the field of this object whose name is fieldName. | |
GetFieldName | Returns the name of the given field in the fieldName argument. | |
GetFields | Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetMatrix | (Inherited from SoNode.) | |
GetName | Returns the name of an instance. | |
GetPrimitiveCount | (Inherited from SoNode.) | |
GetRenderEngineMode | Returns the supported Render engine mode. | |
GetRenderUnitID | (Inherited from SoNode.) | |
GetStringName | (Inherited from SoBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GLRender | (Overrides SoNodeGLRender(SoGLRenderAction).) | |
GLRenderBelowPath | (Inherited from SoNode.) | |
GLRenderInPath | (Inherited from SoNode.) | |
GLRenderOffPath | (Inherited from SoNode.) | |
GrabEventsCleanup | (Inherited from SoNode.) | |
GrabEventsSetup | (Inherited from SoNode.) | |
HandleEvent | (Inherited from SoNode.) | |
HasDefaultValues | Returns true if all of the object's fields have their default values. | |
IsBoundingBoxIgnoring | This method is used by getBoundingBox action traversal to know if the current node must be traversed or not, ie the bounding should be ignored. | |
IsNotifyEnabled | Notification is the process of telling interested objects that this object has changed. | |
IsOverride | Returns the state of the override field. | |
IsSynchronizable | Gets the ScaleViz synchronizable state of this object. | |
IsVBOSupported | Indicates if Vertex Buffer Object (VBO) is supported by your graphics board. | |
Pick | (Overrides SoNodePick(SoPickAction).) | |
RayPick | (Inherited from SoNode.) | |
Search | (Inherited from SoNode.) | |
Set | 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. | |
SetName | (Inherited from SoBase.) | |
SetOverride | Set the state of the override field. | |
SetSynchronizable | Sets this to be a ScaleViz synchronizable object. | |
SetToDefaults | Sets all fields in this object to their default values. | |
ToString |
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.) | |
Touch | Marks an instance as modified, simulating a change to it. | |
Write | (Inherited from SoNode.) |
Name | Description | |
---|---|---|
creaseAngle | Indicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when normal vectors are computed automatically by Open Inventor. | |
faceType | Indicates whether each face is convex. | |
IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) | |
neighborTolerance | Specifies the tolerance value to use when default normals are computed. | |
shapeType | Indicates whether the shape is known to enclose a volume (SOLID) or not. | |
UserData |
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.) | |
useVBO | This field controls whether subsequent shapes in the scene graph can use OpenGL Vertex Buffer Objects (VBO) to speed up rendering. | |
vertexOrdering | Indicates how the vertices of faces are ordered. | |
windingType | Indicates the winding rule used to define holes in a polygon. |
By default, Open Inventor assumes very little about the shapes it renders. You can use the OIV.Inventor.Nodes.SoShapeHints node to indicate that vertex-based shapes (those derived from OIV.Inventor.Nodes.SoVertexShape) are solid, contain ordered vertices, or contain convex faces. For fastest rendering, specify SOLID, COUNTERCLOCKWISE, CONVEX shapes.
These hints allow Open Inventor to optimize certain rendering features. Optimizations that may be performed include enabling back-face culling and disabling two-sided lighting. For example, if an object is solid and has ordered vertices, Open Inventor turns on backface culling and turns off two-sided lighting. If the object is not solid but has ordered vertices, it turns off backface culling and turns on two-sided lighting. In all other cases, both backface culling and two-sided lighting are off. Summary:
Two-sided lighting: enabled if not solid and has ordered vertices. Set OIV.Inventor.Nodes.SoShapeHints.vertexOrdering to COUNTERCLOCKWISE (usually) or CLOCKWISE.
Backface culling: enabled if solid and has ordered vertices. Set OIV.Inventor.Nodes.SoShapeHints.shapeType to SOLID.
Note: Two-sided lighting is automatically enabled for VolumeViz "slice" primitives, such as OIV.VolumeViz.Nodes.SoOrthoSlice and OIV.VolumeViz.Nodes.SoVolumeSkin.
This node allows the creation of polygons with holes. See the OIV.Inventor.Nodes.SoShapeHints.windingType field description, OIV.Inventor.Nodes.SoIndexedFaceSet, and OIV.Inventor.Nodes.SoFaceSet for details.
The OIV.Inventor.Nodes.SoShapeHints node also affects how default normals are generated. When a node derived from OIV.Inventor.Nodes.SoVertexShape has to generate default normals, it uses the OIV.Inventor.Nodes.SoShapeHints.creaseAngle field to determine which edges should be smooth-shaded and which ones should have a sharp crease. The crease angle is the angle between surface normals on adjacent polygons. For example, a crease angle of .5 radians means that an edge between two adjacent polygonal faces will be smooth shaded if the normals to the two faces form an angle that is less than .5 radians (about 30 degrees). Otherwise, it will be faceted.
creaseAngle = 0 | creaseAngle = 0.5 | creaseAngle = PI |
Normal averaging |
See OIV.Inventor.Nodes.SoVertexShape for more information about Vertex Buffer Objects and shape rendering.
ShapeHints {
vertexOrdering | UNKNOWN_ORDERING |
shapeType | UNKNOWN_SHAPE_TYPE |
faceType | CONVEX |
windingType | NO_WINDING_TYPE |
creaseAngle | 0 |
neighborTolerance | 1e-6 |
useVBO | true |
OIV.Inventor.Actions.SoGLRenderAction, OIV.Inventor.Actions.SoCallbackAction, OIV.Inventor.Actions.SoRayPickAction, OIV.Inventor.Actions.SoGetBoundingBoxAction Sets the state to contain the hints; sets up optimizations based on the hints. Sets: OIV.Inventor.Elements.SoShapeHintsElement, OIV.Inventor.Elements.SoCreaseAngleElement, OIV.Inventor.Elements.SoNeighborToleranceElement