| 1 |
NAME SoUnits SoUnits SO_UNITS_ { node that scales to convert units of length } |
| 2 |
|
| 3 |
INCLUDE nodes/SoUnits.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This node defines a uniform 3D scale about the origin relative to the |
| 7 |
previously defined units. The default units for all data are meters. |
| 8 |
Adding a units node with the value \kINCHES\. will have the same |
| 9 |
effect as adding an \cSoScale\. node with the \vscaleFactor\. of |
| 10 |
(.0254, .0254, .0254). Any subsequent \cSoUnits\. node will take the |
| 11 |
previous units into account. When building a composite object out of |
| 12 |
a bunch of pieces, it would be a good practice to add an \cSoUnits\. |
| 13 |
node at the beginning of each of the pieces, under an \cSoSeparator\. |
| 14 |
node, to make sure all the pieces fit together with the same scale. |
| 15 |
} |
| 16 |
|
| 17 |
ENUM Units { |
| 18 |
METERS "", |
| 19 |
CENTIMETERS "", |
| 20 |
MILLIMETERS "", |
| 21 |
MICROMETERS "", |
| 22 |
MICRONS "", |
| 23 |
NANOMETERS "", |
| 24 |
ANGSTROMS "", |
| 25 |
KILOMETERS "", |
| 26 |
FEET "", |
| 27 |
INCHES "", |
| 28 |
POINTS "", |
| 29 |
YARDS "", |
| 30 |
MILES "", |
| 31 |
NAUTICAL_MILES "" |
| 32 |
} |
| 33 |
|
| 34 |
FIELD units { Defines the current unit. } |
| 35 |
|
| 36 |
METHOD "" SoUnits() { |
| 37 |
Creates a unit conversion node with default settings. |
| 38 |
} |
| 39 |
|
| 40 |
METHOD "" static SoType getClassTypeId() { |
| 41 |
Returns type identifier for this class. |
| 42 |
} |
| 43 |
|
| 44 |
ACTION SoGLRenderAction, SoCallbackAction, |
| 45 |
SoGetBoundingBoxAction, SoRayPickAction { |
| 46 |
Accumulates the scale that is the ratio of the size from the previous |
| 47 |
unit to the current unit into the current transformation. |
| 48 |
} |
| 49 |
|
| 50 |
ACTION SoGetMatrixAction { |
| 51 |
Returns the matrix corresponding to the units scaling. |
| 52 |
} |
| 53 |
|
| 54 |
ALSO { SoScale, SoTransform } |