Octree implementation

Hello!

I'm a new jme user, and this is my first (of many, i hope) contribution to this awesome middleware.

That's why I believe that the code still might have some optmization to do, if anyone care to do it would be nice.



In the .zip linked above you will find:

Octree.java

  • The implementation, uses TriangleBatches as triangle data source



    DebugOctree.java
  • An extended Octree that implements some debugging helpers



    OctreeDebugger.java
  • Singleton class to store and manage the debugger helpers



    OctreeIntersectionTest.java
  • A test based on TestCollisionTree demonstration. Show’s how to use the Octree.



    Here is the link:

    http://www.goraieb.com.br/jme/octree-source.zip



    I hope this contribution to be the starting point for lot’s of new stuff based on the octree structure, like culling, collision detection and more…



    If someone give me an code to calculate Frustrum intersection with bounding box it would be very easy to add a Frustrum intersection to the Octree. I’m tired and lazy to search for this right now.  :roll:



    Waiting for some feedback,

    Thanks!



    Lucas.

Looks good… looking forward to seeing more uses of this code :slight_smile:

Seems interesting. Good work. I look forward to looking at it with more detail.

What class use for substitute this classe Triangle Batch for the Jme 2.0 ?

Thanks.