1SoUnits(3IV)()                                                  SoUnits(3IV)()
2
3
4

NAME

6       SoUnits — node that scales to convert units of length
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoTransformation > SoUnits
10

SYNOPSIS

12       #include <Inventor/nodes/SoUnits.h>
13
14     enum Units {
15          SoUnits::METERS
16          SoUnits::CENTIMETERS
17          SoUnits::MILLIMETERS
18          SoUnits::MICROMETERS
19          SoUnits::MICRONS
20          SoUnits::NANOMETERS
21          SoUnits::ANGSTROMS
22          SoUnits::KILOMETERS
23          SoUnits::FEET
24          SoUnits::INCHES
25          SoUnits::POINTS
26          SoUnits::YARDS
27          SoUnits::MILES
28          SoUnits::NAUTICAL_MILES
29     }
30
31          Fields from class SoUnits:
32
33     SoSFEnum            units
34
35          Methods from class SoUnits:
36
37                         SoUnits()
38     static SoType       getClassTypeId()
39
40          Methods from class SoNode:
41
42     void                setOverride(SbBool state)
43     SbBool              isOverride() const
44     SoNode *            copy(SbBool copyConnections = FALSE) const
45     virtual SbBool      affectsState() const
46     static SoNode *     getByName(const SbName &name)
47     static int          getByName(const SbName &name, SoNodeList &list)
48
49          Methods from class SoFieldContainer:
50
51     void                setToDefaults()
52     SbBool              hasDefaultValues() const
53     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
54     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
55                              copyConnections = FALSE)
56     SbBool              set(const char *fieldDataString)
57     void                get(SbString &fieldDataString)
58     virtual int         getFields(SoFieldList &resultList) const
59     virtual SoField *   getField(const SbName &fieldName) const
60     SbBool              getFieldName(const SoField *field, SbName &fieldName)
61                              const
62     SbBool              isNotifyEnabled() const
63     SbBool              enableNotify(SbBool flag)
64
65          Methods from class SoBase:
66
67     void                ref()
68     void                unref() const
69     void                unrefNoDelete() const
70     void                touch()
71     virtual SoType      getTypeId() const
72     SbBool              isOfType(SoType type) const
73     virtual void        setName(const SbName &name)
74     virtual SbName      getName() const
75
76

DESCRIPTION

78       This  node  defines a uniform 3D scale about the origin relative to the
79       previously defined units. The default units for all  data  are  meters.
80       Adding  a units node with the value INCHES will have the same effect as
81       adding an SoScale node with the scaleFactor of (.0254,  .0254,  .0254).
82       Any  subsequent SoUnits node will take the previous units into account.
83       When building a composite object out of a bunch of pieces, it would  be
84       a  good practice to add an SoUnits node at the beginning of each of the
85       pieces, under an SoSeparator node, to make  sure  all  the  pieces  fit
86       together with the same scale.
87

FIELDS

89     SoSFEnum            units
90          Defines the current unit.
91
92

METHODS

94                         SoUnits()
95          Creates a unit conversion node with default settings.
96
97     static SoType       getClassTypeId()
98          Returns type identifier for this class.
99
100

ACTION BEHAVIOR

102       SoGLRenderAction,  SoCallbackAction, SoGetBoundingBoxAction, SoRayPick‐
103       Action
104          Accumulates the scale that is the ratio of the size from the  previ‐
105          ous unit to the current unit into the current transformation.
106
107     SoGetMatrixAction
108          Returns the matrix corresponding to the units scaling.
109
110

FILE FORMAT/DEFAULTS

112       Units {
113          units  METERS
114     }
115

SEE ALSO

117       SoScale, SoTransform
118
119
120
121
122                                                                SoUnits(3IV)()
Impressum