Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoTransform.h
1/*=======================================================================
2 * Copyright 1991-1996, Silicon Graphics, Inc.
3 * ALL RIGHTS RESERVED
4 *
5 * UNPUBLISHED -- Rights reserved under the copyright laws of the United
6 * States. Use of a copyright notice is precautionary only and does not
7 * imply publication or disclosure.
8 *
9 * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
10 * Use, duplication or disclosure by the Government is subject to restrictions
11 * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
12 * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
13 * in similar or successor clauses in the FAR, or the DOD or NASA FAR
14 * Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
15 * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
16 *
17 * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
18 * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
19 * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
20 * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
21 * GRAPHICS, INC.
22**=======================================================================*/
23/*=======================================================================
24** Author : Paul S. Strauss (MMM yyyy)
25** Modified by : Gavin Bell (MMM yyyy)
26**=======================================================================*/
27/*=======================================================================
28 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
29 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
30 *** ***
31 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
32 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
33 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
34 *** ***
35 *** RESTRICTED RIGHTS LEGEND ***
36 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
37 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
38 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
39 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
40 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
41 *** ***
42 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
43 *** BORDEAUX, FRANCE ***
44 *** ALL RIGHTS RESERVED ***
45**=======================================================================*/
46/*=======================================================================
47** Modified by : VSG (MMM YYYY)
48**=======================================================================*/
49
50
51#ifndef _SO_TRANSFORM_
52#define _SO_TRANSFORM_
53
54#include <Inventor/fields/SoSFRotation.h>
55#include <Inventor/fields/SoSFVec3f.h>
56#include <Inventor/nodes/SoTransformation.h>
57
59//
60// Class: SoTransform
61//
62// Geometric transformation node.
63//
65
112
113 SO_NODE_HEADER(SoTransform);
114
115 public:
116 // Fields
142
147
155 void pointAt(const SbVec3f &fromPoint,
156 const SbVec3f &toPoint);
157
162 void getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const;
168 SbMatrix &inv) const;
174 SbMatrix &inv) const;
175
181 void multLeft(const SbMatrix &mat);
187 void multRight(const SbMatrix &mat);
188
194 void combineLeft(SoTransformation *nodeOnLeft);
200 void combineRight(SoTransformation *nodeOnRight);
201
207 void setMatrix(const SbMatrix &mat);
208
213 void recenter(const SbVec3f &newCenter);
214
215 private:
216 virtual void doAction(SoAction *action);
217 virtual void callback(SoCallbackAction *action);
218 virtual void GLRender(SoGLRenderAction *action);
219 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
220 virtual void getMatrix(SoGetMatrixAction *action);
221 virtual void pick(SoPickAction *action);
222 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
223
224 private:
225 static void initClass();
226 static void exitClass();
227
228 private:
229 virtual ~SoTransform();
230
231};
232
233#endif /* _SO_TRANSFORM_ */
234
4x4 matrix class.
Definition SbMatrix.h:309
3D vector class.
Definition SbVec.h:932
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Computes transformation matrix for a subgraph.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Abstract base class for picking objects in a scene.
Field containing a rotation.
Field containing a three-dimensional vector.
Definition SoSFVec3f.h:80
General 3D geometric transformation node.
void recenter(const SbVec3f &newCenter)
Changes the center of the transformation to the given point without affecting the overall effect of t...
void getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const
Returns composite matrix that transforms from object space to rotation space (the space after the sca...
SoSFVec3f center
Origin for scale and rotation.
SoSFRotation rotation
Rotation specification.
void multLeft(const SbMatrix &mat)
Convenience function that combines the effects of a matrix transformation into the current transforma...
void setMatrix(const SbMatrix &mat)
Sets the fields in the node to implement the transformation represented by the given matrix.
SoSFRotation scaleOrientation
Rotational orientation for scale.
void pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)
Sets the node to translate the origin to the fromPoint and rotate the negative z-axis (0,...
void getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const
Returns composite matrix that transforms from object space to scale space (the space after the scale)...
void combineRight(SoTransformation *nodeOnRight)
Convenience function that combines the effects of another transformation node into the current transf...
SoSFVec3f scaleFactor
Scale factors.
void getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const
Returns composite matrix that transforms from object space to translation space (the space after scal...
void multRight(const SbMatrix &mat)
Convenience function that combines the effects of a matrix transformation into the current transforma...
SoTransform()
Creates a transformation node with default settings.
void combineLeft(SoTransformation *nodeOnLeft)
Convenience function that combines the effects of another transformation node into the current transf...
SoSFVec3f translation
Translation vector.
Abstract base class for all geometric transformation nodes.