Package com.openinventor.inventor.nodes
Class SoUnits
- java.lang.Object
-
- All Implemented Interfaces:
SafeDisposable
public class SoUnits extends SoTransformation
Node that scales to convert units of length. 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 anSoScale
node with the scaleFactor of (.0254, .0254, .0254). Any subsequentSoUnits
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 anSoUnits
node at the beginning of each of the pieces, under anSoSeparator
node, to make sure all the pieces fit together with the same scale.File format/default:
Units {
units METERS 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. Sets:SoModelMatrixElement
,SoUnitsElement
SoGetMatrixAction
Returns the matrix corresponding to the units scaling.- See Also:
SoScale
,SoTransform
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoUnits.UnitsType
Units.-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFEnum<SoUnits.UnitsType>
units
Defines the current unit.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoUnits()
Creates a unit conversion node with default settings.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
units
public final SoSFEnum<SoUnits.UnitsType> units
Defines the current unit. Use enumUnits
. Default is METERS.
-
-