vrecko
virtual reality framework
|
#include <abstractturtle.h>
Public Member Functions | |
virtual int | initialize () |
virtual int | finalize () |
virtual int | resetValues () |
TurtleProperties & | getProperties () |
virtual void | setProperties (TurtleProperties p) |
virtual void | inheritProperties (TurtleProperties p) |
void | bindGeode (LSGeode *geode) |
LSGeode * | getGeode () |
osg::Matrixd | getMatrix () |
virtual void | drawFrame (osg::Matrixd &matrix, osg::Vec4d *color=NULL)=0 |
virtual void | drawVector (const osg::Vec3d &vector, osg::Matrixd &matrix, osg::Vec4d &color) |
double | toRad (double angle) |
double | rand (double angle) |
virtual int | turnLeft (std::vector< Parameter > &p)=0 |
virtual int | turnRight (std::vector< Parameter > &p)=0 |
virtual int | pitchDown (std::vector< Parameter > &p)=0 |
virtual int | pitchUp (std::vector< Parameter > &p)=0 |
virtual int | rollLeft (std::vector< Parameter > &p)=0 |
virtual int | rollRight (std::vector< Parameter > &p)=0 |
virtual int | turnArround ()=0 |
virtual int | rollArround ()=0 |
virtual int | rollUntilHorizontal ()=0 |
virtual int | randomTurnPitchRoll (std::vector< Parameter > &p)=0 |
virtual int | multiplyLength (std::vector< Parameter > &p)=0 |
virtual int | multiplyRadius (std::vector< Parameter > &p)=0 |
virtual int | multiplyAngle (std::vector< Parameter > &p)=0 |
virtual int | multiplyTropismElasticity (std::vector< Parameter > &p)=0 |
virtual int | multiplyGravitropismElasticity (std::vector< Parameter > &p)=0 |
virtual int | drawForward (std::vector< Parameter > &p)=0 |
virtual int | drawForwardHalf ()=0 |
virtual int | moveForward (std::vector< Parameter > &p)=0 |
virtual int | moveForwardHalf ()=0 |
Protected Attributes | |
TurtleProperties | properties |
properties of turtle is used for getting parameters for generation of geometry More... | |
LSGeode * | geode |
all geometry generated by turtle is stored to this output geode More... | |
Abstract class for all turtles with declarations of all necessary functions.
|
inline |
|
pure virtual |
Move forward and generate a geometry
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Move forward and generate a geometry. Use half of default length value for movement.
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
For debugging. Draw a turtle frame.
matrix | position matrix of turtle |
color | color of all vectors. Default is red for heading, green for up and blue for left vector. |
Implemented in AP_LSystem::MovingTurtle.
|
inlinevirtual |
For debugging. Draw a vector as arrow.
vector | displayed vector |
matrix | position matrix of vector |
color | color of vector |
|
inlinevirtual |
Process a finalization of turtle. This method is called when turtle is removed from the stack.
Reimplemented in AP_LSystem::StraightPipe, AP_LSystem::Rectangle, AP_LSystem::QueryTurtle, and AP_LSystem::HermitPipe.
|
inline |
Get pointer to binded geode.
|
inline |
Get position matrix of turtle.
|
inline |
Get turtle properties
|
inlinevirtual |
Inherit some properties. This method is called if different L-system is detected. This subsystems has own properties, but some properties are inherited from the turtle on the stack.
p | properties |
|
inlinevirtual |
Process an initialization of turtle. This method is called when turtle is pushed onto the stack.
Reimplemented in AP_LSystem::StraightPipe, AP_LSystem::JointedPipe, AP_LSystem::Rectangle, AP_LSystem::HermitPipe, and AP_LSystem::QueryTurtle.
|
pure virtual |
Move forward and without generating a geometry
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Move forward without generating a geometry. Use half of default length value for movement.
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Multiply a default angle.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Multiply a gravitropism/geotropism elasticity.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Multiply a default lenght.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Multiply a default radius/thickness.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Multiply a diatropism elasticity.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Make a rotation around vector L down.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Make a rotation around vector L up.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
inline |
Conditionally fluctuate the angle.
angle | input angle |
|
pure virtual |
Make a random rotation.
Implemented in AP_LSystem::MovingTurtle.
|
inlinevirtual |
Reset all values in properties to default value as set in Configuration.
|
pure virtual |
Make a 180° rotation around vector U.
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Make a rotation around vector H to the left.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Make a rotation around vector H to the right.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Make a rotation around vector H until left vector is in horizontal position.
Implemented in AP_LSystem::MovingTurtle.
|
inlinevirtual |
Set turtle properties. The setup must be part of turtle initialization.
p | properties |
|
inline |
Conditionally converts degrees to radians.
angle | angle in degrees or radians |
|
pure virtual |
|
pure virtual |
Make a rotation around vector U to the left.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
pure virtual |
Make a rotation around vector U to the right.
p | vector with parameters
|
Implemented in AP_LSystem::MovingTurtle.
|
protected |
all geometry generated by turtle is stored to this output geode
|
protected |
properties of turtle is used for getting parameters for generation of geometry