Package com.jme3.collision.bih
Class BIHNode
java.lang.Object
com.jme3.collision.bih.BIHNode
- All Implemented Interfaces:
Savable
Bounding Interval Hierarchy.
Based on:
Instant Ray Tracing: The Bounding Interval Hierarchy
By Carsten Wächter and Alexander Keller
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
float
final int
intersectBrute
(Ray r, Matrix4f worldMatrix, BIHTree tree, float sceneMin, float sceneMax, CollisionResults results) final int
intersectWhere
(Collidable col, BoundingBox box, Matrix4f worldMatrix, BIHTree tree, CollisionResults results) final 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)
-
Constructor Details
-
BIHNode
public BIHNode(int l, int r) -
BIHNode
public BIHNode(int axis) -
BIHNode
public BIHNode()
-
-
Method Details
-
getLeftChild
-
setLeftChild
-
getLeftPlane
public float getLeftPlane() -
setLeftPlane
public void setLeftPlane(float leftPlane) -
getRightChild
-
setRightChild
-
getRightPlane
public float getRightPlane() -
setRightPlane
public void setRightPlane(float rightPlane) -
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
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)
-