Class

cesium

GeometryInstance

Related Doc: package cesium

Permalink

class GeometryInstance extends Object

Geometry instancing allows one Geometry object to be positions in several different locations and colored uniquely. For example, one BoxGeometry can be instanced several times, each with a different modelMatrix to change its position, rotation, and scale.

alias GeometryInstance

- The options object takes the following properties - {Geometry} options.geometry The geometry to instance. - {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The model matrix that transforms to transform the geometry from model to world coordinates. - {Object} [options.id] A user-defined object to return when the instance is picked with Scene#pick or get/set per-instance attributes with Primitive#getGeometryInstanceAttributes - {Object} [options.attributes] Per-instance attributes like a show or color attribute shown in the example below.

Annotations
@RawJSType() @native() @JSName( "Cesium.GeometryInstance" )
Example:
  1. // Create geometry for a box, and two instances that refer to it. // One instance positions the box on the bottom and colored aqua. // The other instance positions the box on the top and color white. var geometry = Cesium.BoxGeometry.fromDimensions({ vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL, dimensions : new Cesium.Cartesian3(1000000.0, 1000000.0, 500000.0) }); var instanceBottom = new Cesium.GeometryInstance({ geometry : geometry, modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 1000000.0), new Cesium.Matrix4()), attributes : { color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA) }, id : 'bottom' }); var instanceTop = new Cesium.GeometryInstance({ geometry : geometry, modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame( Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 3000000.0), new Cesium.Matrix4()), attributes : { color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA) }, id : 'top' });

See also

Geometry

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

Instance Constructors

  1. new GeometryInstance(options: GeometryInstanceOptions)

    Permalink
  2. new GeometryInstance()

    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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. var attributes: Any

    Permalink
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. var geometry: Geometry

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hasOwnProperty(v: String): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. var id: Any

    Permalink
  15. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    Object
  17. var modelMatrix: Matrix4

    Permalink
  18. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    Object
  22. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  25. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  26. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. 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