vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_LSystem::AbstractInterpret Class Referenceabstract

#include <abstractinterpret.h>

Inheritance diagram for AP_LSystem::AbstractInterpret:
AP_LSystem::QueryInterpret AP_LSystem::TurtleInterpret

Public Member Functions

 AbstractInterpret ()
 
int switchGeode (std::vector< Parameter > &p)
 
void createGeodes ()
 
virtual int parse (ParseableString *word)=0
 

Static Public Member Functions

static const char * errorText (int error)
 

Protected Attributes

vector< LSGeode * > m_Geodes
 
osg::Group * m_Owner
 scene graph owner More...
 
TurtleStack m_Turtles
 stack for turtles More...
 

Constructor & Destructor Documentation

AP_LSystem::AbstractInterpret::AbstractInterpret ( )
inline

Member Function Documentation

void AP_LSystem::AbstractInterpret::createGeodes ( )
inline

Initialize interpret. Scan for loaded L-systems and create LSGeodes instances for them.

static const char* AP_LSystem::AbstractInterpret::errorText ( int  error)
inlinestatic

Translates error codes to error messages.

Parameters
errorerror code
Returns
error message
virtual int AP_LSystem::AbstractInterpret::parse ( ParseableString word)
pure virtual

Interpretes a word by converting L-system modules to turtle commands.

Parameters
wordinterpreted word
Returns
error code

Implemented in AP_LSystem::TurtleInterpret.

int AP_LSystem::AbstractInterpret::switchGeode ( std::vector< Parameter > &  p)
inline

This method is called if change of L-system is interpreted.

Parameters
pvector with parameters of module.
  • 1 parameter: Begin of different L-system. Push new turtle of different L-system. The parameter is L-system ID
  • 0 parameters: End of current L-system subword. Pop turtle from the stack.

Member Data Documentation

vector< LSGeode *> AP_LSystem::AbstractInterpret::m_Geodes
protected

Instances of LSGeode for each loaded L-system. It contains geometry and information about turtle type and settings.

osg::Group* AP_LSystem::AbstractInterpret::m_Owner
protected

scene graph owner

TurtleStack AP_LSystem::AbstractInterpret::m_Turtles
protected

stack for turtles


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