Constructor
new ArcBallCamera(wwd)
Constructs an arc ball camera.
Parameters:
Name | Type | Description |
---|---|---|
wwd |
WorldWindow | The WorldWindow instance. |
- Source:
Throws:
-
If the WorldWindow instance is missing.
- Type
- ArgumentError
Members
heading :Number
The heading of the camera, between -180 to +180 degrees.
It is used to rotate left or right around the look at position.
Type:
- Number
- Default Value:
- 0
- Source:
position :Position
The position to look at
Type:
- Source:
range :Number
The range from the camera to the look at position.
It is used to zoom in or out.
Type:
- Number
- Default Value:
- 10000000
- Source:
roll :Number
This camera's roll, in degrees.
Type:
- Number
- Default Value:
- 0
- Source:
tilt :Number
The tilt of the camera, between 0 to +90 degrees.
It is used to rotate up or down around the look at position.
Type:
- Number
- Default Value:
- 0
- Source:
wwd :WorldWindow
The WorldWindow instance.
Type:
- Source:
Methods
applyLimits()
Enforces navigation limits for this camera:
- a valid position: latitude -90 to 90 deg, longitude -180 to 180 deg, altitude, 0 to Number.MAX_VALUE
- a valid heading angle: -180 to 180 deg
- a valid tilt angle: 0 to 90 deg, 0 deg for 2D projections
- a valid roll angle: -180 to 180 deg
- a valid range: 1 to Number.MAX_VALUE, 1 to 40075016 for 2D projections
- Source:
clone(camera) → {ArcBallCamera}
Clones this camera to the specified camera.
If a camera is not provied a new one will be created.
Parameters:
Name | Type | Description |
---|---|---|
camera |
ArcBallCamera | undefined | The camera to save the rsults in. |
- Source:
Returns:
A colne of this camera.
- Type
- ArcBallCamera
copy(camera) → {ArcBallCamera}
Copies this camera to the specified camera.
Parameters:
Name | Type | Description |
---|---|---|
camera |
ArcBallCamera | The camera to copy. |
- Source:
Throws:
-
If the specified camera is missing.
- Type
- ArgumentError
Returns:
This camera, set to the values of the specified camera.
- Type
- ArcBallCamera
createViewMatrix(matrix) → {Matrix}
Creates a view matrix for this camera.
Parameters:
Name | Type | Description |
---|---|---|
matrix |
Matrix | A matrix in which to set the view matrix. |
- Source:
Throws:
-
If the specified matrix is missing.
- Type
- ArgumentError
Returns:
The view matrix.
- Type
- Matrix
toFirstPerson(camera) → {FirstPersonCamera}
Converts this arc ball camera to a first person camera.
Parameters:
Name | Type | Description |
---|---|---|
camera |
FirstPersonCamera | A camera in which to save the result of the transformation. |
- Source:
Throws:
-
If the specified camera is missing.
- Type
- ArgumentError
Returns:
The specified camera.
- Type
- FirstPersonCamera