vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_LSystem::Rule Struct Reference

#include <rule.h>

Public Member Functions

 Rule ()
 
 Rule (const Rule &)
 
Ruleoperator= (const Rule &)
 
 ~Rule ()
 
void processProbabilityFactor (string *rule, string::iterator &it)
 
void processCondition (string *rule, string::iterator &it)
 
void processParameters (string *rule, string::iterator &it)
 
bool addStaticString (string *rule, string::iterator &it)
 
void addDynamicString (string *rule, string::iterator &it)
 
bool evaluateCondition (double *p)
 

Public Attributes

char strictPredecessor
 strict predecessor of rule More...
 
FunctionParser * condition
 rule condition - for parametric L-system More...
 
std::string variables
 list of variables in string More...
 
FunctionParser * probabilityFactor
 probability factor - for stochastic L-system More...
 
std::vector< StaticString * > staticStrings
 static parts of successor More...
 
std::vector< FunctionParser * > dynamicStrings
 dynamic parts of successor More...
 
string leftContext
 right context More...
 
string rightContext
 left context More...
 

Detailed Description

Structure for storing rule data. Common for all L-system.

Constructor & Destructor Documentation

AP_LSystem::Rule::Rule ( )
inline

Non-parametric constructor

Rule::Rule ( const Rule c)

Copy constructor

Rule::~Rule ( )

Destructor

Member Function Documentation

void Rule::addDynamicString ( string *  rule,
string::iterator &  it 
)

Parses string, processes and adds dynamic part(expressions) of successor

Parameters
rulestring to parse
itopening variables position in rule string
bool Rule::addStaticString ( string *  rule,
string::iterator &  it 
)

Parses string, processes and adds static part of successor

Parameters
rulestring to parse
itopening static string position in rule string
Returns
- false - if successor end behind this parsed part
  • true - if successor continues with expression behind this static part
bool Rule::evaluateCondition ( double *  p)

Evaluates rule's condition.

Parameters
parray of variables values
Returns
result of evaluation
Rule & Rule::operator= ( const Rule c)

Assignment operator

void Rule::processCondition ( string *  rule,
string::iterator &  it 
)

Parses string, processes and adds condition

Parameters
rulestring to parse
itopening condition position in rule string
void Rule::processParameters ( string *  rule,
string::iterator &  it 
)

Parses string, processes and adds parameter variables of predecessor or context

Parameters
rulestring to parse
itopening variables position in rule string
void Rule::processProbabilityFactor ( string *  rule,
string::iterator &  it 
)

Parses string, processes and adds probability factor

Parameters
rulestring to parse
itopening probability factor position in rule string

Member Data Documentation

FunctionParser* AP_LSystem::Rule::condition

rule condition - for parametric L-system

std::vector<FunctionParser*> AP_LSystem::Rule::dynamicStrings

dynamic parts of successor

string AP_LSystem::Rule::leftContext

right context

FunctionParser* AP_LSystem::Rule::probabilityFactor

probability factor - for stochastic L-system

string AP_LSystem::Rule::rightContext

left context

std::vector<StaticString*> AP_LSystem::Rule::staticStrings

static parts of successor

char AP_LSystem::Rule::strictPredecessor

strict predecessor of rule

std::string AP_LSystem::Rule::variables

list of variables in string


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