Appearance
KBE3D / KBCore / Cesium / GroundPolylineGeometry
类: GroundPolylineGeometry
A description of a polyline on terrain or 3D Tiles. Only to be used with GroundPolylinePrimitive.
示例
ts
const positions = Cesium.Cartesian3.fromDegreesArray([
-112.1340164450331, 36.05494287836128,
-112.08821010582645, 36.097804071380715,
-112.13296079730024, 36.168769146801104
]);
const geometry = new Cesium.GroundPolylineGeometry({
positions : positions
});参数
Options with the following properties:
参数
An array of Cartesian3 defining the polyline's points. Heights above the ellipsoid will be ignored.
参数
The screen space width in pixels.
参数
The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
参数
Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
参数
The type of line the polyline segments must follow. Valid options are ArcType.GEODESIC and ArcType.RHUMB.
属性
width
width:
number
The screen space width in pixels.
granularity
granularity:
boolean
The distance interval used for interpolating options.points. Zero indicates no interpolation. Default of 9999.0 allows centimeter accuracy with 32 bit floating point.
loop
loop:
boolean
Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop. If the geometry has two positions this parameter will be ignored.
arcType
arcType:
ArcType
The type of path the polyline must follow. Valid options are ArcType.GEODESIC and ArcType.RHUMB.
方法
pack()
staticpack(value:PolygonGeometry,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
The value to pack.
array
number[]
The array to pack into.
startingIndex?
number
The index into the array at which to start packing the elements.
返回
number[]
The array that was packed into
unpack()
staticunpack(array:number[],startingIndex?:number,result?:PolygonGeometry):void
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
The object into which to store the result.
返回
void
构造函数
构造函数
new GroundPolylineGeometry(
options: {positions:Cartesian3[];width?:number;granularity?:number;loop?:boolean;arcType?:ArcType; }):GroundPolylineGeometry
参数
options
positions
width?
number
granularity?
number
loop?
boolean
arcType?
返回
GroundPolylineGeometry
