|
| Mesh () |
| constructeur par defaut. More...
|
|
| Mesh (const GLenum primitives) |
| constructeur. More...
|
|
int | create (const GLenum primitives) |
| construit les objets openGL. More...
|
|
void | release () |
| detruit les objets openGL. More...
|
|
Color | default_color () const |
| renvoie la couleur par defaut du mesh, utilisee si les sommets n'ont pas de couleur associee. More...
|
|
Mesh & | default_color (const Color &color) |
| modifie la couleur par defaut, utilisee si les sommets n'ont pas de couleur associee. More...
|
|
Mesh & | color (const vec4 &c) |
| definit la couleur du prochain sommet. More...
|
|
Mesh & | color (const Color &c) |
| definit la couleur du prochain sommet. More...
|
|
Mesh & | color (const float r, const float g, const float b, const float a=1) |
| definit la couleur du prochain sommet. More...
|
|
Mesh & | normal (const vec3 &n) |
| definit la normale du prochain sommet. More...
|
|
Mesh & | normal (const Vector &n) |
| definit la normale du prochain sommet. More...
|
|
Mesh & | normal (const float x, const float y, const float z) |
| definit la normale du prochain sommet. More...
|
|
Mesh & | texcoord (const vec2 &uv) |
| definit les coordonnees de texture du prochain sommet. More...
|
|
Mesh & | texcoord (const float x, const float y) |
| definit les coordonnees de texture du prochain sommet. More...
|
|
unsigned int | vertex (const vec3 &p) |
| insere un sommet de position p, et ses attributs (s'ils sont definis par color(), texcoord(), normal()), dans l'objet. renvoie l'indice du sommet. More...
|
|
unsigned int | vertex (const Point &p) |
| insere un sommet de position p, et ses attributs (s'ils sont definis par color(), texcoord(), normal()), dans l'objet. renvoie l'indice du sommet. More...
|
|
unsigned int | vertex (const float x, const float y, const float z) |
| insere un sommet de position p, et ses attributs (s'ils sont definis par color(), texcoord(), normal()), dans l'objet. renvoie l'indice du sommet. More...
|
|
Mesh & | triangle (const unsigned int a, const unsigned int b, const unsigned int c) |
|
Mesh & | triangle_last (const int a, const int b, const int c) |
|
Mesh & | restart_strip () |
| demarre un nouveau strip. a utiliser avec un objet composes de GL_TRIANGLE_STRIP, doit aussi fonctionner avec GL_TRIANGLE_FAN, GL_LINE_STRIP, GL_LINE_LOOP, etc. More...
|
|
Mesh & | color (const unsigned int id, const vec4 &c) |
| modifie la couleur du sommet d'indice id. More...
|
|
Mesh & | color (const unsigned int id, const Color &c) |
| modifie la couleur du sommet d'indice id. More...
|
|
Mesh & | color (const unsigned int id, const float r, const float g, const float b, const float a=1) |
| modifie la couleur du sommet d'indice id. More...
|
|
Mesh & | normal (const unsigned int id, const vec3 &n) |
| modifie la normale du sommet d'indice id. More...
|
|
Mesh & | normal (const unsigned int id, const Vector &n) |
| modifie la normale du sommet d'indice id. More...
|
|
Mesh & | normal (const unsigned int id, const float x, const float y, const float z) |
| modifie la normale du sommet d'indice id. More...
|
|
Mesh & | texcoord (const unsigned int id, const vec2 &uv) |
| modifie les coordonnees du sommet d'indice id. More...
|
|
Mesh & | texcoord (const unsigned int id, const float x, const float y) |
| modifie les coordonnees du sommet d'indice id. More...
|
|
void | vertex (const unsigned int id, const vec3 &p) |
| modifie la position du sommet d'indice id. More...
|
|
void | vertex (const unsigned int id, const Point &p) |
| modifie la position du sommet d'indice id. More...
|
|
void | vertex (const unsigned int id, const float x, const float y, const float z) |
| modifie la position du sommet d'indice id. More...
|
|
void | bounds (Point &pmin, Point &pmax) |
| renvoie min et max les coordonnees des extremites des positions des sommets de l'objet (boite englobante alignee sur les axes, aabb). More...
|
|
int | vertex_count () const |
| renvoie le nombre de sommets. More...
|
|
int | index_count () const |
| renvoie le nombre d'indices de sommets. More...
|
|
const float * | vertex_buffer () const |
| renvoie l'adresse de la position du premier sommet. permet de construire les vertex buffers openGL. par convention, la position est un vec3, 3 GL_FLOAT. More...
|
|
std::size_t | vertex_buffer_size () const |
| renvoie la longueur (en octets) du vertex buffer. More...
|
|
const float * | normal_buffer () const |
| renvoie l'adresse de la normale du premier sommet. par convention, la normale est un vec3, 3 GL_FLOAT. More...
|
|
std::size_t | normal_buffer_size () const |
| renvoie la longueur (en octets) du normal buffer. More...
|
|
const float * | texcoord_buffer () const |
| renvoie l'adresse des coordonnees de textures du premier sommet. par convention, c'est un vec2, 2 GL_FLOAT. More...
|
|
std::size_t | texcoord_buffer_size () const |
| renvoie la taille (en octets) du texcoord buffer. More...
|
|
const float * | color_buffer () const |
| renvoie l'adresse de la couleur du premier sommet. par convention, la couleur est un vec4, 4 GL_FLOAT. More...
|
|
std::size_t | color_buffer_size () const |
| renvoie la taille (en octets) du color buffer. More...
|
|
const void * | index_buffer () const |
| renvoie l'adresse du premier indice du premier triangle. par convention c'est un uint, 1, GL_UNSIGNED_INT. More...
|
|
std::size_t | index_buffer_size () const |
| renvoie la taille (en octets) de l'index buffer. More...
|
|
const void * | attribute_buffer (const unsigned int id) const |
|
std::size_t | attribute_buffer_size (const unsigned int id) const |
| renvoie la taille (en octets) d'un attribut. More...
|
|
const std::vector< vec3 > & | positions () const |
|
const std::vector< vec2 > & | texcoords () const |
|
const std::vector< vec3 > & | normals () const |
|
const std::vector< vec4 > & | colors () const |
|
const std::vector< unsigned int > & | indices () const |
|
GLenum | primitives () const |
|
bool | operator== (const Mesh &m) const |
|
void | draw (const Transform &model, const Transform &view, const Transform &projection, const bool use_light, const Point &light, const Color &light_color, const bool use_texture, const GLuint texture) |
|
GLuint | create_buffers (const bool use_texcoord=true, const bool use_normal=true, const bool use_color=true) |
|
GLuint | create_program (const bool use_texcoord=true, const bool use_normal=true, const bool use_color=true, const bool use_light=false) |
| construit un shader program configure. More...
|
|
int | update_buffers (const bool use_texcoord, const bool use_normal, const bool use_color) |
|
representation d'un objet / maillage.
Definition at line 88 of file mesh.h.