geirs2Panic
Richard J. Mathar
Fits header keyword batch editor
|
A triangle represented by the Cartesian coordinates of its three vertices. More...
#include <Tria2D.h>
Public Member Functions | |
Tria2D (const Point2D &pt1, const Point2D &pt2, const Point2D &pt3) | |
Tria2D () | |
Line2D | edge (int no) const |
double | area () const |
Circle2D | circumC () const |
vector< Tria2D > | chop (const Line2D &lin) const |
vector< Tria2D > | intersect (const Tria2D &oth) const |
Compute the common portion (intersection) between this and another triangle. More... | |
vector< Tria2D > | intersect (const Square2D &oth) const |
Compute the common area (intersection) between this and a square. More... | |
Public Attributes | |
Point2D | vert [3] |
The three points at the vertices. More... | |
A triangle represented by the Cartesian coordinates of its three vertices.
Create a planar triangle given its three vertices.
pt1 | The first vertex. |
pt2 | The second vertex. |
pt3 | The third vertex. |
Tria2D::Tria2D | ( | ) |
Create an empty triangle with three vertices all at the origin.
Line2D Tria2D::edge | ( | int | no | ) | const |
Create a line that connects vertex number 'no' with the next vertex along the edge.
no | The edge number in the range 0 to 2. |
double Tria2D::area | ( | ) | const |
Compute the area of the triangle.
Circle2D Tria2D::circumC | ( | ) | const |
Compute the circumcircle.
Compute the portion of this that is left from the infinite line lin.
lin | The line that cuts the 2D plane in half. |
Compute the common portion (intersection) between this and another triangle.
Compute the common area (intersection) between this and a square.
Point2D Tria2D::vert[3] |
The three points at the vertices.