planes derived by different inputs
(P*MV, ..) used to classify objects
and to test whether they are outside
Extracting the world-frustum planes from the P*Mv:
Fast Extraction of Viewing Frustum Planes from the World-View-Projection Matrix Gil GribbClassifying Point, Sphere and AABBox:Klaus Hartmann http://graphics.cs.ucf.edu/cap4720/fall2008/plane_extraction.pdf
Efficient View Frustum Culling Daniel SýkoraJosef Jelínek http://www.cg.tuwien.ac.at/hostings/cescg/CESCG-2002/DSykoraJJelinek/index.html
Lighthouse3d.com http://www.lighthouse3d.com/tutorials/view-frustum-culling/Fundamentals about Planes, Half-Spaces and Frustum-Culling:
Planes and Half-Spaces, Max Wagnerhttp://www.emeyex.com/site/tuts/PlanesHalfSpaces.pdf
Frustum Culling, Max Wagnerhttp://www.emeyex.com/site/tuts/FrustumCulling.pdf
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static enum | |
| public static class | Frustum.
Plane equation := dot(n, x - p) = 0 -> ax + bc + cx + d == 0
In order to work w/ |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | BOTTOM
Index for bottom plane: |
| public static final int | FAR
Index for far plane: |
| public static final int | LEFT
Index for left plane: |
| public static final int | NEAR
Index for near plane: |
| protected final Frustum. | planes
Normalized planes[l, r, b, t, n, f] |
| public static final int | RIGHT
Index for right plane: |
| public static final int | TOP
Index for top plane: |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Frustum. | Returns: Location of point related to frustum planesthe point p)Check to see if a point is outside, inside or on a plane of the frustum. |
| public final Frustum. | Returns: Location of point related to frustum planescenter of the sphere p, final float radius of the sphere radius)Check to see if a sphere is outside, intersecting or inside of the frustum. |
| public final Frustum. | |
| public final boolean | isAABBoxOutside(final AABBox box)
Check to see if an axis aligned bounding box is completely outside of the frustum. |
| private static final boolean | |
| public final boolean | Returns: true if outside of the frustum, otherwise inside or on a planethe point p)Check to see if a point is outside of the frustum. |
| public final boolean | Returns: true if outside of the frustum, otherwise inside or intersectingcenter of the sphere p, final float radius of the sphere radius)Check to see if a sphere is outside of the frustum. |
| public StringBuilder | |
| public String | |
| public float[] | Returns: given matrix for chaining4x4 matrix in column-major order (also result) m, final int offset in given array m, i.e. start of the 4x4 matrix m_offset, final boolean if true, given matrix will be initialized w/ identity matrix,
otherwise only the frustum fields are set. initM, final Frustum.Calculate the frustum planes in world coordinates
using the passed |
| public final void | updateByPlanes(final Frustum.
the 6 source planes srcCopy the given |
| public void | updateByPMV(final float[] pmv, final int pmv_off)
Calculate the frustum planes in world coordinates using the passed float[16] as premultiplied P*MV (column major order). |
| BOTTOM | back to summary |
|---|---|
| public static final int BOTTOM Index for bottom plane: | |
| FAR | back to summary |
|---|---|
| public static final int FAR Index for far plane: | |
| LEFT | back to summary |
|---|---|
| public static final int LEFT Index for left plane: | |
| NEAR | back to summary |
|---|---|
| public static final int NEAR Index for near plane: | |
| planes | back to summary |
|---|---|
| protected final Frustum. Normalized planes[l, r, b, t, n, f] | |
| RIGHT | back to summary |
|---|---|
| public static final int RIGHT Index for right plane: | |
| TOP | back to summary |
|---|---|
| public static final int TOP Index for top plane: | |
| Frustum | back to summary |
|---|---|
| public Frustum() Creates an undefined instance w/o calculating the frustum.
Use one of the | |
| classifyPoint | back to summary |
|---|---|
| public final Frustum. Check to see if a point is outside, inside or on a plane of the frustum. | |
| classifySphere | back to summary |
|---|---|
| public final Frustum. Check to see if a sphere is outside, intersecting or inside of the frustum. | |
| getPlanes | back to summary |
|---|---|
| public final Frustum.
| |
| isAABBoxOutside | back to summary |
|---|---|
| public final boolean isAABBoxOutside(final AABBox box) Check to see if an axis aligned bounding box is completely outside of the frustum. Note If method returns false, the box may only be partially inside. | |
| isOutsideImpl | back to summary |
|---|---|
| private static final boolean isOutsideImpl(final Frustum. | |
| isPointOutside | back to summary |
|---|---|
| public final boolean isPointOutside(final float[] p) Check to see if a point is outside of the frustum.
| |
| isSphereOutside | back to summary |
|---|---|
| public final boolean isSphereOutside(final float[] p, final float radius) Check to see if a sphere is outside of the frustum.
| |
| toString | back to summary |
|---|---|
| public StringBuilder toString(StringBuilder sb) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| updateByFovDesc | back to summary |
|---|---|
| public float[] updateByFovDesc(final float[] m, final int m_offset, final boolean initM, final Frustum. Calculate the frustum planes in world coordinates
using the passed Operation Details:
Frustum plane's normals will point to the inside of the viewing frustum, as required by this class.
| |
| updateByPlanes | back to summary |
|---|---|
| public final void updateByPlanes(final Frustum. Copy the given | |
| updateByPMV | back to summary |
|---|---|
| public void updateByPMV(final float[] pmv, final int pmv_off) Calculate the frustum planes in world coordinates using the passed float[16] as premultiplied P*MV (column major order). Frustum plane's normals will point to the inside of the viewing frustum, as required by this class. | |
| Modifier and Type | Field and Description |
|---|---|
| public final FovHVHalves | fovhv
Field of view in both directions, may not be centered, either |
| public final float | zFar
Far Z |
| public final float | zNear
Near Z |
| Access | Constructor and Description |
|---|---|
| public | FovDesc(final FovHVHalves
field of view in both directions, may not be centered, either fovhv, final float zNear, final float zFar)FovHVHalves#inTangents or radians
|
| Modifier and Type | Method and Description |
|---|---|
| public final String |
| fovhv | back to summary |
|---|---|
| public final FovHVHalves fovhv Field of view in both directions, may not be centered, either | |
| zFar | back to summary |
|---|---|
| public final float zFar Far Z | |
| zNear | back to summary |
|---|---|
| public final float zNear Near Z | |
| FovDesc | back to summary |
|---|---|
public FovDesc(final FovHVHalves fovhv, final float zNear, final float zFar) throws IllegalArgumentException
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Frustum. | |
| public static final Frustum. | |
| public static final Frustum. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Frustum. | |
| public static Frustum. |
| INSIDE | back to summary |
|---|---|
| public static final Frustum. | |
| INTERSECT | back to summary |
|---|---|
| public static final Frustum. | |
| OUTSIDE | back to summary |
|---|---|
| public static final Frustum. | |
| Location | back to summary |
|---|---|
| private Location() | |
| valueOf | back to summary |
|---|---|
| public static Frustum. | |
| values | back to summary |
|---|---|
| public static Frustum. | |
In order to work w/ isOutside(. methods,
the normals have to point to the inside of the frustum.
| Modifier and Type | Field and Description |
|---|---|
| public float | d
Distance to origin |
| public final float[] | n
Normal of the plane |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final float | distanceTo(final float x, final float y, final float z)
Return signed distance of plane to given point. |
| public final float | distanceTo(final float[] p)
Return distance of plane to given point, see |
| public String |
| d | back to summary |
|---|---|
| public float d Distance to origin | |
| n | back to summary |
|---|---|
| public final float[] n Normal of the plane | |
| Plane | back to summary |
|---|---|
| public Plane() | |
| distanceTo | back to summary |
|---|---|
| public final float distanceTo(final float x, final float y, final float z) Return signed distance of plane to given point.
Positive halfspace is where the plane’s normals vector points into. Negative halfspace is the other side of the plane, i.e. *-1 | |
| distanceTo | back to summary |
|---|---|
| public final float distanceTo(final float[] p) Return distance of plane to given point, see | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |