SOSHAPEHINTS(3iv)
π NAME π
SoShapeHints β the node that provides hints about shapes
Ok so real talk, this is the SoShapeHints(3IV) page, and it's genuinely one of my faves because it's just... telling Inventor the tea about your geometry so it can go faster. Bestie. Let's get into it. π«Ά
π¦ INHERITS FROM π¦
SoBase > SoFieldContainer > SoNode > SoShapeHints
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoShapeHints.h>
enum VertexOrdering {
SoShapeHints::UNKNOWN_ORDERING
Ordering of vertices is unknown
SoShapeHints::CLOCKWISE Face vertices are ordered clockwise (from
the outside)
SoShapeHints::COUNTERCLOCKWISE
Face vertices are ordered counterclockwise
(from the outside)
}
enum ShapeType {
SoShapeHints::UNKNOWN_SHAPE_TYPE
Nothing is known about the shape
SoShapeHints::SOLID The shape encloses a volume
}
enum FaceType {
SoShapeHints::UNKNOWN_FACE_TYPE
Nothing is known about faces
SoShapeHints::CONVEX All faces are convex
}
π
Fields from class SoShapeHints:
SoSFEnum vertexOrdering
SoSFEnum shapeType
SoSFEnum faceType
SoSFFloat creaseAngle
πΈ Methods from class SoShapeHints:
SoShapeHints()
static SoType getClassTypeId()
π Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
π Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
π§ Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π DESCRIPTION π
So by default, Inventor assumes very little about the shapes it renders. Like, it's not gonna guess, it's not gonna assume, it's just gonna do the safe thing. That's where SoShapeHints comes in β you use it to tell Inventor that vertex-based shapes (aka the ones derived from SoVertexShape) are solid, have ordered vertices, or have convex faces. And if you want the fastest rendering possible? Specify SOLID, COUNTERCLOCKWISE, CONVEX shapes. Periodt. π₯
These hints let Inventor optimize certain rendering features. The optimizations it may perform 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, it uses the creaseAngle field to figure out 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. So like, for example, a crease angle of .5 radians means 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'll be faceted. β¨
And ngl, normal generation is fastest when the creaseAngle is 0 (that's the default), which produces one normal per facet. A creaseAngle of pi produces one averaged normal per vertex. π«
π FIELDS π
SoSFEnumvertexOrderingβ tells you how the vertices of faces are ordered.CLOCKWISEordering means the vertices of each face form a clockwise loop around the face, when viewed from the outside (aka the side toward which the normal points). πSoSFEnumshapeTypeβ says whether the shape is known to enclose a volume (SOLID) or not. Important bit: if the inside (the side away from the surface normal) of any part of the shape is visible, then the shape is not solid. π«£SoSFEnumfaceTypeβ says whether each face is convex. And bestie, the reason the default assumes convex is that the penalty for non-convex faces is very steep (faces must be triangulated expensively π). So heads up: shapes with concave faces may not be displayed correctly unless this hint is set toUNKNOWN_FACE_TYPE. Don't say I didn't warn you.SoSFFloatcreaseAngleβ 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. A little baby node, fresh out the box. πstatic SoType getClassTypeId()β returns the type identifier for this class. iykyk. πͺͺ
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction, SoCallbackAction, SoRayPickAction, SoGetBoundingBoxAction
Sets the state to contain the hints; sets up optimizations based on the hints. That's it, that's the whole vibe check. β
πΈ FILE FORMAT/DEFAULTS πΈ
ShapeHints {
vertexOrdering UNKNOWN_ORDERING
shapeType UNKNOWN_SHAPE_TYPE
faceType CONVEX
creaseAngle 0
}
π¦ SEE ALSO π¦
SoVertexShape
ok that's the whole page, bestie, you ate that π
β¨ this was SoShapeHints(3IV)() from the 3IV manual β and yeah the date slot is just empty parens, so consider it timeless π no cap π«Άπ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms