Skip to content

Commit

Permalink
.\chapter25.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjglgamedev committed Feb 17, 2017
1 parent 4ffdce1 commit 6cbe0d4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions chapter25/chapter25.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Once the basis of frustum culling has been explained, we can get advatange of mo

So, let's change the `FrustumCullingFilter` class. The attributes and constructor are simplified like this:

```
```java
public class FrustumCullingFilter {

private final Matrix4f prjViewMatrix;
Expand All @@ -169,20 +169,19 @@ public class FrustumCullingFilter {

The updateFrustum method just delegates the plane extraction to the `FrustumIntersection`instance.

```
```java
public void updateFrustum(Matrix4f projMatrix, Matrix4f viewMatrix) {
// Calculate projection view matrix
prjViewMatrix.set(projMatrix);
prjViewMatrix.mul(viewMatrix);
// Update frustum intersection class
frustumInt.set(prjViewMatrix);
}

```

And the method that `insideFrustum `method is vene more simple:

```
```java
public boolean insideFrustum(float x0, float y0, float z0, float boundingRadius) {
return frustumInt.testSphere(x0, y0, z0, boundingRadius);
}
Expand Down

0 comments on commit 6cbe0d4

Please sign in to comment.