cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
CCAtlasNode Class Reference

#import <CCAtlasNode.h>

+ Inheritance diagram for CCAtlasNode:
+ Collaboration diagram for CCAtlasNode:

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

CCTextureAtlas_textureAtlas
NSUInteger _itemsPerRow
NSUInteger _itemsPerColumn
NSUInteger _itemWidth
NSUInteger _itemHeight
NSUInteger _quadsToDraw
ccBlendFunc _blendFunc
ccColor3B _colorUnmodified
BOOL _opacityModifyRGB
GLint _uniformColor

Properties

CCTextureAtlastextureAtlas
ccBlendFunc blendFunc
ccColor3B color
NSUInteger quadsToDraw

Detailed Description

CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and CCTextureProtocol protocol

It knows how to render a TextureAtlas object. If you are going to render a TextureAtlas consider sub-classing CCAtlasNode (or a subclass of CCAtlasNode)

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

  • opacity and RGB colors

Member Function Documentation

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

creates a CCAtlasNode with an Atlas file the width and height of each item measured in points and the quantity of items to render

- (id) initWithTexture: (CCTexture2D *)  texture
tileWidth: (NSUInteger)  w
tileHeight: (NSUInteger)  h
itemsToRender: (NSUInteger)  c 

initializes an CCAtlasNode with a texture the width and height of each item measured in points and the quantity of items to render

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

initializes an CCAtlasNode with an Atlas file the width and height of each item measured in points and the quantity of items to render

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


Property Documentation

- (ccBlendFunc) blendFunc [read, write, assign]

conforms to CCTextureProtocol protocol

- (ccColor3B) color [read, write, assign]

conforms to CCRGBAProtocol protocol

Reimplemented from <CCRGBAProtocol>.

- (NSUInteger) quadsToDraw [read, write, assign]

how many quads to draw

- (CCTextureAtlas*) textureAtlas [read, write, retain]

conforms to CCTextureProtocol protocol


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