Required to generate proper CSS classes and other class related IDs.
The UID of this drawable object.
An epsilon for comparison. This should be the same epsilon as in Vertex.
Get the rectangular bounds for this triangle.
Re-compute the circumcircle of this triangle (if the vertices have changed).
The circumcenter and radius are stored in this.center and this.radius. There is a third result: radius_squared (for internal computations).
void
Checks if the passed vertex (p) is inside this triangle.
Note: matrix determinants rock.
The vertex to check.
This function should invalidate any installed listeners and invalidate this object. After calling this function the object might not hold valid data any more and should not be used.
Get the determinant of this triangle.
Get the area of this triangle. The returned area is never negative.
If you are interested in the signed area, please consider using the
Triangle.utils.signedArea
helper function. This method just returns
the absolute value of the signed area.
The non-negative area of this triangle.
Get the centroid of this triangle.
The centroid is the average midpoint for each side.
The centroid
Get the circumcircle of this triangle.
The circumcircle is that unique circle on which all three vertices of this triangle are located on.
Please note that for performance reasons any changes to vertices will not reflect in changes of the circumcircle (center or radius). Please call the calcCirumcircle() function after triangle vertex changes.
Get the incenter of this triangle (which is the center of the circumcircle).
Note: due to performance reasonst the incenter is buffered inside the triangle because computing it is relatively expensive. If a, b or c have changed you should call the calcCircumcircle() function first, otherwise you might get wrong results.
Vertex The incenter of this triangle.
Get the incircle of this triangle. That is the circle that touches each side of this triangle in exactly one point.
Note this just calls getIncircularTriangle().getCircumcircle()
The incircle of this triangle.
Get that inner triangle which defines the maximal incircle.
The triangle of those points in this triangle that define the incircle.
Check if the passed vertex is inside this triangle's circumcircle.
The vertex to check.
Check if this triangle and the passed triangle share an adjacent edge.
For edge-checking Vertex.equals is used which uses an an epsilon for comparison.
The second triangle to check adjacency with.
Scale the triangle towards its centroid.
this (for chaining)
Convert this triangle to a polygon instance.
Plase note that this conversion does not perform a deep clone.
A new polygon representing this triangle.
Converts this triangle into a human-readable string.
Used by the containsPoint() function.
Generated using TypeDoc
A triangle class for triangulations.
The class was written for a Delaunay trinagulation demo so it might contain some strange and unexpected functions.
Bounds
Circle
Line
Vertex
Polygon
SVGSerializale
UID
UIDGenerator
geomutils