PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusPolydataForce.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) John SH Baxter, Robarts Research Institute. All rights reserved.
4 See License.txt for details.
5 =========================================================================*/
6 
7 #ifndef __vtkPlusPolydataForce_h
8 #define __vtkPlusPolydataForce_h
9 
10 #include "PlusConfigure.h"
11 #include "vtkPlusHapticsExport.h"
12 
13 #include "vtkPlusForceFeedback.h"
14 
15 class vtkPolyData;
16 
17 class vtkPlusHapticsExport vtkPlusPolydataForce : public vtkPlusForceFeedback
18 {
19 public:
20  static vtkPlusPolydataForce *New();
22  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
23 
24  int GenerateForce(vtkMatrix4x4 * transformMatrix, double force[3]);
25  int SetGamma(double gamma);
26  void SetInput(vtkPolyData * poly);
27 
28 protected:
30  virtual ~vtkPlusPolydataForce();
31  double CalculateDistance(double x, double y, double z);
32  void CalculateForce(double x, double y, double z, double force[3]);
33 
34 private:
35  vtkPolyData * poly;
36  double gammaSigmoid;
37  double scaleForce;
38  double lastPos[3];
39 };
40 
41 #endif
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
static vtkPlusForceFeedback * New()
int x
Definition: phidget22.h:4265
Direction vectors of rods y
Definition: algo3.m:15
virtual int GenerateForce(vtkMatrix4x4 *hapticPosition, double force[3])