@JsType(isNative=true, namespace="Cesium", name="Primitive") public class Primitive extends Object
Modifier and Type | Field and Description |
---|---|
Appearance |
appearance
The Appearance used to shade this primitive.
|
boolean |
cull
When true, the renderer frustum culls and horizon culls the primitive's commands based on their bounding volume.
|
boolean |
debugShowBoundingVolume
This property is for debugging only; it is not for production use nor is it optimized.
|
GeometryInstance[] |
geometryInstances
The geometry instances rendered with this primitive.
|
Matrix4 |
modelMatrix
The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
|
int |
shadows
Determines whether this primitive casts or receives shadows from each light source.
|
boolean |
show
Determines if the primitive will be shown.
|
Constructor and Description |
---|
Primitive() |
Primitive(PrimitiveOptions 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.
|
void |
destroy()
Destroys the WebGL resources held by this object.
|
Object |
getGeometryInstanceAttributes(Object id)
Returns the modifiable per-instance attributes for a GeometryInstance.
|
boolean |
interleave()
Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
|
boolean |
isDestroyed()
Returns true if this object was destroyed; otherwise, false.
|
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.
|
void |
update(Object frameState)
Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive.
|
boolean |
vertexCacheOptimize()
When true, geometry vertices are optimized for the pre and post-vertex-shader caches.
|
@JsProperty public Appearance appearance
@JsProperty public boolean cull
@JsProperty public boolean debugShowBoundingVolume
@JsProperty public GeometryInstance[] geometryInstances
@JsProperty public Matrix4 modelMatrix
Matrix4.IDENTITY()
@JsProperty public int shadows
ShadowMode.DISABLED()
@JsProperty public boolean show
@JsConstructor public Primitive()
@JsConstructor public Primitive(PrimitiveOptions options)
@JsProperty(name="allowPicking") public boolean allowPicking()
@JsProperty(name="asynchronous") public boolean asynchronous()
@JsProperty(name="compressVertices") public boolean compressVertices()
@JsProperty(name="interleave") public boolean interleave()
@JsProperty(name="ready") public boolean ready()
@JsProperty(name="readyPromise") public Promise<Primitive,Void> readyPromise()
@JsProperty(name="releaseGeometryInstances") public boolean releaseGeometryInstances()
@JsProperty(name="vertexCacheOptimize") public boolean vertexCacheOptimize()
@JsMethod public void destroy()
isDestroyed()
@JsMethod public Object getGeometryInstanceAttributes(Object id)
id
- The id of the GeometryInstance.@JsMethod public boolean isDestroyed()
destroy()
@JsMethod public void update(Object frameState)
Copyright © 2019. All rights reserved.