new Cesium.VertexFormat(options)

一个顶点格式定义了什么属性构成顶点. 可提供 Vertex 格式 to a Geometry to request that certain properties be computed, e.g., just position, 姿势和正常等.
Name Type Description
options object optional 如代码示例所示,具有与VertexFormat属性相对应的布尔属性的对象.
Example:
// Create a vertex format with position and 2D texture coordinate attributes.
const format = new Cesium.VertexFormat({
  position : true,
  st : true
});
See:

Members

static constant Cesium.VertexFormat.ALL : VertexFormat

一种不可改变的顶点格式,具有众所周知的属性:位置,正常的,st的,正切的,以及比坦金.
See:

static constant Cesium.VertexFormat.DEFAULT : VertexFormat

具有位置、正常和St属性的不可改变顶点格式. 这与大多数外观和材料是相容的;然而 通常和st属性并不总是需要。 当这是 known in advance, another VertexFormat should be used.
See:

static Cesium.VertexFormat.packedLength : number

用于将对象组合成数组的元素数量.

static constant Cesium.VertexFormat.POSITION_AND_COLOR : VertexFormat

具有位置和颜色属性的永久顶点格式.
See:

static constant Cesium.VertexFormat.POSITION_AND_NORMAL : VertexFormat

具有位置和正常属性的永久顶点格式. 这与像 PerInstanceColorAppearance 的per-intation色彩外观相容.
See:

static constant Cesium.VertexFormat.POSITION_AND_ST : VertexFormat

具有位置和st属性的永久顶点格式. This is compatible with EllipsoidSurfaceAppearance.
See:

static constant Cesium.VertexFormat.POSITION_NORMAL_AND_ST : VertexFormat

具有位置、正常和St属性的不可改变顶点格式. This is compatible with MaterialAppearance when MaterialAppearance#materialSupport 是 NT 0 TESTURED/代码.
See:

static constant Cesium.VertexFormat.POSITION_ONLY : VertexFormat

一个只有位置属性的不可变顶点格式.
See:

bitangent : boolean

true 时,顶点有位元属性(正态化),用于切换-空格效果如凸缘映射.

32位浮点,每个属性3个组件.

Default Value: false

color : boolean

当 NT 0 true NT 1 时,顶点具有 NT 2 的颜色属性.

8位未签名字节. 每个属性3个组件.

Default Value: false

normal : boolean

当 NT 0 real NT 1 时,顶点具有正常属性(正态化),通常用于照明.

32位浮点,每个属性3个组件.

Default Value: false

position : boolean

当 NT 0 true NT 1 时,顶点具有3D位置属性.

64位浮点(用于精确). 每个属性3个组件.

Default Value: false

st : boolean

true 时,顶点具有2D纹理坐标属性.

32位浮点. 每个属性2个组成部分

Default Value: false

tangent : boolean

When true, the vertex has a tangent attribute (normalized), which is used for tangent-space effects like bump mapping.

32位浮点,每个属性3个组件.

Default Value: false

Methods

static Cesium.VertexFormat.clone(vertexFormat, result)VertexFormat

复制一个 Vertex Format 实例 .
Name Type Description
vertexFormat VertexFormat 要复制的顶点格式.
result VertexFormat optional 存储结果的对象 .
Returns:
The modified result parameter or a new VertexFormat instance if one was not provided. (Returns undefined if vertexFormat is undefined)

static Cesium.VertexFormat.pack(value, array, startingIndex)Array.<number>

将所提供的实例存储到所提供的数组中.
Name Type Default Description
value VertexFormat 包装的价值.
array Array.<number> 装入的阵列.
startingIndex number 0 optional The index into the array at which to start packing the elements.
Returns:
装入的阵列

static Cesium.VertexFormat.unpack(array, startingIndex, result)VertexFormat

从组合的数组中获取实例 .
Name Type Default Description
array Array.<number> 装填的阵列.
startingIndex number 0 optional The starting index of the element to be unpacked.
result VertexFormat optional 存储结果的对象.
Returns:
未提供修改的结果参数或新的VertexFormat实例.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.