Documentation
¶
Index ¶
- Constants
- func DrawWaypoints(ctx *panes.Context, waypoints []av.Waypoint, ...)
- func GenerateRouteDrawingCommands(cb *renderer.CommandBuffer, transforms ScopeTransformations, ...)
- type Brightness
- type ClientVideoMap
- type ERAMVideoMap
- type ScopeTransformations
- func (st *ScopeTransformations) LatLongFromWindowP(p [2]float32) math.Point2LL
- func (st *ScopeTransformations) LatLongFromWindowV(v [2]float32) math.Point2LL
- func (st *ScopeTransformations) LoadLatLongViewingMatrices(cb *renderer.CommandBuffer)
- func (st *ScopeTransformations) LoadWindowViewingMatrices(cb *renderer.CommandBuffer)
- func (st *ScopeTransformations) NormalizedFromWindowP(p [2]float32) [2]float32
- func (st *ScopeTransformations) PixelDistanceNM(nmPerLongitude float32) float32
- func (st *ScopeTransformations) WindowFromLatLongP(p math.Point2LL) [2]float32
- type WeatherRadar
Constants ¶
const ( Normal = iota Procedure Local )
const NumWxLevels = 6
Variables ¶
This section is empty.
Functions ¶
func DrawWaypoints ¶
func DrawWaypoints(ctx *panes.Context, waypoints []av.Waypoint, drawnWaypoints map[string]interface{}, transforms ScopeTransformations, td *renderer.TextDrawBuilder, style renderer.TextStyle, ld *renderer.ColoredLinesDrawBuilder, pd *renderer.ColoredTrianglesDrawBuilder, ldr *renderer.ColoredLinesDrawBuilder, color renderer.RGB)
func GenerateRouteDrawingCommands ¶
func GenerateRouteDrawingCommands(cb *renderer.CommandBuffer, transforms ScopeTransformations, ctx *panes.Context, ld *renderer.ColoredLinesDrawBuilder, pd *renderer.ColoredTrianglesDrawBuilder, td *renderer.TextDrawBuilder, ldr *renderer.ColoredLinesDrawBuilder)
Types ¶
type Brightness ¶
type Brightness int
func (Brightness) RGB ¶
func (b Brightness) RGB() renderer.RGB
type ClientVideoMap ¶ added in v0.13.0
type ClientVideoMap struct {
sim.VideoMap
CommandBuffer renderer.CommandBuffer
}
ClientVideoMap extends sim.VideoMap with client-side rendering capabilities.
func BuildClientVideoMaps ¶ added in v0.13.0
func BuildClientVideoMaps(maps []sim.VideoMap) []ClientVideoMap
BuildClientVideoMaps converts []sim.VideoMap to ClientVideoMaps, generating CommandBuffers along the way.
type ERAMVideoMap ¶ added in v0.13.0
type ERAMVideoMap struct {
sim.ERAMMap
CommandBuffer renderer.CommandBuffer
}
func BuildERAMClientVideoMaps ¶ added in v0.13.0
func BuildERAMClientVideoMaps(maps []sim.ERAMMap) []ERAMVideoMap
TODO: Eventually combine them
type ScopeTransformations ¶
type ScopeTransformations struct {
// contains filtered or unexported fields
}
func GetScopeTransformations ¶
func GetScopeTransformations(paneExtent math.Extent2D, magneticVariation float32, nmPerLongitude float32, center math.Point2LL, rangenm float32, rotationAngle float32) ScopeTransformations
GetScopeTransformations returns a ScopeTransformations object corresponding to the specified radar scope center, range, and rotation angle.
func (*ScopeTransformations) LatLongFromWindowP ¶
func (st *ScopeTransformations) LatLongFromWindowP(p [2]float32) math.Point2LL
LatLongFromWindowP transforms a point p in window coordinates to latitude-longitude.
func (*ScopeTransformations) LatLongFromWindowV ¶
func (st *ScopeTransformations) LatLongFromWindowV(v [2]float32) math.Point2LL
LatLongFromWindowV transforms a vector in window coordinates to a vector in latitude-longitude coordinates.
func (*ScopeTransformations) LoadLatLongViewingMatrices ¶
func (st *ScopeTransformations) LoadLatLongViewingMatrices(cb *renderer.CommandBuffer)
LoadLatLongViewingMatrices adds commands to the provided command buffer to load viewing matrices so that latitude-longiture positions can be provided for subsequent vertices.
func (*ScopeTransformations) LoadWindowViewingMatrices ¶
func (st *ScopeTransformations) LoadWindowViewingMatrices(cb *renderer.CommandBuffer)
LoadWindowViewingMatrices adds commands to the provided command buffer to load viewing matrices so that window-coordinate positions can be provided for subsequent vertices.
func (*ScopeTransformations) NormalizedFromWindowP ¶
func (st *ScopeTransformations) NormalizedFromWindowP(p [2]float32) [2]float32
NormalizedFromWindowP transforms a point p in window coordinates to normalized [0,1]^2 coordinates.
func (*ScopeTransformations) PixelDistanceNM ¶
func (st *ScopeTransformations) PixelDistanceNM(nmPerLongitude float32) float32
PixelDistanceNM returns the space between adjacent pixels expressed in nautical miles.
func (*ScopeTransformations) WindowFromLatLongP ¶
func (st *ScopeTransformations) WindowFromLatLongP(p math.Point2LL) [2]float32
WindowFromLatLongP transforms a point given in latitude-longitude coordinates to window coordinates, snapped to a pixel center.
type WeatherRadar ¶
type WeatherRadar struct {
// contains filtered or unexported fields
}
WeatherRadar provides functionality for fetching precipitation data from the server and displaying it in radar scopes.
func (*WeatherRadar) Draw ¶
func (w *WeatherRadar) Draw(ctx *panes.Context, hist int, intensity float32, contrast float32, active [NumWxLevels]bool, transforms ScopeTransformations, cb *renderer.CommandBuffer)
Draw draws the current weather radar data, if available.
func (*WeatherRadar) HaveWeather ¶
func (w *WeatherRadar) HaveWeather() [NumWxLevels]bool