H3D API  2.4.1
H3DFrictionalSurfaceNode.h
Go to the documentation of this file.
1 
3 // Copyright 2004-2019, SenseGraphics AB
4 //
5 // This file is part of H3D API.
6 //
7 // H3D API is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // H3D API is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with H3D API; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 //
21 // A commercial license is also available. Please contact us at
22 // www.sensegraphics.com for more information.
23 //
24 //
28 //
30 #ifndef __H3DFRICTIONALSURFACENODE_H__
31 #define __H3DFRICTIONALSURFACENODE_H__
32 
34 
35 namespace H3D {
36 
41  public:
42 
46  class H3DAPI_API UpdateStaticFriction:
47  public AutoUpdate< OnValueChangeSField< SFFloat > > {
48  protected:
49  virtual void onValueChange( const H3DFloat &v );
50  };
51 
55  class H3DAPI_API UpdateDynamicFriction:
56  public AutoUpdate< OnValueChangeSField< SFFloat > > {
57  protected:
58  virtual void onValueChange( const H3DFloat &v );
59  };
60 
63  Inst< UpdateStiffness > _stiffness = 0,
64  Inst< UpdateDamping > _damping = 0,
65  Inst< UpdateStaticFriction > _staticFriction = 0,
66  Inst< UpdateDynamicFriction > _dynamicFriction = 0,
67  Inst< SFBool > _useRelativeValues = 0 );
68 
75  H3DUniquePtr< UpdateStaticFriction > staticFriction;
76 
83  H3DUniquePtr< UpdateDynamicFriction > dynamicFriction;
84 
87  };
88 }
89 
90 #endif
Header file for H3DStiffnessSurfaceNode.
Specialized field which sets the dynamic_friction variable in H3DFrictionalSurfaceNode when the dynam...
Definition: H3DFrictionalSurfaceNode.h:56
Specialized field which sets the static_friction variable in H3DFrictionalSurfaceNode when the static...
Definition: H3DFrictionalSurfaceNode.h:47
Base class for surfaces with friction.
Definition: H3DFrictionalSurfaceNode.h:40
H3DUniquePtr< UpdateStaticFriction > staticFriction
The friction that is experienced upon initial movement when resting on the surface.
Definition: H3DFrictionalSurfaceNode.h:75
H3DUniquePtr< UpdateDynamicFriction > dynamicFriction
The friction that is experienced when moving along the surface the surface.
Definition: H3DFrictionalSurfaceNode.h:83
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: H3DFrictionalSurfaceNode.h:86
A H3DStiffnessSurfaceNode is the base class for surfaces that have stiffness and damping.
Definition: H3DStiffnessSurfaceNode.h:47
float H3DFloat
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194