From 556d92b63555a085b25e32b1cd55afce24edd07a Mon Sep 17 00:00:00 2001
From: Sven Gothel
src
planes into this this instance's planes.
* @param src the 6 source planes
*/
- public final void updateByPlanes(Plane[] src) {
+ public final void updateByPlanes(final Plane[] src) {
for (int i = 0; i < 6; ++i) {
final Plane p0 = planes[i];
final float[] p0_n = p0.n;
@@ -185,7 +187,7 @@ public class Frustum {
* as required by this class.
*
*/
- public void updateByPMV(float[] pmv, int pmv_off) {
+ public void updateByPMV(final float[] pmv, final int pmv_off) {
// Left: a = m41 + m11, b = m42 + m12, c = m43 + m13, d = m44 + m14 - [1..4] column-major
// Left: a = m30 + m00, b = m31 + m01, c = m32 + m02, d = m33 + m03 - [0..3] column-major
{
@@ -265,7 +267,7 @@ public class Frustum {
}
}
- private static final boolean isOutsideImpl(Plane p, AABBox box) {
+ private static final boolean isOutsideImpl(final Plane p, final AABBox box) {
final float[] low = box.getLow();
final float[] high = box.getHigh();
@@ -288,7 +290,7 @@ public class Frustum {
* Note: If method returns false, the box may only be partially inside.
*
*/
- public final boolean isAABBoxOutside(AABBox box) {
+ public final boolean isAABBoxOutside(final AABBox box) {
for (int i = 0; i < 6; ++i) {
if ( isOutsideImpl(planes[i], box) ) {
// fully outside
@@ -308,7 +310,7 @@ public class Frustum {
* @param p the point
* @return {@link Location} of point related to frustum planes
*/
- public final Location classifyPoint(float[] p) {
+ public final Location classifyPoint(final float[] p) {
Location res = Location.INSIDE;
for (int i = 0; i < 6; ++i) {
@@ -328,7 +330,7 @@ public class Frustum {
* @param p the point
* @return true if outside of the frustum, otherwise inside or on a plane
*/
- public final boolean isPointOutside(float[] p) {
+ public final boolean isPointOutside(final float[] p) {
return Location.OUTSIDE == classifyPoint(p);
}
@@ -339,7 +341,7 @@ public class Frustum {
* @param radius radius of the sphere
* @return {@link Location} of point related to frustum planes
*/
- public final Location classifySphere(float[] p, float radius) {
+ public final Location classifySphere(final float[] p, final float radius) {
Location res = Location.INSIDE; // fully inside
for (int i = 0; i < 6; ++i) {
@@ -362,7 +364,7 @@ public class Frustum {
* @param radius radius of the sphere
* @return true if outside of the frustum, otherwise inside or intersecting
*/
- public final boolean isSphereOutside(float[] p, float radius) {
+ public final boolean isSphereOutside(final float[] p, final float radius) {
return Location.OUTSIDE == classifySphere(p, radius);
}
@@ -370,13 +372,13 @@ public class Frustum {
if( null == sb ) {
sb = new StringBuilder();
}
- sb.append("Frustum[ Planes[ ").append(Platform.NEWLINE)
- .append(" L: ").append(planes[0]).append(", ").append(Platform.NEWLINE)
- .append(" R: ").append(planes[1]).append(", ").append(Platform.NEWLINE)
- .append(" B: ").append(planes[2]).append(", ").append(Platform.NEWLINE)
- .append(" T: ").append(planes[3]).append(", ").append(Platform.NEWLINE)
- .append(" N: ").append(planes[4]).append(", ").append(Platform.NEWLINE)
- .append(" F: ").append(planes[5]).append("], ").append(Platform.NEWLINE)
+ sb.append("Frustum[ Planes[ ").append(PlatformPropsImpl.NEWLINE)
+ .append(" L: ").append(planes[0]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" R: ").append(planes[1]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" B: ").append(planes[2]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" T: ").append(planes[3]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" N: ").append(planes[4]).append(", ").append(PlatformPropsImpl.NEWLINE)
+ .append(" F: ").append(planes[5]).append("], ").append(PlatformPropsImpl.NEWLINE)
.append("]");
return sb;
}
--
cgit v1.2.3