V-ART
|
Parser and loader for xml files that describe an Action. More...
#include <xmlaction.h>
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::Action & | operator= (const VART::Action &action) |
Copy action data, except the active atribute (that remains unmodified). Used in Action::Copy() method. More... | |
JointMover * | AddJointMover (Joint *jointPtr, float newDuration, const Interpolator &interpolator) |
Adds a joint mover to the action. More... | |
JointMover * | AddJointMover (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::Action * | Copy (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... | |
CallBack * | callbackPtr |
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 |
Parser and loader for xml files that describe an Action.
Definition at line 21 of file xmlaction.h.
VART::XmlAction::XmlAction | ( | ) |
Definition at line 26 of file xmlaction.cpp.
VART::XmlAction::~XmlAction | ( | ) |
Definition at line 358 of file xmlaction.cpp.
|
protected |
Definition at line 66 of file xmlaction.cpp.
References VART::XmlAction::Source::GetJointByName(), and VART::JointMover::SetInterpolator().
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.
|
protected |
Definition at line 207 of file xmlaction.cpp.
References VART::JointMover::AddDofMover(), VART::JointMover::AddNoisyDofMover(), VART::Joint::ADDUCTION, VART::Joint::FLEXION, VART::NoisyDofMover::SetNoise(), and VART::Joint::TWIST.
|
friend |