cocos2d-x  3.0alpha1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TiledGrid3D Class Reference

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

#include <CCGrid.h>

Inheritance diagram for TiledGrid3D:
GridBase Object

Public Member Functions

 TiledGrid3D ()
 ~TiledGrid3D ()
Quad3 getTile (const Point &pos) const
 returns the tile at the given position More...
 
CC_DEPRECATED_ATTRIBUTE Quad3 tile (const Point &pos) const
 returns the tile at the given position More...
 
Quad3 getOriginalTile (const Point &pos) const
 returns the original tile (untransformed) at the given position More...
 
CC_DEPRECATED_ATTRIBUTE Quad3 originalTile (const Point &pos) const
 returns the original tile (untransformed) at the given position More...
 
void setTile (const Point &pos, const Quad3 &coords)
 sets a new tile More...
 
virtual void blit () override
virtual void reuse () override
virtual void calculateVertexPoints () override
- Public Member Functions inherited from GridBase
virtual ~GridBase (void)
bool initWithSize (const Size &gridSize, Texture2D *texture, bool bFlipped)
var initWithSize ( var gridSize, var texture, var bFlipped)
local initWithSize ( local gridSize, local texture, local bFlipped)
bool initWithSize (const Size &gridSize)
bool isActive (void) const
 whether or not the grid is active More...
 
var isActive ()
 whether or not the grid is active More...
 
local isActive ()
 whether or not the grid is active More...
 
void setActive (bool bActive)
var setActive ( var bActive)
local setActive ( local bActive)
int getReuseGrid (void) const
 number of times that the grid will be reused More...
 
var getReuseGrid ()
 number of times that the grid will be reused More...
 
local getReuseGrid ()
 number of times that the grid will be reused More...
 
void setReuseGrid (int nReuseGrid)
var setReuseGrid ( var nReuseGrid)
local setReuseGrid ( local nReuseGrid)
const SizegetGridSize (void) const
 size of the grid More...
 
void setGridSize (const Size &gridSize)
var setGridSize ( var gridSize)
local setGridSize ( local gridSize)
const PointgetStep (void) const
 pixels between the grids More...
 
void setStep (const Point &step)
var setStep ( var step)
local setStep ( local step)
bool isTextureFlipped (void) const
 is texture flipped More...
 
var isTextureFlipped ()
 is texture flipped More...
 
local isTextureFlipped ()
 is texture flipped More...
 
void setTextureFlipped (bool bFlipped)
void beforeDraw (void)
var beforeDraw ()
local beforeDraw ()
void afterDraw (Node *target)
void set2DProjection (void)
var set2DProjection ()
local set2DProjection ()
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Member Functions

static TiledGrid3Dcreate (const Size &gridSize, Texture2D *texture, bool bFlipped)
 create one Grid More...
 
static TiledGrid3Dcreate (const Size &gridSize)
 create one Grid More...
 
- Static Public Member Functions inherited from GridBase
static GridBasecreate (const Size &gridSize, Texture2D *texture, bool flipped)
 create one Grid More...
 
static GridBasecreate (const Size &gridSize)
 create one Grid More...
 
var create ( var gridSize)
 create one Grid More...
 
local create ( local gridSize)
 create one Grid More...
 

Protected Attributes

GLvoid * _texCoordinates
GLvoid * _vertices
GLvoid * _originalVertices
GLushort * _indices
- Protected Attributes inherited from GridBase
bool _active
long _reuseGrid
var _reuseGrid
local _reuseGrid
Size _gridSize
var _gridSize
local _gridSize
Texture2D_texture
var _texture
local _texture
Point _step
var _step
local _step
Grabber_grabber
var _grabber
local _grabber
bool _isTextureFlipped
var _isTextureFlipped
local _isTextureFlipped
GLProgram_shaderProgram
var _shaderProgram
local _shaderProgram
Director::Projection _directorProjection
var _directorProjection
local _directorProjection
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Detailed Description

TiledGrid3D is a 3D grid implementation.

It differs from Grid3D in that the tiles can be separated from the grid.

Constructor & Destructor Documentation

Member Function Documentation

virtual void blit ( )
overridevirtual

Reimplemented from GridBase.

virtual void calculateVertexPoints ( )
overridevirtual

Reimplemented from GridBase.

static TiledGrid3D* create ( const Size gridSize,
Texture2D texture,
bool  bFlipped 
)
static

create one Grid

static TiledGrid3D* create ( const Size gridSize)
static

create one Grid

Quad3 getOriginalTile ( const Point pos) const

returns the original tile (untransformed) at the given position

Quad3 getTile ( const Point pos) const

returns the tile at the given position

CC_DEPRECATED_ATTRIBUTE Quad3
originalTile
( const Point pos) const
inline

returns the original tile (untransformed) at the given position

virtual void reuse ( )
overridevirtual

Reimplemented from GridBase.

void setTile ( const Point pos,
const Quad3 coords 
)

sets a new tile

CC_DEPRECATED_ATTRIBUTE Quad3 tile ( const Point pos) const
inline

returns the tile at the given position

Member Data Documentation

GLushort* _indices
protected
GLvoid* _originalVertices
protected
GLvoid* _texCoordinates
protected
GLvoid* _vertices
protected

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