CubicBezier2d
Table of contents
Extends Polyline2d
.
class CubicBezier2d extends Polyline2d {}
Constructs a new instance of the CubicBezier2d
class
Parameters
Name | Description |
---|---|
|
|
Properties
a: Vec
from
Geometry2d
get area(): number
b: Vec
from
Geometry2d
get bounds(): Box
c: Vec
from
Geometry2d
get center(): Vec
d: Vec
from
Geometry2d
debugColor?: string
from
Geometry2d
ignore?: boolean
from
Geometry2d
isClosed: boolean
from
Geometry2d
isFilled: boolean
from
Geometry2d
isLabel: boolean
from
Geometry2d
get length(): number
from
Polyline2d
points: Vec[]
from
Polyline2d
get segments(): Edge2d[]
from
Geometry2d
get vertices(): Vec[]
Methods
static GetAtT(segment: CubicBezier2d, t: number): Vec
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
Vec
from
Geometry2d
distanceToLineSegment(A: Vec, B: Vec): number
Parameters
Returns
number
from
Geometry2d
distanceToPoint(point: Vec, hitInside?: boolean): number
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
number
from
Geometry2d
getArea(): number
from
Geometry2d
getBounds(): Box
getLength(precision?: number): number
Parameters
Name | Description |
---|---|
|
|
Returns
number
getSvgPathData(first?: boolean): string
Parameters
Name | Description |
---|---|
|
|
Returns
string
getVertices(): Vec[]
from
Polyline2d
hitTestLineSegment(A: Vec, B: Vec, distance?: number): boolean
Parameters
Returns
boolean
from
Geometry2d
hitTestPoint(point: Vec, margin?: number, hitInside?: boolean): boolean
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
boolean
from
Geometry2d
isPointInBounds(point: Vec, margin?: number): boolean
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
boolean
midPoint(): Vec
nearestPoint(A: Vec): Vec
Parameters
Name | Description |
---|---|
|
|
Returns
Vec
from
Geometry2d
nearestPointOnLineSegment(A: Vec, B: Vec): Vec
Parameters
Returns
Vec
from
Geometry2d
toSimpleSvgPath(): string