com.jme3.collision.bih
Class BIHNode

java.lang.Object
  extended by com.jme3.collision.bih.BIHNode
All Implemented Interfaces:
Savable

public final class BIHNode
extends java.lang.Object
implements Savable

Bounding Interval Hierarchy. Based on: Instant Ray Tracing: The Bounding Interval Hierarchy By Carsten Wächter and Alexander Keller


Nested Class Summary
static class BIHNode.BIHStackData
           
 
Constructor Summary
BIHNode()
           
BIHNode(int axis)
           
BIHNode(int l, int r)
           
 
Method Summary
 BIHNode getLeftChild()
           
 float getLeftPlane()
           
 BIHNode getRightChild()
           
 float getRightPlane()
           
 int intersectBrute(Ray r, Matrix4f worldMatrix, BIHTree tree, float sceneMin, float sceneMax, CollisionResults results)
           
 int intersectWhere(Collidable col, BoundingBox box, Matrix4f worldMatrix, BIHTree tree, CollisionResults results)
           
 int intersectWhere(Ray r, Matrix4f worldMatrix, BIHTree tree, float sceneMin, float sceneMax, CollisionResults results)
           
 void read(JmeImporter im)
           
 void setLeftChild(BIHNode left)
           
 void setLeftPlane(float leftPlane)
           
 void setRightChild(BIHNode right)
           
 void setRightPlane(float rightPlane)
           
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BIHNode

public BIHNode(int l,
               int r)

BIHNode

public BIHNode(int axis)

BIHNode

public BIHNode()
Method Detail

getLeftChild

public BIHNode getLeftChild()

setLeftChild

public void setLeftChild(BIHNode left)

getLeftPlane

public float getLeftPlane()

setLeftPlane

public void setLeftPlane(float leftPlane)

getRightChild

public BIHNode getRightChild()

setRightChild

public void setRightChild(BIHNode right)

getRightPlane

public float getRightPlane()

setRightPlane

public void setRightPlane(float rightPlane)

write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

intersectWhere

public final int intersectWhere(Collidable col,
                                BoundingBox box,
                                Matrix4f worldMatrix,
                                BIHTree tree,
                                CollisionResults results)

intersectBrute

public final int intersectBrute(Ray r,
                                Matrix4f worldMatrix,
                                BIHTree tree,
                                float sceneMin,
                                float sceneMax,
                                CollisionResults results)

intersectWhere

public final int intersectWhere(Ray r,
                                Matrix4f worldMatrix,
                                BIHTree tree,
                                float sceneMin,
                                float sceneMax,
                                CollisionResults results)