构造函数

属性

is2D: boolean
rotationType: RotationType

0或者null为不旋转,1为沿路径曲线路径旋转,2为沿运动路径旋转

访问器

方法

  • 参数

    • 可选out: Vector3[]

      The array to store the result.

    • 可选outTs: number[]

      The array to store the distance value of each point.

    • 可选pointDensity: number

      The density of the points. It means the step of distance value between two points. Default is 0.1.

    返回 Vector3[]

    All the points on the curve.

    Get all the points on the curve.

    获取曲线上的所有点。

  • 参数

    • segmentIndex: number

      The index of the segment.

    • 可选out: Vector3[]

      The array to store the result.

    返回 Readonly<Vector3>[]

    The anchor points of the specified segment.

    Get the anchor points of the specified segment.

    获取指定分段的锚点。

  • 参数

    • t: number

      Distance value. It should be a value between 0 and 1.

    返回 Readonly<Vector3>

    The point on the curve at the specified distance.

    Get the point on the curve at the specified distance.

    获取曲线上的指定距离的点。

  • 参数

    • segmentIndex: number

      The index of the segment.

    • t0: number

      The start distance of the segment. It should be a value between 0 and 1.

    • t1: number

      The end distance of the segment. It should be a value between 0 and 1.

    • 可选outPoints: Vector3[]

      The array to store the result.

    • 可选outTs: number[]

      The array to store the distance value of each point.

    • 可选pointDensity: number

      The density of the points. It means the step of distance value between two points. Default is 0.1.

    返回 Vector3[]

    The points in the specified segment.

    Get the points in the specified segment.

    获取指定分段中的点。

  • 参数

    • t: number

      Distance value. It should be a value between 0 and 1.

    • 可选out: Vector3

      Optional output Vector3 to store the result. If not provided, a new Vector3 will be created.

    返回 Vector3

    The rotation angles in degrees representing the tangent direction at the specified point.

    Get the rotation (tangent direction) on the curve at the specified distance. Automatically detects 2D/3D data and returns appropriate rotation format. For 2D data (z=0), returns Vector3(0, 0, rotationAngle). For 3D data, returns Vector3(pitch, yaw, roll).

    获取曲线上指定距离点的旋转角度(切线方向)。 自动检测2D/3D数据并返回相应的旋转格式。 对于2D数据(z=0),返回Vector3(0, 0, 旋转角度)。 对于3D数据,返回Vector3(俯仰角, 偏航角, 滚转角)。