Debian Codegraph @

lib/database/src/so/nodes/SoTranslation.c++

raw symbols SCIP
1 /*
2 *
3 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * Further, this software is distributed without any warranty that it is
16 * free of the rightful claim of any third person regarding infringement
17 * or the like. Any license provided herein, whether implied or
18 * otherwise, applies only to this software file. Patent licenses, if
19 * any, provided herein do not apply to combinations of this program with
20 * other software, or any other product whatsoever.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27 * Mountain View, CA 94043, or:
28 *
29 * http://www.sgi.com
30 *
31 * For further information regarding this notice, see:
32 *
33 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34 *
35 */
36
37 /*
38 * Copyright (C) 1990,91 Silicon Graphics, Inc.
39 *
40 _______________________________________________________________________
41 ______________ S I L I C O N G R A P H I C S I N C . ____________
42 |
43 | $Revision: 1.1.1.1 $
44 |
45 | Classes:
46 | SoTranslation
47 |
48 | Author(s) : Paul S. Strauss
49 |
50 ______________ S I L I C O N G R A P H I C S I N C . ____________
51 _______________________________________________________________________
52 */
53
54 #include <Inventor/actions/SoCallbackAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoCallbackAction.h`/
55 #include <Inventor/actions/SoGLRenderAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGLRenderAction.h`/
56 #include <Inventor/actions/SoGetBoundingBoxAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGetBoundingBoxAction.h`/
57 #include <Inventor/actions/SoGetMatrixAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoGetMatrixAction.h`/
58 #include <Inventor/actions/SoPickAction.h>cxx . . $ `<file>/lib/database/include/Inventor/actions/SoPickAction.h`/
59 #include <Inventor/elements/SoModelMatrixElement.h>cxx . . $ `<file>/lib/database/include/Inventor/elements/SoModelMatrixElement.h`/
60 #include <Inventor/nodes/SoTranslation.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoTranslation.h`/
61
62 SO_NODE_SOURCEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:241:9`!(SoTranslation);
63
64 ////////////////////////////////////////////////////////////////////////
65 //
66 // Description:
67 // Constructor
68 //
69 // Use: public
70
71 SoTranslationcxx . . $ SoTranslation#::SoTranslationcxx . . $ SoTranslation#SoTranslation(49f6e7a06ebc5aa8).()
72 //
73 ////////////////////////////////////////////////////////////////////////
74 {
75 SO_NODE_CONSTRUCTORcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:309:9`!(SoTranslation);
76 SO_NODE_ADD_FIELDcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:346:9`!(translation, (0.0, 0.0, 0.0));
77 isBuiltIncxx . . $ SoFieldContainer#isBuiltIn. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!;
78 }
79
80 ////////////////////////////////////////////////////////////////////////
81 //
82 // Description:
83 // Destructor
84 //
85 // Use: private
86
87 SoTranslationcxx . . $ SoTranslation#::~cxx . . $ SoTranslation#`~SoTranslation`(49f6e7a06ebc5aa8).SoTranslationcxx . . $ SoTranslation#()
88 //
89 ////////////////////////////////////////////////////////////////////////
90 {
91 }
92
93 ////////////////////////////////////////////////////////////////////////
94 //
95 // Description:
96 // Implements most actions.
97 //
98 // Use: extender
99
100 void
101 SoTranslationcxx . . $ SoTranslation#::doActioncxx . . $ SoTranslation#doAction(967167263c8a77b7).(SoActioncxx . . $ SoAction# *action)
102 //
103 ////////////////////////////////////////////////////////////////////////
104 {
105 if (! translationcxx . . $ SoTranslation#translation..isIgnoredcxx . . $ SoField#isIgnored(455f465bc33b4cdf).() && ! translationcxx . . $ SoTranslation#translation..isDefaultcxx . . $ SoField#isDefault(455f465bc33b4cdf).())
106 SoModelMatrixElementcxx . . $ SoModelMatrixElement#::translateBycxx . . $ SoModelMatrixElement#translateBy(528e2ed910e577b8).(action->getStatecxx . . $ SoAction#getState(5c8eb8fe6550a03).(), this,
107 translationcxx . . $ SoTranslation#translation..getValuecxx . . $ SoSFVec3f#getValue(b5c384c15c94bb12).());
108 }
109
110
111 ////////////////////////////////////////////////////////////////////////
112 //
113 // Description:
114 // Handles callback action
115 //
116 // Use: extender
117
118 void
119 SoTranslationcxx . . $ SoTranslation#::callbackcxx . . $ SoTranslation#callback(425635c2081b81c8).(SoCallbackActioncxx . . $ SoCallbackAction# *action)
120 //
121 ////////////////////////////////////////////////////////////////////////
122 {
123 SoTranslationcxx . . $ SoTranslation#::doActioncxx . . $ SoTranslation#doAction(967167263c8a77b7).(action);
124 }
125
126 ////////////////////////////////////////////////////////////////////////
127 //
128 // Description:
129 // Handles GL render action
130 //
131 // Use: extender
132
133 void
134 SoTranslationcxx . . $ SoTranslation#::GLRendercxx . . $ SoTranslation#GLRender(5c806c737f468e18).(SoGLRenderActioncxx . . $ SoGLRenderAction# *action)
135 //
136 ////////////////////////////////////////////////////////////////////////
137 {
138 SoTranslationcxx . . $ SoTranslation#::doActioncxx . . $ SoTranslation#doAction(967167263c8a77b7).(action);
139 }
140
141 ////////////////////////////////////////////////////////////////////////
142 //
143 // Description:
144 // Handles get bounding box action
145 //
146 // Use: extender
147
148 void
149 SoTranslationcxx . . $ SoTranslation#::getBoundingBoxcxx . . $ SoTranslation#getBoundingBox(dd7d7d7c2dd56aae).(SoGetBoundingBoxActioncxx . . $ SoGetBoundingBoxAction# *action)
150 //
151 ////////////////////////////////////////////////////////////////////////
152 {
153 SoTranslationcxx . . $ SoTranslation#::doActioncxx . . $ SoTranslation#doAction(967167263c8a77b7).(action);
154 }
155
156 ////////////////////////////////////////////////////////////////////////
157 //
158 // Description:
159 // Returns transformation matrix.
160 //
161 // Use: extender
162
163 void
164 SoTranslationcxx . . $ SoTranslation#::getMatrixcxx . . $ SoTranslation#getMatrix(b69d845234b7e6ee).(SoGetMatrixActioncxx . . $ SoGetMatrixAction# *action)
165 //
166 ////////////////////////////////////////////////////////////////////////
167 {
168 if (! translationcxx . . $ SoTranslation#translation..isIgnoredcxx . . $ SoField#isIgnored(455f465bc33b4cdf).() && ! translationcxx . . $ SoTranslation#translation..isDefaultcxx . . $ SoField#isDefault(455f465bc33b4cdf).()) {
169 SbVec3fcxx . . $ SbVec3f# v = translationcxx . . $ SoTranslation#translation..getValuecxx . . $ SoSFVec3f#getValue(b5c384c15c94bb12).();
170 SbMatrixcxx . . $ SbMatrix# &ctm = action->getMatrixcxx . . $ SoGetMatrixAction#getMatrix(2343154e5d38b214).();
171 SbMatrixcxx . . $ SbMatrix# &inv = action->getInversecxx . . $ SoGetMatrixAction#getInverse(2343154e5d38b214).();
172 SbMatrixcxx . . $ SbMatrix# mcxx . . $ SbMatrix#SbMatrix(49f6e7a06ebc5aa8).;
173
174 m.setTranslatecxx . . $ SbMatrix#setTranslate(65a601b9d70571d6).(v);
175 ctm.multLeftcxx . . $ SbMatrix#multLeft(5bda0b2cfca989a9).(m);
176 m.setTranslatecxx . . $ SbMatrix#setTranslate(65a601b9d70571d6).(-cxx . . $ SbVec3f#operator-(db3a50f11c44d732).v);
177 inv.multRightcxx . . $ SbMatrix#multRight(5bda0b2cfca989a9).(m);
178 }
179 }
180
181 ////////////////////////////////////////////////////////////////////////
182 //
183 // Description:
184 // Handles pick action.
185 //
186 // Use: extender
187
188 void
189 SoTranslationcxx . . $ SoTranslation#::pickcxx . . $ SoTranslation#pick(7b4c6871cb3411ea).(SoPickActioncxx . . $ SoPickAction# *action)
190 //
191 ////////////////////////////////////////////////////////////////////////
192 {
193 SoTranslationcxx . . $ SoTranslation#::doActioncxx . . $ SoTranslation#doAction(967167263c8a77b7).(action);
194 }