Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Navigation

This navigation is merely a design template/recipe for more refined, specialized navigation and provides some basic, commonly used camera modifier such as turntable, first-person, as well as trackball. This implementation is also unfinished and will be continued as soon as possible (e.g., first-person navigation is not usable for now).

todo
  • Refine and comment this class to be usable at least as common/most-basic navigation auxiliary.

Hierarchy

  • Navigation

Index

Constructors

constructor

Properties

Protected _alwaysRotateOnMove

_alwaysRotateOnMove: boolean = false

Specifies, whether or not rotation mode should be invoked on any move event, regardless of buttons.

Protected _camera

_camera: Camera
see

camera

Protected _eventHandler

_eventHandler: EventHandler

Even handler used to forward/map events to specific camera modifiers.

Protected _firstPerson

_firstPerson: FirstPersonModifier | undefined

First person camera modifier.

Protected _invalidate

_invalidate: Invalidate

The navigation's invalidation callback. This should usually be setup by the owning renderer and invoke the same callback the renderer has been given by the canvas. This invalidation is required, when continuous rendering is not present, events might cause need for new rendering requests.

Protected _metaphor

_metaphor: Metaphor

Currently active metaphor.

Protected _mode

_mode: Modes | undefined

Identifies the active camera modifier.

Protected _trackball

_trackball: TrackballModifier | undefined

Trackball camera modifier.

Protected _turntable

_turntable: TurntableModifier | undefined

Turntable camera modifier.

Accessors

camera

  • set camera(camera: Camera): void
  • The camera that is to be modified in response to various events.

    Parameters

    Returns void

metaphor

Methods

Protected mode

  • mode(event: MouseEvent | TouchEvent | KeyboardEvent): Modes | undefined
  • Resolves the event to camera modifier mapping by returning the responsible camera modifier.

    Parameters

    • event: MouseEvent | TouchEvent | KeyboardEvent

      Event to retrieve navigation mode for.

    Returns Modes | undefined

Protected onClick

  • onClick(latests: Array<MouseEvent>, previous: Array<MouseEvent>): void
  • Parameters

    • latests: Array<MouseEvent>
    • previous: Array<MouseEvent>

    Returns void

Protected onMouseDown

  • onMouseDown(latests: Array<MouseEvent>, previous: Array<MouseEvent>): void
  • Parameters

    • latests: Array<MouseEvent>
    • previous: Array<MouseEvent>

    Returns void

Protected onMouseMove

  • onMouseMove(latests: Array<MouseEvent>, previous: Array<MouseEvent>): void
  • Parameters

    • latests: Array<MouseEvent>
    • previous: Array<MouseEvent>

    Returns void

Protected onMouseUp

  • onMouseUp(latests: Array<MouseEvent>, previous: Array<MouseEvent>): void
  • Parameters

    • latests: Array<MouseEvent>
    • previous: Array<MouseEvent>

    Returns void

Protected rotate

  • rotate(event: MouseEvent | TouchEvent, start: boolean): void
  • Parameters

    • event: MouseEvent | TouchEvent
    • start: boolean

    Returns void

update

  • update(): void
  • Update should invoke navigation specific event processing. When using, e.g., an event handler, the event handlers update method should be called in order to have navigation specific event processing invoked.

    Returns void