Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on. More...
Inherits Ref.
Public Member Functions | |
| GLuint | getVertexBuffer () const |
| get vertex buffer More... | |
| bool | hasVertexAttrib (int attrib) const |
| has vertex attribute? More... | |
| var | hasVertexAttrib ( var attrib) |
| has vertex attribute? More... | |
| ssize_t | getMeshVertexAttribCount () const |
| get mesh vertex attribute count | |
| local | getMeshVertexAttribCount () |
| get mesh vertex attribute count | |
| const MeshVertexAttrib & | getMeshVertexAttribute (int idx) |
| get MeshVertexAttribute by index | |
| local | getMeshVertexAttribute ( local idx) |
| get MeshVertexAttribute by index | |
| 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 | |
| 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 | setVisible (bool visible) |
| visible getter and setter | |
| var | setVisible ( var visible) |
| visible getter and setter | |
| local | setVisible ( local visible) |
| visible getter and setter | |
| MeshSkin * | getSkin () const |
| skin getter More... | |
| var | getSkin () |
| skin getter More... | |
| MeshIndexData * | getMeshIndexData () const |
| mesh index data getter More... | |
| var | getMeshIndexData () |
| mesh index data getter More... | |
| GLProgramState * | getGLProgramState () const |
| get GLProgramState More... | |
| var | getGLProgramState () |
| get GLProgramState More... | |
| const std::string & | getName () const |
| name getter | |
| local | getName () |
| name getter | |
| GLenum | getPrimitiveType () const |
| get primitive type More... | |
| var | getPrimitiveType () |
| get primitive type More... | |
| ssize_t | getIndexCount () const |
| get index count More... | |
| var | getIndexCount () |
| get index count More... | |
| GLenum | getIndexFormat () const |
| get index format More... | |
| var | getIndexFormat () |
| get index format More... | |
| GLuint | getIndexBuffer () const |
| get index buffer More... | |
| var | getIndexBuffer () |
| get index buffer More... | |
| const AABB & | getAABB () const |
| get AABB | |
| var | getAABB () |
| get AABB | |
| local | getAABB () |
| get AABB | |
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 () |
| Destructor. More... | |
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 | |
| local | create ( local positions, local normals, local texs, local indices) |
| create mesh from positions, normals, and so on, sigle SubMesh | |
| 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 | |
| local | create ( local vertices, local perVertexSizeInFloat, local indices, local numIndex, local attribs, local attribCount) |
| create mesh with vertex attributes | |
| static Mesh * | create (const std::string &name, MeshIndexData *indexData, MeshSkin *skin=nullptr) |
| create mesh More... | |
Protected Member Functions | |
| GLProgram * | getDefaultGLProgram (bool textured) |
| Get the default GL program. | |
| var | getDefaultGLProgram ( var textured) |
| Get the default GL program. | |
| local | getDefaultGLProgram ( local textured) |
| Get the default GL program. | |
| void | setGLProgramState (GLProgramState *glProgramState) |
| Set the default GL program. | |
| MeshCommand & | getMeshCommand () |
| Get the MeshCommand. | |
| local | getMeshCommand () |
| Get the MeshCommand. | |
| void | setSkin (MeshSkin *skin) |
| skin setter | |
| var | setSkin ( var skin) |
| skin setter | |
| local | setSkin ( local skin) |
| skin setter | |
| void | setMeshIndexData (MeshIndexData *indexdata) |
| Mesh index data setter. | |
| var | setMeshIndexData ( var indexdata) |
| Mesh index data setter. | |
| local | setMeshIndexData ( local indexdata) |
| Mesh index data setter. | |
| void | setName (const std::string &name) |
| name setter | |
| var | setName ( var name) |
| name setter | |
| local | setName ( local name) |
| name setter | |
| void | calculateAABB () |
| calculate the AABB of the mesh More... | |
| var | calculateAABB () |
| calculate the AABB of the mesh More... | |
| local | calculateAABB () |
| calculate the AABB of the mesh More... | |
| void | bindMeshCommand () |
| Bind to the MeshCommand. | |
| var | bindMeshCommand () |
| Bind to the MeshCommand. | |
| local | bindMeshCommand () |
| Bind to the MeshCommand. | |
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 | |
Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on.
|
static |
create mesh
|
static |
create mesh
| GLuint getVertexBuffer | ( | ) | const |
get vertex buffer
| var getVertexBuffer | ( | ) |
get vertex buffer
| bool hasVertexAttrib | ( | int | attrib | ) | const |
has vertex attribute?
| var hasVertexAttrib | ( | var | attrib | ) |
has vertex attribute?
|
inline |
skin getter
|
inline |
skin getter
|
inline |
mesh index data getter
|
inline |
mesh index data getter
|
inline |
get GLProgramState
|
inline |
get GLProgramState
| GLenum getPrimitiveType | ( | ) | const |
get primitive type
| var getPrimitiveType | ( | ) |
get primitive type
| ssize_t getIndexCount | ( | ) | const |
get index count
| var getIndexCount | ( | ) |
get index count
| GLenum getIndexFormat | ( | ) | const |
get index format
| var getIndexFormat | ( | ) |
get index format
| GLuint getIndexBuffer | ( | ) | const |
get index buffer
| var getIndexBuffer | ( | ) |
get index buffer
|
protected |
|
protected |
|
protected |