Class: FlatNavigation

Navigation. FlatNavigation

Provides a camera to navigate on a 2D map - Only available in a Planet context

new FlatNavigation(ctx, options)

Parameters:
Name Type Description
ctx PlanetContext Planet context
options AbstractNavigation.flat_configuration Flat navigation configuration

Extends

Methods


getType()

Returns the type of navigation. The type can take one of the following value : AstroNavigation, FlatNavigation, PlanetNavigation
Inherited From:
Implements:
Returns:
the name of the navigation class, which is used
Type
string

getOptions()

Returns the navigation's options given at the initialisation.
Inherited From:
Implements:
Returns:
Options
Type
Object

start()

Starts the navigation.
Inherited From:
Implements:

stop()

Stops the navigation.
Inherited From:
Implements:

stopAnimations()

Stops the animations.
Inherited From:
Implements:

getFov()

Returns the field of view in decimal degree.
Inherited From:
Implements:
Returns:
the Field of view [fov along width, fov along height]
Type
Array.<float>

getCenter()

Returns the center of the field of view.
Inherited From:
Implements:
Returns:
the center in decimal degree of the field of view [longitude, latitude]
Type
Array.<float>

<abstract> rotate(dx, dy)

Rotates the camera.
Parameters:
Name Type Description
dx float Window delta x
dy float Window delta y
Inherited From:
Implements:

<abstract> pan(dx, dy)

Pans the camera to a direction up/down or left/right with the same distance from the object
Parameters:
Name Type Description
dx float Window direction left/right
dy float Window direction up/down
Inherited From:
Implements:

<abstract> zoom(delta, scale)

Applies zooming.
Parameters:
Name Type Description
delta float Delta zoom
scale float Scale
Inherited From:
Implements:

<abstract> zoomTo(geoPos, options)

Zooms to a 2D position (longitude, latitude).
Parameters:
Name Type Description
geoPos Array.<float> spatial position in decimal degree [longitude, latitude]
options Object options for zoomTo
Inherited From:
Implements:

<abstract> computeViewMatrix()

Computes the view matrix
Inherited From:
Implements:

toViewMatrix(mat, fov, duration, callback)

Basic animation from current view matrix to the given one
Parameters:
Name Type Description
mat Array.<Object> Destination view matrix (array of 16)
fov int Final zooming fov in degrees
duration int Duration of animation in milliseconds
callback navigationCallback Callback at the end of animation
Inherited From:
Implements:

getRenderContext()

Returns the rendering context.
Inherited From:
Implements:
Returns:
the rendering context
Type
RenderContext

setRenderContext(renderContext)

Sets the rendering context
Parameters:
Name Type Description
renderContext RenderContext the rendering context to set
Inherited From:
Implements: