StarFieldLayer

open class StarFieldLayer(starDataSource: FileResource = AssetsMR.files.stars_json) : AbstractLayer

Constructs a layer showing stars and the Sun around the Earth. If used together with the AtmosphereLayer, the StarFieldLayer must be inserted before the AtmosphereLayer.

If you want to use your own star data, the file provided must be .json and the fields "ra", "dec" and "vmag" must be present in the metadata. ra and dec must be expressed in degrees.

This layer uses J2000.0 as the ref epoch.

If the star data .json file is too big, consider enabling gzip compression on your web server. For more info about enabling gzip compression consult the configuration for your web server.

Constructors

Link copied to clipboard
constructor(starDataSource: FileResource = AssetsMR.files.stars_json)

Types

Link copied to clipboard
@Serializable
data class StarData(val metadata: List<StarFieldLayer.StarMetadata>, val data: List<List<Float>>)
Link copied to clipboard
@Serializable
data class StarMetadata(val name: String, val description: String, val datatype: String, val arraysize: Int, val unit: String, val ucd: String)

Properties

Link copied to clipboard
open override var displayName: String?
Link copied to clipboard
open override var isDynamic: Boolean
Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard

Indicates weather to show or hide the Sun

Link copied to clipboard
open override var maxActiveAltitude: Double
Link copied to clipboard
open override var minActiveAltitude: Double
Link copied to clipboard
open override var opacity: Float
Link copied to clipboard
var starDataSource: FileResource

Resource for the stars data

Link copied to clipboard

Resource for the sun texture image.

Link copied to clipboard

The size of the Sun in pixels. This can not exceed the maximum allowed pointSize of the GPU. A warning will be given if the size is too big and the allowed max size will be used.

Functions

Link copied to clipboard
open override fun getUserProperty(key: Any): Any?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)