Class/Object

cesium

GroundPrimitive

Related Docs: object GroundPrimitive | package cesium

Permalink

class GroundPrimitive extends Object

A ground primitive represents geometry draped over the terrain in the 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.

Because of the cutting edge nature of this feature in WebGL, it requires the EXT_frag_depth extension, which is currently only supported in Chrome, Firefox, and Edge. Apple support is expected in iOS 9 and MacOS Safari 9. Android support varies by hardware and IE11 will most likely never support it. You can use webglreport.com to verify support for your hardware. Finally, this feature is currently only supported in Primitives and not yet available via the Entity API.

Valid geometries are CircleGeometry, CorridorGeometry, EllipseGeometry, PolygonGeometry, and RectangleGeometry

alias GroundPrimitive

Annotations
@RawJSType() @native() @JSName( "Cesium.GroundPrimitive" )
Example:
  1. // Example 1: Create primitive with a single instance var rectangleInstance = new Cesium.GeometryInstance({ geometry : new Cesium.RectangleGeometry({ rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0) }), id : 'rectangle', attributes : { color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5) } }); scene.primitives.add(new Cesium.GroundPrimitive({ geometryInstances : rectangleInstance })); // Example 2: Batch instances var color = new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5); // Both instances must have the same color. var rectangleInstance = new Cesium.GeometryInstance({ geometry : new Cesium.RectangleGeometry({ rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0) }), id : 'rectangle', attributes : { color : color } }); var ellipseInstance = new Cesium.GeometryInstance({ geometry : new Cesium.EllipseGeometry({ center : Cesium.Cartesian3.fromDegrees(-105.0, 40.0), semiMinorAxis : 300000.0, semiMajorAxis : 400000.0 }), id : 'ellipse', attributes : { color : color } }); scene.primitives.add(new Cesium.GroundPrimitive({ geometryInstances : [rectangleInstance, ellipseInstance] }));

See also

Appearance

GeometryInstance

Primitive

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GroundPrimitive
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GroundPrimitive(options: GroundPrimitiveOptions)

    Permalink
  2. new GroundPrimitive()

    Permalink
    Attributes
    protected

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var allowPicking: Boolean

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. var asynchronous: Boolean

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. var compressVertices: Boolean

    Permalink
  9. var debugShowBoundingVolume: Boolean

    Permalink
  10. var debugShowShadowVolume: Boolean

    Permalink
  11. def destroy(): Unit

    Permalink
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. var geometryInstances: |[Array[Any], GeometryInstance]

    Permalink
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getGeometryInstanceAttributes(id: Any): Dynamic

    Permalink
  18. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. var interleave: Boolean

    Permalink
  21. def isDestroyed(): Boolean

    Permalink
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  28. var ready: Boolean

    Permalink
  29. var readyPromise: Promise[GroundPrimitive]

    Permalink
  30. var releaseGeometryInstances: Boolean

    Permalink
  31. var show: Boolean

    Permalink
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. def update(): Dynamic

    Permalink
  36. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  37. var vertexCacheOptimize: Boolean

    Permalink
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped