crla / slimmath

Automatically exported from code.google.com/p/slimmath
0 stars 0 forks source link

We need a GJK implementation #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
We need someone who has knowledge on the GJK algorithm to make an 
implementation of it in SlimMath. This will be very useful in the 
BoundingFrustum class and for several other collision facilities. Even a naive 
implementation would be great to at least start with.

Original issue reported on code.google.com by Jorgy...@gmail.com on 19 Feb 2011 at 4:31

GoogleCodeExporter commented 8 years ago
Feel free to use this if it helps.

Original comment by Frassle on 20 Feb 2011 at 12:19

Attachments:

GoogleCodeExporter commented 8 years ago
Wow Frassle... that really is quite amazing to have a complete solution to a 
rather specific request. Did you write that all your self? (I'm asking because 
I'm both impressed and I need to know of any potential copy-write/licensing 
issues.) I was sitting here trying to learn the GJK algorithm and even starting 
a simple implementation but that didn't get too far so this is very helpful! 
I'm assuming it works so I'm going to begin integrating this right in. Though I 
should ask, did you put that in a version of SlimMath your using? I would 
prefer to keep breaking changes to a minimum if you are actually using SlimMath 
for a project.

Original comment by Jorgy...@gmail.com on 20 Feb 2011 at 4:54

GoogleCodeExporter commented 8 years ago

Original comment by Jorgy...@gmail.com on 20 Feb 2011 at 4:54

GoogleCodeExporter commented 8 years ago
Wrote it all myself, learnt it from a mix of the papers, browsing and a 
video(http://www.mollyrocket.com/849).
The code was actully implemented in my own maths library using double 
precision, but it follows a similar design to SlimMath so took just a few 
minutes to change type and method names.

Original comment by Frassle on 21 Feb 2011 at 5:06

GoogleCodeExporter commented 8 years ago
Ahh I was using that video my self actually. But thanks a lot! Really helps me 
out a ton.

Original comment by Jorgy...@gmail.com on 21 Feb 2011 at 6:28

GoogleCodeExporter commented 8 years ago
Your code for intersection using GJK works perfectly! However, now I am in need 
to also get the closest distance between two objects and the closest point on 
each object. I'm not sure if you'll be able to help here but I'm hoping you 
can. So far I have a few references but I haven't been able to get anything 
that actually appears to work.

Main reference: http://www.codezealot.org/archives/153

Original comment by Jorgy...@gmail.com on 26 Feb 2011 at 10:01

GoogleCodeExporter commented 8 years ago
Unfortuantly I didn't move onto those in my code base, so I've got nothing to 
share immediately. I'll have a look to see if I can get anything working, as 
I'm sure it would be useful to have these myself sometime.

Original comment by Frassle on 27 Feb 2011 at 6:54

GoogleCodeExporter commented 8 years ago
I have a distance method working perfectly now. The code will be included in 
r43. I did not use the reference I posted. That way might be more optimal (to 
some degree) but I was not able to get that way to work. Instead I used this 
paper:

http://www.win.tue.nl/~gino/solid/jgt98convex.pdf

So as of right now, I have something that at least works. I/we can optimize it 
later.

Original comment by Jorgy...@gmail.com on 28 Feb 2011 at 11:47