VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtArticulatedModelParser Class Reference

Default implementation of the model parser for Articulated models. More...

Inheritance diagram for makVrv::DtArticulatedModelParser:
Inheritance graph
[legend]

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.
- Public Member Functions inherited from makVrv::DtModelParser
 DtModelParser (DtModel &model)
 CTOR.
virtual ~DtModelParser ()
 DTOR.

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
DtOsgArticulatedModelmyArticulatedModelCast
std::stack< osg::ref_ptr
< osgSim::MultiSwitch > > 
myStateIds
std::stack< int > myStateIdNumbers
- Protected Attributes inherited from makVrv::DtModelParser
DtModelmyModel

Detailed Description

Default implementation of the model parser for Articulated models.

Constructor & Destructor Documentation

makVrv::DtArticulatedModelParser::DtArticulatedModelParser ( DtModel model)

CTOR.

virtual makVrv::DtArticulatedModelParser::~DtArticulatedModelParser ( )
virtual

DTOR.

Member Function Documentation

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 
)
protectedvirtual

Parse a switch declaration and add a state to the model if it is able to parse the description.

Return values
trueif a state was added.
falseif 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.

Returns
NULL if a state was not added.
virtual bool makVrv::DtArticulatedModelParser::parseStateDeclaration ( const std::string &  desc,
osg::Group &  group 
)
protectedvirtual

Parse a state node.

A state is added if a declaration was parsed.

Return values
trueif a state was added.
falseif a state was not added.
virtual bool makVrv::DtArticulatedModelParser::parsePartDeclaration ( const std::string &  desc,
osgSim::DOFTransform &  transform 
)
protectedvirtual

Parse a part declaration and add a part if the parse was successful.

Return values
trueif a part was added.
falseif a part was not added.
virtual bool makVrv::DtArticulatedModelParser::parseAnimationDeclaration ( const std::string &  desc,
osg::Sequence &  sequence 
)
protectedvirtual

Parse an animation declaration and add an animation if the part was successful.

Return values
trueif an animation was added.
falseif 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
Return values
0(invalidId) if there are no ids.
int makVrv::DtArticulatedModelParser::lastStateIdNumber ( ) const
protected
Return values
0(invalidId) if there are no ids.

Member Data Documentation

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
DtOsgArticulatedModel* makVrv::DtArticulatedModelParser::myArticulatedModelCast
protected
std::stack<osg::ref_ptr<osgSim::MultiSwitch> > makVrv::DtArticulatedModelParser::myStateIds
protected
std::stack<int> makVrv::DtArticulatedModelParser::myStateIdNumbers
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)