Class parente de toutes les formes géométriques(RectangleShape, ConvexShape, CircleShape, Sprite) More...
#include <shapeClass.h>
Public Member Functions | |
| Shape (GLfloat *vertices, GLsizeiptr verticesSize, GLuint *indices, GLsizeiptr indicesSize) | |
| Constructeur de Shape. | |
| Shape () | |
| Constructeur par défault de Shape. | |
| Shape (const Shape &other) | |
| Constructeur par copie de shape. | |
| ~Shape () | |
| Destructeur de shape. | |
| void | initShape (GLfloat *vertices, GLsizeiptr verticesSize, GLuint *indices, GLsizeiptr indicesSize) |
| Initialise la Shape comme sont constructeur. | |
| const Vector2f & | getSize () const |
| Renvoie la Taille du Shape. | |
| void | setSize (const Vector2f &nSize) |
| Change la taille du Shape. | |
| void | setSize (float x_, float y_) |
| Change la taille du Shape. | |
| const Vector2f & | getPosition () const |
| Renvoie la position du Shape. | |
| void | setPosition (const Vector2f &nPos) |
| Change la position du Shape. | |
| void | setPosition (float x_, float y_) |
| Change la position de la Shape. | |
| const Vector2f & | getOrigin () const |
| Renvoie l'origine de la Shape. | |
| void | setOrigin (const Vector2f &nOrigin) |
| Change l'origine de la Shape. | |
| void | setOrigin (float x_, float y_) |
| Change l'origine de la Shape. | |
| const Vector3i & | getColor () const |
| Renvoie la couleur de Shape. | |
| void | setColor (const Vector3i &nRGB) |
| Change la couleur de Shape. | |
| void | setColor (int x_, int y_, int z_) |
| Change la couleur de Shape. | |
| float | getAlpha () const |
| Renvoie la transaprence du la Shape. | |
| void | setAlpha (float nAlpha) |
| Change la transaprence de la Shape. | |
| float | getRotation () const |
| Renvoie la rotation de la Shape. | |
| void | setRotation (float nRotation) |
| Change la rotation de la Shape. | |
| CollisionBox & | getCollisionBox () |
| Renvoie la boîte de collision de Shape. | |
| void | setAutoUpdateCollision (bool etat) |
| Change l'état de l'automatisation de la mise a jour de la boîte de collision. | |
| void | move (const Vector2f &vecM) |
| Déplace la Shape. | |
| void | move (float x_, float y_) |
| Déplace la Shape. | |
Public Member Functions inherited from BbopDrawable | |
| virtual void | Draw (GLint *renderUniforms) const =0 |
| Déssine l'objet héritant de la class. | |
Protected Member Functions | |
| virtual void | buildVAO ()=0 |
| virtual void | updateVBO ()=0 |
| virtual void | updateVBORGB ()=0 |
| virtual void | updateVBOAlpha ()=0 |
Protected Attributes | |
| VAO | shapeVAO |
| VBO | shapeVBO |
| EBO | shapeEBO |
| Vector2f | pos |
| Vector2f | size |
| Vector2f | origin |
| Vector3i | RGB |
| bool | autoUpdateCollision |
| float | rotation |
| CollisionBox | shapeCollisionBox |
| float | alpha |
Class parente de toutes les formes géométriques(RectangleShape, ConvexShape, CircleShape, Sprite)
Elle stock et gère tous les attribut de base d'une forme géométrique comme sa position ou encore sa couleur
| Shape::Shape | ( | GLfloat * | vertices, |
| GLsizeiptr | verticesSize, | ||
| GLuint * | indices, | ||
| GLsizeiptr | indicesSize ) |
Constructeur de Shape.
| Shape::Shape | ( | ) |
Constructeur par défault de Shape.
| Shape::Shape | ( | const Shape & | other | ) |
Constructeur par copie de shape.
| Shape::~Shape | ( | ) |
Destructeur de shape.
|
protectedpure virtual |
Implemented in Sprite.
| float Shape::getAlpha | ( | ) | const |
Renvoie la transaprence du la Shape.
| CollisionBox & Shape::getCollisionBox | ( | ) |
Renvoie la boîte de collision de Shape.
| float Shape::getRotation | ( | ) | const |
Renvoie la rotation de la Shape.
| void Shape::initShape | ( | GLfloat * | vertices, |
| GLsizeiptr | verticesSize, | ||
| GLuint * | indices, | ||
| GLsizeiptr | indicesSize ) |
Initialise la Shape comme sont constructeur.
| void Shape::move | ( | float | x_, |
| float | y_ ) |
Déplace la Shape.
| [in] | x_ | distance en x |
| [in] | y_ | distance en y |
| void Shape::setAlpha | ( | float | nAlpha | ) |
Change la transaprence de la Shape.
| [in] | nAlpha | transparence |
| void Shape::setAutoUpdateCollision | ( | bool | etat | ) |
Change l'état de l'automatisation de la mise a jour de la boîte de collision.
| [in] | etat | activation |
| void Shape::setColor | ( | const Vector3i & | nRGB | ) |
Change la couleur de Shape.
| [in] | nRGB | couleur en rgb |
| void Shape::setColor | ( | int | x_, |
| int | y_, | ||
| int | z_ ) |
Change la couleur de Shape.
| [in] | x_ | rouge |
| [in] | y_ | vert |
| [in] | z_ | bleu |
| void Shape::setOrigin | ( | const Vector2f & | nOrigin | ) |
Change l'origine de la Shape.
| [in] | nOrigin | origin |
| void Shape::setOrigin | ( | float | x_, |
| float | y_ ) |
Change l'origine de la Shape.
| [in] | x_ | origine x |
| [in] | y_ | origine y |
| void Shape::setPosition | ( | const Vector2f & | nPos | ) |
Change la position du Shape.
| [in] | nPos | position |
| void Shape::setPosition | ( | float | x_, |
| float | y_ ) |
Change la position de la Shape.
| [in] | x_ | position x |
| [in] | y_ | position y |
| void Shape::setRotation | ( | float | nRotation | ) |
Change la rotation de la Shape.
| [in] | nRotation | rotation |
| void Shape::setSize | ( | float | x_, |
| float | y_ ) |
Change la taille du Shape.
| [in] | x_ | taille x |
| [in] | y_ | taille y |
|
protectedpure virtual |
Implemented in Sprite.
|
protectedpure virtual |
Implemented in Sprite.
|
protectedpure virtual |
Implemented in Sprite.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |