V-ART
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
VART::XmlAction Class Reference

Parser and loader for xml files that describe an Action. More...

#include <xmlaction.h>

Inheritance diagram for VART::XmlAction:
VART::Action VART::XmlBase

Classes

class  Source
 

Public Member Functions

 XmlAction ()
 
 ~XmlAction ()
 
bool LoadFromFile (const std::string &fileName, const Scene &scene)
 Loads action from a XML file. More...
 
bool LoadFromFile (const std::string &fileName, const SceneNode &sNode)
 Loads action from a XML file. More...
 
- Public Member Functions inherited from VART::Action
 Action ()
 Creates an unitialized action. More...
 
 ~Action ()
 
VART::Actionoperator= (const VART::Action &action)
 Copy action data, except the active atribute (that remains unmodified). Used in Action::Copy() method. More...
 
JointMoverAddJointMover (Joint *jointPtr, float newDuration, const Interpolator &interpolator)
 Adds a joint mover to the action. More...
 
JointMoverAddJointMover (Joint *jointPtr, JointMover *jointMover)
 Used to add a copy of jointMover, aplied to jointPtr. More...
 
void SetPriority (unsigned int newPriority)
 Sets the priority of an action. More...
 
void SetSpeed (float newSpeed)
 Sets the speed of an action. More...
 
void SetCyclic (bool value)
 Sets whether an action is cyclic. More...
 
bool IsCyclic ()
 Checks whether the action is cyclic. More...
 
void Set (float newSpeed, unsigned int newPriority, bool cyclic)
 Sets speed, priority and cycle attibutes. More...
 
void Activate ()
 Activate action. More...
 
void Deactivate ()
 Deactivate action. More...
 
void Deactivate (float seconds)
 Deactivate action after some time. More...
 
bool IsActive () const
 Returns true if the action is currently active. More...
 
void GetFinalTimes (std::list< float > *resultPtr)
 Returns a ordered list with all different final times for every dof mover. More...
 
VART::ActionCopy (VART::SceneNode &targetNode)
 Returns a copy of an action, aplied to an targetNode sceneNode. More...
 
void ModifyDofMovers (DMModifier &mod)
 Modifies dof movers. More...
 

Protected Member Functions

void LoadAnimation (const Source &jointSource)
 
void ParseDofMovement (JointMover *jointMPtr, XERCES_CPP_NAMESPACE::DOMNode *dofMovItemPtr)
 
- Protected Member Functions inherited from VART::Action
void Move ()
 Animate joints. More...
 
void DeactivateDofMovers ()
 Deactivates DOF movers in every joint mover. More...
 
- Protected Member Functions inherited from VART::XmlBase
 XmlBase ()
 Creates an unitialized object. More...
 
bool ParseFile (const std::string &fileName)
 Checks if the file comforms to DTD. More...
 
void Terminate ()
 Terminates Xerces objects. More...
 

Friends

std::ostream & operator<< (std::ostream &output, const XmlAction &action)
 

Additional Inherited Members

- Static Public Member Functions inherited from VART::Action
static unsigned int MoveAllActive ()
 Moves all active actions. More...
 
- Public Attributes inherited from VART::Action
std::string description
 Textual description. More...
 
CallBackcallbackPtr
 A call-back to be activated once the action is finished/deactivated. More...
 
- Static Public Attributes inherited from VART::Action
static float frameFrequency = 0.0f
 Fake animation time. More...
 
- Static Protected Member Functions inherited from VART::XmlBase
static bool GetAttributeValue (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *nodePtr, const char itemName[], float *valuePtr)
 Gets an item value for certain node. More...
 
static bool GetAttributeValue (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *nodePtr, const char itemName[], std::string *valuePtr)
 Gets an item value for certain node. More...
 
static bool GetAttributeValue (XERCES_CPP_NAMESPACE::DOMNamedNodeMap *nodePtr, const char itemName[], bool *valuePtr)
 Gets an item value for certain node. More...
 
- Protected Attributes inherited from VART::Action
bool cycle
 
bool active
 
float speed
 
float duration
 
float timeToLive
 
unsigned int priority
 seconds to auto deactivation More...
 
std::list< JointMover * > jointMoverList
 
Time initialTime
 
- Protected Attributes inherited from VART::XmlBase
XERCES_CPP_NAMESPACE::XercesDOMParser * parserPtr
 
XERCES_CPP_NAMESPACE::DOMDocument * documentPtr
 
- Static Protected Attributes inherited from VART::Action
static std::list< Action * > activeInstances
 

Detailed Description

Parser and loader for xml files that describe an Action.

Bug:
Memory allocated for interpolators is never released.
Deprecated:
Please use XmlJointAction.

Definition at line 21 of file xmlaction.h.

Constructor & Destructor Documentation

VART::XmlAction::XmlAction ( )

Definition at line 26 of file xmlaction.cpp.

VART::XmlAction::~XmlAction ( )

Definition at line 358 of file xmlaction.cpp.

Member Function Documentation

void VART::XmlAction::LoadAnimation ( const Source jointSource)
protected
bool VART::XmlAction::LoadFromFile ( const std::string &  fileName,
const Scene scene 
)

Loads action from a XML file.

The whole scene is searched for joints.

bool VART::XmlAction::LoadFromFile ( const std::string &  fileName,
const SceneNode sNode 
)

Loads action from a XML file.

Only descendents of given scene node are searched for joints.

void VART::XmlAction::ParseDofMovement ( JointMover jointMPtr,
XERCES_CPP_NAMESPACE::DOMNode *  dofMovItemPtr 
)
protected

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  output,
const XmlAction action 
)
friend

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