cocos2d-x  v3.6
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
TiledGrid3D Class Reference

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

Inherits GridBase.

Public Member Functions

 TiledGrid3D ()
 Constructor.
 
 ~TiledGrid3D ()
 Destructor.
 
Quad3 getTile (const Vec2 &pos) const
 Returns the tile at the given position.
 
Quad3 tile (const Vec2 &pos) const
 returns the tile at the given position More...
 
var tile ( var pos)
 returns the tile at the given position More...
 
Quad3 getOriginalTile (const Vec2 &pos) const
 Returns the original tile (untransformed) at the given position.
 
Quad3 originalTile (const Vec2 &pos) const
 returns the original tile (untransformed) at the given position More...
 
void setTile (const Vec2 &pos, const Quad3 &coords)
 Sets a new tile.
 
virtual void blit () override
virtual void reuse () override
 Interface, Reuse the grid vertices. More...
 
var reuse ()
 Interface, Reuse the grid vertices. More...
 
local reuse ()
 Interface, Reuse the grid vertices. More...
 
virtual void calculateVertexPoints () override
 Interface, Calculate the vertices used for the blit. More...
 
local calculateVertexPoints ()
 Interface, Calculate the vertices used for the blit. More...
 
- Public Member Functions inherited from GridBase
virtual ~GridBase (void)
 Destructor.
 
int getReuseGrid (void) const
 Get number of times that the grid will be reused. More...
 
var getReuseGrid ()
 Get number of times that the grid will be reused. More...
 
local getReuseGrid ()
 Get number of times that the grid will be reused. More...
 
void setReuseGrid (int reuseGrid)
 Set number of times that the grid will be reused. More...
 
var setReuseGrid ( var reuseGrid)
 Set number of times that the grid will be reused. More...
 
local setReuseGrid ( local reuseGrid)
 Set number of times that the grid will be reused. More...
 
const Size & getGridSize (void) const
 Size of the grid. More...
 
var getGridSize ()
 Size of the grid. More...
 
local getGridSize ()
 Size of the grid. More...
 
void setGridSize (const Size &gridSize)
 Set the size of the grid. More...
 
var setGridSize ( var gridSize)
 Set the size of the grid. More...
 
local setGridSize ( local gridSize)
 Set the size of the grid. More...
 
const Vec2getStep (void) const
 Pixels between the grids. More...
 
local getStep ()
 Pixels between the grids. More...
 
void setStep (const Vec2 &step)
 Get the pixels between the grids. More...
 
var setStep ( var step)
 Get the pixels between the grids. More...
 
local setStep ( local step)
 Get the pixels between the grids. More...
 
bool isTextureFlipped (void) const
 is texture flipped. More...
 
var isTextureFlipped ()
 is texture flipped. More...
 
local isTextureFlipped ()
 is texture flipped. More...
 
void setTextureFlipped (bool flipped)
 Set the texture flipped or not. More...
 
var setTextureFlipped ( var flipped)
 Set the texture flipped or not. More...
 
local setTextureFlipped ( local flipped)
 Set the texture flipped or not. More...
 
void set2DProjection (void)
 Change projection to 2D for grabbing. More...
 
bool initWithSize (const Size &gridSize, Texture2D *texture, bool flipped)
local initWithSize ( local gridSize, local texture, local flipped)
bool isActive (void) const
var isActive ()
local isActive ()
void beforeDraw (void)
virtual void beforeBlit ()
local beforeBlit ()
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Static Public Member Functions

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

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 

Detailed Description

TiledGrid3D is a 3D grid implementation.

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

Member Function Documentation

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

Create one Grid.

var create ( var  gridSize,
var  texture,
var  flipped 
)
static

Create one Grid.

local create ( local  gridSize,
local  texture,
local  flipped 
)
static

Create one Grid.

static TiledGrid3D* create ( const Size &  gridSize)
static

Create one Grid.

var create ( var  gridSize)
static

Create one Grid.

local create ( local  gridSize)
static

Create one Grid.

Quad3 tile ( const Vec2 pos) const
inline

returns the tile at the given position

var tile ( var  pos)
inline

returns the tile at the given position

Quad3 originalTile ( const Vec2 pos) const
inline

returns the original tile (untransformed) at the given position

var originalTile ( var  pos)
inline

returns the original tile (untransformed) at the given position

virtual void blit ( )
overridevirtual

Implementations for interfaces in base calss.

Reimplemented from GridBase.

var blit ( )
overridevirtual

Implementations for interfaces in base calss.

Reimplemented from GridBase.

local blit ( )
overridevirtual

Implementations for interfaces in base calss.

Reimplemented from GridBase.

virtual void reuse ( )
overridevirtual

Interface, Reuse the grid vertices.

Reimplemented from GridBase.

var reuse ( )
overridevirtual

Interface, Reuse the grid vertices.

Reimplemented from GridBase.

local reuse ( )
overridevirtual

Interface, Reuse the grid vertices.

Reimplemented from GridBase.

virtual void calculateVertexPoints ( )
overridevirtual

Interface, Calculate the vertices used for the blit.

Reimplemented from GridBase.

var calculateVertexPoints ( )
overridevirtual

Interface, Calculate the vertices used for the blit.

Reimplemented from GridBase.

local calculateVertexPoints ( )
overridevirtual

Interface, Calculate the vertices used for the blit.

Reimplemented from GridBase.


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