ViewportQuad

new Cesium.ViewportQuad(rectangle, material)

一个与视口对齐的四边形。
Name Type Description
rectangle BoundingRectangle optional 定义quad在视口中的位置的BoundingRectangle
material Material optional 定义视口 quad表面外观的Material
Example:
var viewportQuad = new Cesium.ViewportQuad(new Cesium.BoundingRectangle(0, 0, 80, 40));
viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 0.0, 0.0, 1.0);

Members

四边形的外观。

默认材质是Material.ColorType.

Example:
// 1.将默认材质的颜色改为黄色
viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);

// 2. 将材质改为横条纹
viewportQuad.material = Cesium.Material.fromType(Cesium.Material.StripeType);
See:
四边形在视口中的位置。
Example:
viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40);

show : Boolean

是否显示四边形。
Default Value: true

Methods

销毁此对象持有的WebGL资源。

一旦对象被销毁,它将不能在使用; 调用除isDestroyed之外的任何函数都会导致DeveloperError异常。 因此,将返回值(undefined)赋给对象,如示例所示。
Throws:
Example:
quad = quad && quad.destroy();
See:

isDestroyed()Boolean

如果该对象没被销毁,返回false。

如果该对象已经被销毁, 使用isDestroyed 会触发 DeveloperError 异常.
Returns:
false
See:
Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive.

Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered:

Throws: