#include <movingturtle.h>
void MovingTurtle::adjustMatrices |
( |
| ) |
|
|
protectedvirtual |
Adjust position matrix after each step. This method applies effects like tropism and minimizing twist. It makes some corrections of position matrix depending on L-system parameters.
int MovingTurtle::doStep |
( |
double |
dist | ) |
|
|
protectedvirtual |
Do a non-drawing forward move of predefined length.
- Parameters
-
- Returns
- error code
int MovingTurtle::drawForward |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Move forward and generate a geometry
- Parameters
-
p | vector with parameters
- 0 parameters: use a default distance/length for a movement
- 1 parameter: use this parameter as distance for a movement. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::drawForwardHalf |
( |
| ) |
|
|
virtual |
Move forward and generate a geometry. Use half of default length value for movement.
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
void MovingTurtle::drawFrame |
( |
osg::Matrixd & |
matrix, |
|
|
osg::Vec4d * |
color = NULL |
|
) |
| |
|
protectedvirtual |
For debugging. Draw a turtle frame.
- Parameters
-
matrix | position matrix of turtle |
color | color of all vectors. Default is red for heading, green for up and blue for left vector. |
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::drawStep |
( |
double |
dist | ) |
|
|
protectedvirtual |
int MovingTurtle::makeRotate |
( |
osg::Quat & |
q | ) |
|
|
protectedvirtual |
int MovingTurtle::moveForward |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Move forward and without generating a geometry
- Parameters
-
p | vector with parameters
- 0 parameters: use a default distance/length for a movement
- 1 parameter: use this parameter as distance for a movement. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::moveForwardHalf |
( |
| ) |
|
|
virtual |
Move forward without generating a geometry. Use half of default length value for movement.
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::multiplyAngle |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Multiply a default angle.
- Parameters
-
p | vector with parameters
- 0 parameters: multiply by default value
- 1 parameter: use this parameter as multiplier. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::multiplyGravitropismElasticity |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Multiply a gravitropism/geotropism elasticity.
- Parameters
-
p | vector with parameters
- 0 parameters: multiply by default value
- 1 parameter: use this parameter as multiplier. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::multiplyLength |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Multiply a default lenght.
- Parameters
-
p | vector with parameters
- 0 parameters: multiply by default value
- 1 parameter: use this parameter as multiplier. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::multiplyRadius |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Multiply a default radius/thickness.
- Parameters
-
p | vector with parameters
- 0 parameters: multiply by default value
- 1 parameter: use this parameter as multiplier. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::multiplyTropismElasticity |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Multiply a diatropism elasticity.
- Parameters
-
p | vector with parameters
- 0 parameters: multiply by default value
- 1 parameter: use this parameter as multiplier. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::pitchDown |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Make a rotation around vector L down.
- Parameters
-
p | vector with parameters
- 0 parameters: use default angle
- 1 parameter: use this parameter as angle. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::pitchUp |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Make a rotation around vector L up.
- Parameters
-
p | vector with parameters
- 0 parameters: use default angle
- 1 parameter: use this parameter as angle. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
virtual int AP_LSystem::MovingTurtle::postRotate |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual int AP_LSystem::MovingTurtle::postStep |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual int AP_LSystem::MovingTurtle::preRotate |
( |
| ) |
|
|
inlineprotectedvirtual |
virtual int AP_LSystem::MovingTurtle::preStep |
( |
| ) |
|
|
inlineprotectedvirtual |
int MovingTurtle::randomTurnPitchRoll |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
int MovingTurtle::rollArround |
( |
| ) |
|
|
virtual |
int MovingTurtle::rollLeft |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Make a rotation around vector H to the left.
- Parameters
-
p | vector with parameters
- 0 parameters: use default angle
- 1 parameter: use this parameter as angle. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::rollRight |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Make a rotation around vector H to the right.
- Parameters
-
p | vector with parameters
- 0 parameters: use default angle
- 1 parameter: use this parameter as angle. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::rollUntilHorizontal |
( |
| ) |
|
|
virtual |
Make a rotation around vector H until left vector is in horizontal position.
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::turnArround |
( |
| ) |
|
|
virtual |
int MovingTurtle::turnLeft |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Make a rotation around vector U to the left.
- Parameters
-
p | vector with parameters
- 0 parameters: use default angle
- 1 parameter: use this parameter as angle. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
int MovingTurtle::turnRight |
( |
std::vector< Parameter > & |
p | ) |
|
|
virtual |
Make a rotation around vector U to the right.
- Parameters
-
p | vector with parameters
- 0 parameters: use default angle
- 1 parameter: use this parameter as angle. Type is double.
|
- Returns
- error code
Implements AP_LSystem::AbstractTurtle.
The documentation for this class was generated from the following files: