Results 1 to 10 of 14

Thread: Ray and convex polygon intersection

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Quote Originally Posted by phibermon View Post
    Are you working in 2D or 3D? your statement that models only include convex polygons is incorrect, at the highest order a triangle is convex in flat euclidean space but concave in curved space in comparison.
    I'm building new version of my 3D-modelling software. As far as polygons go, it uses GL_POLYGON for rendering. That often looks bugged with concave. Well, simply put i will never support concaves, nor should anyone. If i want to make a "+" sign (hospital mark), i will build the front face from 5 quads.

    I'm not ready to go for pixel color testing at this point, it would need much more work, and i wouldn't get intersection and normal data (i will need it). Also if i'd use ray-triangle for this, there would always be 1 or 2 unneeded test on the internal edges. So it's slower. The function is also counting intersection, normal and culling check with each triangle... So i'd still need to make unique ray-triangle algorithm for polygon only. I could also calculate the face normal once, and use that for all the edges crossproduct math together. All in all, it would be much more optimal to make a real ray-poly function.

    Quote Originally Posted by Carver413 View Post
    http://chiselapp.com/user/badsector/...y/rtworld/home
    look in the maths.pas there might be something useful
    That code went with the "easy way" for checking polygon as triangles.
    Last edited by User137; 21-01-2013 at 02:39 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •