Début de la division des murs pour placer un fenêtre.
This commit is contained in:
parent
8dff16887e
commit
a8e6da6757
|
@ -2,6 +2,7 @@
|
|||
|
||||
BatimentQuadMur::BatimentQuadMur(Quad c, float height) : Chose(), c(c), height(height) {
|
||||
addEntropy(c);
|
||||
this->window = false;
|
||||
}
|
||||
|
||||
void BatimentQuadMur::getBoundingBoxPoints() {
|
||||
|
@ -9,6 +10,25 @@ void BatimentQuadMur::getBoundingBoxPoints() {
|
|||
addBBPoints(c + Vertex(0,0,height));
|
||||
}
|
||||
|
||||
void BatimentQuadMur::triangulation() {
|
||||
addGPUOcto(c, c + Vertex(0,0,height), 0xF1, 0xE0, 0xE0);
|
||||
void BatimentQuadMur::setWindow(Quad w) {
|
||||
this->windowPos = w;
|
||||
this->window = true;
|
||||
}
|
||||
|
||||
bool BatimentQuadMur::split() {
|
||||
if(!window)
|
||||
return false;
|
||||
|
||||
Quad left = c;
|
||||
Quad right = c;
|
||||
Quad top = c;
|
||||
Quad bottom = c;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BatimentQuadMur::triangulation() {
|
||||
//addGPUOcto(c, c + Vertex(0,0,height), 0xF1, 0xE0, 0xE0);
|
||||
addGPUOcto(c, c + Vertex(0,0,height), 0x60, 0x60, 0xFF);
|
||||
}
|
||||
|
|
|
@ -7,12 +7,16 @@ class BatimentQuadMur: public Chose {
|
|||
private :
|
||||
Quad c;
|
||||
float height;
|
||||
bool window; // Contient une fenêtre ou non.
|
||||
Quad windowPos;
|
||||
|
||||
public :
|
||||
|
||||
BatimentQuadMur(Quad c, float height);
|
||||
virtual void triangulation();
|
||||
virtual bool split();
|
||||
virtual void getBoundingBoxPoints();
|
||||
void setWindow(Quad);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user