cocos2d-x  2.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCGrid3D Class Reference

CCGrid3D is a 3D grid implementation. More...

#include <CCGrid.h>

Inheritance diagram for CCGrid3D:
CCGridBase CCObject CCCopying

Public Member Functions

 CCGrid3D ()
 ~CCGrid3D (void)
ccVertex3F vertex (const CCPoint &pos)
 returns the vertex at a given position More...
 
ccVertex3F originalVertex (const CCPoint &pos)
 returns the original (non-transformed) vertex at a given position More...
 
void setVertex (const CCPoint &pos, const ccVertex3F &vertex)
 sets a new vertex at a given position More...
 
virtual void blit (void)
virtual void reuse (void)
virtual void calculateVertexPoints (void)
- Public Member Functions inherited from CCGridBase
virtual ~CCGridBase (void)
bool isActive (void)
 whether or not the grid is active More...
 
var isActive ()
 whether or not the grid is active More...
 
void setActive (bool bActive)
int getReuseGrid (void)
 number of times that the grid will be reused More...
 
var getReuseGrid ()
 number of times that the grid will be reused More...
 
void setReuseGrid (int nReuseGrid)
const CCSizegetGridSize (void)
 size of the grid More...
 
void setGridSize (const CCSize &gridSize)
const CCPointgetStep (void)
 pixels between the grids More...
 
void setStep (const CCPoint &step)
var setStep ( var step)
bool isTextureFlipped (void)
 is texture flipped More...
 
var isTextureFlipped ()
 is texture flipped More...
 
void setTextureFlipped (bool bFlipped)
bool initWithSize (const CCSize &gridSize, CCTexture2D *pTexture, bool bFlipped)
var initWithSize ( var gridSize, var pTexture, var bFlipped)
bool initWithSize (const CCSize &gridSize)
void beforeDraw (void)
var beforeDraw ()
void afterDraw (CCNode *pTarget)
var afterDraw ( var pTarget)
void set2DProjection (void)
var set2DProjection ()
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
virtual void update (float dt)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

Static Public Member Functions

static CCGrid3Dcreate (const CCSize &gridSize, CCTexture2D *pTexture, bool bFlipped)
 create one Grid More...
 
static CCGrid3Dcreate (const CCSize &gridSize)
 create one Grid More...
 
- Static Public Member Functions inherited from CCGridBase
static CCGridBasecreate (const CCSize &gridSize, CCTexture2D *texture, bool flipped)
 create one Grid More...
 
var create ( var gridSize, var texture, var flipped)
 create one Grid More...
 
static CCGridBasecreate (const CCSize &gridSize)
 create one Grid More...
 
var create ( var gridSize)
 create one Grid More...
 

Protected Attributes

GLvoid * m_pTexCoordinates
GLvoid * m_pVertices
GLvoid * m_pOriginalVertices
GLushort * m_pIndices
- Protected Attributes inherited from CCGridBase
bool m_bActive
int m_nReuseGrid
var m_nReuseGrid
local m_nReuseGrid
CCSize m_sGridSize
var m_sGridSize
local m_sGridSize
CCTexture2Dm_pTexture
var m_pTexture
local m_pTexture
CCPoint m_obStep
var m_obStep
local m_obStep
CCGrabberm_pGrabber
var m_pGrabber
local m_pGrabber
bool m_bIsTextureFlipped
var m_bIsTextureFlipped
local m_bIsTextureFlipped
CCGLProgramm_pShaderProgram
var m_pShaderProgram
local m_pShaderProgram
ccDirectorProjection m_directorProjection
var m_directorProjection
local m_directorProjection
- Protected Attributes inherited from CCObject
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

Detailed Description

CCGrid3D is a 3D grid implementation.

Each vertex has 3 dimensions: x,y,z

Constructor & Destructor Documentation

CCGrid3D ( )
~CCGrid3D ( void  )

Member Function Documentation

virtual void blit ( void  )
virtual

Reimplemented from CCGridBase.

virtual void calculateVertexPoints ( void  )
virtual

Reimplemented from CCGridBase.

static CCGrid3D* create ( const CCSize gridSize,
CCTexture2D pTexture,
bool  bFlipped 
)
static

create one Grid

static CCGrid3D* create ( const CCSize gridSize)
static

create one Grid

ccVertex3F originalVertex ( const CCPoint pos)

returns the original (non-transformed) vertex at a given position

virtual void reuse ( void  )
virtual

Reimplemented from CCGridBase.

void setVertex ( const CCPoint pos,
const ccVertex3F vertex 
)

sets a new vertex at a given position

ccVertex3F vertex ( const CCPoint pos)

returns the vertex at a given position

Member Data Documentation

GLushort* m_pIndices
protected
GLvoid* m_pOriginalVertices
protected
GLvoid* m_pTexCoordinates
protected
GLvoid* m_pVertices
protected

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