EarthMath3

EarthMath3

EarthMath3 地球三维数学类,xz坐标为经纬度,y为海拔高度

Members

Methods

staticArea(triPoints) → number

计算多边形
Name Type Description
triPoints Vector3[]

staticDistance(x1,y1,z1,x2,y2,z2) → number

计算两点距离
Name Type Description
x1 number
y1 number
z1 number
x2 number
y2 number
z2 number

staticDistanceLineLine(points1,points2) → number

计算折线间距离
Name Type Description
points1 Vector3[]
points2 Vector3[]

staticDistanceLineLineAdvance(points1,points2,distLinePoints) → number

计算折线间距离,保存最短线段坐标
Name Type Description
points1 Vector3[]
points2 Vector3[]
distLinePoints RefValue<Array<Vector3>> RefValue指向结果端点数组

staticDistancePoint(pt1,pt2) → number

计算两点间距离
Name Type Description
pt1 Vector3
pt2 Vector3

staticDistancePointLine(point,points) → number

计算点到折线距离
Name Type Description
point Vector3
points Vector3[]

staticDistancePointLineAdvance(point,points,resultPoint) → number

计算点到折线距离,保存最近点坐标
Name Type Description
point Vector3
points Vector3[]
resultPoint Vector3 最近点坐标

staticLength(points) → number

计算折线长度
Name Type Description
points Vector3[]