H3D API  2.4.1
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
H3D::SpaceWareSensor Class Reference

This is a X3DSensorNode for reading values from a 3DConnexion motion controller such as the SpaceTraveller or SpaceMouse 5000. More...

#include <H3D/SpaceWareSensor.h>

Inheritance diagram for H3D::SpaceWareSensor:
Inheritance graph

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.
 
- Public Member Functions inherited from H3D::X3DSensorNode
 X3DSensorNode (Inst< SFBool > _enabled=0, Inst< SFNode > _metadata=0, Inst< SFBool > _isActive=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DChildNode
 X3DChildNode (Inst< SFNode > _metadata=0)
 Constructor.
 
- Public Member Functions inherited from H3D::X3DNode
 X3DNode (Inst< SFNode > _metadata=0)
 Constructor.
 
X3DMetadataObjectgetMetadataByName (const string &_name)
 Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More...
 
- Public Member Functions inherited from H3D::Node
 Node ()
 Constructor.
 
virtual Nodeclone (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.
 
X3DPrototypeInstancegetProtoInstanceParent ()
 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 FieldgetField (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< SFVec3frawTranslation
 Contains the current translation as reported by the device. More...
 
H3DUniquePtr< SFRotationrawYaw
 Contains the current rotation around the x-axis as reported by the device. More...
 
H3DUniquePtr< SFRotationrawPitch
 Contains the current rotation around the y-axis as reported by the device. More...
 
H3DUniquePtr< SFRotationrawRoll
 Contains the current rotation around the z-axis as reported by the device. More...
 
H3DUniquePtr< SFRotationrawRotation
 Contains the current total rotation as reported by the device. More...
 
H3DUniquePtr< ScaleTranslationinstantTranslation
 rawTranslation scaled by rotationScale More...
 
H3DUniquePtr< ScaleRotationinstantYaw
 rawYaw scaled by rotationScale More...
 
H3DUniquePtr< ScaleRotationinstantPitch
 rawPitch scaled by rotationScale More...
 
H3DUniquePtr< ScaleRotationinstantRoll
 rawRoll scaled by rotationScale More...
 
H3DUniquePtr< ScaleRotationinstantRotation
 Composite rotation of instantYaw, instantPitch and instantRoll. More...
 
H3DUniquePtr< AccumulateTranslationaccumulatedTranslation
 The sum of all instantTranslation values. More...
 
H3DUniquePtr< AccumulateRotationaccumulatedYaw
 The sum of all instantYaw values. More...
 
H3DUniquePtr< AccumulateRotationaccumulatedPitch
 The sum of all instantPitch values. More...
 
H3DUniquePtr< AccumulateRotationaccumulatedRoll
 The sum of all instantRoll values. More...
 
H3DUniquePtr< AccumulateRotationaccumulatedRotation
 The sum of all instantRotation values. More...
 
H3DUniquePtr< SFFloattranslationScale
 The scale factor for the instantTranslation field. More...
 
H3DUniquePtr< SFFloatrotationScale
 The scale factor for the instant version of the different rotation fields. More...
 
H3DUniquePtr< SFInt32buttons
 Integer representing the current status of the buttons. More...
 
H3DUniquePtr< SFInt32latestButtonPress
 The button number of the last button that was pressed. More...
 
H3DUniquePtr< SFInt32latestButtonRelease
 The button number of the last button that was released. More...
 
H3DUniquePtr< SFBoolaccumulateTimeDependent
 If true the Accumulated-fields depends on time passed since last time accumulated was updated instead of frame rate. More...
 
H3DUniquePtr< ResetAccumulatedTranslationresetAccumulatedTranslation
 Resets the value of accumulatedTranslation to its own value. More...
 
H3DUniquePtr< ResetAccumulatedRotationresetAccumulatedRotation
 Resets the value of accumulatedRotation to its own value. More...
 
- Public Attributes inherited from H3D::X3DSensorNode
H3DUniquePtr< SFBoolenabled
 If enabled is true the sensor node is enabled otherwise it is disabled and will not generate any output. More...
 
H3DUniquePtr< SFBoolisActive
 A sensor is active when some special conditions are fulfilled and it will then generate extra output. More...
 
- Public Attributes inherited from H3D::X3DNode
H3DUniquePtr< SFNodemetadata
 Meta data about the node. More...
 

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DSensorNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 
- Static Public Attributes inherited from H3D::X3DNode
static H3DNodeDatabase database
 The H3DNodeDatabase for this node.
 

Additional Inherited Members

- Public Types inherited from H3D::Node
typedef std::map< Node *, Node * > DeepCopyMap
 A map type used during a deep copy clone() to map from original nodes to cloned nodes.
 
- Static Public Member Functions inherited from H3D::Node
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.
 
- Protected Member Functions inherited from H3D::Node
void cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for the clone() method. More...
 
- Static Protected Member Functions inherited from H3D::Node
static NodegetClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap)
 A helper function for nodes that implement clone() More...
 

Detailed Description

This is a X3DSensorNode for reading values from a 3DConnexion motion controller such as the SpaceTraveller or SpaceMouse 5000.

Examples:

Internal routes:

Member Data Documentation

◆ accumulatedPitch

H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedPitch

The sum of all instantPitch values.

Access type: outputOnly

Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().

◆ accumulatedRoll

H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedRoll

The sum of all instantRoll values.

Access type: outputOnly

Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().

◆ accumulatedRotation

H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedRotation

The sum of all instantRotation values.

Access type: outputOnly

Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().

◆ accumulatedTranslation

H3DUniquePtr< AccumulateTranslation> H3D::SpaceWareSensor::accumulatedTranslation

The sum of all instantTranslation values.

Access type: outputOnly

Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedTranslation::update().

◆ accumulatedYaw

H3DUniquePtr< AccumulateRotation> H3D::SpaceWareSensor::accumulatedYaw

The sum of all instantYaw values.

Access type: outputOnly

Referenced by SpaceWareSensor(), and H3D::SpaceWareSensor::ResetAccumulatedRotation::update().

◆ accumulateTimeDependent

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().

◆ buttons

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().

◆ instantPitch

H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantPitch

rawPitch scaled by rotationScale

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ instantRoll

H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantRoll

rawRoll scaled by rotationScale

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ instantRotation

H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantRotation

Composite rotation of instantYaw, instantPitch and instantRoll.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ instantTranslation

H3DUniquePtr< ScaleTranslation> H3D::SpaceWareSensor::instantTranslation

rawTranslation scaled by rotationScale

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ instantYaw

H3DUniquePtr< ScaleRotation> H3D::SpaceWareSensor::instantYaw

rawYaw scaled by rotationScale

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ latestButtonPress

H3DUniquePtr< SFInt32 > H3D::SpaceWareSensor::latestButtonPress

The button number of the last button that was pressed.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ latestButtonRelease

H3DUniquePtr< SFInt32 > H3D::SpaceWareSensor::latestButtonRelease

The button number of the last button that was released.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ rawPitch

H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawPitch

Contains the current rotation around the y-axis as reported by the device.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ rawRoll

H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawRoll

Contains the current rotation around the z-axis as reported by the device.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ rawRotation

H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawRotation

Contains the current total rotation as reported by the device.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ rawTranslation

H3DUniquePtr< SFVec3f> H3D::SpaceWareSensor::rawTranslation

Contains the current translation as reported by the device.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ rawYaw

H3DUniquePtr< SFRotation> H3D::SpaceWareSensor::rawYaw

Contains the current rotation around the x-axis as reported by the device.

Access type: outputOnly

Referenced by SpaceWareSensor().

◆ resetAccumulatedRotation

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().

◆ resetAccumulatedTranslation

H3DUniquePtr< ResetAccumulatedTranslation > H3D::SpaceWareSensor::resetAccumulatedTranslation

Resets the value of accumulatedTranslation to its own value.

Access type: inputOnly

Referenced by SpaceWareSensor().

◆ rotationScale

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().

◆ translationScale

H3DUniquePtr< SFFloat> H3D::SpaceWareSensor::translationScale

The scale factor for the instantTranslation field.

Access type: inputOutput
Default value: 1

Referenced by SpaceWareSensor().


The documentation for this class was generated from the following files: