Subdivision des murs OK.
This commit is contained in:
parent
36554fdc9c
commit
9f7a3fc971
|
@ -24,7 +24,7 @@ bool BatimentQuad_::split() {
|
||||||
ch = ch.insetNESW(30);
|
ch = ch.insetNESW(30);
|
||||||
c = c.insetNESW(30);
|
c = c.insetNESW(30);
|
||||||
addChild(new ToitQuad(ch, Dimensions::hauteurToit));
|
addChild(new ToitQuad(ch, Dimensions::hauteurToit));
|
||||||
//addChild(new EtageQuad(c,ch));
|
addChild(new EtageQuad(c,ch));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
addChild(new TerrainQuad(c));
|
addChild(new TerrainQuad(c));
|
||||||
|
|
|
@ -21,14 +21,11 @@ bool EtageQuad::split() {
|
||||||
Quad mwh = ch.insetOpp(W,28);
|
Quad mwh = ch.insetOpp(W,28);
|
||||||
Quad mnh = ch.inset(E,28).inset(W,28).insetOpp(N,28);
|
Quad mnh = ch.inset(E,28).inset(W,28).insetOpp(N,28);
|
||||||
|
|
||||||
MurQuad *mme = new MurQuad(me << 1,meh << 1,we);
|
addChild(new MurQuad(me << 1,meh << 1,we));
|
||||||
MurQuad *mmn = new MurQuad(mn,mnh,wn);
|
addChild(new MurQuad(mw >> 1,mwh >> 1,ww));
|
||||||
MurQuad *mmw = new MurQuad(mw >> 1,mwh >> 1,ww);
|
addChild(new MurQuad(mn,mnh,wn));
|
||||||
MurQuad *mms = new MurQuad(ms >> 2,msh >> 2,ws);
|
addChild(new MurQuad(ms >> 2,msh >> 2,ws));
|
||||||
addChild(mme);
|
|
||||||
addChild(mmw);
|
|
||||||
addChild(mmn);
|
|
||||||
addChild(mms);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,36 +20,22 @@ void MurQuad::setWindow() {
|
||||||
Quad wBack = wFront.offsetNormal(28);
|
Quad wBack = wFront.offsetNormal(28);
|
||||||
windowPos = Quad(wFront[SE],wBack[SE],wBack[SW],wFront[SW]);
|
windowPos = Quad(wFront[SE],wBack[SE],wBack[SW],wFront[SW]);
|
||||||
windowPosh = Quad(wFront[NE],wBack[NE],wBack[NW],wFront[NW]);
|
windowPosh = Quad(wFront[NE],wBack[NE],wBack[NW],wFront[NW]);
|
||||||
|
|
||||||
//addGPUQuad(q,0xFFFF00);
|
|
||||||
//addGPUQuad(ch,0xFFFF00);
|
|
||||||
//addGPUQuad(windowPos,0xFFFF00);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MurQuad::split() {
|
bool MurQuad::split() {
|
||||||
if(!window)
|
if(!window)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*if(c.maxLengthNS() < c.maxLengthEW()) {
|
|
||||||
c = c >> 1;
|
|
||||||
ch = ch >> 1;
|
|
||||||
}*/
|
|
||||||
float length = c.maxLengthNS();
|
float length = c.maxLengthNS();
|
||||||
|
|
||||||
if(length > 500) {
|
if(length > 660) {
|
||||||
//addGPUTriangle(c[NW],c[NE],c[SE],0xFF0000);
|
|
||||||
Quad qa = c.insetOpp(W,length/2);
|
Quad qa = c.insetOpp(W,length/2);
|
||||||
Quad qb = c.insetOpp(E,length-(length/2));
|
Quad qb = c.insetOpp(E,length-(length/2));
|
||||||
Quad qah = ch.insetOpp(W,length/2);
|
Quad qah = ch.insetOpp(W,length/2);
|
||||||
Quad qbh = ch.insetOpp(E,length-(length/2));
|
Quad qbh = ch.insetOpp(E,length-(length/2));
|
||||||
|
|
||||||
addGPUQuad(qa,0x0000FF);
|
addChild(new MurQuad(qa,qah,window));
|
||||||
addGPUQuad(qb,0x00FF00);
|
addChild(new MurQuad(qb,qbh,window));
|
||||||
addGPUQuad(qah,0x0000FF);
|
|
||||||
addGPUQuad(qbh,0x00FF00);
|
|
||||||
//addGPUQuad(qa,0xFFFF00);
|
|
||||||
//addChild(new MurQuad(qa,qah,window));
|
|
||||||
//addChild(new MurQuad(qb,qbh,window));
|
|
||||||
} else {
|
} else {
|
||||||
Quad right = Quad(windowPos[NW],windowPos[SW],c[SW],c[NW]);
|
Quad right = Quad(windowPos[NW],windowPos[SW],c[SW],c[NW]);
|
||||||
Quad righth = Quad(windowPosh[NW],windowPosh[SW],ch[SW],ch[NW]);
|
Quad righth = Quad(windowPosh[NW],windowPosh[SW],ch[SW],ch[NW]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user