Appearance
KBE3D / KBCore / Cesium / CorridorGeometry
类: CorridorGeometry
A description of a corridor. Corridor geometry can be rendered with both Primitive and GroundPrimitive.
示例
ts
const corridor = new Cesium.CorridorGeometry({
vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
positions : Cesium.Cartesian3.fromDegreesArray([-72.0, 40.0, -70.0, 35.0]),
width : 100000
});参数
Object with the following properties:
参数
An array of positions that define the center of the corridor.
参数
The distance between the edges of the corridor in meters.
参数
The ellipsoid to be used as a reference.
参数
The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
参数
The distance in meters between the ellipsoid surface and the positions.
参数
The distance in meters between the ellipsoid surface and the extruded face.
参数
The vertex attributes to be computed.
参数
Determines the style of the corners.
属性
packedLength
packedLength:
number
The number of elements used to pack the object into an array.
方法
pack()
staticpack(value:CorridorGeometry,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
CorridorGeometry
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?:CorridorGeometry):CorridorGeometry
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
CorridorGeometry
The object into which to store the result.
返回
CorridorGeometry
The modified result parameter or a new CorridorGeometry instance if one was not provided.
computeRectangle()
staticcomputeRectangle(options: {positions:Cartesian3[];width:number;ellipsoid?:Ellipsoid;cornerType?:CornerType; },result?:Rectangle):Rectangle
Computes the bounding rectangle given the provided options
参数
options
Object with the following properties:
positions
An array of positions that define the center of the corridor.
width
number
The distance between the edges of the corridor in meters.
ellipsoid?
The ellipsoid to be used as a reference.
cornerType?
Determines the style of the corners.
result?
An object in which to store the result.
返回
The result rectangle.
createGeometry()
staticcreateGeometry(corridorGeometry:CorridorGeometry):Geometry|undefined
Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
参数
corridorGeometry
CorridorGeometry
A description of the corridor.
返回
Geometry | undefined
The computed vertices and indices.
构造函数
构造函数
new CorridorGeometry(
options: {positions:Cartesian3[];width:number;ellipsoid?:Ellipsoid;granularity?:number;height?:number;extrudedHeight?:number;vertexFormat?:VertexFormat;cornerType?:CornerType; }):CorridorGeometry
参数
options
positions
width
number
ellipsoid?
granularity?
number
height?
number
extrudedHeight?
number
vertexFormat?
cornerType?
返回
CorridorGeometry
