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

#include <CCTrianglesCommand.h>

Inheritance diagram for TrianglesCommand:
RenderCommand

Classes

struct  Triangles
 

Public Member Functions

 TrianglesCommand ()
 ~TrianglesCommand ()
void init (float globalOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, const Triangles &triangles, const Mat4 &mv, uint32_t flags)
 Initializes the command with a globalZOrder, a texture ID, a GLProgram, a blending function, a pointer to triangles, quantity of quads, and the Model View transform to be used for the quads. More...
 
void init (float globalOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, const Triangles &triangles, const Mat4 &mv)
void useMaterial () const
uint32_t getMaterialID () const
GLuint getTextureID () const
const TrianglesgetTriangles () const
ssize_t getVertexCount () const
ssize_t getIndexCount () const
const V3F_C4B_T2FgetVertices () const
const unsigned short * getIndices () const
GLProgramStategetGLProgramState () const
BlendFunc getBlendType () const
const Mat4getModelView () const
- Public Member Functions inherited from RenderCommand
void init (float globalZOrder, const Mat4 &modelViewTransform, uint32_t flags)
 init function, will be called by all the render commands More...
 
float getGlobalOrder () const
 Get Render Command Id. More...
 
Type getType () const
 Returns the Command type. More...
 
bool isTransparent () const
 Retruns whether is transparent. More...
 
void setTransparent (bool isTransparent)
 set transparent flag More...
 
bool isSkipBatching () const
void setSkipBatching (bool value)
bool is3D () const
void set3D (bool value)
float getDepth () const

Protected Member Functions

void generateMaterialID ()
- Protected Member Functions inherited from RenderCommand
 RenderCommand ()
virtual ~RenderCommand ()
void printID ()

Protected Attributes

uint32_t _materialID
GLuint _textureID
GLProgramState_glProgramState
BlendFunc _blendType
Triangles _triangles
Mat4 _mv
- Protected Attributes inherited from RenderCommand
Type _type
float _globalOrder
bool _isTransparent
bool _skipBatching
bool _is3D
float _depth

Additional Inherited Members

- Public Types inherited from RenderCommand
enum  Type {
  UNKNOWN_COMMAND, QUAD_COMMAND, CUSTOM_COMMAND, BATCH_COMMAND,
  GROUP_COMMAND, MESH_COMMAND, PRIMITIVE_COMMAND, TRIANGLES_COMMAND
}
 

Constructor & Destructor Documentation

Member Function Documentation

void generateMaterialID ( )
protected
BlendFunc getBlendType ( ) const
inline
GLProgramState* getGLProgramState ( ) const
inline
ssize_t getIndexCount ( ) const
inline
const unsigned short* getIndices ( ) const
inline
uint32_t getMaterialID ( ) const
inline
const Mat4& getModelView ( ) const
inline
GLuint getTextureID ( ) const
inline
const Triangles& getTriangles ( ) const
inline
ssize_t getVertexCount ( ) const
inline
const V3F_C4B_T2F* getVertices ( ) const
inline
void init ( float  globalOrder,
GLuint  textureID,
GLProgramState glProgramState,
BlendFunc  blendType,
const Triangles triangles,
const Mat4 mv,
uint32_t  flags 
)

Initializes the command with a globalZOrder, a texture ID, a GLProgram, a blending function, a pointer to triangles, quantity of quads, and the Model View transform to be used for the quads.

void init ( float  globalOrder,
GLuint  textureID,
GLProgramState glProgramState,
BlendFunc  blendType,
const Triangles triangles,
const Mat4 mv 
)
void useMaterial ( ) const

Member Data Documentation

BlendFunc _blendType
protected
GLProgramState* _glProgramState
protected
uint32_t _materialID
protected
Mat4 _mv
protected
GLuint _textureID
protected
Triangles _triangles
protected

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