Modifier and Type | Field and Description |
---|---|
(package private) int[] |
detail |
private processing.core.PApplet |
parent |
Constructor and Description |
---|
RodTurtle(processing.core.PApplet parent)
initialise and instance of RodTurtle
|
Modifier and Type | Method and Description |
---|---|
void |
draw(float distance)
Any implementing classes should draw something eg. line rod box etc
|
void |
draw(float distance,
int depth)
Any implementing classes should draw something eg. line rod box etc
|
void |
drawRod(float distance)
Wrapper method
Draw a smooth cylinder capped at one end with a sphere uses a look up
table for sin and cos (NB: degree not radians), arbitrary set ratio of
distance & cylinder radius & detail/level
|
void |
drawRod(float distance,
float r1,
float r2,
int level)
Real Method
Draw a smooth cone section with radii r1, r2, perpendicular distance
level is inverse of detail, capped with a sphere
|
void |
drawRod(float distance,
int level)
Wrapper method
Draw a smooth cylinder capped at one end with a sphere uses a look up
table for sin and cos (NB: degree not radians)
|
void |
endCap(float r,
int detail)
Draws a sphere cap unless radius very small
|
void |
forward(float distance)
Any implementing classes should move forward by distance without drawing
|
void |
pitch(float angle) |
void |
pitch(int angle)
Up and Down to non aeronautical
|
void |
roll(float angle) |
void |
roll(int angle)
Rotate about the axis (of the direction we are moving in)
|
void |
yaw(float angle) |
void |
yaw(int angle)
Left and Right turn to non aeronautical
|
public RodTurtle(processing.core.PApplet parent)
parent
- public void draw(float distance)
Turtle3D
public void draw(float distance, int depth)
Turtle3D
public void forward(float distance)
Turtle3D
public void pitch(int angle)
Turtle3D
public void roll(int angle)
Turtle3D
public void yaw(int angle)
Turtle3D
public void drawRod(float distance)
distance
- the length of the cylinderpublic void drawRod(float distance, int level)
distance
- the length of the cylinderlevel
- detail ie inverse of levelpublic void drawRod(float distance, float r1, float r2, int level)
public void endCap(float r, int detail)
r
- radius floatdetail
- latitude division int