InternalClipper
Internal utility functions for Clipper operations.
Static Members
maxInt64: ClipperInt64minInt64: ClipperInt64maxCoord: ClipperInt64invalid64: ClipperInt64maxCoordFloat: FloatminCoordFloat: FloatfloatingPointTolerance: FloatdefaultMinimumEdgeLength: FloattoFloat(v: ClipperInt64): Float| Name | Type |
|---|---|
v |
ClipperInt64 |
| Returns |
|---|
| Float |
abs64(v: ClipperInt64): ClipperInt64| Name | Type |
|---|---|
v |
ClipperInt64 |
| Returns |
|---|
| ClipperInt64 |
roundToInt64(value: Float): ClipperInt64| Name | Type |
|---|---|
value |
Float |
| Returns |
|---|
| ClipperInt64 |
roundToEvenInt64(value: Float): ClipperInt64| Name | Type |
|---|---|
value |
Float |
| Returns |
|---|
| ClipperInt64 |
triSign(x: ClipperInt64): Int| Name | Type |
|---|---|
x |
ClipperInt64 |
| Returns |
|---|
| Int |
min64(a: ClipperInt64, b: ClipperInt64): ClipperInt64| Name | Type |
|---|---|
a |
ClipperInt64 |
b |
ClipperInt64 |
| Returns |
|---|
| ClipperInt64 |
max64(a: ClipperInt64, b: ClipperInt64): ClipperInt64| Name | Type |
|---|---|
a |
ClipperInt64 |
b |
ClipperInt64 |
| Returns |
|---|
| ClipperInt64 |
Check precision is within valid range.
| Name | Type |
|---|---|
precision |
Int |
Check if a floating point value is approximately zero.
| Name | Type |
|---|---|
value |
Float |
| Returns |
|---|
| Bool |
Cross product of three points (returns double to avoid overflow).
| Name | Type |
|---|---|
pt1 |
Point64 |
pt2 |
Point64 |
pt3 |
Point64 |
| Returns |
|---|
| Float |
Cross product sign with high precision (using 128-bit multiplication).
| Name | Type |
|---|---|
pt1 |
Point64 |
pt2 |
Point64 |
pt3 |
Point64 |
| Returns |
|---|
| Int |
multiplyUInt64(a: ClipperInt64, b: ClipperInt64): UInt128Multiply two 64-bit unsigned integers to get 128-bit result.
| Name | Type |
|---|---|
a |
ClipperInt64 |
b |
ClipperInt64 |
| Returns |
|---|
| UInt128 |
productsAreEqual(a: ClipperInt64, b: ClipperInt64, c: ClipperInt64, d: ClipperInt64): BoolCheck if products ab and cd are equal (using 128-bit precision).
| Name | Type |
|---|---|
a |
ClipperInt64 |
b |
ClipperInt64 |
c |
ClipperInt64 |
d |
ClipperInt64 |
| Returns |
|---|
| Bool |
Check if three points are collinear.
| Name | Type |
|---|---|
pt1 |
Point64 |
sharedPt |
Point64 |
pt2 |
Point64 |
| Returns |
|---|
| Bool |
Dot product of three points.
| Name | Type |
|---|---|
pt1 |
Point64 |
pt2 |
Point64 |
pt3 |
Point64 |
| Returns |
|---|
| Float |
Cross product of two PointD vectors.
| Name | Type |
|---|---|
vec1 |
PointD |
vec2 |
PointD |
| Returns |
|---|
| Float |
Dot product of two PointD vectors.
| Name | Type |
|---|---|
vec1 |
PointD |
vec2 |
PointD |
| Returns |
|---|
| Float |
checkCastInt64(val: Float): ClipperInt64Check cast to ClipperInt64, returns Invalid64 if out of range.
| Name | Type |
|---|---|
val |
Float |
| Returns |
|---|
| ClipperInt64 |
Get line intersection point (Point64 version). Returns true if lines are non-parallel. ip is constrained to seg1.
| Name | Type |
|---|---|
ln1a |
Point64 |
ln1b |
Point64 |
ln2a |
Point64 |
ln2b |
Point64 |
| Returns |
|---|
| AnonStruct |
Get line intersection point (PointD version).
| Name | Type |
|---|---|
ln1a |
PointD |
ln1b |
PointD |
ln2a |
PointD |
ln2b |
PointD |
| Returns |
|---|
| AnonStruct |
segsIntersect(seg1a: Point64, seg1b: Point64, seg2a: Point64, seg2b: Point64, ?inclusive: Bool = false): BoolCheck if two segments intersect.
| Name | Type | Default |
|---|---|---|
seg1a |
Point64 | |
seg1b |
Point64 | |
seg2a |
Point64 | |
seg2b |
Point64 | |
inclusive |
Bool | false |
| Returns |
|---|
| Bool |
Get bounding rectangle of a path.
| Name | Type |
|---|---|
path |
Path64 |
| Returns |
|---|
| Rect64 |
Get closest point on segment to off point.
| Name | Type |
|---|---|
offPt |
Point64 |
seg1 |
Point64 |
seg2 |
Point64 |
| Returns |
|---|
| Point64 |
pointInPolygon(pt: Point64, polygon: Path64): PointInPolygonResultPoint in polygon test.
| Name | Type |
|---|---|
pt |
Point64 |
polygon |
Path64 |
| Returns |
|---|
| PointInPolygonResult |
Check if path2 contains path1.
| Name | Type |
|---|---|
path1 |
Path64 |
path2 |
Path64 |
| Returns |
|---|
| Bool |
Calculate the signed area of a polygon path. Returns positive for counter-clockwise paths, negative for clockwise.
| Name | Type |
|---|---|
path |
Path64 |
| Returns |
|---|
| Float |
Calculate the signed area of multiple paths.
| Name | Type |
|---|---|
paths |
Paths64 |
| Returns |
|---|
| Float |
Private Members
precisionRangeError: StringMetadata
| Name | Parameters |
|---|---|
:hxGen |
- |