-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rect.h
37 lines (29 loc) · 793 Bytes
/
Rect.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef RECT_H
#define RECT_H
#include <vector>
#include <GL/glut.h>
#include <cmath>
#include "EstruturasBasicas.h"
class Rect
{
public:
Rect();
Rect(int _x, int _y, int _largura, int _altura, Cor _cor = Cor("white"));
Ponto posicao;
Cor cor;
std::string id;
int altura;
int largura;
int strokeLargura;
Cor strokeCor;
Textura textura;
int fatorRepeticaoTextura = 10;
bool estaDentro(Ponto p);
void Draw(int flag = DRAW_2D, Textura *_textura = NULL, bool drawStroke = NO_STROKE);
void DrawArestas();
static void DrawCubo(Rect *r, float profundidade, float textureS = 1);
protected:
private:
std::vector<Ponto> getVertices();
};
#endif // RECT_H