ClassificationPrimitive
A classification primitive represents a volume enclosing geometry in the Scene to be highlighted.
A primitive combines geometry instances 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 PerInstanceColorAppearance with the same color across all instances is supported at this time when using ClassificationPrimitive directly. For full Appearance support when classifying terrain or 3D Tiles use GroundPrimitive instead.
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.
Valid geometries are BoxGeometry, CylinderGeometry, EllipsoidGeometry, PolylineVolumeGeometry, and SphereGeometry.
Geometries that follow the surface of the ellipsoid, such as CircleGeometry, CorridorGeometry, EllipseGeometry, PolygonGeometry, and RectangleGeometry, are also valid if they are extruded volumes; otherwise, they will not be rendered.
See also
Types
Properties
When true
, each geometry instance will only be pickable with Scene.pick. When false
, GPU memory is saved.
Determines if the geometry instances will be created and batched on a web worker.
Determines whether terrain, 3D Tiles or both will be classified.
When true
, geometry vertices are compressed, which will save memory.
This property is for debugging only; it is not for production use nor is it optimized.
This property is for debugging only; it is not for production use nor is it optimized.
The geometry instance rendered with this primitive. This may be undefined
if options.releaseGeometryInstances
is true
when the primitive is constructed.
Determines if geometry vertex attributes are interleaved, which can slightly improve rendering performance.
Determines if the primitive is complete and ready to render. If this property is true, the primitive will be rendered the next time that ClassificationPrimitive.update is called.
When true
, the primitive does not keep a reference to the input geometryInstances
to save memory.
When true
, geometry vertices are optimized for the pre and post-vertex-shader caches.
Functions
Returns the modifiable per-instance attributes for a GeometryInstance.
Returns true if this object was destroyed; otherwise, false.
Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive.