#include <H3DNetworkingUtils/Attractor.h>
Public Attributes | |
auto_ptr < H3D::ThreadSafeSField < H3D::SFVec3f > > | point |
The global point of attraction access type: inputOutput basic type: SFVec3f default value: 0 0 0. | |
auto_ptr< H3D::SFBool > | withOffset |
If true, the attraction is to an offset from the point value The offset is the value of the haptic device location when the attractor becomes active access type: inputOutput basic type: SFBool default value: TRUE. | |
auto_ptr< H3D::SFFloat > | radius |
The radius of attraction from the point access type: inputOutput basic type: SFFloat default value: 0.05. | |
auto_ptr< H3D::SFFloat > | strength |
The strength of attraction (newtons) access type: inputOutput basic type: SFFloat default value: 2.0. | |
auto_ptr< H3D::SFBool > | enabled |
Enable the force Any number of routes can come into this field It will be true if any of them are true - false if all are false access type: inputOutput= basic type: SFBool default value: FALSE. | |
auto_ptr< H3D::SFInt32 > | deviceIndex |
If "deviceIndex is NEAREST_DEVICE (-1), the nearest tool at the attraction start time is attracted The attraction start time is either: when the tool comes within radius of the point while enabled is true or when enabled become true while the tool is within the radius of the point access type: inputOutput basic type: SFInt32 default value: 0. | |
auto_ptr< H3D::SFFloat > | maxForce |
Limits maximum force (newtons) access type: inputOutput basic type: SFFloat default value: 5. | |
auto_ptr< H3D::SFFloat > | maxDeltaForce |
Limits maximum change of force (newtons/sec) access type: inputOutput basic type: SFFloat default value: 100. | |
auto_ptr< H3D::SFVec3f > | offset |
If withOffset is true, this field holds the offset from the tool access type: outputOnly basic type: SFVec3f default value: 0 0 0. | |
auto_ptr< H3D::SFBool > | repel |
Change the force to repel access type: inputOutput basic type: SFBool default value: FALSE. | |
auto_ptr< H3D::SFInt32 > | activeDevice |
The device that is currently being attracted, -1 if none access type: inputOutput basic type: SFInt32 default value: -1. | |
auto_ptr< H3D::SFBool > | activeOnlyOnClick |
If this is false, the attraction can become active (if already enabled) as soon as the device crosses the threshold to come within range (radius) of the attraction point If true, it becomes active only if enabled becomes true while within range access type: inputOutput basic type: SFBool default value: FALSE. | |
auto_ptr< H3D::SFFloat > | rampUpTime |
If rampUpTime is non-zero, the force ramps up over the designated time access type: inputOutput basic type: SFFloat default value: 0. | |
auto_ptr< H3D::SFFloat > | rampDownTime |
If rampDownTime is non-zero, the force ramps down over the designated time access type: inputOutput basic type: SFFloat default value: 0. |
The point is retrieved from the point field at graphics rates. (typically you would use a RealtimeAttractor which extends this class to retrieve the point at haptics rates). Features: Can attract to a point or to an offset from a point, the offset being the position the tool is at the time of becoming enabled. Can work with any number of tools. Smoothes the attraction forces. Has a radius of attraction - no attraction outside the radius, sin(r) attraction inside. Can limit the force applied. Can limit the change in force applied. Can be enabled locally, or remotely. This class works with any number of haptic devices.
Examples: