Data structure that contains an object of type ObjectType used to generate haptic feedback.
|
| | Object (float pos[3], float rot[3], vector< float >vertices, vector< int > indices, float stiffnessFactor) |
| | SHAPE constructor. More...
|
| |
| | Object (ObjectType constraintType, int device, float pos[3], float dir[3], float Kp, float Kv, float Fmax) |
| | Constraints constructor. More...
|
| |
| virtual | ~Object () |
| | Destructor. More...
|
| |
| void | SetTarget (float pos[3], float rot[3], float stiffnessFactor) |
| | Set new SHAPE target state. More...
|
| |
| void | SetTarget (float pos[3], float dir[3], float Kp, float Kv, float Fmax) |
| | Set new constraint target state. More...
|
| |
| void | Update (double t) |
| | Interpolate all object parameters to a given timestamp. More...
|
| |
| void | ComputeForce () |
| | Compute additional force contribution for a given Device position and velocity. More...
|
| |
| Object::Object |
( |
float |
pos[3], |
|
|
float |
rot[3], |
|
|
vector< float > |
vertices, |
|
|
vector< int > |
indices, |
|
|
float |
stiffnessFactor |
|
) |
| |
|
inline |
This member creates a new SHAPE and adds it to the scene.
- Parameters
-
| pos | SHAPE position in the scene, expressed in m. |
| rot | SHAPE orientation in the scene, expressed as ZYX extrinsic Euler angles. |
| vertices | list of vertices that define the Mesh member. |
| indices | list of vertex indices that define the Mesh triangles. |
| stiffnessFactor | object stiffness factor (must be between 0.0 and 1.0). |
| Object::Object |
( |
ObjectType |
constraintType, |
|
|
int |
device, |
|
|
float |
pos[3], |
|
|
float |
dir[3], |
|
|
float |
Kp, |
|
|
float |
Kv, |
|
|
float |
Fmax |
|
) |
| |
|
inline |
This member creates a new constraint and adds it to the scene.
- Parameters
-
| constraintType | type of constraint to create. |
| device | device handle (returned by hapticConnect()) to assign this constraint to. |
| pos | constraint position in the scene, expressed in m. |
| dir | constraint direction, as defined in ObjectType. |
| Kp | constraint stiffness factor (between 0.0 and 1.0). |
| Kv | constraint viscosity factor (between 0.0 and 1.0). |
| Fmax | constraint max force for Kp, expressed in N. |
| virtual Object::~Object |
( |
| ) |
|
|
inlinevirtual |
| void Object::SetTarget |
( |
| ) |
|
|
inlineprivate |
| void Object::SetTarget |
( |
float |
pos[3], |
|
|
float |
rot[3], |
|
|
float |
stiffnessFactor |
|
) |
| |
|
inline |
- Parameters
-
| pos | new target SHAPE target position, expressed in m. |
| rot | new target SHAPE orientation in the scene, expressed as ZYX extrinsic Euler angles. |
| stiffnessFactor | new target object stiffness factor (between 0.0 and 1.0). |
| void Object::SetTarget |
( |
float |
pos[3], |
|
|
float |
dir[3], |
|
|
float |
Kp, |
|
|
float |
Kv, |
|
|
float |
Fmax |
|
) |
| |
|
inline |
- Parameters
-
| pos | new constraint position in the scene, expressed in m. |
| dir | new constraint direction, as defined in ObjectType. |
| Kp | new constraint stiffness factor (between 0.0 and 1.0). |
| Kv | new constraint viscosity factor (between 0.0 and 1.0). |
| Fmax | new constraint max force for Kp, expressed in N. |
| void Object::Update |
( |
double |
t | ) |
|
|
inline |
The state at the timestamp is linearly interpolated between the initial state (Object::S0) and the current target state (Object::ST), and is available after computation in Object::S.
- Parameters
-
| t | timestamp, expressed in s. |
| void Object::ComputeForce |
( |
| ) |
|
|
inline |
This additional force provides the constraint defined by the relevant ObjectType. The force is computed using the Device handle and is added to the Device::Force member.
- Note
- This member can be negative if the object is not assigned to any particular device (e.g. SHAPE). All constraint objects are assigned to a device.
The documentation for this class was generated from the following file: