Note that there are some explanatory texts on larger screens.

plurals
  1. PODrawing Collision on Screen
    text
    copied!<p>And here we are for another question.</p> <p>After the previous one, i finally completed the kDop system and everything related. (Hierarchycal tree of kDop, etc..) Everything works fine.</p> <p>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)</p> <p>For the AABB/Sphere no problem, its pretty much easy to create. The problem is with the kDOP...</p> <p>I have :</p> <p>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.</p> <p>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)</p> <p>Thanks a lot for the answers!!!</p> <p>EDIT : I can calculate EASILY the normals of the mesh cause I already have the axis. The problem is calculating the vertex position...</p> <p>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 :</p> <pre><code> real Kdop::getDistanceOfPlaneToOrigin(int k) const { if (k &lt; 0 || k &gt;= mK) { return 0.0f; } if (k &gt;= mK/2) { return (real) (mDistances[k] * -1.0); } return mDistances[k]; } </code></pre> <p>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....</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload