H3D API  2.4.1
H3DCoordinateDeformerNode.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 __H3DCOORDINATEDEFORMERNODE_H__
30 #define __H3DCOORDINATEDEFORMERNODE_H__
31 
32 #include <H3D/Node.h>
33 
34 namespace H3D {
35 
45  class H3DAPI_API H3DCoordinateDeformerNode : public Node {
46  public:
47 
50 
72  virtual void deformPoints( const vector< bool > &is_touched,
73  const vector< Vec3f > &touch_point,
74  const vector< Vec3f > &touch_normal,
75  const vector< Vec3f > &touch_force,
76  const vector< Vec3f > &penetration_points,
77  const vector< Vec3f > &orig_points,
78  const vector< Vec3f > &resting_points,
79  const vector< Vec3f > &deformed_points,
80  vector< Vec3f > &new_resting_points,
81  vector< Vec3f > &new_deformed_points ) = 0;
82 
85  virtual string defaultXMLContainerField() {
86  return "deformer";
87  }
88 
89  };
90 }
91 
92 #endif
Node base class.
The H3DCoordinateDeformerNode is the abstract base class for all nodes specifying deformation of coor...
Definition: H3DCoordinateDeformerNode.h:45
virtual string defaultXMLContainerField()
Returns the default xml containerField attribute value.
Definition: H3DCoordinateDeformerNode.h:85
virtual void deformPoints(const vector< bool > &is_touched, const vector< Vec3f > &touch_point, const vector< Vec3f > &touch_normal, const vector< Vec3f > &touch_force, const vector< Vec3f > &penetration_points, const vector< Vec3f > &orig_points, const vector< Vec3f > &resting_points, const vector< Vec3f > &deformed_points, vector< Vec3f > &new_resting_points, vector< Vec3f > &new_deformed_points)=0
The deformPoints method determines the deformation of coordinates based on the interaction of a hapti...
H3DCoordinateDeformerNode()
Constructor.
Definition: H3DCoordinateDeformerNode.h:49
Node is the base class for all classes that can be part of the H3D scene-graph.
Definition: Node.h:46
H3D API namespace.
Definition: Anchor.h:38