A 2d exact arithmetic point-in-triangle predicate.
Namespace:
ceometric.ComputationalGeometryAssembly: ceometric.ComputationalGeometry (in ceometric.ComputationalGeometry.dll) Version: 2.4.0.0 (2.4.0.0)
Syntax
C# |
---|
public static double InTriangle2dExact( Point vertex1, Point vertex2, Point vertex3, Point point ) |
Visual Basic (Declaration) |
---|
Public Shared Function InTriangle2dExact ( _ vertex1 As Point, _ vertex2 As Point, _ vertex3 As Point, _ point As Point _ ) As Double |
Visual C++ |
---|
public: static double InTriangle2dExact( Point^ vertex1, Point^ vertex2, Point^ vertex3, Point^ point ) |
Parameters
- vertex1
- Type: ceometric.VectorGeometry..::.Point
A vertex of a 2d triangle.
- vertex2
- Type: ceometric.VectorGeometry..::.Point
A vertex of a 2d triangle.
- vertex3
- Type: ceometric.VectorGeometry..::.Point
A vertex of a 2d triangle.
- point
- Type: ceometric.VectorGeometry..::.Point
A 2d point.
Return Value
For a counterclockwise arrangement of the vertices, the predicate is- positive if point lies inside the triangle.
- zero if point lies on the circumference of the triangle.
- negative if point lies outside the triangle.
Remarks
The vertices must be arranged in counterclockwise order, or the result of this predicate will be reversed.