www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f0ad90f76bf5f7f08e61f03b4f1ff40770095e11
parent ee6918a0b7c5676134f83dd5eb2f55a2f62096e2
Author: Yoann <yoann.b87@voila.fr>
Date:   Wed, 11 Jan 2012 20:42:05 +0100

Il ya des fenĂȘtres bizarres mais y'en a.

Diffstat:
Mrules/batiment/batimentquadmaisonpont.cpp | 2+-
Mrules/batiment/batimentquadmur.cpp | 29+++++++++++++++--------------
2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/rules/batiment/batimentquadmaisonpont.cpp b/rules/batiment/batimentquadmaisonpont.cpp @@ -24,7 +24,7 @@ bool BatimentQuadMaisonPont::split() { addChild(new BatimentQuadBlock(qa,qa + Vertex(0,0,partHeight))); addChild(new BatimentQuadBlock(qb,qb + Vertex(0,0,partHeight))); addChild(new BatimentQuadBlock((qh + Vertex(0,0,partHeight)),qh + Vertex(0,0,2*partHeight))); - addChild(new BatimentQuadPont(qc,partHeight)); + //addChild(new BatimentQuadPont(qc,partHeight)); addChild(new BatimentQuadToit(qh + Vertex(0,0,2*partHeight),160)); return true; diff --git a/rules/batiment/batimentquadmur.cpp b/rules/batiment/batimentquadmur.cpp @@ -13,18 +13,18 @@ void BatimentQuadMur::getBoundingBoxPoints() { void BatimentQuadMur::setWindow(bool val) { val = val; - /*this->window = val; + this->window = val; Quad q = Quad(ch[SE],c[SE],c[SW],ch[SW]); - int lr = (q.length(S) - 100)/40; - std::cout << q.inset(E,60).surface() << std::endl; - Quad wFront = q.insetNESW(40,100,lr,lr); + int lr = (q.length(S) - 100)/2; + + Quad wFront = q.insetNESW(40,lr,110,lr); Quad wBack = wFront.offsetNormal(28); windowPos = Quad(wBack[SE],wFront[SE],wFront[SW],wBack[SW]); windowPosh = Quad(wBack[NE],wFront[NE],wFront[NW],wBack[NW]); -*/ + //std::cout << "lr" << lr << std::endl; - //std::cout << wFront[NE] << std::endl; - //std::cout << q[SE] << std::endl; + //std::cout << windowPos[NE] << std::endl; + //std::cout << windowPos[SE] << std::endl; //std::cout << q[SW] << std::endl; //std::cout << q[NW] << std::endl << std::endl; } @@ -33,15 +33,16 @@ bool BatimentQuadMur::split() { if(!window) return false; - Quad left = c; - Quad right = c; - Quad top = c; - Quad bottom = c; + Quad left = Quad(windowPos[NW],windowPos[SW],c[SW],c[NW]); + Quad lefth = Quad(windowPosh[NW],windowPosh[SE],ch[SW],ch[NW]); + Quad right = Quad(c[NE],c[SE],windowPos[SE],windowPos[NE]); + Quad righth = Quad(ch[NE],ch[SE],windowPosh[SE],windowPosh[NE]); - - /*addChild(new BatimentQuadMur(c,windowPos)); + addChild(new BatimentQuadMur(c,windowPos)); addChild(new BatimentQuadMur(windowPosh,ch)); -*/ + addChild(new BatimentQuadMur(left,lefth)); + addChild(new BatimentQuadMur(right,righth)); + return true; }