Provided by: inventor-doc_2.1.5-10-18_all
NAME
SoUnits — node that scales to convert units of length
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoTransformation > SoUnits
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
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
SoSFEnum units Defines the current unit.
METHODS
SoUnits() Creates a unit conversion node with default settings. static SoType getClassTypeId() Returns type identifier for this class.
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.
FILE FORMAT/DEFAULTS
Units { units METERS }
SEE ALSO
SoScale, SoTransform SoUnits(3IV)()