Ray-triangle intersectioon (moved to discussion 5)
Möller Trumbone Algorithm
Ray-sphere intersection (skipped)
Ray intersection with implicit surfaces (skipped)
Half-edge data structure
🖍 Board work on half-edge data structure
See below for a minimal representation of the half-edge data structure. You may assume the winding are counter-clockwise for the half-edges.
structHalfedge {HalfedgeIter &next();
HalfedgeIter &twin();
VertexIter &vertex(); // At its baseEdgeIter &edge();
FaceIter &face();
};
structVertex {HalfedgeIter &halfedge(); // Any half-edge going out from this vertex
Vector3D position;
};
structEdge {HalfedgeIter &halfedge(); // Half-edge on either side
};
structFace {HalfedgeIter &halfedge(); // Half-edge along any edge
};