#pragma once #include #include #include namespace J3ML::Geometry { using namespace J3ML::LinearAlgebra; // Represents a three-dimensional closed geometric solid defined by flat polygonal faces. class Polyhedron : public Shape { public: // Stores a list of indices of a single face of a Polygon struct Face { // Specifies the indices of the corner vertices of the polyhedron. // Indices point to the polyhedron vertex array. // The face vertices should all lie on the same plane. // The positive direction of the plane (the direction the face outwards normal points) // is the one where the vertices are wound in counter-clockwise order. std::vector v; // Reverses the winding order of this face. This has the effect of reversing the direction // the normal of this face points to. void FlipWindingOrder(); }; // Specifies the vertices of this polyhedron. std::vector v; protected: private: }; }