Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

SphereSensor Class Reference

SphereSensor node instances. More...

Inheritance diagram for SphereSensor:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

 SphereSensor (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.

virtual ~SphereSensor () throw ()
 Destructor.

virtual SphereSensor * toSphereSensor () const
 Cast to a SphereSensor.

virtual void render (Viewer &viewer, VrmlRenderContext context)
 Render the node.

void activate (double timeStamp, bool isActive, double *p)
 Activate or deactivate the SphereSensor.

bool isEnabled () const throw ()
 Determine whether the SphereSensor is enabled.


Private Methods

void processSet_autoOffset (const FieldValue &sfbool, double timestamp) throw (std::bad_cast)
 set_autoOffset eventIn handler.

void processSet_enabled (const FieldValue &sfbool, double timestamp) throw (std::bad_cast)
 set_enabled eventIn handler.

void processSet_offset (const FieldValue &sfrotation, double timestamp) throw (std::bad_cast)
 set_offset eventIn handler.


Private Attributes

SFBool autoOffset
 autoOffset exposedField.

SFBool enabled
 enabled exposedField.

SFRotation offset
 offset exposedField.

SFBool active
 isActive eventOut.

SFRotation rotation
 rotation_changed eventOut.

SFVec3f trackPoint
 trackPoint_changed eventOut.

SFVec3f activationPoint
 The start point of a drag operation.

SFVec3f centerPoint
 Center point.

VrmlMatrix modelview
 Modelview matrix.


Friends

class SphereSensorClass
 Class object for SphereSensor instances.


Detailed Description

SphereSensor node instances.


Constructor & Destructor Documentation

SphereSensor const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

Parameters:
nodeType the NodeType associated with the node instance.
scope the Scope to which the node belongs.

~SphereSensor   throw () [virtual]
 

Destructor.


Member Function Documentation

void activate double    timeStamp,
bool    isActive,
double *    p
 

Activate or deactivate the SphereSensor.

Activating a drag sensor means that the pointing device button has been depressed and a drag operation has been initiated. The sensor is deactivated when the button is released at the end of the operation.

Parameters:
timeStamp the current time.
isActive true if the drag operation is in progress; false otherwise.
p the pointing device position.

bool isEnabled   const throw ()
 

Determine whether the SphereSensor is enabled.

Returns:
true if the SphereSensor is enabled; false otherwise.

void processSet_autoOffset const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [private]
 

set_autoOffset eventIn handler.

Parameters:
sfbool an SFBool value.
timestamp the current time.
Exceptions:
std::bad_cast if sfbool is not an SFBool.

void processSet_enabled const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [private]
 

set_enabled eventIn handler.

Parameters:
sfbool an SFBool value.
timestamp the current time.
Exceptions:
std::bad_cast if sfbool is not an SFBool.

void processSet_offset const FieldValue   sfrotation,
double    timestamp
throw (std::bad_cast) [private]
 

set_offset eventIn handler.

Parameters:
sfrotation an SFRotation value.
timestamp the current time.
Exceptions:
std::bad_cast if sfrotation is not an SFRotation.

void render Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Render the node.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from Node.

SphereSensor * toSphereSensor   const [virtual]
 

Cast to a SphereSensor.

Returns:
a pointer to the node.

Reimplemented from Node.


Friends And Related Function Documentation

SphereSensorClass [friend]
 

Class object for SphereSensor instances.


Member Data Documentation

SFVec3f activationPoint [private]
 

The start point of a drag operation.

SFBool active [private]
 

isActive eventOut.

SFBool autoOffset [private]
 

autoOffset exposedField.

SFVec3f centerPoint [private]
 

Center point.

SFBool enabled [private]
 

enabled exposedField.

VrmlMatrix modelview [private]
 

Modelview matrix.

SFRotation offset [private]
 

offset exposedField.

SFRotation rotation [private]
 

rotation_changed eventOut.

SFVec3f trackPoint [private]
 

trackPoint_changed eventOut.