Template Struct TriangleStrip
Defined in File vertex.h
Struct Documentation
-
template<std::size_t TriangleCount>
struct TriangleStrip Adjacent faces share two vertices; the face winding alternates along the strip.
Public Functions
-
inline constexpr TriangleStrip(const Triangle &first, const std::array<Vertex2D, TriangleCount - 1> &remaining)
Copy the first face and one additional vertex per subsequent strip face.
See also
- Template Parameters:
TriangleCount – Positive compile-time face count.
- Parameters:
first – Initial counterclockwise triangle.
remaining – Subsequent strip vertices in order; no geometry/winding validation occurs.
-
inline constexpr Triangle triangle(const std::size_t index) const
Declaration:
[[nodiscard]]Copy one face while correcting alternating strip winding.
See also
- Parameters:
index – Zero-based face below TriangleCount.
- Throws:
std::out_of_range – For an index outside the strip.
- Returns:
Counterclockwise face when the input strip follows its declared winding.
Public Members
-
std::array<Vertex2D, TriangleCount + 2> vertices
Owned strip order; the first three define the initial face.
-
inline constexpr TriangleStrip(const Triangle &first, const std::array<Vertex2D, TriangleCount - 1> &remaining)