/** * Set the water plane for this processor. * @param plane */ public void setPlane(Plane plane) { this.plane.setConstant(plane.getConstant()); this.plane.setNormal(plane.getNormal()); updateClipPlanes(); }
@Override public boolean intersectsBox(BoundingBox box, TempVars vars) { Vector3f axis1 = getScaledAxis(0, vars.vect1); Vector3f axis2 = getScaledAxis(1, vars.vect2); Vector3f axis3 = getScaledAxis(2, vars.vect3); Vector3f tn = vars.vect4; Plane p = vars.plane; Vector3f c = box.getCenter(); p.setNormal(0, 0, -1); p.setConstant(-(c.z + box.getZExtent())); if (!insidePlane(p, axis1, axis2, axis3, tn)) return false; p.setNormal(0, 0, 1); p.setConstant(c.z - box.getZExtent()); if (!insidePlane(p, axis1, axis2, axis3, tn)) return false; p.setNormal(0, -1, 0); p.setConstant(-(c.y + box.getYExtent())); if (!insidePlane(p, axis1, axis2, axis3, tn)) return false; p.setNormal(0, 1, 0); p.setConstant(c.y - box.getYExtent()); if (!insidePlane(p, axis1, axis2, axis3, tn)) return false; p.setNormal(-1, 0, 0); p.setConstant(-(c.x + box.getXExtent())); if (!insidePlane(p, axis1, axis2, axis3, tn)) return false; p.setNormal(1, 0, 0); p.setConstant(c.x - box.getXExtent()); if (!insidePlane(p, axis1, axis2, axis3, tn)) return false; return true; }
worldPlane[FAR_PLANE].setNormal(left); worldPlane[FAR_PLANE].setNormal(-direction.x, -direction.y, -direction.z); worldPlane[FAR_PLANE].setConstant(-(dirDotLocation + frustumFar)); worldPlane[NEAR_PLANE].setNormal(direction.x, direction.y, direction.z); worldPlane[NEAR_PLANE].setConstant(dirDotLocation + frustumNear);
this.viewportChanged = true; for (int i = 0; i < MAX_WORLD_PLANES; ++i) { worldPlane[i].setNormal(cam.worldPlane[i].getNormal()); worldPlane[i].setConstant(cam.worldPlane[i].getConstant());
/** * Set the water plane for this processor. * @param plane */ public void setPlane(Plane plane) { this.plane.setConstant(plane.getConstant()); this.plane.setNormal(plane.getNormal()); updateClipPlanes(); }
/** * Set the water plane for this processor. * @param plane */ public void setPlane(Plane plane) { this.plane.setConstant(plane.getConstant()); this.plane.setNormal(plane.getNormal()); updateClipPlanes(); }
/** * Set the water plane for this processor. * @param plane */ public void setPlane(Plane plane) { this.plane.setConstant(plane.getConstant()); this.plane.setNormal(plane.getNormal()); updateClipPlanes(); }
worldPlane[FAR_PLANE].setNormal(left); worldPlane[FAR_PLANE].setNormal(-direction.x, -direction.y, -direction.z); worldPlane[FAR_PLANE].setConstant(-(dirDotLocation + frustumFar)); worldPlane[NEAR_PLANE].setNormal(direction.x, direction.y, direction.z); worldPlane[NEAR_PLANE].setConstant(dirDotLocation + frustumNear);
worldPlane[FAR_PLANE].setNormal(left); worldPlane[FAR_PLANE].setNormal(-direction.x, -direction.y, -direction.z); worldPlane[FAR_PLANE].setConstant(-(dirDotLocation + frustumFar)); worldPlane[NEAR_PLANE].setNormal(direction.x, direction.y, direction.z); worldPlane[NEAR_PLANE].setConstant(dirDotLocation + frustumNear);
this.viewportChanged = true; for (int i = 0; i < MAX_WORLD_PLANES; ++i) { worldPlane[i].setNormal(cam.worldPlane[i].getNormal()); worldPlane[i].setConstant(cam.worldPlane[i].getConstant());
this.viewportChanged = cam.viewportChanged; for (int i = 0; i < MAX_WORLD_PLANES; ++i) { worldPlane[i].setNormal(cam.worldPlane[i].getNormal()); worldPlane[i].setConstant(cam.worldPlane[i].getConstant());