Public Member Functions | Static Public Member Functions | Protected Attributes | Properties

Path Class Reference

A path is a list of CGPoint with special attributes that are drawn on screen. More...

#import <Path.h>

List of all members.

Public Member Functions

(id) - init
 initializes class and returns an instance of the class, you must take care of allocating the object yourself
(void) - addEndPoint:
 adds another point which is an endpoint (harbor, landing strip, etc)
(void) - addPoint:
 add a regular point
(void) - endPathDrawing
 disallows adding more points, stops drawing the endPoint and changes lineStyle
(void) - removePath
 removes Path from GamePaths list and will deallocate the Path
(void) - removeFirstPoint
 remove the first path point from the list (first being the one closest to the object)
(void) - removeAllPoints
 remove all path points from the list
(int) - getNumPoints
 returns the number of points in the path
(CGPoint) - getLastPointLocation
 returns the location of the current last point of the path
(PathPoint- getFirstPathPoint
 returns the first path point in the list
(void) - dealloc [implementation]
(PathPoint- getPathPointAtIndex: [implementation]
(void) - addPathPoint: [implementation]
(void) - applyLineStyle: [implementation]
 sets the OpenGL line style for the current line
(void) - resetOpenGL [implementation]
(void) - draw [implementation]
(void) - onArrivedAtPoint

Static Public Member Functions

(id) + path
 initializes class and returns an autoreleased instance of the class

Protected Attributes

NSMutableArray * pathPoints
 contains a list of PathPoint structs that define the path

Properties

EPathLineStyles lineStyle
 set the desired line style for rendering the path after drawing
EPathLineStyles lineStyleWhileDrawing
 set the desired line style for rendering the path while it is still being drawn
CGPoint objectPosition
 the current position of the object following this path, it is pushed (updated) by the object itself
CGPoint drawingEndPoint
 set the drawingEndPoint which is rendered only while drawing the path, should be the location where the finger is touching
bool isUserStillDrawingThisPath
 true if the user is currently drawing this path

Detailed Description

A path is a list of CGPoint with special attributes that are drawn on screen.

It knows how to draw itself with various line styles.


Member Function Documentation

- (void) addEndPoint: (CGPoint)  point  

adds another point which is an endpoint (harbor, landing strip, etc)

- (void) addPathPoint: (PathPoint pathPoint   [implementation]
- (void) addPoint: (CGPoint)  point  

add a regular point

- (void) applyLineStyle: (EPathLineStyles style   [implementation]

sets the OpenGL line style for the current line

- (void) dealloc   [implementation]
- (void) draw   [implementation]
- (void) endPathDrawing  

disallows adding more points, stops drawing the endPoint and changes lineStyle

- (PathPoint) getFirstPathPoint  

returns the first path point in the list

- (CGPoint) getLastPointLocation  

returns the location of the current last point of the path

- (int) getNumPoints  

returns the number of points in the path

- (PathPoint) getPathPointAtIndex: (int)  index   [implementation]
- (id) init  

initializes class and returns an instance of the class, you must take care of allocating the object yourself

- (void) onArrivedAtPoint  
+ (id) path  

initializes class and returns an autoreleased instance of the class

- (void) removeAllPoints  

remove all path points from the list

- (void) removeFirstPoint  

remove the first path point from the list (first being the one closest to the object)

- (void) removePath  

removes Path from GamePaths list and will deallocate the Path

- (void) resetOpenGL   [implementation]

Member Data Documentation

- (NSMutableArray*) pathPoints [protected]

contains a list of PathPoint structs that define the path


Property Documentation

- (CGPoint) drawingEndPoint [read, write, assign]

set the drawingEndPoint which is rendered only while drawing the path, should be the location where the finger is touching

- (bool) isUserStillDrawingThisPath [read, assign]

true if the user is currently drawing this path

- (EPathLineStyles) lineStyle [read, write, assign]

set the desired line style for rendering the path after drawing

- (EPathLineStyles) lineStyleWhileDrawing [read, write, assign]

set the desired line style for rendering the path while it is still being drawn

- (CGPoint) objectPosition [read, write, assign]

the current position of the object following this path, it is pushed (updated) by the object itself


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties