de.grogra.gpuflux.scene.BVH
Class BVHTree
java.lang.Object
de.grogra.gpuflux.scene.BVH.BVHTree
public class BVHTree
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_DEPTH
public static final int MAX_DEPTH
- See Also:
- Constant Field Values
TAABB
public static final float TAABB
- See Also:
- Constant Field Values
TPRIM
public static final double TPRIM
- See Also:
- Constant Field Values
BVHTree
public BVHTree(BVHNode root,
BoundingBox3d bbox,
java.lang.Integer[] primOrder)
computeSAH
public double computeSAH()
getBounds
public BoundingBox3d getBounds()
getRoot
public BVHNode getRoot()
getRootIdx
public int getRootIdx()
getSAH
public static double getSAH(double area,
double leftArea,
double rightArea,
int leftPrims,
int rightPrims)
getVolumeOrdering
public java.lang.Integer[] getVolumeOrdering()
prune
public void prune()
serializeBIH
public void serializeBIH(ComputeByteBuffer computeByteBuffer,
int primitiveIdxOffset)
throws java.io.IOException
- Throws:
java.io.IOException
serializeBVH
public void serializeBVH(ComputeByteBuffer computeByteBuffer,
int primitiveIdxOffset)
throws java.io.IOException
- Throws:
java.io.IOException