Entity instances aggregate multiple forms of visualization into a single high-level object.
They can be created manually and added to
Viewer#entities
or be produced by
data sources, such as CzmlDataSource
and GeoJsonDataSource
.
参数名称 | 类型 | 描述信息 |
---|---|---|
options |
Entity.ConstructorOptions | 可选 Object describing initialization options |
成员(属性)
availability : TimeIntervalCollection|undefined
The availability, if any, associated with this object.
If availability is undefined, it is assumed that this object's
other properties will return valid data for any provided time.
If availability exists, the objects other properties will only
provide valid data if queried within the given interval.
billboard : BillboardGraphics|undefined
Gets or sets the billboard.
box : BoxGraphics|undefined
Gets or sets the box.
corridor : CorridorGraphics|undefined
Gets or sets the corridor.
cylinder : CylinderGraphics|undefined
Gets or sets the cylinder.
readonly definitionChanged : Event
Gets the event that is raised whenever a property or sub-property is changed or modified.
description : Property|undefined
Gets or sets the description.
ellipse : EllipseGraphics|undefined
Gets or sets the ellipse.
ellipsoid : EllipsoidGraphics|undefined
Gets or sets the ellipsoid.
entityCollection : EntityCollection
Gets or sets the entity collection that this entity belongs to.
Gets the unique ID associated with this object.
Gets whether this entity is being displayed, taking into account
the visibility of any ancestor entities.
label : LabelGraphics|undefined
Gets or sets the label.
model : ModelGraphics|undefined
Gets or sets the model.
Gets or sets the name of the object. The name is intended for end-user
consumption and does not need to be unique.
orientation : Property|undefined
Gets or sets the orientation in respect to Earth-fixed-Earth-centered (ECEF).
Defaults to east-north-up at entity position.
parent : Entity|undefined
Gets or sets the parent object.
path : PathGraphics|undefined
Gets or sets the path.
plane : PlaneGraphics|undefined
Gets or sets the plane.
point : PointGraphics|undefined
Gets or sets the point graphic.
polygon : PolygonGraphics|undefined
Gets or sets the polygon.
polyline : PolylineGraphics|undefined
Gets or sets the polyline.
polylineVolume : PolylineVolumeGraphics|undefined
Gets or sets the polyline volume.
position : PositionProperty|undefined
Gets or sets the position.
properties : PropertyBag|undefined
Gets or sets the bag of arbitrary properties associated with this entity.
Gets the names of all properties registered on this instance.
rectangle : RectangleGraphics|undefined
Gets or sets the rectangle.
Gets or sets whether this entity should be displayed. When set to true,
the entity is only displayed if the parent entity's show property is also true.
tileset : Cesium3DTilesetGraphics|undefined
Gets or sets the tileset.
trackingReferenceFrame : TrackingReferenceFrame
Gets or sets the entity's tracking reference frame.
viewFrom : Property|undefined
Gets or sets the suggested initial offset when tracking this object.
The offset is typically defined in the east-north-up reference frame,
but may be another frame depending on the object's velocity.
wall : WallGraphics|undefined
Gets or sets the wall.
方法
Checks if the given Scene supports materials besides Color on Entities draped on terrain or 3D Tiles.
If this feature is not supported, Entities with non-color materials but no `height` will
instead be rendered as if height is 0.
参数名称 | 类型 | 描述信息 |
---|---|---|
scene |
Scene | The current scene. |
返回值:
Whether or not the current scene supports materials for entities on terrain.
Checks if the given Scene supports polylines clamped to terrain or 3D Tiles.
If this feature is not supported, Entities with PolylineGraphics will be rendered with vertices at
the provided heights and using the `arcType` parameter instead of clamped to the ground.
参数名称 | 类型 | 描述信息 |
---|---|---|
scene |
Scene | The current scene. |
返回值:
Whether or not the current scene supports polylines on terrain or 3D TIles.
Adds a property to this object. Once a property is added, it can be
observed with
Entity#definitionChanged
and composited
with CompositeEntityCollection
参数名称 | 类型 | 描述信息 |
---|---|---|
propertyName |
string | The name of the property to add. |
Throws:
-
DeveloperError : "propertyName" is a reserved property name.
-
DeveloperError : "propertyName" is already a registered property.
computeModelMatrix(time, result) → Matrix4
Computes the model matrix for the entity's transform at specified time. Returns undefined if position is undefined
参数名称 | 类型 | 描述信息 |
---|---|---|
time |
JulianDate | The time to retrieve model matrix for. |
result |
Matrix4 | 可选 The object onto which to store the result. |
返回值:
The modified result parameter or a new Matrix4 instance if one was not provided. Result is undefined if position is undefined.
Given a time, returns true if this object should have data during that time.
参数名称 | 类型 | 描述信息 |
---|---|---|
time |
JulianDate | The time to check availability for. |
返回值:
true if the object should have data during the provided time, false otherwise.
Assigns each unassigned property on this object to the value
of the same property on the provided source object.
参数名称 | 类型 | 描述信息 |
---|---|---|
source |
Entity | The object to be merged into this object. |
Removed a property previously added with addProperty.
参数名称 | 类型 | 描述信息 |
---|---|---|
propertyName |
string | The name of the property to remove. |
Throws:
-
DeveloperError : "propertyName" is a reserved property name.
-
DeveloperError : "propertyName" is not a registered property.
定义的类型
Initialization options for the Entity constructor
属性:
属性名称 | 类型 | 可选 | 默认值 | 描述信息 |
---|---|---|---|---|
id |
string |
<可选> |
A unique identifier for this object. If none is provided, a GUID is generated. | |
name |
string |
<可选> |
A human readable name to display to users. It does not have to be unique. | |
availability |
TimeIntervalCollection |
<可选> |
The availability, if any, associated with this object. | |
show |
boolean |
<可选> |
A boolean value indicating if the entity and its children are displayed. | |
trackingReferenceFrame |
TrackingReferenceFrame |
<可选> |
TrackingReferenceFrame.AUTODETECT | The reference frame used when this entity is being tracked. If undefined , reference frame is determined based on entity velocity: near-surface slow moving entities are tracked using the local east-north-up reference frame, whereas fast moving entities such as satellites are tracked using VVLH (Vehicle Velocity, Local Horizontal). |
description |
Property | string |
<可选> |
A string Property specifying an HTML description for this entity. | |
position |
PositionProperty | Cartesian3 | CallbackPositionProperty |
<可选> |
A Property specifying the entity position. | |
orientation |
Property | Quaternion |
<可选> |
Transforms.eastNorthUpToFixedFrame(position) | A Property specifying the entity orientation in respect to Earth-fixed-Earth-centered (ECEF). If undefined, east-north-up at entity position is used. |
viewFrom |
Property | Cartesian3 |
<可选> |
A suggested initial offset for viewing this object. | |
parent |
Entity |
<可选> |
A parent entity to associate with this entity. | |
billboard |
BillboardGraphics | BillboardGraphics.ConstructorOptions |
<可选> |
A billboard to associate with this entity. | |
box |
BoxGraphics | BoxGraphics.ConstructorOptions |
<可选> |
A box to associate with this entity. | |
corridor |
CorridorGraphics | CorridorGraphics.ConstructorOptions |
<可选> |
A corridor to associate with this entity. | |
cylinder |
CylinderGraphics | CylinderGraphics.ConstructorOptions |
<可选> |
A cylinder to associate with this entity. | |
ellipse |
EllipseGraphics | EllipseGraphics.ConstructorOptions |
<可选> |
A ellipse to associate with this entity. | |
ellipsoid |
EllipsoidGraphics | EllipsoidGraphics.ConstructorOptions |
<可选> |
A ellipsoid to associate with this entity. | |
label |
LabelGraphics | LabelGraphics.ConstructorOptions |
<可选> |
A options.label to associate with this entity. | |
model |
ModelGraphics | ModelGraphics.ConstructorOptions |
<可选> |
A model to associate with this entity. | |
tileset |
Cesium3DTilesetGraphics | Cesium3DTilesetGraphics.ConstructorOptions |
<可选> |
A 3D Tiles tileset to associate with this entity. | |
path |
PathGraphics | PathGraphics.ConstructorOptions |
<可选> |
A path to associate with this entity. | |
plane |
PlaneGraphics | PlaneGraphics.ConstructorOptions |
<可选> |
A plane to associate with this entity. | |
point |
PointGraphics | PointGraphics.ConstructorOptions |
<可选> |
A point to associate with this entity. | |
polygon |
PolygonGraphics | PolygonGraphics.ConstructorOptions |
<可选> |
A polygon to associate with this entity. | |
polyline |
PolylineGraphics | PolylineGraphics.ConstructorOptions |
<可选> |
A polyline to associate with this entity. | |
properties |
PropertyBag | Object.<string, *> |
<可选> |
Arbitrary properties to associate with this entity. | |
polylineVolume |
PolylineVolumeGraphics | PolylineVolumeGraphics.ConstructorOptions |
<可选> |
A polylineVolume to associate with this entity. | |
rectangle |
RectangleGraphics | RectangleGraphics.ConstructorOptions |
<可选> |
A rectangle to associate with this entity. | |
wall |
WallGraphics | WallGraphics.ConstructorOptions |
<可选> |
A wall to associate with this entity. |