And here we are for another question.
After the previous one, i finally completed the kDop system and everything related. (Hierarchycal tree of kDop, etc..) Everything works fine.
Now i want to draw on screen the collision for debug purpose and to see the result of the work. (To see if the hierarchical choice i've done in a particular mode is fine or not)
For the AABB/Sphere no problem, its pretty much easy to create. The problem is with the kDOP...
I have :
axises (1,0,0)(0,1,0)(0,0,1)(1,1,1)(-1,1,1)(1,-1,1)(1,1,-1)(1,1,0)(1,0,1),(0,1,1),(1,-1,0),(1,0,-1),(0,1,-1) and the Min/Max values calculated using the axes.
How can i create a series of polygon (a simple mesh in fact) with these data? (I don't care about implementation, i just want to understand it theorically so I can implement it)
Thanks a lot for the answers!!!
EDIT : I can calculate EASILY the normals of the mesh cause I already have the axis. The problem is calculating the vertex position...
EDIT 2: I found on the net this code that seems to be useful (or at least in the doc it says its for creating a debug mesh), but I don't know how to use it to find the vertex position :
real Kdop::getDistanceOfPlaneToOrigin(int k) const {
if (k < 0 || k >= mK) {
return 0.0f;
}
if (k >= mK/2) {
return (real) (mDistances[k] * -1.0);
}
return mDistances[k];
}
EDIT 3: I thought and having normals and a point (the origin, that i'm sure the plane pass over), i can build all the planes related to the operation... Now I need something more....