private void setGuiBounding() { float sx = width * viewPortLeft; float ex = width * viewPortRight; float sy = height * viewPortBottom; float ey = height * viewPortTop; float xExtent = Math.max(0f, (ex - sx) / 2f); float yExtent = Math.max(0f, (ey - sy) / 2f); guiBounding.setCenter(sx + xExtent, sy + yExtent, 0); guiBounding.setXExtent(xExtent); guiBounding.setYExtent(yExtent); guiBounding.setZExtent(Float.MAX_VALUE); }
casterBB.setXExtent(casterBB.getXExtent() + 2.0f); casterBB.setYExtent(casterBB.getYExtent() + 2.0f); casterBB.setZExtent(casterBB.getZExtent() + 2.0f);
this.viewProjectionMatrix.set(cam.viewProjectionMatrix); this.guiBounding.setXExtent(cam.guiBounding.getXExtent()); this.guiBounding.setYExtent(cam.guiBounding.getYExtent()); this.guiBounding.setZExtent(cam.guiBounding.getZExtent());
makeCamFrustum(); aabb.setCenter(20, 10, -60); aabb.setXExtent(10); aabb.setYExtent(5); aabb.setZExtent(3);
private void setGuiBounding() { float sx = width * viewPortLeft; float ex = width * viewPortRight; float sy = height * viewPortBottom; float ey = height * viewPortTop; float xExtent = Math.max(0f, (ex - sx) / 2f); float yExtent = Math.max(0f, (ey - sy) / 2f); guiBounding.setCenter(sx + xExtent, sy + yExtent, 0); guiBounding.setXExtent(xExtent); guiBounding.setYExtent(yExtent); guiBounding.setZExtent(Float.MAX_VALUE); }
private void setGuiBounding() { float sx = width * viewPortLeft; float ex = width * viewPortRight; float sy = height * viewPortBottom; float ey = height * viewPortTop; float xExtent = Math.max(0f, (ex - sx) / 2f); float yExtent = Math.max(0f, (ey - sy) / 2f); guiBounding.setCenter(new Vector3f(sx + xExtent, sy + yExtent, 0)); guiBounding.setXExtent(xExtent); guiBounding.setYExtent(yExtent); guiBounding.setZExtent(Float.MAX_VALUE); }
private static void findChildBound(BoundingBox bbox, int side){ float extent = bbox.getXExtent() * 0.5f; bbox.getCenter().set(bbox.getCenter().x + extent * Octnode.extentMult[side].x, bbox.getCenter().y + extent * Octnode.extentMult[side].y, bbox.getCenter().z + extent * Octnode.extentMult[side].z); bbox.setXExtent(extent); bbox.setYExtent(extent); bbox.setZExtent(extent); }
bbox.setXExtent(extent); bbox.setYExtent(extent); bbox.setZExtent(extent);
casterBB.setXExtent(casterBB.getXExtent() + 2.0f); casterBB.setYExtent(casterBB.getYExtent() + 2.0f); casterBB.setZExtent(casterBB.getZExtent() + 2.0f);
casterBB.setXExtent(casterBB.getXExtent() + 2.0f); casterBB.setYExtent(casterBB.getYExtent() + 2.0f); casterBB.setZExtent(casterBB.getZExtent() + 2.0f);
public void generateRenderSet(Geometry[] globalGeomList, Set<Geometry> renderSet, Camera cam, BoundingBox parentBox, boolean isRoot){ tempBox.setCenter(parentBox.getCenter()); tempBox.setXExtent(parentBox.getXExtent()); tempBox.setYExtent(parentBox.getYExtent()); tempBox.setZExtent(parentBox.getZExtent()); tempBox.setXExtent(ext); tempBox.setYExtent(ext); tempBox.setZExtent(ext);
this.viewProjectionMatrix.set(cam.viewProjectionMatrix); this.guiBounding.setXExtent(cam.guiBounding.getXExtent()); this.guiBounding.setYExtent(cam.guiBounding.getYExtent()); this.guiBounding.setZExtent(cam.guiBounding.getZExtent());
this.viewProjectionMatrix.set(cam.viewProjectionMatrix); this.guiBounding.setXExtent(cam.guiBounding.getXExtent()); this.guiBounding.setYExtent(cam.guiBounding.getYExtent()); this.guiBounding.setZExtent(cam.guiBounding.getZExtent());