This is the documentation for Enlighten.
class Enlighten Triangle2D
class Enlighten::Triangle2D
A triangle in 2D defined by three points.
Variables
Functions
Name | Description |
|---|---|
Computes the unsigned area of the triangle. | |
Computes the unsigned area of the triangle multiplied by two. | |
Computes the barycentric coordinates for a point and this triangle. | |
Computes the barycentric weights for a point and this triangle. | |
Tests if a point is truly inside the triangle, which excludes the edges of the triangle. | |
Tests if a point is inside the triangle incorporating a certain tolerance, which also excludes the edges defined by the triangle and this tolerance. | |
Tests if a point is inside the triangle including the edges of the triangle. This does not handle 0 area triangles. | |
Computes the point on the triangle's edges that is closest to a given point. | |
Tests if a point is inside the triangle including the edges of the triangle. Handles 0 area triangles. | |
Componentwise scaling of the triangle. | |
Default constructor initialising the triangle to a point at (0,0). | |
Triangle2D(const Vertex2D &, const Vertex2D &, const Vertex2D &) | Constructor defining the three vertices of the triangle. |
Tests if the triangle is valid which means that all vertices are finite. |
double Enlighten::Triangle2D::Area
public: double Area() const
Computes the unsigned area of the triangle.
double Enlighten::Triangle2D::AreaTimesTwo
public: double AreaTimesTwo() const
Computes the unsigned area of the triangle multiplied by two.
BaryCoords Enlighten::Triangle2D::GetBarycentricCoordinates
public: BaryCoords GetBarycentricCoordinates
(
const Vertex2D & p
) const
Computes the barycentric coordinates for a point and this triangle.