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

Anchor Class Reference

Represents Anchor node instances. More...

Inheritance diagram for Anchor:

Group AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

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

virtual ~Anchor () throw ()
 Destructor.

virtual Anchor * toAnchor () const
 Cast to an Anchor.

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

void activate ()
 Handle a click by loading the url.

const BVolumegetBVolume () const
 Get the bounding volume.


Private Methods

void setDescription (const FieldValue &sfstring) throw (std::bad_cast, std::bad_alloc)
void setParameter (const FieldValue &mfstring) throw (std::bad_cast, std::bad_alloc)
void setUrl (const FieldValue &mfstring) throw (std::bad_cast, std::bad_alloc)
void processSet_description (const FieldValue &sfstring, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_description eventIn handler.

void processSet_parameter (const FieldValue &mfstring, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_parameter eventIn handler.

void processSet_url (const FieldValue &mfstring, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_url eventIn handler.


Private Attributes

SFString description
MFString parameter
MFString url

Friends

class AnchorClass

Detailed Description

Represents Anchor node instances.


Constructor & Destructor Documentation

Anchor const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

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

~Anchor   throw () [virtual]
 

Destructor.


Member Function Documentation

void activate  
 

Handle a click by loading the url.

const BVolume * getBVolume   const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from Group.

void processSet_description const FieldValue   sfstring,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_description eventIn handler.

Parameters:
sfstring an SFString value.
timestamp the current time.
Exceptions:
std::bad_cast if sfstring is not an SFString.
std::bad_alloc if memory allocation fails.

void processSet_parameter const FieldValue   mfstring,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_parameter eventIn handler.

Parameters:
mfstring an MFString value.
timestamp the current time.
Exceptions:
std::bad_cast if mfstring is not an MFString.
std::bad_alloc if memory allocation fails.

void processSet_url const FieldValue   mfstring,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_url eventIn handler.

Parameters:
mfstring an MFString value.
timestamp the current time.
Exceptions:
std::bad_cast if mfstring is not an MFString.
std::bad_alloc if memory allocation fails.

void render Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Render the node.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from Group.

Anchor * toAnchor   const [virtual]
 

Cast to an Anchor.

Returns:
a pointer to this node.

Reimplemented from Node.