Provided by: inventor-doc_2.1.5-10-18_all

**NAME**

SoShapeHints — node that provides hints about shapes

**INHERITS** **FROM**

SoBase > SoFieldContainer > SoNode > SoShapeHints

**SYNOPSIS**

#include<Inventor/nodes/SoShapeHints.h>enumVertexOrdering{SoShapeHints::UNKNOWN_ORDERINGOrdering of vertices is unknownSoShapeHints::CLOCKWISEFace vertices are ordered clockwise (from the outside)SoShapeHints::COUNTERCLOCKWISEFace vertices are ordered counterclockwise (from the outside)}enumShapeType{SoShapeHints::UNKNOWN_SHAPE_TYPENothing is known about the shapeSoShapeHints::SOLIDThe shape encloses a volume}enumFaceType{SoShapeHints::UNKNOWN_FACE_TYPENothing is known about facesSoShapeHints::CONVEXAll faces are convex}Fields from class SoShapeHints:SoSFEnumvertexOrderingSoSFEnumshapeTypeSoSFEnumfaceTypeSoSFFloatcreaseAngleMethods from class SoShapeHints:SoShapeHints()staticSoTypegetClassTypeId()Methods from class SoNode:voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)Methods from class SoFieldContainer:voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)Methods from class SoBase:voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const

**DESCRIPTION**

By default, Inventor assumes very little about the shapes it renders. You can use theSoShapeHintsnode to indicate that vertex-based shapes (those derived fromSoVertexShape) are solid, contain ordered vertices, or contain convex faces. For fastest rendering, specify SOLID, COUNTERCLOCKWISE, CONVEX shapes. These hints allow 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, 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. TheSoShapeHintsnode also affects how default normals are generated. When a node derived fromSoVertexShapehas to generate default normals, it uses thecreaseAnglefield 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. Normal generation is fastest when the creaseAngle is 0 (the default), producing one normal per facet. A creaseAngle of pi produces one averaged normal per vertex.

**FIELDS**

SoSFEnumvertexOrderingIndicates how the vertices of faces are ordered.CLOCKWISEordering means that the vertices of each face form a clockwise loop around the face, when viewed from the outside (the side toward which the normal points).SoSFEnumshapeTypeIndicates whether the shape is known to enclose a volume (SOLID) or not. If the inside (the side away from the surface normal) of any part of the shape is visible, the shape is not solid.SoSFEnumfaceTypeIndicates whether each face is convex. Because the penalty for non-convex faces is very steep (faces must be triangulated expensively), the default assumes all faces are convex. Therefore, shapes with concave faces may not be displayed correctly unless this hint is set toUNKNOWN_FACE_TYPE.SoSFFloatcreaseAngleIndicates the minimum angle (in radians) between two adjacent face normals required to form a sharp crease at the edge when default normals are computed and used.

**METHODS**

SoShapeHints()Creates a shape hints node with default settings.staticSoTypegetClassTypeId()Returns type identifier for this class.

**ACTION** **BEHAVIOR**

SoGLRenderAction,SoCallbackAction,SoRayPickAction,SoGetBoundingBoxActionSets the state to contain the hints; sets up optimizations based on the hints.

**FILE** **FORMAT/DEFAULTS**

ShapeHints{vertexOrderingUNKNOWN_ORDERINGshapeTypeUNKNOWN_SHAPE_TYPEfaceTypeCONVEXcreaseAngle0}

**SEE** **ALSO**

SoVertexShapeSoShapeHints(3IV)()