H3D API  2.4.1
HAnimJoint.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 __HANIMJOINT_H__
30 #define __HANIMJOINT_H__
31 
32 #include <H3D/HAnimDisplacer.h>
33 #include <H3D/Transform.h>
34 #include <H3D/MFFloat.h>
35 #include <H3D/MFInt32.h>
36 
37 namespace H3D {
38 
108  class H3DAPI_API HAnimJoint : public Transform {
109  public:
110 
115  Field,
118 
120  HAnimJoint( Inst< AddChildren > _addChildren = 0,
121  Inst< RemoveChildren > _removeChildren = 0,
122  Inst< SFVec3f > _center = 0,
123  Inst< MFChild > _children = 0,
124  Inst< SFNode > _metadata = 0,
125  Inst< SFRotation > _rotation = 0,
126  Inst< SFVec3f > _scale = 0,
127  Inst< SFRotation > _scaleOrientation = 0,
128  Inst< SFVec3f > _translation = 0,
129  Inst< SFBound > _bound = 0,
130  Inst< SFVec3f > _bboxCenter = 0,
131  Inst< SFVec3f > _bboxSize = 0,
132  Inst< SFTransformedBound > _transformedBound = 0,
133  Inst< Matrix > _matrix = 0,
134  Inst< SFMatrix4f > _accumulatedForward = 0,
135  Inst< SFMatrix4f > _accumulatedInverse = 0,
136  Inst< MFDisplacer > _displacers = 0,
137  Inst< SFRotation > _limitOrientation = 0,
138  Inst< MFFloat > _llimit = 0,
139  Inst< MFFloat > _ulimit = 0,
140  Inst< SFString > _name = 0,
141  Inst< MFInt32 > _skinCoordIndex = 0,
142  Inst< MFFloat > _skinCoordWeight = 0,
143  Inst< MFFloat > _stiffness = 0
144  );
145 
146  //virtual void render();
147  virtual void traverseSG( TraverseInfo &ti );
148 
150  typedef enum {
155  SKELETON
156  } RenderType;
157 
159  void renderSkeleton( RenderType type );
160 
169  H3DUniquePtr< MFDisplacer > displacers;
170 
181  H3DUniquePtr< SFRotation > limitOrientation;
182 
193  H3DUniquePtr< MFFloat > llimit;
194 
205  H3DUniquePtr< MFFloat > ulimit;
206 
214  H3DUniquePtr< SFString > name;
215 
224  H3DUniquePtr< MFInt32 > skinCoordIndex;
225 
237  H3DUniquePtr< MFFloat > skinCoordWeight;
238 
248  H3DUniquePtr< MFFloat > stiffness;
249 
260  H3DUniquePtr< SFMatrix4f > accumulatedJointMatrix;
261 
264 
265  };
266 }
267 
268 #endif
Header file for HAnimDisplacer, X3D scene-graph node.
Contains the MFFloat field class.
Contains the MFInt32 field class.
Header file for Transform, X3D scene-graph node.
DependentMFNode are modified TypedMFNode fields where the field dirty status is dependent on fields i...
Definition: DependentNodeFields.h:336
Class used for specifying a field member of a node in a DependentSFNode or DependentMFNode specificat...
Definition: DependentNodeFields.h:48
The Field class.
Definition: Field.h:46
Applications may need to alter the shape of individual segments.
Definition: HAnimDisplacer.h:66
The HAnimJoint object is the fundamental building block that represents body parts.
Definition: HAnimJoint.h:108
H3DUniquePtr< MFFloat > llimit
The llimit fields of the HAnimJoint object specify the lower joint rotation limits.
Definition: HAnimJoint.h:193
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: HAnimJoint.h:263
H3DUniquePtr< MFFloat > skinCoordWeight
The skinCoordWeight field contains a list of floating point values between 0.0 and 1....
Definition: HAnimJoint.h:237
H3DUniquePtr< MFDisplacer > displacers
The displacers field contains a list of HAnimDisplacer objects that are used to morph the deformable ...
Definition: HAnimJoint.h:169
DependentMFNode< HAnimDisplacer, FieldRef< X3DGeometricPropertyNode, Field, &HAnimDisplacer::propertyChanged > > MFDisplacer
The MFDisplacer is dependent on the propertyChanged field of the contained HAnimDisplacer.
Definition: HAnimJoint.h:117
H3DUniquePtr< MFFloat > stiffness
The stiffness field, if present, contains values ranging between 0.0 and 1.0 that provide an inverse ...
Definition: HAnimJoint.h:248
@ JOINTS
Render the joints only as spheres.
Definition: HAnimJoint.h:152
H3DUniquePtr< MFFloat > ulimit
The ulimit fields of the HAnimJoint object specify the upper joint rotation limits.
Definition: HAnimJoint.h:205
H3DUniquePtr< SFMatrix4f > accumulatedJointMatrix
The accumulated joint transform from the local coordinate system of the joint to HAnimHumanoid local ...
Definition: HAnimJoint.h:260
H3DUniquePtr< SFString > name
The name field contains a name that is used for identifying the object.
Definition: HAnimJoint.h:214
H3DUniquePtr< MFInt32 > skinCoordIndex
The skinCoordIndex field contains a list of indices into the skinCoord field of the HAnimHumanoid obj...
Definition: HAnimJoint.h:224
H3DUniquePtr< SFRotation > limitOrientation
The limitOrientation field gives the orientation of the coordinate frame in which the ulimit and llim...
Definition: HAnimJoint.h:181
The Transform node is a grouping node that defines a coordinate system for its children that is relat...
Definition: Transform.h:91
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
This is the base node type for all geometric property node types defined in X3D.
Definition: X3DGeometricPropertyNode.h:43
H3DUniquePtr< Field > propertyChanged
Field that indicated whether the properties have changed.
Definition: X3DGeometricPropertyNode.h:53
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