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

#import <CCDrawNode.h>

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

Instance Methods

(void) - drawDot:radius:color:
 
(void) - drawSegmentFrom:to:radius:color:
 
(void) - drawPolyWithVerts:count:fillColor:borderWidth:borderColor:
 
(void) - clear
 
- Instance Methods inherited from CCNode
(id) - init
 
(void) - onEnter
 
(void) - onEnterTransitionDidFinish
 
(void) - onExit
 
(void) - onExitTransitionDidStart
 
(void) - addChild:
 
(void) - addChild:z:
 
(void) - addChild:z:tag:
 
(void) - removeFromParent
 
(void) - removeFromParentAndCleanup:
 
(void) - removeChild:
 
(void) - removeChild:cleanup:
 
(void) - removeChildByTag:
 
(void) - removeChildByTag:cleanup:
 
(void) - removeAllChildren
 
(void) - removeAllChildrenWithCleanup:
 
(CCNode *) - getChildByTag:
 
(void) - reorderChild:z:
 
(void) - sortAllChildren
 
(void) - cleanup
 
(void) - draw
 
(void) - visit
 
(void) - transform
 
(void) - transformAncestors
 
(CGRect) - boundingBox
 
(CCAction *) - runAction:
 
(void) - stopAllActions
 
(void) - stopAction:
 
(void) - stopActionByTag:
 
(CCAction *) - getActionByTag:
 
(NSUInteger) - numberOfRunningActions
 
(void) - scheduleUpdate
 
(void) - scheduleUpdateWithPriority:
 
(void) - unscheduleUpdate
 
(void) - schedule:
 
(void) - schedule:interval:
 
(void) - schedule:interval:repeat:delay:
 
(void) - scheduleOnce:delay:
 
(void) - unschedule:
 
(void) - unscheduleAllSelectors
 
(void) - resumeSchedulerAndActions
 
(void) - pauseSchedulerAndActions
 
(void) - update:
 
(CGAffineTransform) - nodeToParentTransform
 
(CGAffineTransform) - parentToNodeTransform
 
(CGAffineTransform) - nodeToWorldTransform
 
(CGAffineTransform) - worldToNodeTransform
 
(CGPoint) - convertToNodeSpace:
 
(CGPoint) - convertToWorldSpace:
 
(CGPoint) - convertToNodeSpaceAR:
 
(CGPoint) - convertToWorldSpaceAR:
 
(CGPoint) - convertTouchToNodeSpace:
 
(CGPoint) - convertTouchToNodeSpaceAR:
 
(void) - setIsRelativeAnchorPoint:
 
(BOOL) - DEPRECATED_ATTRIBUTE
 
(void) - setZOrder:
 

Protected Attributes

GLuint _vao
 
GLuint _vbo
 
NSUInteger _bufferCapacity
 
GLsizei _bufferCount
 
ccV2F_C4B_T2F_buffer
 
ccBlendFunc _blendFunc
 
BOOL _dirty
 
- Protected Attributes inherited from CCNode
float rotationX_
 
float rotationY_
 
float scaleX_
 
float scaleY_
 
float vertexZ_
 
CGPoint position_
 
float skewX_
 
float skewY_
 
CGPoint anchorPointInPoints_
 
CGPoint anchorPoint_
 
CGSize contentSize_
 
CGAffineTransform transform_
 
CGAffineTransform inverse_
 
CCCameracamera_
 
CCGridBasegrid_
 
NSInteger zOrder_
 
CCArraychildren_
 
CCNodeparent_
 
NSInteger tag_
 
void * userData_
 
id userObject_
 
CCGLProgramshaderProgram_
 
ccGLServerState glServerState_
 
NSUInteger orderOfArrival_
 
CCSchedulerscheduler_
 
CCActionManageractionManager_
 
BOOL isRunning_
 
BOOL isTransformDirty_
 
BOOL isInverseDirty_
 
BOOL visible_
 
BOOL ignoreAnchorPointForPosition_
 
BOOL isReorderChildDirty_
 

Properties

ccBlendFunc blendFunc
 
- Properties inherited from CCNode
NSInteger zOrder
 
float vertexZ
 
float skewX
 
float skewY
 
float rotation
 
float rotationX
 
float rotationY
 
float scale
 
float scaleX
 
float scaleY
 
CGPoint position
 
CCCameracamera
 
CCArraychildren
 
CCGridBasegrid
 
BOOL visible
 
CGPoint anchorPoint
 
CGPoint anchorPointInPoints
 
CGSize contentSize
 
BOOL isRunning
 
CCNodeparent
 
BOOL ignoreAnchorPointForPosition
 
NSInteger tag
 
void * userData
 
id userObject
 
CCGLProgramshaderProgram
 
NSUInteger orderOfArrival
 
ccGLServerState glServerState
 
CCActionManageractionManager
 
CCSchedulerscheduler
 

Additional Inherited Members

- Class Methods inherited from CCNode
(id) + node
 

Detailed Description

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

Since
v2.1

Method 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: