alecjacobson / computer-graphics-bounding-volume-hierarchy

Computer Graphics Assignment about Bounding Volume Hierarchies
123 stars 43 forks source link

ray_intersect_triangle_mesh_brute_force clarification #39

Open CalinArdelean opened 4 years ago

CalinArdelean commented 4 years ago

Does this mean V stores x, y, and z positions of every vertex? // V #V by 3 list of mesh vertex positions // F #F by 3 list of triangle indices into rows of V Does this mean F stores indices of vertices in V, with 3 vertices in a row for each face?

ericpko commented 4 years ago

It took me a while to figure out. It means each row of F contains three indices. Once you get these indices, then // F #F by 3 list of triangle indices into rows of V

abhimadan commented 4 years ago

Yes, you're both correct.

Alireza1997 commented 4 years ago

I found this to be a good explanation: https://en.wikipedia.org/wiki/Polygon_mesh#Face-vertex_meshes