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

#import <CCDrawNode.h>

+ Inheritance diagram for CCDrawNode:
+ Collaboration diagram for CCDrawNode:

List of all members.

Public Member Functions

(void) - drawDot:radius:color:
(void) - drawSegmentFrom:to:radius:color:
(void) - drawPolyWithVerts:count:fillColor:borderWidth:borderColor:
(void) - clear

Protected Attributes

GLuint _vao
GLuint _vbo
NSUInteger _bufferCapacity
GLsizei _bufferCount
ccBlendFunc _blendFunc
BOOL _dirty


ccBlendFunc blendFunc

Detailed Description

CCDrawNode Node that draws dots, segments and polygons. Faster than the "drawing primitives" since they it draws everything in one single batch.


Member Function Documentation

- (void) clear

Clear the geometry in the node's buffer.

- (void) drawDot: (CGPoint)  pos
radius: (CGFloat)  radius
color: (ccColor4F color 

draw a dot at a position, with a given radius and color

- (void) drawPolyWithVerts: (CGPoint *)  verts
count: (NSUInteger)  count
fillColor: (ccColor4F fill
borderWidth: (CGFloat)  width
borderColor: (ccColor4F line 

draw a polygon with a fill color and line color

- (void) drawSegmentFrom: (CGPoint)  a
to: (CGPoint)  b
radius: (CGFloat)  radius
color: (ccColor4F color 

draw a segment with a radius and color

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