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

PlaneSensor Class Reference

Inheritance diagram for PlaneSensor:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

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

virtual ~PlaneSensor () throw ()
 Destructor.

virtual PlaneSensor * toPlaneSensor () const
virtual void render (Viewer &viewer, VrmlRenderContext context)
 Render the node.

void activate (double timeStamp, bool isActive, double *p)
virtual void accumulateTransform (Node *)
virtual NodegetParentTransform ()
bool isEnabled ()

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_maxPosition (const FieldValue &sfvec2f, double timestamp) throw (std::bad_cast)
 set_maxPosition eventIn handler.

void processSet_minPosition (const FieldValue &sfvec2f, double timestamp) throw (std::bad_cast)
 set_minPosition eventIn handler.

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


Private Attributes

SFBool autoOffset
SFBool enabled
SFVec2f maxPosition
SFVec2f minPosition
SFVec3f offset
SFBool active
SFVec3f translation
SFVec3f trackPoint
SFVec3f activationPoint
NodeparentTransform
VrmlMatrix activationMatrix
VrmlMatrix modelview

Friends

class PlaneSensorClass

Detailed Description

The PlaneSensor node maps pointing device motion into two-dimensional translation in a plane parallel to the Z=0 plane of the local coordinate system. The PlaneSensor node uses the descendent geometry of its parent node to determine whether it is liable to generate events

Todo:
need copy constructor for d_parentTransform ...


Constructor & Destructor Documentation

PlaneSensor const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

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

~PlaneSensor   throw () [virtual]
 

Destructor.


Member Function Documentation

void activate double    timeStamp,
bool    isActive,
double *    p
 

Todo:
This is not correct. The local coords are computed for one instance, need to convert p to local coords for each instance (DEF/USE) of the sensor...

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_maxPosition const FieldValue   sfvec2f,
double    timestamp
throw (std::bad_cast) [private]
 

set_maxPosition eventIn handler.

Parameters:
sfvec2f an SFVec2f value.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec2f is not an SFVec2f.

void processSet_minPosition const FieldValue   sfvec2f,
double    timestamp
throw (std::bad_cast) [private]
 

set_minPosition eventIn handler.

Parameters:
sfvec2f an SFVec2f value.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec2f is not an SFVec2f.

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

set_offset eventIn handler.

Parameters:
sfvec3f an SFVec3f value.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec3f is not an SFVec3f.

void render Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Render the node.

Render a frame if there is one available.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from Node.