Constructor
new Entity(optionsopt)
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | IEntityParams | <optional> | Entity options. Properties
|
- Source
Members
entityCollection
Gets current entity collection container.
- Source
id
Returns the entity id.
- Source
instanceName
Returns the instance class name.
- Source
layer
Returns the assigned vector layer.
- Source
layerIndex
Gets the layer index of the entity.
- Source
relativePosition
Sets whether the entity position is relative to its parent.
- Source
relativePosition
Returns whether the entity position is relative to its parent.
- Source
rootEntity
Returns the root entity.
- Source
Methods
_setCartesian3vSilent(cartesian, skipLonLat)
Sets local cartesian position without dispatching events.
| Name | Type | Default | Description |
|---|---|---|---|
cartesian | Vec3 | Cartesian position in 3D space. | |
skipLonLat | boolean | false | Skip geodetic conversion. |
- Source
addTo(collection) → {Entity}
Adds the entity to a collection or vector layer.
| Name | Type | Description |
|---|---|---|
collection | EntityCollection | | Target collection or vector layer. |
- Source
This object.
- Type:
- Entity
appendChild(entity)
Appends a child entity.
| Name | Type | Description |
|---|---|---|
entity | Entity | Child entity. |
- Source
appendChildren(entities, forceRelativePositionopt)
Appends child entities.
| Name | Type | Attributes | Description |
|---|---|---|---|
entities | Array.<Entity> | Child entities. | |
forceRelativePosition | boolean | <optional> | If defined, sets |
- Source
getAbsoluteCartesian() → {Vec3}
Returns absolute cartesian position.
- Source
Absolute cartesian position.
- Type:
- Vec3
getAbsolutePitch() → {number}
Gets the absolute pitch angle of the entity.
- Source
The absolute pitch angle in radians.
- Type:
- number
getAbsoluteRoll() → {number}
Gets the absolute roll angle of the entity.
- Source
The absolute roll angle in radians.
- Type:
- number
getAbsoluteRotation() → {Quat}
Gets the absolute rotation direction of the entity.
- Source
The absolute rotation quaternion.
- Type:
- Quat
getAbsoluteYaw() → {number}
Gets the absolute yaw angle of the entity.
- Source
The absolute yaw angle in radians.
- Type:
- number
getAltitude() → {number}
Returns entity altitude over the planet.
- Source
Altitude.
- Type:
- number
getCartesian() → {Vec3}
Returns cartesian position.
- Source
Cartesian position.
- Type:
- Vec3
getCollectionIndex() → {number}
Gets the collection index of the entity.
- Source
The entity collection index.
- Type:
- number
getExtent() → {Extent}
Returns geodetic extent.
- Source
Geodetic extent.
- Type:
- Extent
getLonLat() → {LonLat}
Returns geodetic coordinates.
- Source
Entity geodetic coordinates.
- Type:
- LonLat
getOpacity() → {number}
Returns entity opacity.
- Source
Entity opacity.
- Type:
- number
getPitch() → {number}
Gets the pitch angle of the entity.
- Source
The pitch angle in radians.
- Type:
- number
getRoll() → {number}
Gets the roll angle of the entity.
- Source
The roll angle in radians.
- Type:
- number
getRotation() → {Quat}
Gets the local rotation of the entity. For the root entity it is equal to the absolute rotation.
- Source
The rotation quaternion.
- Type:
- Quat
getScale() → {Vec3}
Returns the local scale.
- Source
- Type:
- Vec3
getVisibility() → {boolean}
Returns entity visibility.
- Source
Entity visibility flag.
- Type:
- boolean
getYaw() → {number}
Gets the yaw angle of the entity.
- Source
The yaw angle in radians.
- Type:
- number
isEqual(entity) → {boolean}
Checks if the given entity is equal to the current entity.
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity to compare. |
- Source
True if entities are equal, otherwise false.
- Type:
- boolean
remove()
Removes the entity from its collection or layer.
- Source
setAbsoluteCartesian(x, y, z)
Sets the absolute cartesian position of the entity.
| Name | Type | Description |
|---|---|---|
x | number | X coordinate. |
y | number | Y coordinate. |
z | number | Z coordinate. |
- Source
setAbsoluteCartesian3v(absolutCartesian)
Sets absolute cartesian position using a vector.
| Name | Type | Description |
|---|---|---|
absolutCartesian | Vec3 | Absolute cartesian position. |
- Source
setAbsolutePitch(val)
Sets the absolute pitch of the entity.
| Name | Type | Description |
|---|---|---|
val | number | The absolute pitch angle in radians. |
- Source
setAbsoluteRoll(val)
Sets the absolute roll of the entity.
| Name | Type | Description |
|---|---|---|
val | number | The absolute roll angle in radians. |
- Source
setAbsoluteRotation(rot)
Sets the absolute rotation of the entity.
| Name | Type | Description |
|---|---|---|
rot | Quat | The new absolute rotation quaternion. |
- Source
setAbsoluteYaw(val)
Sets the absolute yaw of the entity.
| Name | Type | Description |
|---|---|---|
val | number | The absolute yaw angle in radians. |
- Source
setAltitude(altitude)
Sets entity altitude over the planet.
| Name | Type | Description |
|---|---|---|
altitude | number | Altitude. |
- Source
setBillboard(billboard) → {Billboard}
Sets entity billboard.
| Name | Type | Description |
|---|---|---|
billboard | Billboard | Billboard object. |
- Source
Assigned billboard object.
- Type:
- Billboard
setCartesian(x, y, z)
Sets local cartesian position.
| Name | Type | Description |
|---|---|---|
x | number | X coordinate in 3D space. |
y | number | Y coordinate in 3D space. |
z | number | Z coordinate in 3D space. |
- Source
setCartesian3v(cartesian)
Sets entity cartesian position.
| Name | Type | Description |
|---|---|---|
cartesian | Vec3 | Cartesian position in 3D space. |
- Source
setDirectQuaternionRotation(rot)
Sets rotation directly from glTF quaternion with common coordinate system conversion. This method avoids the current pitch/yaw/roll conversion.
| Name | Type | Description |
|---|---|---|
rot | Quat | Quaternion from glTF. |
- Source
setGeoObject(geoObject) → {GeoObject}
Sets entity geoObject.
| Name | Type | Description |
|---|---|---|
geoObject | GeoObject | GeoObject. |
- Source
Assigned geo object.
- Type:
- GeoObject
setGeometry(geometry) → {Geometry}
Sets entity geometry.
| Name | Type | Description |
|---|---|---|
geometry | Geometry | Geometry object. |
- Source
Assigned geometry object.
- Type:
- Geometry
setLabel(label) → {Label}
Sets entity label.
| Name | Type | Description |
|---|---|---|
label | Label | Text label. |
- Source
Assigned label object.
- Type:
- Label
setLonLat(lonlat)
Sets geodetic coordinates.
| Name | Type | Description |
|---|---|---|
lonlat | LonLat | Geodetic coordinates. |
- Source
setLonLat2(lon, lat, heightopt)
Sets geodetic coordinates.
| Name | Type | Attributes | Description |
|---|---|---|---|
lon | number | Longitude. | |
lat | number | Latitude. | |
height | number | <optional> | Height. |
- Source
setLook3v(cart)
Rotates the entity to look at a given point in world coordinates.
| Name | Type | Description |
|---|---|---|
cart | Vec3 | The target position to look at. |
- Source
setLookLonLat(lonLat)
Rotates the entity to look at a given geographic coordinate.
| Name | Type | Description |
|---|---|---|
lonLat | LonLat | The longitude and latitude to look at. |
- Source
setOpacity(opacity)
Sets entity opacity for all available features.
| Name | Type | Description |
|---|---|---|
opacity | number | Entity opacity. |
- Source
setPickingColor()
Applies entity picking color to all supported features.
- Source
setPitch(val)
Sets the pitch rotation of the entity.
| Name | Type | Description |
|---|---|---|
val | number | The new pitch angle in radians. |
- Source
setPointCloud(pointCloud) → {PointCloud}
Sets entity pointCloud.
| Name | Type | Description |
|---|---|---|
pointCloud | PointCloud | PointCloud object. |
- Source
Assigned point cloud object.
- Type:
- PointCloud
setPolyline(polyline) → {Polyline}
Sets entity polyline.
| Name | Type | Description |
|---|---|---|
polyline | Polyline | Polyline object. |
- Source
Assigned polyline object.
- Type:
- Polyline
setRay(ray) → {Ray}
Sets entity ray.
| Name | Type | Description |
|---|---|---|
ray | Ray | Ray object. |
- Source
Assigned ray object.
- Type:
- Ray
setRoll(val)
Sets the roll rotation of the entity.
| Name | Type | Description |
|---|---|---|
val | number | The new roll angle in radians. |
- Source
setRotation(rot)
Sets the local rotation of the entity.
| Name | Type | Description |
|---|---|---|
rot | Quat | The new rotation quaternion. |
- Source
setScale(val)
Sets uniform local scale.
| Name | Type | Description |
|---|---|---|
val | number | Scale value. |
- Source
setScale3v(scale)
Sets per-axis local scale.
| Name | Type | Description |
|---|---|---|
scale | Vec3 | Scale vector. |
- Source
setStrip(strip) → {Strip}
Sets entity strip.
| Name | Type | Description |
|---|---|---|
strip | Strip | Strip object. |
- Source
Assigned strip object.
- Type:
- Strip
setVisibility(visibility)
Sets the entity visibility.
| Name | Type | Description |
|---|---|---|
visibility | boolean | Entity visibility. |
- Source
setYaw(val)
Sets the yaw rotation of the entity.
| Name | Type | Description |
|---|---|---|
val | number | The new yaw angle in radians. |
- Source