class: ege::resource::Mesh


Description:



Constructor and Destructor:

#                                                 Mesh                  (const std::string & _fileName,
const std::string & _shaderName);
# virtual ~Mesh (void );

Synopsis:

#         bool                                    m_checkNormal;
# ewol::resource::Program* m_GLprogram;
# int32_t m_GLPosition;
# int32_t m_GLMatrix;
# int32_t m_GLMatrixPosition;
# int32_t m_GLNormal;
# int32_t m_GLtexture;
# int32_t m_bufferOfset;
# int32_t m_numberOfElments;
# MaterialGlId m_GLMaterial;
# ege::Light m_light;
# std::vector<vec3> m_listVertex;
# std::vector<vec2> m_listUV;
# std::vector<vec3> m_listFacesNormal;
# std::vector<vec3> m_listVertexNormal;
# etk::Hash<FaceIndexing> m_listFaces;
# etk::Hash<ege::Material*> m_materials;
# std::vector<ege::PhysicsShape*> m_physics;
# ewol::resource::VirtualBufferObject* m_verticesVBO;
+ virtual void draw (mat4 & _positionMatrix,
bool _enableDepthTest,
bool _enableDepthUpdate);
+ virtual void draw (mat4 & _positionMatrix,
const etk::Color<float> & _mainColor,
bool _enableDepthTest,
bool _enableDepthUpdate);
+ void generateVBO (void );
+ void createViewBox (const std::string & _materialName,
float _size);
+ void addMaterial (const std::string & _name,
ege::Material* _data);
+ void setCheckNormal (bool _status);
+ bool getCheckNormal (void );
+ const std::vector<ege::PhysicsShape*> & getPhysicalProperties (void ) const;
+ void setShape (void* _shape);
+ void* getShape (void );
+ void setFreeShapeFunction (void(*_functionFreeShape)(void*_pointer ));
+ ege::resource::Mesh* keep (const std::string & _meshname);
+ void release (ege::resource::Mesh* & _object);

Object Hierarchy:

+ewol::Object
+--> +ewol::Resource
+--> ege::resource::Mesh
+--> ege::resource::ParticuleMesh

Detail:

m_checkNormal

# bool m_checkNormal;
when enable, this check the normal of the mesh before sending it at the 3d card


m_GLprogram

# ewol::resource::Program* m_GLprogram;



m_GLPosition

# int32_t m_GLPosition;



m_GLMatrix

# int32_t m_GLMatrix;



m_GLMatrixPosition

# int32_t m_GLMatrixPosition;



m_GLNormal

# int32_t m_GLNormal;



m_GLtexture

# int32_t m_GLtexture;



m_bufferOfset

# int32_t m_bufferOfset;



m_numberOfElments

# int32_t m_numberOfElments;



m_GLMaterial

# MaterialGlId m_GLMaterial;



m_light

# ege::Light m_light;



m_listVertex

# std::vector<vec3> m_listVertex;
List of all vertex in the element


m_listUV

# std::vector<vec2> m_listUV;
List of all UV point in the mesh (for the specify texture)


m_listFacesNormal

# std::vector<vec3> m_listFacesNormal;
List of all Face normal, when calculated


m_listVertexNormal

# std::vector<vec3> m_listVertexNormal;
List of all Face normal, when calculated


m_listFaces

# etk::Hash<FaceIndexing> m_listFaces;
List of all Face for the mesh


m_materials

# etk::Hash<ege::Material*> m_materials;



m_physics

# std::vector<ege::PhysicsShape*> m_physics;
collision shape module ... (independent of bullet lib)


m_verticesVBO

# ewol::resource::VirtualBufferObject* m_verticesVBO;



Mesh

#  Mesh (const std::string & _fileName,
const std::string & _shaderName);



~Mesh

# virtual  ~Mesh (void );



draw

+ virtual void draw (mat4 & _positionMatrix,
bool _enableDepthTest,
bool _enableDepthUpdate);



draw

+ virtual void draw (mat4 & _positionMatrix,
const
etk::Color<float> & _mainColor,
bool _enableDepthTest,
bool _enableDepthUpdate);



generateVBO

+ void generateVBO (void );



createViewBox

+ void createViewBox (const std::string & _materialName,
float _size);



addMaterial

+ void addMaterial (const std::string & _name,
ege::Material* _data);



setCheckNormal

+ void setCheckNormal (bool _status);
set the check of normal position befor sending it to the openGl card


getCheckNormal

+ bool getCheckNormal (void );
get the check value of normal position befor sending it to the openGl card


getPhysicalProperties

+ const std::vector<ege::PhysicsShape*> & getPhysicalProperties (void ) const;



setShape

+ void setShape (void* _shape);
set the shape pointer (no type == > user might know it ...)


getShape

+ void* getShape (void );
get the pointer on the shame (no type)


setFreeShapeFunction

+ void setFreeShapeFunction (void(*_functionFreeShape)(void*_pointer ));



keep

+ ege::resource::Mesh* keep (const std::string & _meshname);
keep the resource pointer.
Note: Never free this pointer by your own...


release

+ void release (ege::resource::Mesh* & _object);
release the keeped resources