Discussion 4

Bullets


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.

struct Halfedge {
    HalfedgeIter &next();
    HalfedgeIter &twin();
    VertexIter &vertex(); // At its base
    EdgeIter &edge();
    FaceIter &face();
};

struct Vertex {
    HalfedgeIter &halfedge(); // Any half-edge going out from this vertex
    Vector3D position;
};

struct Edge {
    HalfedgeIter &halfedge(); // Half-edge on either side
};

struct Face {
    HalfedgeIter &halfedge(); // Half-edge along any edge
};

Ray tracing

🖍 Board work on ray intersection math

Board work at the end of section