AtlasNode Class Reference

#import <AtlasNode.h>

Inherits CocosNode, CocosNodeOpacity-p, CocosNodeRGB-p, and CocosNodeSize-p.

Inherited by LabelAtlas, and TileMapAtlas.

Collaboration diagram for AtlasNode:

Collaboration graph
[legend]

List of all members.

Public Member Functions

(id) - initWithTileFile:tileWidth:tileHeight:itemsToRender:
(void) - updateAtlasValues

Static Public Member Functions

(id) + atlasWithTileFile:tileWidth:tileHeight:itemsToRender:

Protected Attributes

TextureAtlastextureAtlas
 texture atlas
int itemsPerRow
 chars per row
int itemsPerColumn
 chars per column
float texStepX
 texture coordinate x increment
float texStepY
 texture coordinate y increment
int itemWidth
 width of each char
int itemHeight
 height of each char

Properties

GLubyte opacity
 texture opacity
GLubyte r
 texture color


Detailed Description

AtlasNode is a subclass of CocosNode that implements CocosNodeOpacity, CocosNodeRGB and CocosNodeSize protocols.

It knows how to render a TextureAtlas object.

All features from CocosNode are valid, plus the following features:


Member Function Documentation

+ (id) atlasWithTileFile: (NSString *)  tile
tileWidth: (int)  w
tileHeight: (int)  h
itemsToRender: (int)  c 

creates an AtlasNode with an Atlas file the width and height of each item and the quantity of items to render

- (id) initWithTileFile: (NSString *)  tile
tileWidth: (int)  w
tileHeight: (int)  h
itemsToRender: (int)  c 

initializes an AtlasNode with an Atlas file the width and height of each item and the quantity of items to render

- (void) updateAtlasValues  

updates the Atlas (indexed vertex array). Shall be overriden in subclasses


Member Data Documentation

- (int) itemHeight [protected]

height of each char

- (int) itemsPerColumn [protected]

chars per column

- (int) itemsPerRow [protected]

chars per row

- (int) itemWidth [protected]

width of each char

- (float) texStepX [protected]

texture coordinate x increment

- (float) texStepY [protected]

texture coordinate y increment

- (TextureAtlas*) textureAtlas [protected]

texture atlas


Property Documentation

- (GLubyte) opacity [read, write, assign]

texture opacity

Conforms to CocosNodeOpacity and CocosNodeRGB protocol.

- (GLubyte) r [read, write, assign]

texture color


The documentation for this class was generated from the following file:

Generated on Tue Jun 9 10:39:28 2009 for cocos2d for iPhone 0.7.3 by  doxygen 1.5.8