9 #include "imstkDeviceControl.h" 10 #include "imstkMath.h" 48 void setPosition(
const Vec3d& pos);
55 void setOrientation(
const Quatd& orientation);
63 bool getComputeVelocity()
const;
71 bool getComputeAngularVelocity()
const;
78 void setAngularVelocity(
const Vec3d& angularVelocity);
85 void setVelocity(
const Vec3d& velocity);
92 void setTranslationScaling(
const double scaling);
99 void setTranslationOffset(
const Vec3d& t);
107 void setRotationOffset(
const Quatd& r);
115 void setEffectorRotationOffset(
const Quatd& r);
123 void setInversionFlags(
const unsigned char f);
138 Vec3d m_currentPos = Vec3d::Zero();
139 Quatd m_currentOrientation = Quatd::Identity();
140 Vec3d m_currentVelocity = Vec3d::Zero();
141 Vec3d m_currentAngularVelocity = Vec3d::Zero();
143 Vec3d m_currentDisplacement = Vec3d::Zero();
144 Quatd m_currentRotation = Quatd::Identity();
Vec3d m_translationOffset
Translation concatenated to the device translation.
virtual void applyForces()
Apply forces to the haptic device.
While the DeviceClient provides quantities from the device, the control defines what to do with those...
virtual bool updateTrackingData(const double dt)
Update tracking data.
double m_scaling
Scaling factor for physical to virtual translations.
unsigned char m_invertFlags
Invert flags to be masked with DeviceTracker::InvertFlag.
const Vec3d & getAngularVelocity() const
Get/Set the angular velocity.
const Vec3d & getTranslationOffset() const
Get/Set the translation offset.
void setComputeAngularVelocity(const bool computeAngularVelocity)
Set/Get whether to compute the anular velocity from previous and current samples Useful if the device...
Quatd m_effectorRotationOffset
Rotation prefixed to the device rotation.
void setComputeVelocity(const bool computeVelocity)
Set/Get whether to compute the velocity from previous and current samples Useful if a device does not...
bool m_computeAngularVelocity
If true, will use current and previous rotations to produce angular velocity, if off, will ask device for angular velocity.
const Quatd & getOrientation() const
Set/Get the orientation of the tracker.
const Quatd & getRotationOffset()
Get/Set the rotation offset, this rotation is applied to the overall device coordinate system...
Quatd m_rotationOffset
Rotation concatenated to the device rotation.
Base class for all DeviceControls that track something in space (position and orientation) ...
const Vec3d & getPosition() const
Set/Get the position of the tracker.
const Quatd & getEffectorRotationOffset()
Get/Set the roation applied to the end effector, this can be used to register the device in virtual s...
bool m_computeVelocity
If true, will use current and previous positions to produce velocity, if off, will ask device for vel...
const Vec3d & getVelocity() const
Get/Set the linear velocity.
double getTranslationScaling() const
Get/Set the current scaling factor.
unsigned char getInversionFlags()
Get/Set the inversion flags, when set the corresponding axis coordinates or rotation angle will be ne...