pumpkin wrote:

I need behavior what is triggered if 2 of the same kind hit eachother. So a
shape from BranchGroup 1 + a shape from branchgroup 2 => no collision, no
behavior triggered. Two from group X => collision, behavior triggered.

Ah... what you are seeking is not a picking system at all, but the n-body collision detection. This is, mathematically speaking, quite a frightening subject to deal with. A trivial implementation is O(n^2) computation. If you start making approximations and some assumption about object shapes, you can get this down to almost linear, depending on the algorithm and degree of precision needed.

I got about 90% of the way through an implementation of Kelvin Chung's
HS-Jump/Q-Collide algorithms late last year but never got them finished.
 I believe I put the code into the j3d.org repository, but not definite
on that. These work with non-convex object shapes and are reasonably
efficient depending on your object shape (HS_Jump is more efficient for
long, thin cylinders, Q-Collide for spherical). If you have non-convex
objects then  there are several different options out there to play
with, but they are non-trivial to implement.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Look through the lens, and the light breaks down into many lights.
 Turn it or move it, and a new set of arrangements appears... is it
 a single light or many lights, lights that one must know how to
 distinguish, recognise and appreciate? Is it one light with many
 frames or one frame for many lights?"      -Subcomandante Marcos
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to