My Project
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
TriangleNet.RobustPredicates Class Reference

Adaptive exact arithmetic geometric predicates. More...

Inheritance diagram for TriangleNet.RobustPredicates:
TriangleNet.IPredicates

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.
 

Detailed Description

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

Member Function Documentation

◆ CounterClockwise()

float TriangleNet.RobustPredicates.CounterClockwise ( Point  pa,
Point  pb,
Point  pc 
)
inline

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.

Parameters
paPoint a.
pbPoint b.
pcPoint c.
Returns
Return a positive value if the points pa, pb, and pc occur in counterclockwise order; a negative value if they occur in clockwise order; and zero if they are collinear.

Implements TriangleNet.IPredicates.

◆ FindCircumcenter() [1/2]

Point TriangleNet.RobustPredicates.FindCircumcenter ( Point  org,
Point  dest,
Point  apex,
ref float  xi,
ref float  eta 
)
inline

Find the circumcenter of a triangle.

Parameters
orgTriangle point.
destTriangle point.
apexTriangle point.
xiRelative coordinate of new location.
etaRelative coordinate of new location.
Returns
Coordinates of the circumcenter

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.

◆ FindCircumcenter() [2/2]

Point TriangleNet.RobustPredicates.FindCircumcenter ( Point  org,
Point  dest,
Point  apex,
ref float  xi,
ref float  eta,
float  offconstant 
)
inline

Find the circumcenter of a triangle.

Parameters
orgTriangle point.
destTriangle point.
apexTriangle point.
xiRelative coordinate of new location.
etaRelative coordinate of new location.
offconstantOff-center constant.
Returns
Coordinates of the circumcenter (or off-center)

Implements TriangleNet.IPredicates.

◆ InCircle()

float TriangleNet.RobustPredicates.InCircle ( Point  pa,
Point  pb,
Point  pc,
Point  pd 
)
inline

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.

Parameters
paPoint a.
pbPoint b.
pcPoint c.
pdPoint d.
Returns
Return a positive value if the point pd lies inside the circle passing through pa, pb, and pc; a negative value if it lies outside; and zero if the four points are cocircular.

Implements TriangleNet.IPredicates.

◆ NonRegular()

float TriangleNet.RobustPredicates.NonRegular ( Point  pa,
Point  pb,
Point  pc,
Point  pd 
)
inline

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.

Parameters
paPoint a.
pbPoint b.
pcPoint c.
pdPoint d.
Returns
Return a positive value if the point pd lies inside the circle passing through pa, pb, and pc; a negative value if it lies outside; and zero if the four points are cocircular.

The documentation for this class was generated from the following file: