main.cesium.SelectionIndicatorViewModel.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
@file:Suppress(
"NON_EXTERNAL_DECLARATION_IN_INAPPROPRIATE_FILE",
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* The view model for [SelectionIndicator].
* @see Online Documentation
*
* @constructor
* @property [scene] The scene instance to use for screen-space coordinate conversion.
* @property [selectionIndicatorElement] The element containing all elements that make up the selection indicator.
* @property [container] The DOM element that contains the widget.
* @see Online Documentation
*/
@JsName("\$cesium__SelectionIndicatorViewModel")
external class SelectionIndicatorViewModel(
var scene: Scene,
var selectionIndicatorElement: org.w3c.dom.Element,
var container: org.w3c.dom.Element,
) {
/**
* Gets or sets the world position of the object for which to display the selection indicator.
* @see Online Documentation
*/
var position: Cartesian3
/**
* Gets or sets the visibility of the selection indicator.
* @see Online Documentation
*/
var showSelection: Boolean
/**
* Gets the visibility of the position indicator. This can be false even if an
* object is selected, when the selected object has no position.
* @see Online Documentation
*/
var isVisible: Boolean
/**
* Gets or sets the function for converting the world position of the object to the screen space position.
* ```
* selectionIndicatorViewModel.computeScreenSpacePosition = function(position, result) {
* return SceneTransforms.wgs84ToWindowCoordinates(scene, position, result);
* };
* ```
* @see Online Documentation
*/
var computeScreenSpacePosition: ComputeScreenSpacePosition
/**
* Updates the view of the selection indicator to match the position and content properties of the view model.
* This function should be called as part of the render loop.
* @see Online Documentation
*/
fun update()
/**
* Animate the indicator to draw attention to the selection.
* @see Online Documentation
*/
fun animateAppear()
/**
* Animate the indicator to release the selection.
* @see Online Documentation
*/
fun animateDepart()
}
/**
* A function that converts the world position of an object to a screen space position.
* @param [position] The position in WGS84 (world) coordinates.
* @param [result] An object to return the input position transformed to window coordinates.
* @see Online Documentation
*/
typealias ComputeScreenSpacePosition = (position: Cartesian3, result: Cartesian2) -> Cartesian2