cocos2d-x  3.1rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Mesh Class Reference

Mesh: TODO, add description of Mesh. More...

#include <CCMesh.h>

Inheritance diagram for Mesh:
Ref

Public Types

enum  IndexFormat { INDEX8 = GL_UNSIGNED_BYTE, INDEX16 = GL_UNSIGNED_SHORT }
 Defines supported index formats. More...
 
enum  PrimitiveType {
  TRIANGLES = GL_TRIANGLES, TRIANGLE_STRIP = GL_TRIANGLE_STRIP, LINES = GL_LINES, LINE_STRIP = GL_LINE_STRIP,
  POINTS = GL_POINTS
}
 Defines supported primitive types. More...
 

Public Member Functions

GLuint getVertexBuffer () const
var getVertexBuffer ()
local getVertexBuffer ()
ssize_t getMeshVertexAttribCount () const
local getMeshVertexAttribCount ()
const MeshVertexAttribgetMeshVertexAttribute (int idx) const
bool hasVertexAttrib (int attrib)
var hasVertexAttrib ( var attrib)
local hasVertexAttrib ( local attrib)
int getVertexSizeInBytes () const
var getVertexSizeInBytes ()
local getVertexSizeInBytes ()
PrimitiveType getPrimitiveType () const
local getPrimitiveType ()
ssize_t getIndexCount () const
var getIndexCount ()
local getIndexCount ()
IndexFormat getIndexFormat () const
local getIndexFormat ()
GLuint getIndexBuffer () const
local getIndexBuffer ()
void restore ()
var restore ()
local restore ()
- 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 ()

Static Public Member Functions

static Meshcreate (const std::vector< float > &positions, const std::vector< float > &normals, const std::vector< float > &texs, const std::vector< unsigned short > &indices)
local create ( local positions, local normals, local texs, local indices)

Protected Member Functions

 Mesh ()
 Mesh ()
 Mesh ()
virtual ~Mesh ()
local ~Mesh ()
bool init (const std::vector< float > &positions, const std::vector< float > &normals, const std::vector< float > &texs, const std::vector< unsigned short > &indices)
var init ( var positions, var normals, var texs, var indices)
local init ( local positions, local normals, local texs, local indices)
void buildBuffer ()
var buildBuffer ()
local buildBuffer ()
void cleanAndFreeBuffers ()
var cleanAndFreeBuffers ()
local cleanAndFreeBuffers ()
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Protected Attributes

PrimitiveType _primitiveType
var _primitiveType
local _primitiveType
IndexFormat _indexFormat
var _indexFormat
local _indexFormat
GLuint _vertexBuffer
var _vertexBuffer
local _vertexBuffer
GLuint _indexBuffer
var _indexBuffer
local _indexBuffer
ssize_t _indexCount
var _indexCount
local _indexCount
RenderMeshData _renderdata
var _renderdata
local _renderdata
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

Mesh: TODO, add description of Mesh.

Member Enumeration Documentation

enum IndexFormat
strong

Defines supported index formats.

Enumerator
INDEX8 
INDEX16 
var IndexFormat
strong

Defines supported index formats.

Enumerator
INDEX8 
INDEX16 
local IndexFormat
strong

Defines supported index formats.

Enumerator
INDEX8 
INDEX16 
enum PrimitiveType
strong

Defines supported primitive types.

Enumerator
TRIANGLES 
TRIANGLE_STRIP 
LINES 
LINE_STRIP 
POINTS 
var PrimitiveType
strong

Defines supported primitive types.

Enumerator
TRIANGLES 
TRIANGLE_STRIP 
LINES 
LINE_STRIP 
POINTS 
local PrimitiveType
strong

Defines supported primitive types.

Enumerator
TRIANGLES 
TRIANGLE_STRIP 
LINES 
LINE_STRIP 
POINTS 

Constructor & Destructor Documentation

Mesh ( )
protected
var Mesh ( )
protected
local Mesh ( )
protected
virtual ~Mesh ( )
protectedvirtual
var ~Mesh ( )
protectedvirtual
local ~Mesh ( )
protectedvirtual

Member Function Documentation

void buildBuffer ( )
protected
var buildBuffer ( )
protected
local buildBuffer ( )
protected
void cleanAndFreeBuffers ( )
protected
var cleanAndFreeBuffers ( )
protected
local cleanAndFreeBuffers ( )
protected
static Mesh* create ( const std::vector< float > &  positions,
const std::vector< float > &  normals,
const std::vector< float > &  texs,
const std::vector< unsigned short > &  indices 
)
static
var create ( var  positions,
var  normals,
var  texs,
var  indices 
)
static
local create ( local  positions,
local  normals,
local  texs,
local  indices 
)
static
GLuint getIndexBuffer ( ) const
inline
var getIndexBuffer ( )
inline
local getIndexBuffer ( )
inline
ssize_t getIndexCount ( ) const
inline
var getIndexCount ( )
inline
local getIndexCount ( )
inline
IndexFormat getIndexFormat ( ) const
inline
var getIndexFormat ( )
inline
local getIndexFormat ( )
inline
ssize_t getMeshVertexAttribCount ( ) const
inline
var getMeshVertexAttribCount ( )
inline
local getMeshVertexAttribCount ( )
inline
const MeshVertexAttrib&
getMeshVertexAttribute
( int  idx) const
inline
var getMeshVertexAttribute ( var  idx)
inline
local getMeshVertexAttribute ( local  idx)
inline
PrimitiveType getPrimitiveType ( ) const
inline
var getPrimitiveType ( )
inline
local getPrimitiveType ( )
inline
GLuint getVertexBuffer ( ) const
inline
var getVertexBuffer ( )
inline
local getVertexBuffer ( )
inline
int getVertexSizeInBytes ( ) const
inline
var getVertexSizeInBytes ( )
inline
local getVertexSizeInBytes ( )
inline
bool hasVertexAttrib ( int  attrib)
inline
var hasVertexAttrib ( var  attrib)
inline
local hasVertexAttrib ( local  attrib)
inline
bool init ( const std::vector< float > &  positions,
const std::vector< float > &  normals,
const std::vector< float > &  texs,
const std::vector< unsigned short > &  indices 
)
protected
var init ( var  positions,
var  normals,
var  texs,
var  indices 
)
protected
local init ( local  positions,
local  normals,
local  texs,
local  indices 
)
protected
void restore ( )
var restore ( )
local restore ( )

Member Data Documentation

GLuint _indexBuffer
protected
var _indexBuffer
protected
local _indexBuffer
protected
ssize_t _indexCount
protected
var _indexCount
protected
local _indexCount
protected
IndexFormat _indexFormat
protected
var _indexFormat
protected
local _indexFormat
protected
PrimitiveType _primitiveType
protected
var _primitiveType
protected
local _primitiveType
protected
RenderMeshData _renderdata
protected
var _renderdata
protected
local _renderdata
protected
GLuint _vertexBuffer
protected
var _vertexBuffer
protected
local _vertexBuffer
protected

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