new CameraView()
- Source:
Holds a camera view parameters, expressed as a rectangular extent and/or as a camera position, direction, and up vector.
Methods
(static) fromJson(json) → {CameraView}
- Source:
Constructs a CameraView
from json. All angles must be specified in degrees.
If neither json.lookAt nor json.positionHeadingPitchRoll is present, then json should have the keys position, direction, up, west, south, east, north.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
json |
Object | The JSON description. The JSON should be in the form of an object literal, not a string. Properties
|
Returns:
The camera view.
- Type
- CameraView
(static) fromLookAt(targetPosition, headingPitchRange) → {CameraView}
- Source:
Constructs a CameraView
from a "look at" description.
Parameters:
Name | Type | Description |
---|---|---|
targetPosition |
Cartographic | The position to look at. |
headingPitchRange |
HeadingPitchRange | The offset of the camera from the target position. |
Returns:
The camera view.
- Type
- CameraView
(static) fromPositionHeadingPitchRoll(cameraPosition, heading, pitch, roll)
- Source:
Constructs a CameraView
from a camera position and heading, pitch, and roll angles for the camera.
Parameters:
Name | Type | Description |
---|---|---|
cameraPosition |
Cartographic | The position of the camera. |
heading |
Number | The heading of the camera in radians measured from North toward East. |
pitch |
Number | The pitch of the camera in radians measured from the local horizontal. Positive angles look up, negative angles look down. |
roll |
Number | The roll of the camera in radians counterclockwise. |