My Project
|
Adaptive exact arithmetic geometric predicates. More...
Public Member Functions | |
float | CounterClockwise (Point pa, Point pb, Point pc) |
Check, if the three points appear in counterclockwise order. The result is also a rough approximation of twice the signed area of the triangle defined by the three points. | |
float | InCircle (Point pa, Point pb, Point pc, Point pd) |
Check if the point pd lies inside the circle passing through pa, pb, and pc. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed. | |
float | NonRegular (Point pa, Point pb, Point pc, Point pd) |
Return a positive value if the point pd is incompatible with the circle or plane passing through pa, pb, and pc (meaning that pd is inside the circle or below the plane); a negative value if it is compatible; and zero if the four points are cocircular/coplanar. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed. | |
Point | FindCircumcenter (Point org, Point dest, Point apex, ref float xi, ref float eta, float offconstant) |
Find the circumcenter of a triangle. | |
Point | FindCircumcenter (Point org, Point dest, Point apex, ref float xi, ref float eta) |
Find the circumcenter of a triangle. | |
float | CounterClockwise (Point a, Point b, Point c) |
float | InCircle (Point a, Point b, Point c, Point p) |
Point | FindCircumcenter (Point org, Point dest, Point apex, ref float xi, ref float eta) |
Point | FindCircumcenter (Point org, Point dest, Point apex, ref float xi, ref float eta, float offconstant) |
Properties | |
static RobustPredicates | Default [get] |
Gets the default configuration instance. | |
Adaptive exact arithmetic geometric predicates.
The adaptive exact arithmetic geometric predicates implemented herein are described in detail in the paper "Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates." by Jonathan Richard Shewchuk, see http://www.cs.cmu.edu/~quake/robust.html
The macros of the original C code were automatically expanded using the Visual Studio command prompt with the command "CL /P /C EXACT.C", see http://msdn.microsoft.com/en-us/library/8z9z0bx6.aspx
Check, if the three points appear in counterclockwise order. The result is also a rough approximation of twice the signed area of the triangle defined by the three points.
pa | Point a. |
pb | Point b. |
pc | Point c. |
Implements TriangleNet.IPredicates.
|
inline |
Find the circumcenter of a triangle.
org | Triangle point. |
dest | Triangle point. |
apex | Triangle point. |
xi | Relative coordinate of new location. |
eta | Relative coordinate of new location. |
The result is returned both in terms of x-y coordinates and xi-eta (barycentric) coordinates. The xi-eta coordinate system is defined in terms of the triangle: the origin of the triangle is the origin of the coordinate system; the destination of the triangle is one unit along the xi axis; and the apex of the triangle is one unit along the eta axis. This procedure also returns the square of the length of the triangle's shortest edge.
Implements TriangleNet.IPredicates.
|
inline |
Find the circumcenter of a triangle.
org | Triangle point. |
dest | Triangle point. |
apex | Triangle point. |
xi | Relative coordinate of new location. |
eta | Relative coordinate of new location. |
offconstant | Off-center constant. |
Implements TriangleNet.IPredicates.
Check if the point pd lies inside the circle passing through pa, pb, and pc. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed.
pa | Point a. |
pb | Point b. |
pc | Point c. |
pd | Point d. |
Implements TriangleNet.IPredicates.
Return a positive value if the point pd is incompatible with the circle or plane passing through pa, pb, and pc (meaning that pd is inside the circle or below the plane); a negative value if it is compatible; and zero if the four points are cocircular/coplanar. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed.
pa | Point a. |
pb | Point b. |
pc | Point c. |
pd | Point d. |