Trees | Indices | Toggle frames |
---|
GridBase --+ | TiledGrid3D
TiledGrid3D is a 3D grid implementation. It differs from Grid3D in that the tiles can be separated from the grid.
The vertex array will be built with:
self.vertex_list.vertices: x,y,z (floats) self.vertex_list.tex_coords: x,y (floats) self.vertex_list.colors: RGBA, with values from 0 - 255
set_tile(self,
x,
y,
coords)
Set the 4 tile coordinates
|
|
[ float, float, float, float, float, float, float, float, float, float, float, float ] |
get_original_tile(self,
x,
y)
Get the 4-original tile coordinates.
|
[ float, float, float, float, float, float, float, float, float, float, float, float ] |
get_tile(self,
x,
y)
Get the current tile coordinates.
|
__init__(self) (Inherited from cocos.grid.GridBase) | |
after_draw(self,
camera)
Called by CocosNode when the texture is already grabbed.
(Inherited from cocos.grid.GridBase)
|
|
before_draw(self)
Binds the framebuffer to a texture
and set a 2d projection before binding
to prevent calculating a new texture
(Inherited from cocos.grid.GridBase)
|
|
init(self,
grid)
Initializes the grid creating both a vertex_list for an independent-tiled grid
and creating also a vertex_list_indexed for a "united" (non independent tile) grid.
(Inherited from cocos.grid.GridBase)
|
active
Determines whether the grid is active or not
:type: bool
(Inherited from cocos.grid.GridBase)
|
vertex_list
vertex array that can be transformed.
|
|
vertex_points
original vertex array of the grid.
|
|
grid
size of the grid.
(Inherited from cocos.grid.GridBase)
|
|
x_step
x pixels between each vertex (float)
(Inherited from cocos.grid.GridBase)
|
|
y_step
y pixels between each vertex (float)
(Inherited from cocos.grid.GridBase)
|
texture = None
(Inherited from cocos.grid.GridBase)
|
Set the 4 tile coordinates
Coordinates positions:
3 <-- 2 ^ | 0 --> 1
Get the 4-original tile coordinates.
Coordinates positions:
3 <-- 2 ^ | 0 --> 1
Get the current tile coordinates.
Coordinates positions:
3 <-- 2 ^ | 0 --> 1
vertex array that can be transformed. it has these attributes:
- vertices
- colors
- tex_coords
for more information refer to pyglet's documentation: pyglet.graphics.vertex_list
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Wed Oct 26 10:00:14 2011 | http://epydoc.sourceforge.net |