-
首页
-
C4D R23.110 C++ SDK
ExactPredicates2DInterface Class Reference
#include <exactpredicates2d.h>
详细描述
2D exact geometrical predicates. Based on Shewchuk's adaptive exact predicates.
静态公共成员函数
|
static
MAXON_METHOD
Float
|
Orient
(const
Vector2d
&pointA, const
Vector2d
&pointB, const
Vector2d
&pointC)
|
static
MAXON_METHOD
Float
|
InCircle
(const
Vector2d
&pointA, const
Vector2d
&pointB, const
Vector2d
&pointC, const
Vector2d
&testPoint)
|
static
MAXON_METHOD
Result
<
Float
>
|
InTriangle
(const
Vector2d
&pointA, const
Vector2d
&pointB, const
Vector2d
&pointC, const
Vector2d
&testPoint)
|
static
MAXON_METHOD
Result
<
Float
>
|
InSector
(const
Vector2d
¢er, const
Vector2d
&rayA, const
Vector2d
&rayB, const
Vector2d
&testPoint)
|
static
MAXON_METHOD
Result
<
Bool
>
|
OutlineSelfIntersectionTest
(const
Block
< const
Vector2d
> &outline)
|
static
MAXON_METHOD
Result
<
Bool
>
|
OutlinesIntersectionTest
(const
Block
< const
Vector2d
> &outline1, const
Block
< const
Vector2d
> &outline2)
|
static
MAXON_METHOD
Result
<
Bool
>
|
OutlinesIntersectionTest
(const
Block
< const
Block
< const
Vector2d
>> &outlines)
|
成员函数文档编制
◆
MAXON_INTERFACE_NONVIRTUAL()
◆
Orient()
Gets orientation of three points.
-
参数
-
[in]
|
pointA
|
First point.
|
[in]
|
pointB
|
Second point.
|
[in]
|
pointC
|
Third point.
|
-
返回
-
Positive (negative) value if orientation is counter-clockwise (clockwise), zero otherwise.
◆
InCircle()
Tests if a point is inside the circumscribed circle of a triangle defined by three points.
-
参数
-
[in]
|
pointA
|
First point.
|
[in]
|
pointB
|
Second point.
|
[in]
|
pointC
|
Third point.
|
[in]
|
testPoint
|
Test point.
|
-
返回
-
Positive (negative) value if the point is inside (outside) the circle, zero if it is on the circle.
◆
InTriangle()
Tests if a point is inside a triangle defined by three points.
-
参数
-
[in]
|
pointA
|
First point.
|
[in]
|
pointB
|
Second point.
|
[in]
|
pointC
|
Third point.
|
[in]
|
testPoint
|
Test point.
|
-
Precondition
-
Three triangle points shall differ.
-
返回
-
Positive (negative) value if the point is inside (outside) the triangle, zero if it is on the triangle boundary.
◆
InSector()
Checks if the test point lies inside a space sector.
Check if the test point lies inside the space sector defined by a center point and two rays (ccw order).
-
参数
-
[in]
|
center
|
Sector center.
|
[in]
|
rayA
|
Sector first ray.
|
[in]
|
rayB
|
Sector second ray (ccw w.r.t the above parameters).
|
[in]
|
testPoint
|
Test Point.
|
-
Precondition
-
Center and ray points shall differ.
-
Sector angle shall be less than 180 degree (not reflex).
-
返回
-
Positive/zero/negative if the test point @testPoint is in/on/outside the sector respectively.
◆
OutlineSelfIntersectionTest()
Tests if a closed outline is self-intersected or have duplicated points.
-
参数
-
[in]
|
outline
|
Input outline.
|
-
返回
-
Outlines is self-intersected.
◆
OutlinesIntersectionTest()
[1/2]
Tests if two closed outlines intersect or either polyline is self-intersected.
Tests if two closed outlines intersect in at least one point or at least one of them is self-intersected or have duplicated points.
-
Precondition
-
Each outline has at least 3 points.
-
参数
-
[in]
|
outline1
|
First outline.
|
[in]
|
outline2
|
Second outline.
|
-
返回
-
Outlines intersect.
◆
OutlinesIntersectionTest()
[2/2]
Tests if a set of closed outlines intersect or if either polyline is self-intersected.
Tests if a set of closed outlines intersect in at least one point or at least one of them is self-intersected or has duplicated points.
-
Precondition
-
Each outline has at least 3 points.
-
参数
-
[in]
|
outlines
|
Input outlines.
|
-
返回
-
Outlines intersect.