H3D API
2.4.1
|
This is a X3DSensorNode for reading values from a 3DConnexion motion controller such as the SpaceTraveller or SpaceMouse 5000. More...
#include <H3D/SpaceWareSensor.h>
Classes | |
struct | AccumulateRotation |
This class is an AutoUpdate class that accumulates the rotation values routed to it, i.e. More... | |
struct | AccumulateTranslation |
This class is an AutoUpdate class that accumulates the Vec3f values routed to it, i.e. More... | |
class | ResetAccumulatedRotation |
This class is an AutoUpdate class that sets the field accumulatedRotation to its input value and also sets accumulatedYaw, accumulatedPitch and accumulatedRoll to a value dependent on input value. More... | |
class | ResetAccumulatedTranslation |
This class is an AutoUpdate class that sets the field accumulatedTranslation to its input value. More... | |
struct | ScaleRotation |
Updates itself to the Rotation routed to it where the angle is scaled by the scale factor. More... | |
struct | ScaleTranslation |
Updates itself to the SFVec3f routed to it scaled by the scale factor. More... | |
Public Member Functions | |
SpaceWareSensor (Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isActive=0, Inst< SFVec3f > _rawTranslation=0, Inst< SFRotation > _rawYaw=0, Inst< SFRotation > _rawPitch=0, Inst< SFRotation > _rawRoll=0, Inst< SFRotation > _rawRotation=0, Inst< ScaleTranslation > _instantTranslation=0, Inst< ScaleRotation > _instantYaw=0, Inst< ScaleRotation > _instantPitch=0, Inst< ScaleRotation > _instantRoll=0, Inst< ScaleRotation > _instantRotation=0, Inst< AccumulateTranslation > _accumulatedTranslation=0, Inst< AccumulateRotation > _accumulatedYaw=0, Inst< AccumulateRotation > _accumulatedPitch=0, Inst< AccumulateRotation > _accumulatedRoll=0, Inst< AccumulateRotation > _accumulatedRotation=0, Inst< SFFloat > _translationScale=0, Inst< SFFloat > _rotationScale=0, Inst< SFInt32 > _buttons=0, Inst< SFInt32 > _latestButtonPress=0, Inst< SFInt32 > _latestButtonRelease=0, Inst< SFBool > _accumulateTimeDependent=0, Inst< ResetAccumulatedTranslation > _resetAccumulatedTranslation=0, Inst< ResetAccumulatedRotation > _resetAccumulatedRotation=0) | |
Constructor. | |
![]() | |
X3DSensorNode (Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isActive=0) | |
Constructor. | |
![]() | |
X3DChildNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
![]() | |
X3DNode (Inst< SFNode > _metadata=0) | |
Constructor. | |
X3DMetadataObject * | getMetadataByName (const string &_name) |
Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
![]() | |
Node () | |
Constructor. | |
virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
Returns a new instance of this node type with the same state as this one. More... | |
virtual | ~Node () |
Destructor. | |
X3DPrototypeInstance * | getProtoInstanceParent () |
If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
void | setProtoInstanceParent (X3DPrototypeInstance *p) |
Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
virtual void | render () |
the render() function is used for the depth-first rendering traversal of the scene-graph. More... | |
virtual void | traverseSG (TraverseInfo &ti) |
traverseSG is called once per scenegraph loop on the scene in order to traverse the scenegraph. More... | |
virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
Detect intersection between a line segment and the Node. More... | |
virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
Find closest point on Node to p. More... | |
virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
Detect collision between a moving sphere and the Node. More... | |
virtual string | defaultXMLContainerField () |
Returns the default xml containerField attribute value. More... | |
virtual Field * | getField (const string &_name) const |
return a pointer to the field specified by name within this instance | |
int | addDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
Add a callback function to be run on destruction of node. More... | |
Public Attributes | |
H3DUniquePtr< SFVec3f > | rawTranslation |
Contains the current translation as reported by the device. More... | |
H3DUniquePtr< SFRotation > | rawYaw |
Contains the current rotation around the x-axis as reported by the device. More... | |
H3DUniquePtr< SFRotation > | rawPitch |
Contains the current rotation around the y-axis as reported by the device. More... | |
H3DUniquePtr< SFRotation > | rawRoll |
Contains the current rotation around the z-axis as reported by the device. More... | |
H3DUniquePtr< SFRotation > | rawRotation |
Contains the current total rotation as reported by the device. More... | |
H3DUniquePtr< ScaleTranslation > | instantTranslation |
rawTranslation scaled by rotationScale More... | |
H3DUniquePtr< ScaleRotation > | instantYaw |
rawYaw scaled by rotationScale More... | |
H3DUniquePtr< ScaleRotation > | instantPitch |
rawPitch scaled by rotationScale More... | |
H3DUniquePtr< ScaleRotation > | instantRoll |
rawRoll scaled by rotationScale More... | |
H3DUniquePtr< ScaleRotation > | instantRotation |
Composite rotation of instantYaw, instantPitch and instantRoll. More... | |
H3DUniquePtr< AccumulateTranslation > | accumulatedTranslation |
The sum of all instantTranslation values. More... | |
H3DUniquePtr< AccumulateRotation > | accumulatedYaw |
The sum of all instantYaw values. More... | |
H3DUniquePtr< AccumulateRotation > | accumulatedPitch |
The sum of all instantPitch values. More... | |
H3DUniquePtr< AccumulateRotation > | accumulatedRoll |
The sum of all instantRoll values. More... | |
H3DUniquePtr< AccumulateRotation > | accumulatedRotation |
The sum of all instantRotation values. More... | |
H3DUniquePtr< SFFloat > | translationScale |
The scale factor for the instantTranslation field. More... | |
H3DUniquePtr< SFFloat > | rotationScale |
The scale factor for the instant version of the different rotation fields. More... | |
H3DUniquePtr< SFInt32 > | buttons |
Integer representing the current status of the buttons. More... | |
H3DUniquePtr< SFInt32 > | latestButtonPress |
The button number of the last button that was pressed. More... | |
H3DUniquePtr< SFInt32 > | latestButtonRelease |
The button number of the last button that was released. More... | |
H3DUniquePtr< SFBool > | accumulateTimeDependent |
If true the Accumulated-fields depends on time passed since last time accumulated was updated instead of frame rate. More... | |
H3DUniquePtr< ResetAccumulatedTranslation > | resetAccumulatedTranslation |
Resets the value of accumulatedTranslation to its own value. More... | |
H3DUniquePtr< ResetAccumulatedRotation > | resetAccumulatedRotation |
Resets the value of accumulatedRotation to its own value. More... | |
![]() | |
H3DUniquePtr< SFBool > | enabled |
If enabled is true the sensor node is enabled otherwise it is disabled and will not generate any output. More... | |
H3DUniquePtr< SFBool > | isActive |
A sensor is active when some special conditions are fulfilled and it will then generate extra output. More... | |
![]() | |
H3DUniquePtr< SFNode > | metadata |
Meta data about the node. More... | |
Static Public Attributes | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
![]() | |
static H3DNodeDatabase | database |
The H3DNodeDatabase for this node. | |
Additional Inherited Members | |
![]() | |
typedef std::map< Node *, Node * > | DeepCopyMap |
A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
![]() | |
static unsigned int | nrNodesAlive () |
Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
static int | nrNodesCreated () |
Returns the number of nodes created in total since the start of the program. | |
![]() | |
void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for the clone() method. More... | |
![]() | |
static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
A helper function for nodes that implement clone() More... | |
This is a X3DSensorNode for reading values from a 3DConnexion motion controller such as the SpaceTraveller or SpaceMouse 5000.
Examples:
H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedPitch |
The sum of all instantPitch values.
Access type: outputOnly
Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().
H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedRoll |
The sum of all instantRoll values.
Access type: outputOnly
Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().
H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedRotation |
The sum of all instantRotation values.
Access type: outputOnly
Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().
H3DUniquePtr< AccumulateTranslation> H3D::SpaceWareSensor::accumulatedTranslation |
The sum of all instantTranslation values.
Access type: outputOnly
Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedTranslation::update().
H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedYaw |
The sum of all instantYaw values.
Access type: outputOnly
Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().
H3DUniquePtr< SFBool > H3D::SpaceWareSensor::accumulateTimeDependent |
If true the Accumulated-fields depends on time passed since last time accumulated was updated instead of frame rate.
Access type: inputOutput
Referenced by SpaceWareSensor().
H3DUniquePtr< SFInt32 > H3D::SpaceWareSensor::buttons |
Integer representing the current status of the buttons.
Each bit represents the status of a button where 1 means that it is pressed. There are three special button bits: SI_RESET_BIT, SI_PICK_BIT and
SI_DIALOG_BIT (these buttons are not present on all devices). Aside from these the first button is the 0x2 bit, the second is the 0x4 and so on.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantPitch |
H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantRoll |
H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantRotation |
Composite rotation of instantYaw, instantPitch and instantRoll.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< ScaleTranslation> H3D::SpaceWareSensor::instantTranslation |
H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantYaw |
H3DUniquePtr< SFInt32 > H3D::SpaceWareSensor::latestButtonPress |
The button number of the last button that was pressed.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFInt32 > H3D::SpaceWareSensor::latestButtonRelease |
The button number of the last button that was released.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawPitch |
Contains the current rotation around the y-axis as reported by the device.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawRoll |
Contains the current rotation around the z-axis as reported by the device.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawRotation |
Contains the current total rotation as reported by the device.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFVec3f> H3D::SpaceWareSensor::rawTranslation |
Contains the current translation as reported by the device.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawYaw |
Contains the current rotation around the x-axis as reported by the device.
Access type: outputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< ResetAccumulatedRotation > H3D::SpaceWareSensor::resetAccumulatedRotation |
Resets the value of accumulatedRotation to its own value.
Also resets accumulatedYaw, accumulatedPitch and accumulatedRoll
Access type: inputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< ResetAccumulatedTranslation > H3D::SpaceWareSensor::resetAccumulatedTranslation |
Resets the value of accumulatedTranslation to its own value.
Access type: inputOnly
Referenced by SpaceWareSensor().
H3DUniquePtr< SFFloat> H3D::SpaceWareSensor::rotationScale |
The scale factor for the instant version of the different rotation fields.
Access type: inputOutput
Default value: 1
Referenced by SpaceWareSensor().
H3DUniquePtr< SFFloat> H3D::SpaceWareSensor::translationScale |
The scale factor for the instantTranslation field.
Access type: inputOutput
Default value: 1
Referenced by SpaceWareSensor().