45 #ifndef CAlgorithmFingerProxyH 46 #define CAlgorithmFingerProxyH This class implements a 3D vector.
Definition: CVector3d.h:88
void setProxyRadius(const double &a_radius)
This method sets the radius of the proxy.
Definition: CAlgorithmFingerProxy.h:120
cCollisionRecorder m_collisionRecorderConstraint2
Collision detection recorder for searching third constraint.
Definition: CAlgorithmFingerProxy.h:277
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition: CRenderOptions.h:82
bool m_slipping
If true then we are currently in a "slip friction".
Definition: CAlgorithmFingerProxy.h:249
void reset()
This method reset the algorithm and sets the proxy position to the device position.
Definition: CAlgorithmFingerProxy.cpp:159
void setProxyGlobalPosition(const cVector3d &a_position)
This method sets the position of the proxy in world coordinates.
Definition: CAlgorithmFingerProxy.h:129
unsigned int m_numCollisionEvents
Number of collision events between proxy and triangles (0, 1, 2 or 3).
Definition: CAlgorithmFingerProxy.h:258
cVector3d surfaceNormal
Surface normal.
Definition: CAlgorithmFingerProxy.h:341
cCollisionSettings m_collisionSettings
Collision settings.
Definition: CAlgorithmFingerProxy.h:185
bool computeNextProxyPositionWithContraints2(const cVector3d &a_goalGlobalPos)
This method updates the position of the proxy - constraint 2.
Definition: CAlgorithmFingerProxy.cpp:754
double m_forceShadingAngleThreshold
Maximum force shading angle (radians) threshold between normals of triangle.
Definition: CAlgorithmFingerProxy.h:182
void setEpsilonBaseValue(double a_value)
This method sets the epsilon tolerance error base value.
Definition: CAlgorithmFingerProxy.cpp:184
cVector3d m_tangentialForce
Tangential force.
Definition: CAlgorithmFingerProxy.h:255
cCollisionRecorder m_collisionRecorderConstraint1
Collision detection recorder for searching second constraint.
Definition: CAlgorithmFingerProxy.h:274
void adjustDynamicProxy(const cVector3d &a_goal)
This method ajust the position of proxy by taking into account motion of objects in the world...
Definition: CAlgorithmFingerProxy.cpp:329
This structure stores the data related to a collision event.
Definition: CCollisionBasics.h:91
double getEpsilonBaseValue()
This method returns the current epsilon tolerance error base value.
Definition: CAlgorithmFingerProxy.h:198
double m_epsilonBaseValue
Epsilon value - used for handling numerical limits.
Definition: CAlgorithmFingerProxy.h:303
cVector3d getNormalForce()
This method returns the most recently calculated normal force.
Definition: CAlgorithmFingerProxy.h:138
double m_epsilonMinimalValue
Epsilon value - used for handling numerical limits.
Definition: CAlgorithmFingerProxy.h:306
cVector3d computeShadedSurfaceNormal(cCollisionEvent *a_contactPoint)
This method computes the local surface normal from interpolated vertex normals.
Definition: CAlgorithmFingerProxy.cpp:1346
double m_epsilon
Epsilon value - used for handling numerical limits.
Definition: CAlgorithmFingerProxy.h:297
virtual void updateForce()
This method computes the resulting force which will be sent to the haptic device. ...
Definition: CAlgorithmFingerProxy.cpp:1073
This class implements a virtual world.
Definition: CWorld.h:92
double getProxyRadius() const
This method returns the radius of the proxy.
Definition: CAlgorithmFingerProxy.h:123
Implements a base class for programming collision detectors that identify intersections between segme...
cVector3d m_normalForce
Normal force.
Definition: CAlgorithmFingerProxy.h:252
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition: CGenericObject.h:112
This class implements a collision detection recorder that stores all collision events that are report...
Definition: CCollisionBasics.h:185
bool computeNextProxyPositionWithContraints1(const cVector3d &a_goalGlobalPos)
This method updates the position of the proxy - constraint 1.
Definition: CAlgorithmFingerProxy.cpp:579
This class implements a base class for modeling force rendering algorithms.
Definition: CGenericForceAlgorithm.h:84
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition: CCollisionBasics.h:242
void initialize(cWorld *a_world, const cVector3d &a_initialGlobalPosition)
This method initialize the algorithm.
Definition: CAlgorithmFingerProxy.cpp:130
int getNumCollisionEvents()
This method return the number of collision events (0, 1, 2 or 3):
Definition: CAlgorithmFingerProxy.h:151
double m_frictionDynHysteresisMultiplier
Definition: CAlgorithmFingerProxy.h:179
cCollisionEvent * m_collisionEvents[3]
Table of collision events (0-3). Call getNumCollisionEvents() to see how many are actually valid...
Definition: CAlgorithmFingerProxy.h:161
bool m_useDynamicProxy
If true the the dynamic proxy is enabled to handle moving objects.
Definition: CAlgorithmFingerProxy.h:171
cVector3d getProxyGlobalPosition() const
This method returns the last computed position of the proxy in world coordinates. ...
Definition: CAlgorithmFingerProxy.h:126
bool computeNextProxyPositionWithContraints0(const cVector3d &a_goalGlobalPos)
This method updates the position of the proxy - constraint 0.
Definition: CAlgorithmFingerProxy.cpp:408
virtual cVector3d computeForces(const cVector3d &a_toolPos, const cVector3d &a_toolVel)
This method calculates the interaction forces.
Definition: CAlgorithmFingerProxy.cpp:204
This class implements a finger-proxy force rendering algorithm.
Definition: CAlgorithmFingerProxy.h:86
virtual void testFrictionAndMoveProxy(const cVector3d &a_goal, const cVector3d &a_proxy, cVector3d &a_normal, cGenericObject *a_parent)
This method attempts to move the proxy, subject to friction constraints.
Definition: CAlgorithmFingerProxy.cpp:945
cVector3d m_lastGlobalForce
Last computed force (in global coordinate frame).
Definition: CAlgorithmFingerProxy.h:243
cVector3d getDeviceGlobalPosition() const
This method returns the last specified position of the device in world coordinates.
Definition: CAlgorithmFingerProxy.h:132
double m_epsilonCollisionDetection
Epsilon value - used for handling numerical limits.
Definition: CAlgorithmFingerProxy.h:300
cVector3d m_nextBestProxyGlobalPos
Next best position for the proxy (in global coordinate frame).
Definition: CAlgorithmFingerProxy.h:246
cVector3d m_proxyGlobalPos
Global position of the proxy.
Definition: CAlgorithmFingerProxy.h:237
cVector3d m_contactPointLocalPos1
Local position of contact point first object.
Definition: CAlgorithmFingerProxy.h:283
Definition: CAudioBuffer.cpp:56
virtual void computeNextBestProxyPosition(const cVector3d &a_goal)
This method computes the next goal position of the proxy.
Definition: CAlgorithmFingerProxy.cpp:248
double m_radius
Radius of the proxy.
Definition: CAlgorithmFingerProxy.h:261
unsigned int m_algoCounter
Value of state machine.
Definition: CAlgorithmFingerProxy.h:309
virtual bool goalAchieved(const cVector3d &a_proxy, const cVector3d &a_goal) const
This method tests whether the proxy has reached the goal point.
Definition: CAlgorithmFingerProxy.cpp:927
cCollisionRecorder m_collisionRecorderConstraint0
Collision detection recorder for searching first constraint.
Definition: CAlgorithmFingerProxy.h:271
Implements a base class for force rendering algorithms.
cVector3d m_contactPointLocalPos2
Local position of contact point first object.
Definition: CAlgorithmFingerProxy.h:286
double m_collisionRadius
Collision radius. This value typically corresponds to the radius of the virtual tool or cursor...
Definition: CCollisionBasics.h:275
double m_epsilonInitialValue
Epsilon value - used for handling numerical limits.
Definition: CAlgorithmFingerProxy.h:294
cAlgorithmFingerProxy()
Constructor of cAlgorithmFingerProxy.
Definition: CAlgorithmFingerProxy.cpp:59
cVector3d m_contactPointLocalPos0
Local position of contact point first object.
Definition: CAlgorithmFingerProxy.h:280
virtual void render(cRenderOptions &a_options)
This method renders the force algorithms graphically in OpenGL. (For debug purposes) ...
Definition: CAlgorithmFingerProxy.cpp:1451
cVector3d m_deviceGlobalPos
Global position of device.
Definition: CAlgorithmFingerProxy.h:240
virtual ~cAlgorithmFingerProxy()
Destructor of cAlgorithmFingerProxy.
Definition: CAlgorithmFingerProxy.h:98
cVector3d getForce()
This method returns the last computed force in world coordinates.
Definition: CAlgorithmFingerProxy.h:135
cVector3d getTangentialForce()
This method returns the most recently calculated tangential force.
Definition: CAlgorithmFingerProxy.h:141