Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 具有以下属性的对象:
|
Example:
// Create geometry for a box, and two instances that refer to it.
// One instance positions the box on the bottom and colored aqua.
// The other instance positions the box on the top and color white.
var geometry = Cesium.BoxGeometry.fromDimensions({
vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL,
dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0)
});
var instanceBottom = new Cesium.GeometryInstance({
geometry : geometry,
modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 1000000.0), new Cesium.Matrix4()),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
},
id : 'bottom'
});
var instanceTop = new Cesium.GeometryInstance({
geometry : geometry,
modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 3000000.0), new Cesium.Matrix4()),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
},
id : 'top'
});
See:
Members
每实例属性,如
ColorGeometryInstanceAttribute
或ShowGeometryInstanceAttribute
。
Geometry
每个顶点都有不同的属性;这些属性对于整个实例都是常量。-
Default Value:
undefined
geometry : Geometry
正在实例化的几何体。
-
Default Value:
undefined
拾取实例或用于获取/设置每个实例属性时返回的用户定义对象。
-
Default Value:
undefined
See:
modelMatrix : Matrix4
将几何体从模型转换为世界坐标的4x4变换矩阵。
当这是单位矩阵时,几何图形是在世界坐标系中绘制的,即地球的WGS84坐标系。
局部参考帧可以通过提供不同的转换矩阵来使用,就像返回的那样
通过
Transforms.eastNorthUpToFixedFrame
。-
Default Value:
Matrix4.IDENTITY