![]() |
VR-Forces 4.0.4 Class Documentation
|
Default implementation of the model parser for Articulated models. More...

Public Member Functions | |
| DtArticulatedModelParser (DtModel &model) | |
| CTOR. | |
| virtual | ~DtArticulatedModelParser () |
| DTOR. | |
| virtual void | apply (osg::Group &group) |
| Apply functions used for iterating through a model using the as a node visitor. | |
| virtual void | apply (osg::Sequence &sequence) |
| Apply functions used for iterating through a model using the as a node visitor. | |
| virtual void | apply (osgSim::MultiSwitch &multiswitch) |
| Apply functions used for iterating through a model using the as a node visitor. | |
| virtual void | apply (osgSim::DOFTransform &transform) |
| Apply functions used for iterating through a model using the as a node visitor. | |
| virtual void | apply (osg::Transform &transform) |
| Apply functions used for iterating through a model using the as a node visitor. | |
Static Public Member Functions | |
| static std::string | parserFormat () |
| Get the string to indicate the parser format this parser supports. | |
Protected Member Functions | |
| virtual bool | parseSwitchDeclaration (const std::string &desc, osgSim::MultiSwitch &multiswitch) |
| Parse a switch declaration and add a state to the model if it is able to parse the description. | |
| const DtModelSemanticsMapper::States::Id * | createCustomStateId (const std::string &stateName, DtModelSemanticsMapper &mapper) |
| Creates a custom state id if possible. | |
| virtual bool | parseStateDeclaration (const std::string &desc, osg::Group &group) |
| Parse a state node. | |
| virtual bool | parsePartDeclaration (const std::string &desc, osgSim::DOFTransform &transform) |
| Parse a part declaration and add a part if the parse was successful. | |
| virtual bool | parseAnimationDeclaration (const std::string &desc, osg::Sequence &sequence) |
| Parse an animation declaration and add an animation if the part was successful. | |
| std::vector< int > | parseValueList (const std::string &valueList) |
| Parse a value list string into a list of integers. | |
| void | pushStateId (int idNumber, osgSim::MultiSwitch *lastStateId) |
| Push a state id onto a local stack. | |
| void | popStateId () |
| Pop a state id onto a local stack. | |
| osgSim::MultiSwitch * | lastStateId () const |
| int | lastStateIdNumber () const |
Protected Attributes | |
| std::string | mySwitchTag |
| std::string | myStateTag |
| std::string | myPartTag |
| std::string | myAnimationTag |
| std::string | mySkipTag |
| std::string | myNoSkipTag |
| DtOsgArticulatedModel * | myArticulatedModelCast |
| std::stack< osg::ref_ptr < osgSim::MultiSwitch > > | myStateIds |
| std::stack< int > | myStateIdNumbers |
Default implementation of the model parser for Articulated models.
CTOR.
| virtual makVrv::DtArticulatedModelParser::~DtArticulatedModelParser | ( | ) | [virtual] |
DTOR.
| static std::string makVrv::DtArticulatedModelParser::parserFormat | ( | ) | [static] |
Get the string to indicate the parser format this parser supports.
| virtual void makVrv::DtArticulatedModelParser::apply | ( | osg::Group & | group | ) | [virtual] |
Apply functions used for iterating through a model using the as a node visitor.
| virtual void makVrv::DtArticulatedModelParser::apply | ( | osg::Sequence & | sequence | ) | [virtual] |
Apply functions used for iterating through a model using the as a node visitor.
| virtual void makVrv::DtArticulatedModelParser::apply | ( | osgSim::MultiSwitch & | multiswitch | ) | [virtual] |
Apply functions used for iterating through a model using the as a node visitor.
| virtual void makVrv::DtArticulatedModelParser::apply | ( | osgSim::DOFTransform & | transform | ) | [virtual] |
Apply functions used for iterating through a model using the as a node visitor.
| virtual void makVrv::DtArticulatedModelParser::apply | ( | osg::Transform & | transform | ) | [virtual] |
Apply functions used for iterating through a model using the as a node visitor.
| virtual bool makVrv::DtArticulatedModelParser::parseSwitchDeclaration | ( | const std::string & | desc, |
| osgSim::MultiSwitch & | multiswitch | ||
| ) | [protected, virtual] |
Parse a switch declaration and add a state to the model if it is able to parse the description.
| true | if a state was added. |
| false | if a state was not added. |
| const DtModelSemanticsMapper::States::Id* makVrv::DtArticulatedModelParser::createCustomStateId | ( | const std::string & | stateName, |
| DtModelSemanticsMapper & | mapper | ||
| ) | [protected] |
Creates a custom state id if possible.
| virtual bool makVrv::DtArticulatedModelParser::parseStateDeclaration | ( | const std::string & | desc, |
| osg::Group & | group | ||
| ) | [protected, virtual] |
Parse a state node.
A state is added if a declaration was parsed.
| true | if a state was added. |
| false | if a state was not added. |
| virtual bool makVrv::DtArticulatedModelParser::parsePartDeclaration | ( | const std::string & | desc, |
| osgSim::DOFTransform & | transform | ||
| ) | [protected, virtual] |
Parse a part declaration and add a part if the parse was successful.
| true | if a part was added. |
| false | if a part was not added. |
| virtual bool makVrv::DtArticulatedModelParser::parseAnimationDeclaration | ( | const std::string & | desc, |
| osg::Sequence & | sequence | ||
| ) | [protected, virtual] |
Parse an animation declaration and add an animation if the part was successful.
| true | if an animation was added. |
| false | if an animation was not added. |
| std::vector<int> makVrv::DtArticulatedModelParser::parseValueList | ( | const std::string & | valueList | ) | [protected] |
Parse a value list string into a list of integers.
| void makVrv::DtArticulatedModelParser::pushStateId | ( | int | idNumber, |
| osgSim::MultiSwitch * | lastStateId | ||
| ) | [protected] |
Push a state id onto a local stack.
This allows for tracking which the current state is when adding children.
| void makVrv::DtArticulatedModelParser::popStateId | ( | ) | [protected] |
Pop a state id onto a local stack.
This removes a state id after a node's children have been traversed.
| osgSim::MultiSwitch* makVrv::DtArticulatedModelParser::lastStateId | ( | ) | const [protected] |
| 0 | (invalidId) if there are no ids. |
| int makVrv::DtArticulatedModelParser::lastStateIdNumber | ( | ) | const [protected] |
| 0 | (invalidId) if there are no ids. |
std::string makVrv::DtArticulatedModelParser::mySwitchTag [protected] |
std::string makVrv::DtArticulatedModelParser::myStateTag [protected] |
std::string makVrv::DtArticulatedModelParser::myPartTag [protected] |
std::string makVrv::DtArticulatedModelParser::myAnimationTag [protected] |
std::string makVrv::DtArticulatedModelParser::mySkipTag [protected] |
std::string makVrv::DtArticulatedModelParser::myNoSkipTag [protected] |
std::stack<osg::ref_ptr<osgSim::MultiSwitch> > makVrv::DtArticulatedModelParser::myStateIds [protected] |
std::stack<int> makVrv::DtArticulatedModelParser::myStateIdNumbers [protected] |