SoUnits — node that scales to convert units of length
Contents
Action Behavior
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoRayPickAction
Accumulates the scale that is the ratio of the size from the previous unit to the current unit into
the current transformation.
SoGetMatrixAction
Returns the matrix corresponding to the units scaling.
Description
This node defines a uniform 3D scale about the origin relative to the previously defined units. The
default units for all data are meters. Adding a units node with the value INCHES will have the same
effect as adding an SoScale node with the scaleFactor of (.0254, .0254, .0254). Any subsequent SoUnits
node will take the previous units into account. When 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, to make sure all the pieces fit together with the same scale.
Fields
SoSFEnumunits
Defines the current unit.
File Format/Defaults
Units{unitsMETERS}Inherits From
SoBase > SoFieldContainer > SoNode > SoTransformation > SoUnits
Methods
SoUnits()
Creates a unit conversion node with default settings.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoUnits — node that scales to convert units of length
See Also
SoScale,SoTransformSoUnits(3IV)()
Synopsis
#include<Inventor/nodes/SoUnits.h>enumUnits{SoUnits::METERSSoUnits::CENTIMETERSSoUnits::MILLIMETERSSoUnits::MICROMETERSSoUnits::MICRONSSoUnits::NANOMETERSSoUnits::ANGSTROMSSoUnits::KILOMETERSSoUnits::FEETSoUnits::INCHESSoUnits::POINTSSoUnits::YARDSSoUnits::MILESSoUnits::NAUTICAL_MILES}
Fields from class SoUnits:
SoSFEnumunits
Methods from class SoUnits:
SoUnits()staticSoTypegetClassTypeId()
Methods from class SoNode:
voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const