commit 8469c02f8e39585ed4aec242fc680b2220120360
parent cdb5dd06979e8bdbcfa2b366cd0ad17300da94a7
Author: Yoann <yoann.b87@voila.fr>
Date: Wed, 21 Dec 2011 16:15:35 +0100
Suite des maison avec passage au dessous.
Diffstat:
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/rules/batiment/batimentquadmaisonpont.cpp b/rules/batiment/batimentquadmaisonpont.cpp
@@ -27,13 +27,13 @@ std::vector<Vertex*> BatimentQuadMaisonPont::getBoundingBoxPoints() const {
}
bool BatimentQuadMaisonPont::split() {
-/*
+
Quad q = Quad(ne,se,sw,nw);
q.makeParallelogram();
if(Segment(q.corner[0],q.corner[3]).length() < Segment(q.corner[0],q.corner[1]).length())
q = Quad(q.corner[1],q.corner[2],q.corner[3],q.corner[0]);
float partLength = Segment(q.corner[0],q.corner[3]).length() / 3;
- int partHeight = 300;
+ int partHeight = 2.5*height/3.;
Quad qa = q;
Quad qb = q;
Quad qc = q;
@@ -70,6 +70,20 @@ bool BatimentQuadMaisonPont::split() {
ne = lctr+qc.corner[3];
addChild(new BatimentQuadPont(se,sw,nw,ne,partHeight));
+/*
+ Vertex seh = qh.corner[0] + Vertex(0,0,partHeight);
+ Vertex swh = qh.corner[1] + Vertex(0,0,partHeight);
+ Vertex nwh = qh.corner[2] + Vertex(0,0,partHeight);
+ Vertex neh = qh.corner[3] + Vertex(0,0,partHeight);
+
+ Vertex ce = seh + (neh - seh)/2 + Vertex(0,0,0.5*height/3.);
+ Vertex cw = swh + (nwh - swh)/2 + Vertex(0,0,0.5*height/3.);
+
+ addTriangle(new Triangle(swh,nwh,cw,0xDD,0xDD,0xDD));
+ addTriangle(new Triangle(neh,seh,ce,0xDD,0xDD,0xDD));
+
+ addQuad(neh,nwh,cw,ce,0xE0,0x20,0x00);
+ addQuad(swh,seh,ce,cw,0xE0,0x20,0x00);
*/
return true;
}