public final class Visibility
extends java.lang.Object
| Constructor and Description |
|---|
Visibility() |
| Modifier and Type | Method and Description |
|---|---|
CullTest |
cull(ICullable cullable) |
void |
cull(ICullableNode rootNode)
Visible nodes outside the frustum are marked as culled.
|
float |
distanceToView(IBoundable boundable,
boolean minDistance) |
Frustum |
getFrustum() |
int |
getFrustumCullingMaxDepth() |
int |
getNodeInsideFrustum()
Valid after calling
cull(ICullableNode) |
int |
getNodesCulled()
Valid after calling
cull(ICullableNode) |
int |
getNodesInvisible()
Valid after calling
cull(ICullableNode) |
boolean |
getUndefinedVolumeInsideFrustum() |
int |
lodLevel(ILod lod) |
void |
setFrustumCullingMaxDepth(int maxDepth) |
void |
setUndefinedVolumeInsideFrustum(boolean nullVolumeInsideFrustum) |
<T extends IBoundable> |
sort(Array<T> dst,
Array<T> src,
boolean frontToBack) |
<T extends IBoundable> |
sort(T[] srcAndDst,
boolean frontToBack) |
<T extends ILod> |
sortAndLodLevel(Array<T> dst,
Array<T> src,
boolean frontToBack) |
<T extends ILod> |
sortAndLodLevel(T[] srcAndDst,
boolean frontToBack) |
void |
update(Frustum frustum)
Update the view from a
Frustum |
void |
update(ICamera view,
Mat4x4 projection)
Deprecated.
|
public final Frustum getFrustum()
Frustum of this Visibilityupdate(Frustum)public final void update(Frustum frustum)
Frustumfrustum - update(ICamera, Mat4x4)@Deprecated public final void update(ICamera view, Mat4x4 projection)
ICameraview - update(Frustum)public final void setFrustumCullingMaxDepth(int maxDepth)
maxDepth - maximum depthgetFrustumCullingMaxDepth()public final int getFrustumCullingMaxDepth()
public void setUndefinedVolumeInsideFrustum(boolean nullVolumeInsideFrustum)
public boolean getUndefinedVolumeInsideFrustum()
public final int getNodeInsideFrustum()
cull(ICullableNode)Frustumpublic final int getNodesCulled()
cull(ICullableNode)Frustum, ie culledpublic final int getNodesInvisible()
cull(ICullableNode)FrustumICullable.isVisible()public final void cull(ICullableNode rootNode)
public final <T extends IBoundable> void sort(Array<T> dst, Array<T> src, boolean frontToBack)
dst - destination list to store sorted objects, can be srcsrc - source list IBoundable of objects to sortfrontToBack - true: front to back sorting (best for opaque / alpha test), false: back to front sorting (best for transparent)public final <T extends IBoundable> void sort(T[] srcAndDst, boolean frontToBack)
public final <T extends ILod> void sortAndLodLevel(Array<T> dst, Array<T> src, boolean frontToBack)
dst - destination list to store sorted objects, can be srcsrc - source list ILod of objects to sort and update lod levelfrontToBack - true: front to back sorting (best for opaque / alpha test), false: back to front sorting (best for transparent)public final <T extends ILod> void sortAndLodLevel(T[] srcAndDst, boolean frontToBack)
public final int lodLevel(ILod lod)
lod - ILod object to update lod level based onupdate(Frustum),
update(ICamera, Mat4x4)public final float distanceToView(IBoundable boundable, boolean minDistance)
boundable - an IBoundable objectsminDistance - true: min distanceBonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com