mirror of https://github.com/axmolengine/axmol.git
add comment
This commit is contained in:
parent
d90572fc10
commit
81dbb0bca4
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "3d/CCBundle3DData.h"
|
||||
#include "3d/CCAABB.h"
|
||||
#include "3d/3dExport.h"
|
||||
|
||||
#include "base/CCRef.h"
|
||||
#include "base/ccTypes.h"
|
||||
|
@ -37,7 +38,6 @@
|
|||
#include "renderer/CCGLProgram.h"
|
||||
#include "renderer/CCGLProgramState.h"
|
||||
#include "renderer/CCMeshCommand.h"
|
||||
#include "3d/3dExport.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -45,7 +45,7 @@ class Texture2D;
|
|||
class MeshSkin;
|
||||
class MeshIndexData;
|
||||
/**
|
||||
* SubMeshState: visibility and apperence of submesh
|
||||
* Mesh: contains ref to index buffer, GLProgramState, texture, skin, blend function, aabb and so on
|
||||
*/
|
||||
class CC_3D_DLL Mesh : public Ref
|
||||
{
|
||||
|
@ -105,6 +105,9 @@ public:
|
|||
GLenum getIndexFormat() const;
|
||||
/**get index buffer*/
|
||||
GLuint getIndexBuffer() const;
|
||||
|
||||
/**get AABB*/
|
||||
const AABB& getAABB() const { return _aabb; }
|
||||
|
||||
CC_CONSTRUCTOR_ACCESS:
|
||||
|
||||
|
@ -123,9 +126,7 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
void setMeshIndexData(MeshIndexData* indexdata);
|
||||
/**name setter*/
|
||||
void setName(const std::string& name) { _name = name; }
|
||||
|
||||
const AABB& getAABB() const { return _aabb; }
|
||||
|
||||
|
||||
void calcuateAABB();
|
||||
|
||||
void bindMeshCommand();
|
||||
|
|
|
@ -65,6 +65,7 @@ public:
|
|||
void setId(const std::string& id) { _id = id; }
|
||||
const std::string& getId() const { return _id; }
|
||||
|
||||
/**primitive type setter & getter*/
|
||||
GLenum getPrimitiveType() const { return _primitiveType; }
|
||||
void setPrimitiveType(GLenum primitive) { _primitiveType = primitive; }
|
||||
|
||||
|
@ -119,7 +120,7 @@ protected:
|
|||
VertexData* _vertexData; //mesh vertex data
|
||||
VertexBuffer* _vertexBuffer; // vertex buffer
|
||||
Vector<MeshIndexData*> _indexs; //index data
|
||||
std::vector<MeshVertexAttrib> _attribs;
|
||||
std::vector<MeshVertexAttrib> _attribs; //vertex attributes
|
||||
|
||||
int _vertexCount; //vertex count
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue