BoundingVolume.intersects(Vector3f)

Is there no function to check whether a point is inside a BoundingVolume?



I would like to check collisions for particles and I don't really want to create a BoundingVolume for each particle.It should be fast and I don't care about the accuracy regarding the size of the particle. A check for a simple Vector3f would be sufficient.

Yeah, it's pretty amazing we don't have such a method right now.

What about that:



Index: BoundingBox.java
===================================================================
RCS file: /cvs/jme/src/com/jme/bounding/BoundingBox.java,v
retrieving revision 1.47
diff -u -r1.47 BoundingBox.java
--- BoundingBox.java   1 Sep 2006 22:30:39 -0000   1.47
+++ BoundingBox.java   11 Nov 2006 20:20:44 -0000
@@ -513,6 +513,17 @@

I like, but let's call the method "contains" since we are checking to see if the bounds contain a point really.  Also, this looks like a good thing to write a unit test for.

Could someone check the member in OrientedBoundingBox? I don't use it and I'm not sure it's correct (mostly copied from the other intersects functions).

contains method has been comitted to cvs.  I've also redone the OrientedBoundingBox version to something akin to a method done by eberly.