Triangle
Generated from engine/math/triangle.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/math/triangle.h" · namespace mattmath
struct Triangle
Section titled “struct Triangle”points
Section titled “points”Triangle
Section titled “Triangle”Triangle(const Triangle&) = default; const mattmath::Vector2F& point1, const mattmath::Vector2F& point2);Triangle(float x0, float y0, float x1, float y1, float x2, float y2);bounding_box · shape_type · offset · inflate
Section titled “bounding_box · shape_type · offset · inflate”void inflate(float amount) override;point_0 · point_1 · point_2
Section titled “point_0 · point_1 · point_2”const Vector2F& point_1() const;const Vector2F& point_2() const;edge_0 · edge_1 · edge_2 · edges
Section titled “edge_0 · edge_1 · edge_2 · edges”Segment edge_1() const;Segment edge_2() const;std::array<Segment, 3> edges() const;angle_0 · angle_1 · angle_2
Section titled “angle_0 · angle_1 · angle_2”float angle_0() const;float angle_1() const;float angle_2() const;operator== · operator!=
Section titled “operator== · operator!=”bool operator!=(const Triangle& other) const;center
Section titled “center”calculate_gradient
Section titled “calculate_gradient”float calculate_gradient(int edge) const;struct TriangleRightAxisAligned
Section titled “struct TriangleRightAxisAligned”TriangleRightAxisAligned
Section titled “TriangleRightAxisAligned”TriangleRightAxisAligned(const TriangleRightAxisAligned&) = default; const mattmath::Vector2F& left, const mattmath::Vector2F& right);TriangleRightAxisAligned(float x0, float y0, float x1, float y1, float x2, float y2);hypotenuse · hypotenuse_gradient
Section titled “hypotenuse · hypotenuse_gradient”float hypotenuse_gradient() const;Related types
Section titled “Related types”Named in the public declarations above: RectangleF, Segment, Shape, ShapeType, Vector2F.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
tests/collision/narrow_phase_tests.cpptests/math/ericson_math_tests.cpp,inflate_tests.cpp,rectanglef_tests.cpp,shape_intersect_tests.cpp,shape_tests.cpp,triangle_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.