H3D API  2.4.1
Transform.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
27 //
29 #ifndef __TRANSFORM_H__
30 #define __TRANSFORM_H__
31 
32 #include <H3D/MatrixTransform.h>
33 #include <H3D/SFRotation.h>
34 
35 namespace H3D {
36 
91  class H3DAPI_API Transform : public MatrixTransform {
92  public:
93 
102  class H3DAPI_API Matrix:
103  public TypedField< H3D::SFMatrix4f,
104  Types< SFVec3f, SFRotation, SFVec3f,
105  SFRotation, SFVec3f > >{
106  protected:
107 
109  virtual void update();
110  };
111 
112 
114  Transform( Inst< AddChildren > _addChildren = 0,
115  Inst< RemoveChildren > _removeChildren = 0,
116  Inst< SFVec3f > _center = 0,
117  Inst< MFChild > _children = 0,
118  Inst< SFNode > _metadata = 0,
119  Inst< SFRotation > _rotation = 0,
120  Inst< SFVec3f > _scale = 0,
121  Inst< SFRotation > _scaleOrientation = 0,
122  Inst< SFVec3f > _translation = 0,
123  Inst< SFBound > _bound = 0,
124  Inst< SFVec3f > _bboxCenter = 0,
125  Inst< SFVec3f > _bboxSize = 0,
126  Inst< SFTransformedBound > _transformedBound = 0,
127  Inst< Matrix > _matrix = 0,
128  Inst< SFMatrix4f > _accumulatedForward = 0,
129  Inst< SFMatrix4f > _accumulatedInverse = 0 );
130 
131 
132  virtual void render();
133 
142  H3DUniquePtr< SFVec3f > center;
143 
150  H3DUniquePtr< SFRotation > rotation;
151 
162  H3DUniquePtr< SFVec3f > scale;
163 
171  H3DUniquePtr< SFRotation > scaleOrientation;
172 
179  H3DUniquePtr< SFVec3f > translation;
180 
183  };
184 }
185 
186 #endif
Header file for MatrixTransform, X3D scene-graph node.
Contains the SFRotation field class.
The MatrixTransform node is a grouping node that defines a coordinate system for its children that is...
Definition: MatrixTransform.h:64
Specialize the SFMatrix4f to update the matrix from the fields in the Transform node.
Definition: Transform.h:105
The Transform node is a grouping node that defines a coordinate system for its children that is relat...
Definition: Transform.h:91
H3DUniquePtr< SFVec3f > scale
The scale field specifies a non-uniform scale of the coordinate system.
Definition: Transform.h:162
H3DUniquePtr< SFVec3f > translation
Specifies a translation to the coordinate system.
Definition: Transform.h:179
H3DUniquePtr< SFRotation > scaleOrientation
The scaleOrientation specifies a rotation of the coordinate system before the scale (to specify scale...
Definition: Transform.h:171
H3DUniquePtr< SFVec3f > center
The center field specifies a translation offset from the origin of the local coordinate system that t...
Definition: Transform.h:142
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: Transform.h:182
H3DUniquePtr< SFRotation > rotation
The rotation field specifies an arbitrary rotation.
Definition: Transform.h:150
A template modifier class for adding type checking on the routes to any Field class.
Definition: TypedField.h:84
H3D API namespace.
Definition: Anchor.h:38
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194