SOUNITS(3iv)
π SoUnits β the manual page, but make it make sense π
okay bestie, buckle up, we're doing SoUnits(3IV) β yes that's the whole manual name, and yes it's giving "3D graphics library that predates your birth" energy, but trust me, it slays. π¦
β¨ NAME β¨
SoUnits β node that scales to convert units of length πβ¨
πΈ INHERITS FROM πΈ
SoBase > SoFieldContainer > SoNode > SoTransformation > SoUnits
so basically it's the great-great-great-grandchild of SoBase and it inherited the whole family tree, no cap. π
π SYNOPSIS π
#include <Inventor/nodes/SoUnits.h>
enum Units {
SoUnits::METERS
SoUnits::CENTIMETERS
SoUnits::MILLIMETERS
SoUnits::MICROMETERS
SoUnits::MICRONS
SoUnits::NANOMETERS
SoUnits::ANGSTROMS
SoUnits::KILOMETERS
SoUnits::FEET
SoUnits::INCHES
SoUnits::POINTS
SoUnits::YARDS
SoUnits::MILES
SoUnits::NAUTICAL_MILES
}
Fields from class SoUnits:
SoSFEnum units
Methods from class SoUnits:
SoUnits()
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
the way that's a LOT of inherited methods and not a single one of them is getting skipped, periodt. π
π DESCRIPTION π
so what does this node actually DO? it defines a uniform 3D scale about the origin, relative to whatever units were defined before it. π―
the default units for all data are meters. write that down. ποΈ
here's the iconic part: adding a SoUnits node with the value INCHES has the exact same effect as adding an SoScale node with the scaleFactor of (.0254, .0254, .0254). same vibe, different font. β¨
and it's cumulative, bestie β any subsequent SoUnits node takes the previous units into account. so the chain keeps building on itself, like a group chat where everyone's replying to the last person. π²
when you're building a composite object out of a bunch of pieces, it would be a good practice to add an SoUnits node at the beginning of each of the pieces, under an SoSeparator node, so you can make sure all the pieces fit together with the same scale. do this and your model will not look like a cursed collage. π
π FIELDS π
SoSFEnumunitsβ defines the current unit. that's it. that's the whole field. one job, and she does it flawlessly. π
π«Ά METHODS π«Ά
SoUnits()β creates a unit conversion node with default settings. a fresh baby node, defaults and all. πΌstatic SoType getClassTypeId()β returns the type identifier for this class. iykyk. π
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction
accumulates the scale β which is the ratio of the size from the previous unit to the current unit β into the current transformation. so it's doing the math for you and sliding it right into the transform. no notes. π―
SoGetMatrixAction
returns the matrix corresponding to the units scaling. just hands you the matrix. straightforward, generous, main character energy. π
β FILE FORMAT/DEFAULTS β
Units {
units METERS
}
look at her. minimal. default. flawless. π
π SEE ALSO π
SoScale, SoTransform
okay that's the whole page, you ate it, you understood it, you're basically a units expert now π§π β and before you go, the footer of this manual says SoUnits(3IV)() which is literally the same as the title up top, because this manpage believes in symmetry and also in not giving us a version number or a date. iconic behaviour honestly. 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