ork::Method Class Reference
[scenegraph]

A SceneNode method. More...

#include <Method.h>

Inheritance diagram for ork::Method:
ork::Object

List of all members.

Public Member Functions

 Method (ptr< TaskFactory > body)
 Creates a new Method using the given basic or compound task.
virtual ~Method ()
 Deletes this method.
ptr< SceneNodegetOwner ()
 Returns the SceneNode to which this Method belongs.
bool isEnabled ()
 Returns true if this method is enabled.
void setIsEnabled (bool enabled)
 Enables or disables this method.
ptr< TaskFactorygetTaskFactory ()
 Returns the body of this method.
void setTaskFactory (ptr< TaskFactory > taskFactory)
 Sets the body of this method.
ptr< TaskgetTask ()
 Returns the Task to be run to execute this method.

Detailed Description

A SceneNode method.

A Method defines a behavior of a scene node. It can be a basic task or a combination of basic tasks using sequences, loops or method calls. The body of a method is TaskFactory that can be shared between several methods. This TaskFactory is used to get the tasks to be run to execute the method, depending on the context (the context passed to TaskFactory::getTask being the Method itself, from which the owner SceneNode can be found, and then then owner SceneManager).


Constructor & Destructor Documentation

ork::Method::Method ( ptr< TaskFactory body  ) 

Creates a new Method using the given basic or compound task.

Parameters:
body the method definition.
virtual ork::Method::~Method (  )  [virtual]

Deletes this method.


Member Function Documentation

ptr<SceneNode> ork::Method::getOwner (  ) 

Returns the SceneNode to which this Method belongs.

See SceneNode::getMethod.

ptr<Task> ork::Method::getTask (  ) 

Returns the Task to be run to execute this method.

ptr<TaskFactory> ork::Method::getTaskFactory (  ) 

Returns the body of this method.

bool ork::Method::isEnabled (  ) 

Returns true if this method is enabled.

A call to disabled method is skipped. A method is enabled by default.

void ork::Method::setIsEnabled ( bool  enabled  ) 

Enables or disables this method.

A call to disabled method is skipped.

Parameters:
enabled true to enable this method, false to disable it.
void ork::Method::setTaskFactory ( ptr< TaskFactory taskFactory  ) 

Sets the body of this method.

Parameters:
taskFactory the new method body.

Generated on Mon Oct 18 09:36:11 2010 for ork by  doxygen 1.6.1