@JsType(isNative=true, namespace="Cesium", name="Cesium3DTileFeature") public class Cesium3DTileFeature extends PickedObject
Cesium3DTileset
.
Provides access to a feature's properties stored in the tile's batch table, as well as the ability to show/hide a
feature and change its highlight color via Cesium3DTileset.show
and color
, respectively.
Modifications to a Cesium3DTileFeature object have the lifetime of the tile's content. If the tile's c
ontent is unloaded, e.g., due to it going out of view and needing to free space in the cache for visible tiles,
listen to the Cesium3DTileset.tileUnload
event to save any modifications. Also listen to the Cesium3DTileset.tileVisible
event to reapply any modifications.
Do not construct this directly. Access it through Cesium3DTileContent.getFeature(int)
or picking using Scene#pick and Scene.pickPosition(org.cesiumjs.cs.core.Cartesian2)
.Modifier and Type | Field and Description |
---|---|
Color |
color
Gets or sets the highlight color multiplied with the feature's color.
|
boolean |
show
Gets or sets if the feature will be shown.
|
id, primitive
Constructor and Description |
---|
Cesium3DTileFeature() |
Modifier and Type | Method and Description |
---|---|
JsObject |
getProperty(String name)
Returns a copy of the value of the feature's property with the given name.
|
String[] |
getPropertyNames()
Returns an array of property names for the feature.
|
String[] |
getPropertyNames(String[] results)
Returns an array of property names for the feature.
|
boolean |
hasProperty(String name)
Returns whether the feature contains this property.
|
Cesium3DTileset |
primitive()
All objects returned by Scene#pick have a primitive property.
|
void |
setProperty(String name,
JsObject value)
Sets the value of the feature's property with the given name.
|
Cesium3DTileset |
tileset()
Gets the tileset containing the feature.
|
@JsProperty public Color color
Color.WHITE()
@JsProperty public boolean show
@JsProperty(name="primitive") public Cesium3DTileset primitive()
@JsProperty(name="tileset") public Cesium3DTileset tileset()
@JsMethod public JsObject getProperty(String name)
name
- The case-sensitive name of the property.@JsMethod public String[] getPropertyNames()
@JsMethod public String[] getPropertyNames(String[] results)
results
- An array into which to store the results.@JsMethod public boolean hasProperty(String name)
name
- The case-sensitive name of the property.@JsMethod public void setProperty(String name, JsObject value)
name
- The case-sensitive name of the property.value
- The value of the property that will be copied.Copyright © 2019. All rights reserved.