Constructor
new Entity(optionsopt)
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | IEntityParams | <optional> | Entity options: Properties
|
- Source
Members
entityCollection
Gets current entity collection container.
- Source
id
Gets entity uniq id
- Source
instanceName
Gets the instance class name of the entity.
- Source
layer
Gets layer container
- Source
layerIndex
Gets the layer index of the entity.
- Source
relativePosition
Sets relative position property
- Source
relativePosition
Gets relative position property
- Source
rootEntity
Returns root entity object.
- Source
Methods
_setCartesian3vSilent(cartesian, skipLonLat)
Sets entity cartesian position without event dispatching.
Name | Type | Default | Description |
---|---|---|---|
cartesian | Vec3 | Cartesian position in 3d space. | |
skipLonLat | boolean | false | skip geodetic calculation. |
- Source
addTo(collection, rightNowopt) → {Entity}
Adds current entity into the specified entity collection.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
collection | EntityCollection | | Specified entity collection or vector layer. | ||
rightNow | boolean | <optional> | false | Entity insertion option for vector layer. |
- Source
- This object.
- Type:
- Entity
appendChild(entity)
Append child entity.
Name | Type | Description |
---|---|---|
entity | Entity | Child entity. |
- Source
getAbsoluteCartesian() → {Vec3}
Returns absolute cartesian position.
- Source
- 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}
Sets entity altitude over the planet.
- Source
Altitude.
- Type:
- number
getCartesian() → {Vec3}
Returns cartesian position.
- Source
- Type:
- Vec3
getCollectionIndex() → {number}
Gets the collection index of the entity.
- Source
The entity collection index.
- Type:
- number
getExtent() → {Extent}
Return geodetic extent.
- Source
- Type:
- Extent
getLonLat() → {LonLat}
Gets entity geodetic coordinates.
- Source
- Type:
- LonLat
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}
Gets scale factor
- Source
- Type:
- Vec3
getVisibility() → {boolean}
Returns entity visibility.
- Source
- 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 current 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 the absolute cartesian position of the entity using a Vec3.
Name | Type | Description |
---|---|---|
absolutCartesian | Vec3 | The 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
- Type:
- Billboard
setCartesian(x, y, z)
Sets entity cartesian position.
Name | Type | Description |
---|---|---|
x | number | 3d space X - position. |
y | number | 3d space Y - position. |
z | number | 3d space Z - position. |
- Source
setCartesian3v(cartesian)
Sets entity cartesian position.
Name | Type | Description |
---|---|---|
cartesian | Vec3 | Cartesian position in 3d space. |
- Source
setGeoObject(geoObject) → {GeoObject}
Sets entity geoObject.
Name | Type | Description |
---|---|---|
geoObject | GeoObject | GeoObject. |
- Source
- Type:
- GeoObject
setGeometry(geometry) → {Geometry}
Sets entity geometry.
Name | Type | Description |
---|---|---|
geometry | Geometry | Geometry object. |
- Source
- Type:
- Geometry
setLabel(label) → {Label}
Sets entity label.
Name | Type | Description |
---|---|---|
label | Label | Text label. |
- Source
- Type:
- Label
setLonLat(lonlat)
Sets geodetic coordinates of the entity point object.
Name | Type | Description |
---|---|---|
lonlat | LonLat | coordinates. |
- Source
setLonLat2(lon, lat, heightopt)
Sets geodetic coordinates of the entity point object.
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
setPickingColor()
Appends entity items(billboard, label etc.) picking color.
- 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
- Type:
- PointCloud
setPolyline(polyline) → {Polyline}
Sets entity polyline.
Name | Type | Description |
---|---|---|
polyline | Polyline | Polyline object. |
- Source
- Type:
- Polyline
setRay(ray) → {Ray}
Sets entity ray.
Name | Type | Description |
---|---|---|
ray | Ray | Ray object. |
- Source
- 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 scale for the inner object such as GeoObject
Name | Type | Description |
---|---|---|
val | number | Scale factor |
- Source
setScale3v(scale)
Sets XYZ axis scale for the inner object such as GeoObject
Name | Type | Description |
---|---|---|
scale | Vec3 | Scale factor |
- Source
setStrip(strip) → {Strip}
Sets entity strip.
Name | Type | Description |
---|---|---|
strip | Strip | Strip object. |
- Source
- 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