SOINDEXEDNURBSSURFACE(3iv)

πŸ’– SoIndexedNurbsSurface β€” indexed NURBS surface shape node πŸ’–

okay so bestie, welcome to the SoIndexedNurbsSurface(3IV) page, aka the Open Inventor node that lets you sculpt a whole smooth curvy NURBS surface out of knot vectors and indexed control points. it's giving math but make it fashion. let's go ✨


🌈 INHERITS FROM 🌈

so the whole family tree is a little something like this:

SoBase > SoFieldContainer > SoNode > SoShape > SoIndexedNurbsSurface

she inherits everything from her ancestors, as one does. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

first things first, you gotta pull in the header:

#include <Inventor/nodes/SoIndexedNurbsSurface.h>

✨ Fields from class SoIndexedNurbsSurface ✨

these are hers, her very own:

SoSFInt32           numUControlPoints
SoSFInt32           numVControlPoints
SoMFInt32           coordIndex
SoMFFloat           uKnotVector
SoMFFloat           vKnotVector
SoSFInt32           numSControlPoints
SoSFInt32           numTControlPoints
SoMFInt32           textureCoordIndex
SoMFFloat           sKnotVector
SoMFFloat           tKnotVector

πŸ¦‹ Methods from class SoIndexedNurbsSurface πŸ¦‹

                    SoIndexedNurbsSurface()
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 πŸ’…

okay so this shape node is literally a NURBS surface, built from the knot vectors and the control points you specify. no cap. 🫢

the uKnotVector and vKnotVector fields hold floating-point arrays of values β€” those values are the coordinates of the knot points in the surface, and bestie you must enter them in non-decreasing order. that's the vibe check, they gotta be sorted. πŸ“ˆ

the numUControlPoints and numVControlPoints fields tell her how many control points the surface will have in the U and V parametric directions, and she'll use the current coordinates that are indexed from the coordIndex field. so it's an indexed surface, iykyk. ✨


now the fun part, the order drama:

  • you can get a surface of minimum order (2) in the U or V directions by specifying two more knots than control points in that direction and having at least two control points in that direction. and this surface would appear creased in one direction. so like, intentionally crunchy. πŸ’€
  • you can get a surface of maximum order (8) in the U or V directions by specifying eight more knots than control points in that direction and having at least eight control points in that direction. that's the max, periodt. πŸ‘‘

more lore:

  • the control points of the NURBS surface are transformed by the current cumulative transformation.
  • the surface is drawn with the current light model and drawing style.
  • the coordinates, normals, and texture coordinates of a surface are generated, so you cannot bind explicit normals or texture coordinates to a NURBS surface. nope, not allowed, she generates her own. πŸ™ˆ
  • the first material in the state is applied to the entire surface. one material, whole surface, no switching up mid-way.
  • the surface is trimmed according to the currently defined profiles curves.

and now, texture talk πŸŽ€ (this part is lowkey important):

when default texture coordinates are applied to a NURBS surface, the edges of the texture square are stretched to fit the surface. the axes of the texture are called S and T; S is horizontal and T is vertical. the axes of the NURBS surface are called U and V; U is horizontal and V is vertical. don't mix them up bestie, that's the whole plot twist. 😭

you can also define texture coordinates explicitly with the S,T location point, the knot vectors, and the current texture coordinates. so you do have options. slay. πŸ’…


✨ FIELDS ✨

one bullet per field, no skipping, let's get into it:

  • SoSFInt32 numUControlPoints
  • SoSFInt32 numVControlPoints

number of control points in the U and V directions. πŸ”₯

  • SoMFInt32 coordIndex

coordinate indices. that's the index list, that's the pointer to which coords you're using. 🫢

  • SoMFFloat uKnotVector
  • SoMFFloat vKnotVector

the knot vectors in the U and V directions. 🌸

  • SoSFInt32 numSControlPoints
  • SoSFInt32 numTControlPoints

number of control points in the S and T directions. πŸ¦‹

  • SoMFInt32 textureCoordIndex

texture coordinate indices. ✨

  • SoMFFloat sKnotVector
  • SoMFFloat tKnotVector

the knot vectors in the S and T directions. πŸ’œ


🌟 METHODS 🌟

  • SoIndexedNurbsSurface()

creates an indexed NURBS surface node with default settings. brand new baby node, defaults and all. πŸŽ€

  • static SoType getClassTypeId()

returns the type identifier for this class. it's her ID, her passport. πŸ‘‘


πŸ”₯ ACTION BEHAVIOR πŸ”₯

how she acts when the actions come knocking:

  • SoGLRenderAction

draws the surface based on the current coordinates, material, and so on. 🌈

  • SoRayPickAction

picks the surface based on the current coordinates and transformation. 🎯

  • SoGetBoundingBoxAction

computes the bounding box that encloses all control points of the surface with the current transformation applied to them. sets the center to the average of the control points. πŸ“¦

  • SoCallbackAction

if any triangle callbacks are registered with the action, they will be invoked for each successive triangle approximating the surface. so many triangles bestie, so many. 😭


πŸ’– FILE FORMAT/DEFAULTS πŸ’–

here's exactly what she looks like written out, verbatim, every number preserved:

IndexedNurbsSurface {
   numUControlPoints  0
   numVControlPoints  0
   numSControlPoints  0
   numTControlPoints  0
   coordIndex         0
   uKnotVector        0
   vKnotVector        0
   sKnotVector        0
   tKnotVector        0
   textureCoordIndex  -1
}
ngl bestie, peep that textureCoordIndex -1 β€” she's the odd one out and she knows it. πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're the friend group:

  • SoIndexedNurbsCurve
  • SoNurbsSurface
  • SoProfile

okay that's the whole page, you ate it, you understood it, periodt. πŸ’…βœ¨ this was SoIndexedNurbsSurface(3IV)() β€” same title energy top and bottom, iconic and consistent, no notes. go build something curvy bestie πŸŽ€πŸ«ΆπŸ’œ