1SoAntiSquish(3IV)()                                        SoAntiSquish(3IV)()
2
3
4

NAME

6       SoAntiSquish — transformation node that undoes non-uniform 3D scales
7

INHERITS FROM

9       SoBase > SoFieldContainer > SoNode > SoTransformation > SoAntiSquish
10

SYNOPSIS

12       #include <Inventor/nodes/SoAntiSquish.h>
13
14     enum Sizing {
15          SoAntiSquish::X     fits  the  other  two  axes to match the X axis,
16                                   whose size is unchanged
17          SoAntiSquish::Y     fits the other two axes to  match  the  Y  axis,
18                                   whose size is unchanged
19          SoAntiSquish::Z     fits  the  other  two  axes to match the Z axis,
20                                   whose size is unchanged
21          SoAntiSquish::AVERAGE_DIMENSION
22                              uses average of 3 scales in the matrix
23          SoAntiSquish::BIGGEST_DIMENSION
24                              uses biggest of 3 scales in the matrix
25          SoAntiSquish::SMALLEST_DIMENSION
26                              uses smallest of 3 scales in the matrix
27          SoAntiSquish::LONGEST_DIAGONAL
28                              accounts for shearing; transforms a cube by  the
29                                   matrix  and  then  uses  length  of longest
30                                   diagonal
31     }
32
33          Fields from class SoAntiSquish:
34
35     SoSFEnum            sizing
36     SoSFBool            recalcAlways
37
38          Methods from class SoAntiSquish:
39
40                         SoAntiSquish()
41     static SoType       getClassTypeId()
42     void                recalc()
43
44          Methods from class SoNode:
45
46     void                setOverride(SbBool state)
47     SbBool              isOverride() const
48     SoNode *            copy(SbBool copyConnections = FALSE) const
49     virtual SbBool      affectsState() const
50     static SoNode *     getByName(const SbName &name)
51     static int          getByName(const SbName &name, SoNodeList &list)
52
53          Methods from class SoFieldContainer:
54
55     void                setToDefaults()
56     SbBool              hasDefaultValues() const
57     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
58     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
59                              copyConnections = FALSE)
60     SbBool              set(const char *fieldDataString)
61     void                get(SbString &fieldDataString)
62     virtual int         getFields(SoFieldList &resultList) const
63     virtual SoField *   getField(const SbName &fieldName) const
64     SbBool              getFieldName(const SoField *field, SbName &fieldName)
65                              const
66     SbBool              isNotifyEnabled() const
67     SbBool              enableNotify(SbBool flag)
68
69          Methods from class SoBase:
70
71     void                ref()
72     void                unref() const
73     void                unrefNoDelete() const
74     void                touch()
75     virtual SoType      getTypeId() const
76     SbBool              isOfType(SoType type) const
77     virtual void        setName(const SbName &name)
78     virtual SbName      getName() const
79
80

DESCRIPTION

82       This node removes nonuniform 3D scaling from the current transformation
83       matrix  when traversed by an action. It is used by draggers such as the
84       SoTrackballDragger that need to stay uniformly scaled no  matter  where
85       they are located in the scene graph.
86
87       The magnitude of the new scale is determined by the current transforma‐
88       tion matrix and the sizing field. This node does not change the  trans‐
89       lation or rotation in the matrix.
90

FIELDS

92     SoSFEnum            sizing
93          Determines  which  of  the  algorithms enumerated by the type Sizing
94          will be used to select the new scale when the x,y, and z scales  are
95          not equal.
96
97     SoSFBool            recalcAlways
98          If recalcAlways is TRUE, this node calculates its unsquishing matrix
99          every time it is traversed. If FALSE, then this only  occurs  during
100          the first traversal folllowing a call to recalc().
101
102

METHODS

104                         SoAntiSquish()
105          Creates an anti-squish node with default settings.
106
107     static SoType       getClassTypeId()
108          Returns type identifier for this class.
109
110     void                recalc()
111          Sets  a  flag  so  that the next time the node is traversed, it will
112          recalculate its unsquishing matrix.
113
114

ACTION BEHAVIOR

116       SoGLRenderAction,  SoCallbackAction,  SoGetBoundingBoxAction,  SoGetMa‐
117       trixAction, SoRayPickAction
118          Appends  the  current  transformation with a new matrix to create an
119          unsquished result.
120
121

FILE FORMAT/DEFAULTS

123       AntiSquish {
124          sizing        AVERAGE_DIMENSION
125          recalcAlways  TRUE
126     }
127

SEE ALSO

129       SoCenterballDragger, SoJackDragger, SoTrackballDragger,  SoTransformer‐
130       Dragger, SoTransformation, SoTransformBoxDragger
131
132
133
134
135                                                           SoAntiSquish(3IV)()
Impressum