Appearance
KBE3D / KBCore / Cesium / BoxOutlineGeometry
类: BoxOutlineGeometry
A description of the outline of a cube centered at the origin.
示例
ts
const box = new Cesium.BoxOutlineGeometry({
maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
});
const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);参数
Object with the following properties:
参数
The minimum x, y, and z coordinates of the box.
参数
The maximum x, y, and z coordinates of the box.
属性
packedLength
staticpackedLength:number
The number of elements used to pack the object into an array.
方法
fromDimensions()
staticfromDimensions(options: {dimensions:Cartesian3; }):BoxOutlineGeometry
Creates an outline of a cube centered at the origin given its dimensions.
参数
options
Object with the following properties:
dimensions
The width, depth, and height of the box stored in the x, y, and z coordinates of the <code>Cartesian3</code>, respectively.
返回
BoxOutlineGeometry
示例
ts
const box = Cesium.BoxOutlineGeometry.fromDimensions({
dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
});
const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);fromAxisAlignedBoundingBox()
staticfromAxisAlignedBoundingBox(boundingBox:AxisAlignedBoundingBox):BoxOutlineGeometry
Creates an outline of a cube from the dimensions of an AxisAlignedBoundingBox.
参数
boundingBox
A description of the AxisAlignedBoundingBox.
返回
BoxOutlineGeometry
示例
ts
const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0,
-75.0, 30.0,
-70.0, 30.0,
-68.0, 40.0
]));
const box = Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(aabb);pack()
staticpack(value:BoxOutlineGeometry,array:number[],startingIndex?:number):number[]
Stores the provided instance into the provided array.
参数
value
BoxOutlineGeometry
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?:BoxOutlineGeometry):BoxOutlineGeometry
Retrieves an instance from a packed array.
参数
array
number[]
The packed array.
startingIndex?
number
The starting index of the element to be unpacked.
result?
BoxOutlineGeometry
The object into which to store the result.
返回
BoxOutlineGeometry
The modified result parameter or a new BoxOutlineGeometry instance if one was not provided.
createGeometry()
staticcreateGeometry(boxGeometry:BoxOutlineGeometry):Geometry|undefined
Computes the geometric representation of an outline of a box, including its vertices, indices, and a bounding sphere.
参数
boxGeometry
BoxOutlineGeometry
A description of the box outline.
返回
Geometry | undefined
The computed vertices and indices.
构造函数
构造函数
new BoxOutlineGeometry(
options: {minimum:Cartesian3;maximum:Cartesian3; }):BoxOutlineGeometry
参数
options
minimum
maximum
返回
BoxOutlineGeometry
