H3D API  2.4.1
Billboard.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 __BILLBOARD_H__
30 #define __BILLBOARD_H__
31 
32 #include <H3D/MatrixTransform.h>
33 
34 namespace H3D {
35 
100  class H3DAPI_API Billboard : public MatrixTransform {
101  public:
102 
108  class H3DAPI_API SFMatrix4f:
109  public TypedField< H3D::SFMatrix4f,
110  Types< SFVec3f, SFVec3f, SFVec3f > >{
111  protected:
112 
114  virtual void update();
115  };
116 
117 
119  Billboard( Inst< AddChildren > _addChildren = 0,
120  Inst< RemoveChildren > _removeChildren = 0,
121  Inst< MFChild > _children = 0,
122  Inst< SFNode > _metadata = 0,
123  Inst< SFBound > _bound = 0,
124  Inst< SFVec3f > _bboxCenter = 0,
125  Inst< SFVec3f > _bboxSize = 0,
126  Inst< SFTransformedBound > _transformedBound = 0,
127  Inst< SFMatrix4f > _matrix = 0,
128  Inst< SFVec3f > _axisOfRotation = 0 );
129 
134  virtual void traverseSG( TraverseInfo &ti );
135 
145  H3DUniquePtr< SFVec3f > axisOfRotation;
146 
149 
150  protected:
154  H3DUniquePtr< SFVec3f > vpPosition;
155 
159  H3DUniquePtr< SFVec3f > vpUp;
160  };
161 }
162 
163 #endif
Header file for MatrixTransform, X3D scene-graph node.
Specialize the SFMatrix4f to update the matrix from the fields in the Billboard node.
Definition: Billboard.h:110
The Billboard node is a grouping node which modifies its coordinate system so that the Billboard node...
Definition: Billboard.h:100
H3DUniquePtr< SFVec3f > vpUp
The up vector of the viewpoint in local coordinates of the Billboard node.
Definition: Billboard.h:159
H3DUniquePtr< SFVec3f > axisOfRotation
The axisOfRotation field specifies which axis to use to perform the rotation.
Definition: Billboard.h:145
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: Billboard.h:148
H3DUniquePtr< SFVec3f > vpPosition
The position of the viewpoint in local coordinates of the Billboard node.
Definition: Billboard.h:154
The MatrixTransform node is a grouping node that defines a coordinate system for its children that is...
Definition: MatrixTransform.h:64
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
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