@JsType(isNative=true, namespace="Cesium", name="GroundPrimitive") public class GroundPrimitive extends Primitive
Scene
.
The geometry must be from a single GeometryInstance
. Batching multiple geometries is not yet supported.
A primitive combines the geometry instance with an Appearance
that
describes the full shading, including Material
and RenderState. Roughly,
the geometry instance defines the structure and placement, and the appearance defines the visual characteristics.
Decoupling geometry and appearance allows us to mix and match most of them and add a new geometry or
appearance independently of each other. Only the PerInstanceColorAppearance
is supported at this time.
For correct rendering, this feature requires the EXT_frag_depth WebGL extension. For hardware that do not support this extension,
there will be rendering artifacts for some viewing angles.Primitive
,
ClassificationPrimitive
,
GeometryInstance
,
Appearance
Modifier and Type | Field and Description |
---|---|
Number |
classificationType
Determines whether terrain, 3D Tiles or both will be classified.
|
boolean |
debugShowBoundingVolume
This property is for debugging only; it is not for production use nor is it optimized.
|
boolean |
debugShowShadowVolume
This property is for debugging only; it is not for production use nor is it optimized.
|
boolean |
show
Determines if the primitive will be shown.
|
appearance, cull, geometryInstances, modelMatrix, shadows
Constructor and Description |
---|
GroundPrimitive() |
GroundPrimitive(GroundPrimitiveOptions options) |
Modifier and Type | Method and Description |
---|---|
boolean |
allowPicking()
When true, each geometry instance will only be pickable with Scene#pick.
|
boolean |
asynchronous()
Determines if the geometry instances will be created and batched on a web worker.
|
boolean |
compressVertices()
When true, geometry vertices are compressed, which will save memory.
|
GeometryInstance[] |
geometryInstances()
The geometry instance rendered with this primitive.
|
static Promise<JsObject,Void> |
initializeTerrainHeights()
Initializes the minimum and maximum terrain heights.
|
boolean |
interleave()
Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
|
static boolean |
isSupported(Scene scene)
Determines if GroundPrimitive rendering is supported.
|
boolean |
ready()
Determines if the primitive is complete and ready to render.
|
Promise<Primitive,Void> |
readyPromise()
Gets a promise that resolves when the primitive is ready to render.
|
boolean |
releaseGeometryInstances()
When true, the primitive does not keep a reference to the input geometryInstances to save memory.
|
static boolean |
supportsMaterials(Scene scene)
Checks if the given Scene supports materials on GroundPrimitives.
|
boolean |
vertexCacheOptimize()
When true, geometry vertices are optimized for the pre and post-vertex-shader caches.
|
destroy, getGeometryInstanceAttributes, isDestroyed, update
@JsProperty public Number classificationType
ClassificationType.TERRAIN()
@JsProperty public boolean debugShowBoundingVolume
@JsProperty public boolean debugShowShadowVolume
@JsProperty public boolean show
@JsConstructor public GroundPrimitive()
@JsConstructor public GroundPrimitive(GroundPrimitiveOptions options)
@JsProperty(name="allowPicking") public boolean allowPicking()
allowPicking
in class Primitive
@JsProperty(name="asynchronous") public boolean asynchronous()
asynchronous
in class Primitive
@JsProperty(name="compressVertices") public boolean compressVertices()
compressVertices
in class Primitive
@JsProperty(name="geometryInstances") public GeometryInstance[] geometryInstances()
@JsProperty(name="interleave") public boolean interleave()
interleave
in class Primitive
@JsProperty(name="ready") public boolean ready()
Primitive.update(Object)
is called.@JsProperty(name="readyPromise") public Promise<Primitive,Void> readyPromise()
readyPromise
in class Primitive
@JsProperty(name="releaseGeometryInstances") public boolean releaseGeometryInstances()
releaseGeometryInstances
in class Primitive
@JsProperty(name="vertexCacheOptimize") public boolean vertexCacheOptimize()
vertexCacheOptimize
in class Primitive
@JsMethod public static Promise<JsObject,Void> initializeTerrainHeights()
@JsMethod public static boolean isSupported(Scene scene)
scene
- The scene.@JsMethod public static boolean supportsMaterials(Scene scene)
scene
- The current scene.Copyright © 2019. All rights reserved.