#include <TriangleSet.h>
Public Member Functions | |
| void | add (Triangle *triangle) |
| Add copy of triangle to container. | |
| void | add (TriangleSet *tset) |
| Add copy of triangles to container. | |
| size_t | count () |
| Return current count of triangle stored in container. | |
| Triangle & | operator[] (unsigned index) |
| Access triangle using its index. | |
Static Public Member Functions | |
| static float | distance (Vertex a, Vertex b) |
| Compute distance of two vertexes. | |
| static Vertex | centre (Vertex a, Vertex b) |
| Compute center of two vertexes. | |
| template<int QUALITY> | |
| static float | size (Triangle *triangle) |
| Compute triangle size. | |
| static TriangleSet * | divide (Triangle *triangle) |
| Divide triangle to 4 triangles, each with 1/4 area. | |
There are also static methods to deal with Triangle object and its components to leave Triangle structure as POD.
Definition at line 25 of file TriangleSet.h.
| void TriangleSet::add | ( | Triangle * | triangle | ) |
Add copy of triangle to container.
| triangle | Pointer to triangle to copy to container. |
| void TriangleSet::add | ( | TriangleSet * | tset | ) |
Add copy of triangles to container.
| tset | Pointer to TriangleSet containing source triangles. |
| size_t TriangleSet::count | ( | ) |
Return current count of triangle stored in container.
| Triangle& TriangleSet::operator[] | ( | unsigned | index | ) |
Access triangle using its index.
| index | Index of triangle - must be in range <0, count()-1>. |
| float TriangleSet::size< 1 > | ( | Triangle * | triangle | ) | [inline, static] |
Compute triangle size.
Template parameter QUALITY Switch algorithm to express triangle size (0 - girth, 1 - area). There are two way to express triangle size - girth and area. The 1st is faster, the 2nd is realistic.
| triangle | Triangle to compute. |
| static TriangleSet* TriangleSet::divide | ( | Triangle * | triangle | ) | [static] |
Divide triangle to 4 triangles, each with 1/4 area.
| triangle | Pointer to triangle to divide. |
1.5.2