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.
That code went with the "easy way" for checking polygon as triangles.
Bookmarks