Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on. More...
#include <CCMesh.h>
Public Types | |
typedef std::vector< unsigned short > | IndexArray |
Public Member Functions | |
GLuint | getVertexBuffer () const |
get vertex buffer More... | |
var | getVertexBuffer () |
get vertex buffer More... | |
local | getVertexBuffer () |
get vertex buffer More... | |
bool | hasVertexAttrib (int attrib) const |
has vertex attribute? More... | |
var | hasVertexAttrib ( var attrib) |
has vertex attribute? More... | |
local | hasVertexAttrib ( local attrib) |
has vertex attribute? More... | |
ssize_t | getMeshVertexAttribCount () const |
get mesh vertex attribute count More... | |
var | getMeshVertexAttribCount () |
get mesh vertex attribute count More... | |
local | getMeshVertexAttribCount () |
get mesh vertex attribute count More... | |
const MeshVertexAttrib & | getMeshVertexAttribute (int idx) |
get MeshVertexAttribute by index More... | |
local | getMeshVertexAttribute ( local idx) |
get MeshVertexAttribute by index More... | |
int | getVertexSizeInBytes () const |
get per vertex size in bytes More... | |
var | getVertexSizeInBytes () |
get per vertex size in bytes More... | |
local | getVertexSizeInBytes () |
get per vertex size in bytes More... | |
void | setTexture (const std::string &texPath) |
texture getter and setter More... | |
var | setTexture ( var texPath) |
texture getter and setter More... | |
local | setTexture ( local texPath) |
texture getter and setter More... | |
void | setTexture (Texture2D *tex) |
var | setTexture ( var tex) |
local | setTexture ( local tex) |
Texture2D * | getTexture () const |
var | getTexture () |
local | getTexture () |
void | setVisible (bool visible) |
visible getter and setter More... | |
var | setVisible ( var visible) |
visible getter and setter More... | |
local | setVisible ( local visible) |
visible getter and setter More... | |
bool | isVisible () const |
var | isVisible () |
local | isVisible () |
MeshSkin * | getSkin () const |
skin getter More... | |
var | getSkin () |
skin getter More... | |
local | getSkin () |
skin getter More... | |
MeshIndexData * | getMeshIndexData () const |
mesh index data getter More... | |
local | getMeshIndexData () |
mesh index data getter More... | |
GLProgramState * | getGLProgramState () const |
get GLProgramState More... | |
var | getGLProgramState () |
get GLProgramState More... | |
local | getGLProgramState () |
get GLProgramState More... | |
const std::string & | getName () const |
name getter More... | |
var | getName () |
name getter More... | |
local | getName () |
name getter More... | |
void | setBlendFunc (const BlendFunc &blendFunc) |
var | setBlendFunc ( var blendFunc) |
local | setBlendFunc ( local blendFunc) |
const BlendFunc & | getBlendFunc () const |
var | getBlendFunc () |
local | getBlendFunc () |
GLenum | getPrimitiveType () const |
get primitive type More... | |
var | getPrimitiveType () |
get primitive type More... | |
local | getPrimitiveType () |
get primitive type More... | |
ssize_t | getIndexCount () const |
get index count More... | |
var | getIndexCount () |
get index count More... | |
local | getIndexCount () |
get index count More... | |
GLenum | getIndexFormat () const |
get index format More... | |
local | getIndexFormat () |
get index format More... | |
GLuint | getIndexBuffer () const |
get index buffer More... | |
var | getIndexBuffer () |
get index buffer More... | |
local | getIndexBuffer () |
get index buffer More... | |
const AABB & | getAABB () const |
get AABB More... | |
local | getAABB () |
get AABB More... | |
virtual | ~Mesh () |
var | ~Mesh () |
local | ~Mesh () |
GLProgram * | getDefaultGLProgram (bool textured) |
var | getDefaultGLProgram ( var textured) |
local | getDefaultGLProgram ( local textured) |
void | setGLProgramState (GLProgramState *glProgramState) |
var | setGLProgramState ( var glProgramState) |
local | setGLProgramState ( local glProgramState) |
MeshCommand & | getMeshCommand () |
var | getMeshCommand () |
local | getMeshCommand () |
void | setSkin (MeshSkin *skin) |
skin setter More... | |
var | setSkin ( var skin) |
skin setter More... | |
local | setSkin ( local skin) |
skin setter More... | |
void | setMeshIndexData (MeshIndexData *indexdata) |
Mesh index data setter. More... | |
var | setMeshIndexData ( var indexdata) |
Mesh index data setter. More... | |
local | setMeshIndexData ( local indexdata) |
Mesh index data setter. More... | |
void | setName (const std::string &name) |
name setter More... | |
local | setName ( local name) |
name setter More... | |
void | calcuateAABB () |
local | calcuateAABB () |
void | bindMeshCommand () |
var | bindMeshCommand () |
local | bindMeshCommand () |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
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 Mesh * | create (const std::vector< float > &positions, const std::vector< float > &normals, const std::vector< float > &texs, const IndexArray &indices) |
create mesh from positions, normals, and so on, sigle SubMesh More... | |
local | create ( local positions, local normals, local texs, local indices) |
create mesh from positions, normals, and so on, sigle SubMesh More... | |
static Mesh * | create (const std::vector< float > &vertices, int perVertexSizeInFloat, const IndexArray &indices, int numIndex, const std::vector< MeshVertexAttrib > &attribs, int attribCount) |
create mesh with vertex attributes More... | |
local | create ( local vertices, local perVertexSizeInFloat, local indices, local numIndex, local attribs, local attribCount) |
create mesh with vertex attributes More... | |
static Mesh * | create (const std::vector< float > &vertices, int perVertexSizeInFloat, const IndexArray &indices, const std::vector< MeshVertexAttrib > &attribs) |
local | create ( local vertices, local perVertexSizeInFloat, local indices, local attribs) |
static Mesh * | create (const std::string &name, MeshIndexData *indexData, MeshSkin *skin=nullptr) |
create mesh More... | |
Public Attributes | |
CC_CONSTRUCTOR_ACCESS | __pad0__: Mesh() |
Protected Attributes | |
Texture2D * | _texture |
local | _texture |
MeshSkin * | _skin |
var | _skin |
local | _skin |
bool | _visible |
var | _visible |
local | _visible |
bool | _isTransparent |
var | _isTransparent |
local | _isTransparent |
std::string | _name |
var | _name |
local | _name |
MeshIndexData * | _meshIndexData |
var | _meshIndexData |
local | _meshIndexData |
GLProgramState * | _glProgramState |
var | _glProgramState |
local | _glProgramState |
MeshCommand | _meshCommand |
var | _meshCommand |
local | _meshCommand |
BlendFunc | _blend |
var | _blend |
local | _blend |
AABB | _aabb |
var | _aabb |
local | _aabb |
std::function< void()> | _visibleChanged |
var | _visibleChanged |
local | _visibleChanged |
Protected Attributes inherited from Ref | |
unsigned int | _referenceCount |
count of references More... | |
var | _referenceCount |
count of references More... | |
local | _referenceCount |
count of references More... | |
Friends | |
class | Sprite3D |
Additional Inherited Members | |
Protected Member Functions inherited from Ref | |
Ref () | |
Constructor. More... | |
Ref () | |
Constructor. More... | |
Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on.
typedef std::vector<unsigned short> IndexArray |
var IndexArray |
local IndexArray |
|
virtual |
|
virtual |
|
virtual |
void bindMeshCommand | ( | ) |
var bindMeshCommand | ( | ) |
local bindMeshCommand | ( | ) |
void calcuateAABB | ( | ) |
var calcuateAABB | ( | ) |
local calcuateAABB | ( | ) |
|
static |
create mesh from positions, normals, and so on, sigle SubMesh
|
static |
create mesh from positions, normals, and so on, sigle SubMesh
|
static |
create mesh from positions, normals, and so on, sigle SubMesh
|
inlinestatic |
create mesh with vertex attributes
|
inlinestatic |
create mesh with vertex attributes
|
inlinestatic |
create mesh with vertex attributes
|
static |
|
static |
|
static |
|
static |
create mesh
|
static |
create mesh
|
static |
create mesh
|
inline |
get AABB
|
inline |
get AABB
const BlendFunc& getBlendFunc | ( | ) | const |
var getBlendFunc | ( | ) |
local getBlendFunc | ( | ) |
GLProgram* getDefaultGLProgram | ( | bool | textured | ) |
var getDefaultGLProgram | ( | var | textured | ) |
local getDefaultGLProgram | ( | local | textured | ) |
|
inline |
get GLProgramState
|
inline |
get GLProgramState
|
inline |
get GLProgramState
GLuint getIndexBuffer | ( | ) | const |
get index buffer
var getIndexBuffer | ( | ) |
get index buffer
local getIndexBuffer | ( | ) |
get index buffer
ssize_t getIndexCount | ( | ) | const |
get index count
var getIndexCount | ( | ) |
get index count
local getIndexCount | ( | ) |
get index count
GLenum getIndexFormat | ( | ) | const |
get index format
var getIndexFormat | ( | ) |
get index format
local getIndexFormat | ( | ) |
get index format
|
inline |
|
inline |
|
inline |
|
inline |
mesh index data getter
|
inline |
mesh index data getter
|
inline |
mesh index data getter
ssize_t getMeshVertexAttribCount | ( | ) | const |
get mesh vertex attribute count
var getMeshVertexAttribCount | ( | ) |
get mesh vertex attribute count
local getMeshVertexAttribCount | ( | ) |
get mesh vertex attribute count
const MeshVertexAttrib& getMeshVertexAttribute |
( | int | idx | ) |
get MeshVertexAttribute by index
var getMeshVertexAttribute | ( | var | idx | ) |
get MeshVertexAttribute by index
local getMeshVertexAttribute | ( | local | idx | ) |
get MeshVertexAttribute by index
|
inline |
name getter
|
inline |
name getter
|
inline |
name getter
GLenum getPrimitiveType | ( | ) | const |
get primitive type
var getPrimitiveType | ( | ) |
get primitive type
local getPrimitiveType | ( | ) |
get primitive type
|
inline |
skin getter
|
inline |
skin getter
|
inline |
skin getter
|
inline |
|
inline |
|
inline |
GLuint getVertexBuffer | ( | ) | const |
get vertex buffer
var getVertexBuffer | ( | ) |
get vertex buffer
local getVertexBuffer | ( | ) |
get vertex buffer
int getVertexSizeInBytes | ( | ) | const |
get per vertex size in bytes
var getVertexSizeInBytes | ( | ) |
get per vertex size in bytes
local getVertexSizeInBytes | ( | ) |
get per vertex size in bytes
bool hasVertexAttrib | ( | int | attrib | ) | const |
has vertex attribute?
var hasVertexAttrib | ( | var | attrib | ) |
has vertex attribute?
local hasVertexAttrib | ( | local | attrib | ) |
has vertex attribute?
|
inline |
|
inline |
|
inline |
void setBlendFunc | ( | const BlendFunc & | blendFunc | ) |
var setBlendFunc | ( | var | blendFunc | ) |
local setBlendFunc | ( | local | blendFunc | ) |
void setGLProgramState | ( | GLProgramState * | glProgramState | ) |
var setGLProgramState | ( | var | glProgramState | ) |
local setGLProgramState | ( | local | glProgramState | ) |
void setMeshIndexData | ( | MeshIndexData * | indexdata | ) |
Mesh index data setter.
var setMeshIndexData | ( | var | indexdata | ) |
Mesh index data setter.
local setMeshIndexData | ( | local | indexdata | ) |
Mesh index data setter.
|
inline |
name setter
|
inline |
name setter
|
inline |
name setter
void setSkin | ( | MeshSkin * | skin | ) |
skin setter
var setSkin | ( | var | skin | ) |
skin setter
local setSkin | ( | local | skin | ) |
skin setter
void setTexture | ( | const std::string & | texPath | ) |
texture getter and setter
var setTexture | ( | var | texPath | ) |
texture getter and setter
local setTexture | ( | local | texPath | ) |
texture getter and setter
void setTexture | ( | Texture2D * | tex | ) |
var setTexture | ( | var | tex | ) |
local setTexture | ( | local | tex | ) |
void setVisible | ( | bool | visible | ) |
visible getter and setter
var setVisible | ( | var | visible | ) |
visible getter and setter
local setVisible | ( | local | visible | ) |
visible getter and setter
|
friend |
|
friend |
|
friend |
CC_CONSTRUCTOR_ACCESS __pad0__ |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |