Rectification d'un bug sur les maisons avec pont.
This commit is contained in:
parent
800338bfaa
commit
dde802c8fc
|
@ -10,11 +10,11 @@ void BatimentQuadMaisonPont::getBoundingBoxPoints() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BatimentQuadMaisonPont::split() {
|
bool BatimentQuadMaisonPont::split() {
|
||||||
Quad q = Quad(c[NE],c[SE],c[SW],c[NW]);
|
Quad q = c;
|
||||||
q.makeParallelogram();
|
q.makeParallelogram();
|
||||||
if(Segment(q.c[0],q.c[3]).length() < Segment(q.c[0],q.c[1]).length())
|
if(Segment(q.c[0],q.c[3]).length() < Segment(q.c[0],q.c[1]).length())
|
||||||
q = Quad(q.c[1],q.c[2],q.c[3],q.c[0]);
|
q = q >> 1;
|
||||||
float partLength = Segment(q.c[0],q.c[3]).length() / 3;
|
float partLength = Segment(q.c[0],q.c[3]).length() / 3.;
|
||||||
int partHeight = 2.5*height/3.;
|
int partHeight = 2.5*height/3.;
|
||||||
Quad qa = q;
|
Quad qa = q;
|
||||||
Quad qb = q;
|
Quad qb = q;
|
||||||
|
@ -25,10 +25,10 @@ bool BatimentQuadMaisonPont::split() {
|
||||||
qc.offset(E, -partLength);
|
qc.offset(E, -partLength);
|
||||||
qc.offset(W, -partLength);
|
qc.offset(W, -partLength);
|
||||||
|
|
||||||
addChild(new BatimentQuadJardin(c << 1));
|
addChild(new BatimentQuadJardin(c));
|
||||||
addChild(new BatimentQuadBlock(qa >> 1,partHeight));
|
addChild(new BatimentQuadBlock(qa,partHeight));
|
||||||
addChild(new BatimentQuadBlock(qb >> 1,partHeight));
|
addChild(new BatimentQuadBlock(qb,partHeight));
|
||||||
addChild(new BatimentQuadBlock((qh + Vertex(0,0,partHeight)) >> 1,partHeight));
|
addChild(new BatimentQuadBlock((qh + Vertex(0,0,partHeight)),partHeight));
|
||||||
addChild(new BatimentQuadPont(qc,partHeight));
|
addChild(new BatimentQuadPont(qc,partHeight));
|
||||||
addChild(new BatimentQuadToit(qh + Vertex(0,0,2*partHeight),150));
|
addChild(new BatimentQuadToit(qh + Vertex(0,0,2*partHeight),150));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user