SONURBSCURVE(3iv)
πΈ SoNurbsCurve(3IV) β NURBS curve shape node β¨
okay bestie, buckle up, because we're about to talk about curves β and not the kind on your fave's Instagram. this is the SoNurbsCurve page from the SoNurbsCurve(3IV) manual and it's genuinely one of the cutest little nodes in Open Inventor. let's get into it π
π¦ NAME π¦
SoNurbsCurve β NURBS curve shape node
like. that's it. that's the whole name. it's a node. it shapes a curve. iconic behaviour honestly.
π INHERITS FROM π
SoBase > SoFieldContainer > SoNode > SoShape > SoNurbsCurve
so the whole family tree is giving main character lineage β SoNurbsCurve is the baby of the family and it inherited everything from SoBase all the way down. it did NOT skip leg day, it inherited the whole gym π«Ά
β¨ SYNOPSIS β¨
first things first, you gotta let your code know it exists:
#include <Inventor/nodes/SoNurbsCurve.h>
the fields that belong to SoNurbsCurve
SoSFInt32 numControlPoints
SoMFFloat knotVector
the methods that belong to SoNurbsCurve
SoNurbsCurve()
static SoType getClassTypeId()
methods it got from 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 it got from 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 it got from 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
look at that inheritance. it's giving generational wealth π
π DESCRIPTION π
so, SoNurbsCurve is a whole class that represents a NURBS curve, and it's built entirely off the knot vector and the control points that you specify. you're the main character here, the node just does what you say.
the knotVector field is a floating-point array of values. those values are the coordinates of the knot points in the curve, and bestie, you must enter them in non-decreasing order. like, ascending. do not come in here with your chaos. π
the curve uses the first numControlPoints values in the current coordinates as its control points.
now here's the math tea β β if you specify n knots, you can specify up to n-8 control points. the number of knots minus the number of control points is known as the order of the curve. and a NURBS curve can have an order of up to 8. that's the ceiling. that's the limit. periodt.
the control points of the curve get transformed by the current transformation matrix. the curve is drawn with the current lighting model and drawing style β and heads up, a drawing style of FILLED is treated as LINES, because it's a curve, babe, it's not a filled shape, be so serious. the coordinates, normals, and texture coordinates of a NURBS curve are generated, so you cannot bind explicit normals or texture coordinates to a NURBS curve. no. stop. not allowed. π
and lastly, the approximation of the curve by line segments is affected by the current complexity value. so if it's looking a little chunky, you know what knob to twist. π₯
π FIELDS π
SoSFInt32 numControlPointsβ the number of control points. how many points are we controlling? this many. πSoMFFloat knotVectorβ the knot vector. that's the whole description. it's the knot vector. it vectors the knots. slay.
π§ METHODS π§
SoNurbsCurve()β creates a NURBS curve node with default settings. fresh out the box, defaults and all. β¨static SoType getClassTypeId()β returns the type identifier for this class. it's the little name tag this class wears to the party. π
π ACTION BEHAVIOR π
this is where the node actually does stuff when the actions come knocking:
SoGLRenderActionβ draws the curve based on the current coordinates, material, and so on. render o'clock, bestie. π₯SoRayPickActionβ picks the curve based on the current coordinates and transformation. yes, you can click on it. it responds. π«ΆSoGetBoundingBoxActionβ computes the bounding box that encloses all control points of the curve, with the current transformation applied to them. and it sets the center to the average of the control points. cute little midpoint moment. πSoCallbackActionβ if any line segment callbacks are registered with the action, they will be invoked for each successive segment approximating the curve. every single segment gets its callback. no segment left behind. π
β FILE FORMAT/DEFAULTS β
here's what it looks like written out, and what you get if you don't touch anything:
NurbsCurve {
numControlPoints 0
knotVector 0
}
yep. 0 and 0. it starts out as an empty little nothing and then you build it into a masterpiece. character development honestly. πΈ
π¦ SEE ALSO π¦
go check out its siblings, they're also iconic:
SoIndexedNurbsCurveSoNurbsSurface
heads up bestie: the order can't go above 8, the knot values gotta be non-decreasing, and you cannot bind explicit normals or texture coordinates to a NURBS curve. these are not vibes, these are rules. π
okay that's the whole page, you're officially a NURBS girlie now π
this was the SoNurbsCurve(3IV)() manual page, straight from the SoNurbsCurve(3IV) source β so go forth and curve, and remember: non-decreasing order, always. mwah πππ¦
π¦ 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