Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

VRPNFeedback Class Reference

Feedback subclass for sending haptic forces to VRPN over the net. More...

#include <P_VRPNFeedback.h>

Inheritance diagram for VRPNFeedback:

Feedback List of all members.

Public Methods

 VRPNFeedback ()
 ~VRPNFeedback ()
virtual const char * device_name () const
 Device name; must be unique to other Feedback subclasses. More...

virtual Feedbackclone ()
virtual void update ()
virtual int alive ()
virtual void addconstraint (float k, const float *location)
 corresponding functions that should just add force on to whatever is already present --- since forces and jacobians add linearly, this works! Units are all NEWTONS. More...

virtual void addplaneconstraint (float k, const float *point, const float *normal)
virtual void addforcefield (const float *origin, const float *force, const float *jacobian)
virtual void zeroforce ()
 zeros out the constructed force (does not send a message to the haptic until sendforce is called!). More...

virtual void forceoff ()
 stop forces (actually sends a message). More...

virtual void sendforce (const float *initial_pos)
 send the force that has been constructed -- we have this so the force can be built up in several parts, using the additive functions, and no incorrect forces are ever sent. The argument is the current position of the corresponding tracker - it may be used to check that the force doesn't exceed the max. More...


Protected Methods

virtual int do_start (const SensorConfig *)
 Do device-specific startup configuration. Return success. More...


Detailed Description

Feedback subclass for sending haptic forces to VRPN over the net.

Definition at line 32 of file P_VRPNFeedback.h.


Constructor & Destructor Documentation

VRPNFeedback::VRPNFeedback  
 

Definition at line 32 of file P_VRPNFeedback.C.

References NULL.

VRPNFeedback::~VRPNFeedback  
 

Definition at line 54 of file P_VRPNFeedback.C.

References forceoff.


Member Function Documentation

void VRPNFeedback::addconstraint float    k,
const float *    location
[virtual]
 

corresponding functions that should just add force on to whatever is already present --- since forces and jacobians add linearly, this works! Units are all NEWTONS.

Implements Feedback.

Definition at line 64 of file P_VRPNFeedback.C.

void VRPNFeedback::addforcefield const float *    origin,
const float *    force,
const float *    jacobian
[virtual]
 

Implements Feedback.

Definition at line 75 of file P_VRPNFeedback.C.

References force.

Referenced by addplaneconstraint.

void VRPNFeedback::addplaneconstraint float    k,
const float *    point,
const float *    normal
[virtual]
 

Implements Feedback.

Definition at line 134 of file P_VRPNFeedback.C.

References addforcefield, force, and sqr.

virtual int VRPNFeedback::alive   [inline, virtual]
 

Definition at line 48 of file P_VRPNFeedback.h.

Referenced by update.

virtual Feedback* VRPNFeedback::clone   [inline, virtual]
 

Implements Feedback.

Definition at line 45 of file P_VRPNFeedback.h.

virtual const char* VRPNFeedback::device_name   const [inline, virtual]
 

Device name; must be unique to other Feedback subclasses.

Implements Feedback.

Definition at line 44 of file P_VRPNFeedback.h.

int VRPNFeedback::do_start const SensorConfig   config [protected, virtual]
 

Do device-specific startup configuration. Return success.

Reimplemented from Feedback.

Definition at line 36 of file P_VRPNFeedback.C.

References forceoff, SensorConfig::getmaxforce, SensorConfig::have_one_sensor, SensorConfig::make_vrpn_address, and Feedback::set_maxforce.

void VRPNFeedback::forceoff   [inline, virtual]
 

stop forces (actually sends a message).

Implements Feedback.

Definition at line 161 of file P_VRPNFeedback.C.

References zeroforce.

Referenced by do_start, and ~VRPNFeedback.

void VRPNFeedback::sendforce const float *    initial_pos [virtual]
 

send the force that has been constructed -- we have this so the force can be built up in several parts, using the additive functions, and no incorrect forces are ever sent. The argument is the current position of the corresponding tracker - it may be used to check that the force doesn't exceed the max.

Implements Feedback.

Definition at line 91 of file P_VRPNFeedback.C.

References dot_prod, Feedback::maxforce, norm, vec_add, vec_copy, vec_scale, and vec_sub.

void VRPNFeedback::update   [virtual]
 

Implements Feedback.

Definition at line 59 of file P_VRPNFeedback.C.

References alive.

void VRPNFeedback::zeroforce   [inline, virtual]
 

zeros out the constructed force (does not send a message to the haptic until sendforce is called!).

Implements Feedback.

Definition at line 153 of file P_VRPNFeedback.C.

Referenced by forceoff.


The documentation for this class was generated from the following files:
Generated on Thu Mar 28 02:46:07 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002