Appearance
KBE3D / KBCore / Cesium / EllipseGeometry
类: EllipseGeometry
A description of an ellipse on an ellipsoid. Ellipse geometry can be rendered with both Primitive and GroundPrimitive.
示例
ts
// Create an ellipse.
const ellipse = new Cesium.EllipseGeometry({
center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
semiMajorAxis : 500000.0,
semiMinorAxis : 300000.0,
rotation : Cesium.Math.toRadians(60.0)
});
const geometry = Cesium.EllipseGeometry.createGeometry(ellipse);参数
Object with the following properties:
参数
The ellipse's center point in the fixed frame.
参数
The length of the ellipse's semi-major axis in meters.
参数
The length of the ellipse's semi-minor axis in meters.
参数
The ellipsoid the ellipse will be on.
参数
The distance in meters between the ellipse and the ellipsoid surface.
参数
The distance in meters between the ellipse's extruded face and the ellipsoid surface.
参数
The angle of rotation counter-clockwise from north.
参数
The rotation of the texture coordinates counter-clockwise from north.
参数
The angular distance between points on the ellipse in radians.
参数
The vertex attributes to be computed.
属性
packedLength
staticpackedLength:number
The number of elements used to pack the object into an array.
方法
pack()
staticpack(value:EllipseGeometry,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
EllipseGeometry
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?:EllipseGeometry):EllipseGeometry
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
EllipseGeometry
The object into which to store the result.
返回
EllipseGeometry
The modified result parameter or a new EllipseGeometry instance if one was not provided.
computeRectangle()
staticcomputeRectangle(options: {center:Cartesian3;semiMajorAxis:number;semiMinorAxis:number;ellipsoid?:Ellipsoid;rotation?:number;granularity?:number; },result?:Rectangle):Rectangle
Computes the bounding rectangle based on the provided options
参数
options
Object with the following properties:
center
The ellipse's center point in the fixed frame.
semiMajorAxis
number
The length of the ellipse's semi-major axis in meters.
semiMinorAxis
number
The length of the ellipse's semi-minor axis in meters.
ellipsoid?
The ellipsoid the ellipse will be on.
rotation?
number
The angle of rotation counter-clockwise from north.
granularity?
number
The angular distance between points on the ellipse in radians.
result?
An object in which to store the result
返回
The result rectangle
createGeometry()
staticcreateGeometry(ellipseGeometry:EllipseGeometry):Geometry|undefined
Computes the geometric representation of a ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
参数
ellipseGeometry
EllipseGeometry
A description of the ellipse.
返回
Geometry | undefined
The computed vertices and indices.
构造函数
构造函数
new EllipseGeometry(
options: {center:Cartesian3;semiMajorAxis:number;semiMinorAxis:number;ellipsoid?:Ellipsoid;height?:number;extrudedHeight?:number;rotation?:number;stRotation?:number;granularity?:number;vertexFormat?:VertexFormat; }):EllipseGeometry
参数
options
center
semiMajorAxis
number
semiMinorAxis
number
ellipsoid?
height?
number
extrudedHeight?
number
rotation?
number
stRotation?
number
granularity?
number
vertexFormat?
返回
EllipseGeometry
