com.turtle3d.turtle
Interface Turtle3D

All Known Implementing Classes:
Turtle3DImplementation

public interface Turtle3D

3D Turtle interface

Author:
Marek Paterczyk

Method Summary
 void forward(float distance)
          Move forward
 int getDepth()
          Depth reached by turtle.
 int getMaximalDepth()
          Maximal depth reached by turtle.
 javax.vecmath.Matrix4f getTransformMatrix()
          Get turtle's actual tranformation matrix as a copy.
 void pitch(float angle)
          Pitch down/up
 void pop()
          Pop transformation from the stack and make it actual one
 void push()
          Push actual transformation to the stack
 void roll(float angle)
          Roll left/right
 void scale(float x, float y, float z)
          Scale turtle
 void transform(javax.vecmath.Matrix4f matrix)
          Tranform turtle's position
 void turn(float angle)
          Turn left/right
 

Method Detail

forward

void forward(float distance)
Move forward

Parameters:
distance - Distance to move, negative value means backwards

turn

void turn(float angle)
Turn left/right

Parameters:
angle - Angle in degrees, negative means left

roll

void roll(float angle)
Roll left/right

Parameters:
angle - Angle in degrees, negative means left

pitch

void pitch(float angle)
Pitch down/up

Parameters:
angle - Angle in degrees, negative means down

push

void push()
Push actual transformation to the stack


pop

void pop()
Pop transformation from the stack and make it actual one


getTransformMatrix

javax.vecmath.Matrix4f getTransformMatrix()
Get turtle's actual tranformation matrix as a copy.

Returns:
4x4 transform matrix

getDepth

int getDepth()
Depth reached by turtle. Each forward command rises depth by one. Depth is pushed and popped too.

Returns:
depth

getMaximalDepth

int getMaximalDepth()
Maximal depth reached by turtle.

Returns:
Maximal depth reached by turtle

transform

void transform(javax.vecmath.Matrix4f matrix)
Tranform turtle's position

Parameters:
matrix - 4x4 transform matrix

scale

void scale(float x,
           float y,
           float z)
Scale turtle

Parameters:
x - scale axis x
y - scale axis y
z - scale axis z