- include common.h

curr

< Previous state...

prev

Previous state...

stack

Internal position stack ...

stacklen

The size of the turtle's stack...

start

The state at turtle's creation...

angle

Angle in radians...

draw

< Angle in radians...

x

Horizontal position...

y

< Horizontal position...

_sgTurtleInit

sgTurtleCreateRads

\brief Create a turtle with angle in radians
\memberof SGTurtle
\param x Start x position
\param y Start y position
\param rads Start angle in radians
\param draw The initial pen position,
SG_TRUE to draw (down),
SG_FALSE otherwise (up)
\return The newly created turtle if successful, NULL otherwise.

sgTurtleDestroy

...

sgTurtleGetPos

...

sgTurtleMove

\brief Move the turtle to the absolute coordinates
\memberof SGTurtle
\param turtle The turtle to move
\param x X coordinate
\param y Y coordinate
This function makes the turtle go to the absolute coordinates,
drawing a line in between if the pen is down.

sgTurtleSetPen

\brief Change the pen state
\memberof SGTurtle
\param turtle The turtle of which pen state we want to set
\param pen The new pen state
Sets the turtle's pen state, thus enabling or disabling drawing.

sgTurtleStep

\brief Step ahead
\memberof SGTurtle
\param turtle The turtle to move
\param dist The movement distance
This function makes the turtle go \a dist steps ahead,
drawing a line in between if the pen is down.