And now after some work, I finally understand how the KDop bounding volume are created and how the collisions are intersected and I maked a working implementation of them. Now the problem is another. :D
How can I intersect (it has to be possible, or it would not make any sense) 2 K-Dop of different K values? (obviously we know beforehand which axis has been used to create those 2 K-Dop.)
Like how can i intersect a DOP6 (AABB) and a DOP14 (AABB + corners cut off)? Or a DOP14 (AABB + corners cut off) and a DOP26 (AABB + Corners cut off + Edges cut off)?
The simple method (between KDOP with the same K) is
public Boolean Intersects(kDOP a, kDOP b)
{
// TODO : How to do if the K is not the same?
for (int i = 0; i < a.K / 2; i++)
if ((a.Min[i] > b.Max[i]) || (a.Max[i] < b.Min[i]))
return false;
return true;
}
Another question is. How to do intersection between KDOP and say a Sphere? KDOP and a Capsule? KDOP and a OOB? KDOP and a AABB? (this should be easier if we know how to do with different K (as AABB is a DOP6 basically)) I mean what's the common way to do intersection between these simple structures?
Thanks a lot for the answers!!!
EDIT : From some search on the net it seems that the separation axis is the way to go, but I can't find any detailed information on how to implement it on the K-DOP. :P
EDIT 2 : Someone has a working implementation of a separation axis theorem over KDOP? :|