EarthSDK Geometry

Geometry

Members

constantunitBillboard : object

单位面片(竖立电子标牌)
Properties:
Name Type Description
positions Array.<number> 位置数组 [0,-1,0, 0,1,0, 0,1,2, 0,-1,2,]
sts Array.<number> 纹理坐标数组 [0,0, 1,0, 1,1, 0,1, ]
indices Array.<number> 索引数组 [0, 1, 2, 0, 2, 3,]

constantunitSquare : object

单位面片(平铺电子标牌)
Properties:
Name Type Description
positions Array.<number> 位置数组 [-1,-1,0,1,-1,0,1,1,0,-1,1,0,]
sts Array.<number> 纹理坐标数组 [0,0, 1,0, 1,1, 0,1, ]
indices Array.<number> 索引数组 [0, 1, 2, 0, 2, 3]

Methods

staticObj.CustomPrimitive.Geometry.createCylinder(topRadius, bottomRadius, height, slices)

创建圆柱体
Name Type Description
topRadius number 顶部半径
bottomRadius number 底部半径
height number 圆柱高度
slices number 圆柱分段数

staticObj.CustomPrimitive.Geometry.getLocalPositions(positions, origin)

根据经纬度点来获取本地坐标点,用来方便给CustomPrimitive的positions属性赋值
Name Type Description
positions array.<Array.<number>> 所有的位置点坐标,形如[[1.0, 0.5, 0.0], [1.0, 0.53, 0.0], ...]
origin Array.<number> optional 原点,可以为undefined,此时需要自动计算中心点来作为原点