示例#1
0
 private float getFloorHeight() {
   float h00 = getHeight();
   float h10 = getMap().getTile(this, 1, 0) != null ? getMap().getTile(this, 1, 0).getHeight() : 0;
   float h01 = getMap().getTile(this, 0, 1) != null ? getMap().getTile(this, 0, 1).getHeight() : 0;
   float h11 = getMap().getTile(this, 1, 1) != null ? getMap().getTile(this, 1, 1).getHeight() : 0;
   return Math.max(Math.max(h00, h10), Math.max(h01, h11));
 }
示例#2
0
 public void renderSelection(GL2 g) {
   if ((Globals.tab == Tab.labels || Globals.tab == Tab.height)) {
     g.glDisable(GL2.GL_ALPHA_TEST);
     g.glEnable(GL2.GL_BLEND);
     g.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
     double color = System.currentTimeMillis();
     color %= 2000d;
     color -= 1000d;
     color = Math.abs(color);
     color /= 1000d;
     g.glColor4d(1, 1, 0, 0.1d + 0.2d * color);
     g.glBegin(GL2.GL_QUADS);
     g.glVertex2f(0, 0);
     g.glVertex2f(0, 4);
     g.glVertex2f(4, 4);
     g.glVertex2f(4, 0);
     g.glEnd();
     g.glColor4f(1, 1, 1, 1);
     g.glDisable(GL2.GL_BLEND);
     g.glEnable(GL2.GL_ALPHA_TEST);
   }
 }
示例#3
0
 private float getHorizontalWallHeight() {
   return Math.min(getHeight(), getMap().getTile(this, 1, 0).getHeight());
 }
示例#4
0
 private float getVerticalWallHeight() {
   return Math.min(getHeight(), getMap().getTile(this, 0, 1).getHeight());
 }