SoShapeHints(3IV)NAMESoShapeHints (SoShapeHints) - node that provides hints about shapes
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoShapeHintsSYNOPSIS
#include <Inventor_c/nodes/SoShapeHints.h>
enum SoShapeHintsVertexOrdering {
UNKNOWN_ORDERING Ordering of vertices is unknown
CLOCKWISE Face vertices are ordered clockwise (from the
outside)
COUNTERCLOCKWISE Face vertices are ordered counterclockwise (from
the outside)
}
enum SoShapeHintsShapeType {
UNKNOWN_SHAPE_TYPE Nothing is known about the shape
SOLID The shape encloses a volume
}
enum SoShapeHintsFaceType {
UNKNOWN_FACE_TYPE Nothing is known about faces
CONVEX All faces are convex
}
Fields from class SoShapeHints:
SoSFEnum vertexOrdering
SoSFEnum shapeType
SoSFEnum faceType
SoSFFloat creaseAngle
Functions from class SoShapeHints:
SoShapeHints * SoShapeHintsCreate()
SoType SoShapeHintsGetClassTypeId()
Functions from class SoNode:
void SoShapeHintsSetOverride(SoShapeHints *this, SbBool
state)
SbBool SoShapeHintsIsOverride(const SoShapeHints *this)
SoNode * SoShapeHintsCopy(const SoShapeHints *this, SbBool
copyConnections = FALSE)
SbBool SoShapeHintsAffectsState(const SoShapeHints *this)
SoNode * SoShapeHintsGetByName(const char *name)
int SoShapeHintsGetByNameList(const char *name,
SoNodeList *list)
Functions from class SoFieldContainer:
Page 1SoShapeHints(3IV)
void SoShapeHintsSetToDflts(SoShapeHints *this)
SbBool SoShapeHintsHasDfltVals(const SoShapeHints *this)
SbBool SoShapeHintsFldsAreEq(const SoShapeHints *this, const
SoFieldContainer *fc)
void SoShapeHintsCopyFieldVals(SoShapeHints *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
SbBool SoShapeHintsSet(SoShapeHints *this, const char
*fieldDataString)
void SoShapeHintsGet(SoShapeHints *this, SbString
*fieldDataString)
int SoShapeHintsGetFields(const SoShapeHints *this,
SoFieldList *resultList)
SoField * SoShapeHintsGetField(const SoShapeHints *this, const
char *fieldName)
SbBool SoShapeHintsGetFieldName(const SoShapeHints *this,
const SoField *field, SbName *fieldName)
SbBool SoShapeHintsIsNotifyEnabled(const SoShapeHints *this)
SbBool SoShapeHintsEnableNotify(SoShapeHints *this, SbBool
flag)
Functions from class SoBase:
void SoShapeHintsRef(SoShapeHints *this)
void SoShapeHintsUnref(const SoShapeHints *this)
void SoShapeHintsUnrefNoDelete(const SoShapeHints *this)
void SoShapeHintsTouch(SoShapeHints *this)
SoType SoShapeHintsGetTypeId(const SoShapeHints *this)
SbBool SoShapeHintsIsOfType(const SoShapeHints *this, SoType
type)
void SoShapeHintsSetName(SoShapeHints *this, const char
*name)
SbName SoShapeHintsGetName(const SoShapeHints *this)
DESCRIPTION
By default, Inventor assumes very little about the shapes it renders. You
can use the SoShapeHints node to indicate that vertex-based shapes (those
derived from SoVertexShape) 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.
The SoShapeHints node also affects how default normals are generated.
When a node derived from SoVertexShape has to generate default normals,
Page 2SoShapeHints(3IV)
it uses the 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. 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
SoSFEnum vertexOrdering
Indicates how the vertices of faces are ordered. CLOCKWISE ordering
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).
SoSFEnum shapeType
Indicates 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.
SoSFEnum faceType
Indicates 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
to UNKNOWN_FACE_TYPE.
SoSFFloat creaseAngle
Indicates 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.
FUNCTIONSSoShapeHints * SoShapeHintsCreate()
Creates a shape hints node with default settings.
SoType SoShapeHintsGetClassTypeId()
Returns type identifier for this class.
ACTION BEHAVIOR
SoGLRenderAction, SoCallbackAction, SoRayPickAction,
SoGetBoundingBoxAction
Sets the state to contain the hints; sets up optimizations based on
the hints.
Page 3SoShapeHints(3IV)FILE FORMAT/DEFAULTS
ShapeHints {
vertexOrdering UNKNOWN_ORDERING
shapeType UNKNOWN_SHAPE_TYPE
faceType CONVEX
creaseAngle 0
}
SEE ALSO
SoVertexShape
Page 4