new RouteLine(param)
道路线
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
object | 初始参数.
Properties
|
Members
-
arrow :boolean
-
开启/关闭 箭头模式
Example
// 获取箭头模式 const arrow = this.arrow; // 设置箭头模式 this.arrow = true; -
cornerRadius :number
-
道路线转弯半径(一般大于宽度的一半)
- Default Value:
- 0.3
Example
// 获取转弯半径 const cornerRadius = this.cornerRadius; // 设置转弯半径 this.cornerRadius = 0.5; -
cornerSplit :number
-
获取/设置拐角分割面数,数值越大拐角越平滑(必须是整数)
- Default Value:
- 10
Example
// 获取拐角分割面数 const cornerSplit = this.cornerSplit; // 设置拐角分割面数 this.cornerSplit = 20; -
facingDirection :Array.<number>
-
获取/设置本地坐标系下线路面的朝向
Example
// 获取朝向 const facingDirection = this.facingDirection; // 设置朝向 this.facingDirection = [0, 0, 1]; -
frenet :boolean
-
开启/关闭 Frenet 模式
- Default Value:
- true
-
width :number
-
线宽度(米)
- Default Value:
- 1.0
Example
// 获取宽度 const width = this.width; // 设置宽度 this.width = 2.0;