Polyline2d
Table of contents
Public class
Signature
class Polyline2d extends Geometry2d {}
References
Source
packages/editor/src/lib/primitives/geometry/Polyline2d.ts
Constructor
Public constructor
Constructs a new instance of the Polyline2d
class
Parameters
Name | Description |
---|---|
|
|
References
Properties
length
Public readonly property
Signature
get length(): number
points
Public property
Signature
points: Vec[]
References
segments
Public readonly property
Signature
get segments(): Edge2d[]
References
Methods
getVertices()
Public method
Signature
getVertices(): Vec[]
References
hitTestLineSegment()
Public method
Signature
hitTestLineSegment(A: Vec, B: Vec, distance?: number): boolean
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
Returns
boolean
References
nearestPoint()
Public method
Signature
nearestPoint(A: Vec): Vec
Parameters
Name | Description |
---|---|
|
|
Returns
Vec
References