new Cesium.ShowGeometryInstanceAttribute(show)

确定是否显示几何实例的每英寸几何属性的值和类型信息.
Name Type Default Description
show boolean true optional Determines if the geometry instance will be shown.
Example:
const instance = new Cesium.GeometryInstance({
  geometry : new Cesium.BoxGeometry({
    vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL,
    minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0),
    maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0)
  }),
  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()),
  id : 'box',
  attributes : {
    show : new Cesium.ShowGeometryInstanceAttribute(false)
  }
});
See:

Members

readonly componentDatatype : ComponentDatatype

The datatype of each component in the attribute, e.g., individual elements in ColorGeometryInstanceAttribute#value.
Default Value: ComponentDatatype.UNSIGNED_BYTE

readonly componentsPerAttribute : number

属性中的组件数, i.e ., ColorGeometryInstanceAttribute#value .
Default Value: 1

readonly normalize : boolean

当 NT 0 true NT 1 和 NT 2 组件Datatype NT 3 是一个整数格式时, indicate that the components should be mapped to the range [0, 1] (unsigned) 或[-1, 1] (署名),当它们作为浮点进行渲染时.
Default Value: true

value : Uint8Array

输入数组中存储属性的值 .
Default Value: [1.0]

Methods

static Cesium.ShowGeometryInstanceAttribute.toValue(show, result)Uint8Array

将布尔显示转换为可以用来分配显示属性的输入数组.
Name Type Description
show boolean 展出价值.
result Uint8Array optional 如果创建未定义的新实例, 将存储结果的数组 .
Returns:
如果结果未定义, 修改后的结果参数或新实例 .
Example:
const attributes = primitive.getGeometryInstanceAttributes('an id');
attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show);
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.