SONURBSSURFACE(3iv)

πŸ’– SoNurbsSurface β€” the NURBS surface shape node πŸ’–

okay bestie, buckle up, we're talking about SoNurbsSurface from the 3IV manual, and it's literally the moment a smooth lil NURBS surface becomes a whole shape node. no cap. πŸ¦‹


🌸 NAME 🌸

SoNurbsSurface β€” NURBS surface shape node. that's it, that's the vibe. πŸ‘‘


🧬 INHERITS FROM 🧬

SoBase > SoFieldContainer > SoNode > SoShape > SoNurbsSurface

so yes, she comes from a long line of iconic ancestors. generational talent fr fr. πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoNurbsSurface.h>

Fields from class SoNurbsSurface:

SoSFInt32           numUControlPoints
SoSFInt32           numVControlPoints
SoSFInt32           numSControlPoints
SoSFInt32           numTControlPoints
SoMFFloat           uKnotVector
SoMFFloat           vKnotVector
SoMFFloat           sKnotVector
SoMFFloat           tKnotVector

Methods from class SoNurbsSurface:

                      SoNurbsSurface()
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 this shape node represents a NURBS surface, built from the node's knot vectors and from control points that get constructed out of the current coordinates. 🫢

the current coordinates are used in row-major order β€” and the V direction corresponds to the rows, iykyk. the number of coordinates used is decided by the numUControlPoints and numVControlPoints fields. the uKnotVector and vKnotVector fields hold floating point arrays of non-decreasing values.

the order of the surface in the U and V directions is defined as the number of knots minus the number of control points in that particular direction. and the largest order allowed for a NURBS surface is 8. that's the ceiling, no going above it. πŸ’€

the control points of the NURBS surface get 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 for you β€” which means you cannot bind explicit normals or texture coordinates to a NURBS surface. nope. not allowed. πŸ™ˆ and the first material in the state is applied to the entire surface.

the surface is trimmed according to the currently defined profile's curves.

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, T is vertical. the axes of the NURBS surface are called U and V β€” U is horizontal, V is vertical. you can also define texture coordinates explicitly with the S,T location point, the knot vectors, and the current texture coordinates. ✨

and finally: the approximation of the surface by polygons is affected by the current complexity value. noted. πŸ“


πŸ¦‹ FIELDS πŸ¦‹

  • SoSFInt32 numUControlPoints
  • SoSFInt32 numVControlPoints

number of control points in the U and V directions.

  • SoSFInt32 numSControlPoints
  • SoSFInt32 numTControlPoints

number of control points in the S and T directions.

  • SoMFFloat uKnotVector
  • SoMFFloat vKnotVector

the knot vectors in the U and V directions.

  • SoMFFloat sKnotVector
  • SoMFFloat tKnotVector

the knot vectors in the S and T directions.


🧚 METHODS 🧚

  • SoNurbsSurface()

creates a NURBS surface node with default settings. fresh out the box, defaults only. 🎁

  • static SoType getClassTypeId()

returns the type identifier for this class. your girl's ID, basically. πŸ’…


πŸ”₯ ACTION BEHAVIOR πŸ”₯

  • SoGLRenderAction

draws the surface based on the current coordinates, material, and so on. the glow-up happens here. ✨

  • 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. it sets the center to the average of the control points. math girlies rise. πŸ‘‘

  • SoCallbackAction

if any triangle callbacks are registered with the action, they will be invoked for each successive triangle approximating the surface. every single one. no skips. πŸŽ€


πŸ’œ FILE FORMAT/DEFAULTS πŸ’œ

NurbsSurface {
    numUControlPoints  0
    numVControlPoints  0
    numSControlPoints  0
    numTControlPoints  0
    uKnotVector        0
    vKnotVector        0
    sKnotVector        0
    tKnotVector        0
}

🌈 SEE ALSO 🌈

  • SoIndexedNurbsSurface
  • SoNurbsCurve
  • SoProfile

okay that's the whole page, bestie, you ate. go build something gorgeous. πŸ’–

this was the SoNurbsSurface(3IV)() page β€” that's the 3IV manual, and the footer was literally just SoNurbsSurface(3IV)() with no extra source, version, or date info to pass along, so we're keeping it cute and empty like a clean ~/.vimrc. 🫢✨