H3D API  2.4.1
FitToBoxTransform.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 __FITTOBOXTRANSFORM_H__
30 #define __FITTOBOXTRANSFORM_H__
31 
32 #include <H3D/MatrixTransform.h>
33 
34 namespace H3D {
35 
59 
60  class H3DAPI_API FitToBoxTransform : public MatrixTransform {
61  public:
76  class SFMatrix4f: public TypedField< MatrixTransform::SFMatrix4f,
77  Types< SFVec3f, SFVec3f,
78  SFBound, SFBool, SFBool > > {
80  virtual void update();
81  };
82 
83 
86  Inst< AddChildren > _addChildren = 0,
87  Inst< RemoveChildren > _removeChildren = 0,
88  Inst< MFChild > _children = 0,
89  Inst< SFNode > _metadata = 0,
90  Inst< SFBound > _bound = 0,
91  Inst< SFVec3f > _bboxCenter = 0,
92  Inst< SFVec3f > _bboxSize = 0,
93  Inst< SFTransformedBound > _transformedBound = 0,
94  Inst< SFMatrix4f > _matrix = 0,
95  Inst< SFVec3f > _boxSize = 0,
96  Inst< SFVec3f > _boxCenter = 0,
97  Inst< SFBool > _uniformScalingOnly = 0,
98  Inst< SFBool > _active = 0 );
99 
107  H3DUniquePtr< SFVec3f > boxSize;
108 
115  H3DUniquePtr< SFVec3f > boxCenter;
116 
124  H3DUniquePtr< SFBool > uniformScalingOnly;
125 
133  H3DUniquePtr< SFBool > active;
134 
137  };
138 }
139 
140 #endif
Header file for MatrixTransform, X3D scene-graph node.
We specialize the SFMatrix4f field to that update itself from a SFBound field and two SFVec3f fields.
Definition: FitToBoxTransform.h:78
The FitToBoxTransform node is a MatrixTransform that is used when one wants to transform a part of a ...
Definition: FitToBoxTransform.h:60
H3DUniquePtr< SFBool > uniformScalingOnly
Determines if uniform scaling only should be used, or if nonuniform scaling is allowed.
Definition: FitToBoxTransform.h:124
H3DUniquePtr< SFVec3f > boxCenter
The center of the box we want to transform into.
Definition: FitToBoxTransform.h:115
H3DUniquePtr< SFVec3f > boxSize
The size of the box we want to transform into.
Definition: FitToBoxTransform.h:107
H3DUniquePtr< SFBool > active
Determines if the transformation matrix should be updated or not.
Definition: FitToBoxTransform.h:133
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: FitToBoxTransform.h:136
The MatrixTransform node is a grouping node that defines a coordinate system for its children that is...
Definition: MatrixTransform.h:64
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