Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

TurtleState Class Reference

Saved location and orientation state of a turtle. More...

#include <mturtle.h>

Inheritance diagram for TurtleState:

Turtle List of all members.

Public Methods

void jumpTo (double x, double y)
void jumpTo (const Coord2D &pos)
void turnBy (double rot)
void copy (const TurtleState &o)
void operator= (const TurtleState &o)

Protected Attributes

Coord2D mCoord
double mRot

Detailed Description

Saved location and orientation state of a turtle.

These are placed in stack by Turtle.

Definition at line 83 of file mturtle.h.


Member Function Documentation

void copy const TurtleState &    o
 

Copy operator.

* * Copyright (C) 1998-2004 Marko Grönroos <magi@iki.fi> * *

* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *

  • Suite 330, Boston, MA 02111-1307, USA. * *

Definition at line 40 of file mturtle.cc.

References mCoord, and mRot.

Referenced by Turtle::drawLSystem(), and operator=().

void jumpTo const Coord2D   pos [inline]
 

Moves to given coordinates.

Definition at line 90 of file mturtle.h.

References Coord2D::copy(), and mCoord.

void jumpTo double    x,
double    y
[inline]
 

Moves to given coordinates.

Definition at line 88 of file mturtle.h.

References mCoord, and Coord2D::moveTo().

Referenced by Turtle::forward(), and Turtle::Turtle().

void operator= const TurtleState &    o [inline]
 

Copy operator.

Definition at line 98 of file mturtle.h.

References copy().

void turnBy double    rot [inline]
 

Turns the turtle by given amount (in radians).

Definition at line 93 of file mturtle.h.

References mRot.

Referenced by Turtle::drawLSystem().


Member Data Documentation

Coord2D mCoord [protected]
 

Coordinates.

Definition at line 102 of file mturtle.h.

Referenced by copy(), Turtle::drawLSystem(), Turtle::forward(), jumpTo(), and Turtle::operator>>().

double mRot [protected]
 

Current rotation angle.

Definition at line 105 of file mturtle.h.

Referenced by copy(), Turtle::forward(), Turtle::operator>>(), turnBy(), and Turtle::Turtle().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:43 2005 for LibMagiC by doxygen1.2.18