-
protected_aspectNumber
-
Aspect ratio.
-
protected_bVec3
-
Camera forward vector.
-
protected_insideSegmentquadTree.Node
-
Quad node that camera flies over.
-
protected_insideSegmentPositionLonLat
-
Coordinates that depends on what segment class we are fling over.
It can be WGS84 or Mercator coordinates. Gets in og.quadTree.Node
-
protected_lonLatLonLat
-
Current geographical degree position.
-
protected_lonLatMercLonLat
-
Current geographical mercator position.
-
protected_normalMatrixMat3
-
Camera normal matrix.
-
protected_rVec3
-
Camera right vector.
-
protected_terrainAltitudenumber
-
Current altitude.
-
protected_terrainPointVec3
-
Cartesian coordinates on the terrain.
-
protected_uVec3
-
Camera up vector.
-
protected_viewAngleNumber
-
Camera view angle in degrees
-
-
Camera view matrix.
-
eventsEvents
-
Camera events handler
-
eyeVec3
-
Camera position.
-
eyeHighVec3
-
Camera RTE high position
-
eyeLowVec3
-
Camera RTE low position
-
maxAltitudenumber
-
Maximal alltitude that camera can reach over the globe.
-
minAltitudenumber
-
Minimal alltitude that camera can reach over the terrain.
-
planetPlanet
-
Assigned camera's planet.
-
-
Assigned renderer
-
-
Camera initialization.
Name |
Type |
Description |
renderer |
Renderer
|
OpenGlobus renderer object. |
options |
Object
|
optional
Camera options:
Name |
Type |
Description |
viewAngle |
number
|
optional
Camera angle of view. Default is 30.0 |
near |
number
|
optional
Camera near plane distance. Default is 1.0 |
far |
number
|
optional
Camera far plane distance. Deafult is og.math.MAX |
eye |
Vec3
|
optional
Camera eye position. Default (0,0,0) |
look |
Vec3
|
optional
Camera look position. Default (0,0,0) |
up |
Vec3
|
optional
Camera eye position. Default (0,1,0) |
|
-
-
Sets up camera projection
Name |
Type |
Description |
angle |
nnumber
|
Camera's view angle |
aspect |
number
|
Screen aspect ration |
-
-
Prepare camera to the frame. Used in render node frame function.
-
flyCartesian(cartesian, look, up, ampl, completeCallback, startCallback, frameCallback)
-
Flies to the cartesian coordinates.
Name |
Type |
Default |
Description |
cartesian |
Vec3
|
|
Finish cartesian coordinates. |
look |
Vec3
|
|
optional
Camera LOOK in the end of flying. Default - (0,0,0) |
up |
Vec3
|
|
optional
Camera UP vector in the end of flying. Default - (0,1,0) |
ampl |
Number
|
1.0
|
optional
Altitude amplitude factor. |
completeCallback |
cameraCallback
|
|
optional
Callback that calls after flying when flying is finished. |
startCallback |
cameraCallback
|
|
optional
Callback that calls befor the flying begins. |
frameCallback |
|
|
optional
|
-
flyExtent(extent, up, ampl, completeCallback, startCallback, frameCallback)
-
Flies to the current extent.
Name |
Type |
Description |
extent |
Extent
|
Current extent. |
up |
Vec3
|
optional
Camera UP in the end of flying. Default - (0,1,0) |
ampl |
Number
|
optional
Altitude amplitude factor. |
completeCallback |
cameraCallback
|
optional
Callback that calls after flying when flying is finished. |
startCallback |
cameraCallback
|
optional
Callback that calls befor the flying begins. |
frameCallback |
|
optional
|
-
flyLonLat(lonlat, look, up, ampl, completeCallback, startCallback)
-
Flies to the geo coordiantes.
Name |
Type |
Description |
lonlat |
LonLat
|
Finish coordinates. |
look |
Vec3
|
optional
Camera LOOK in the end of flying. Default - (0,0,0) |
up |
Vec3
|
optional
Camera UP vector in the end of flying. Default - (0,1,0) |
ampl |
Number
|
optional
Altitude amplitude factor. |
completeCallback |
cameraCallback
|
optional
Callback that calls after flying when flying is finished. |
startCallback |
cameraCallback
|
optional
Callback that calls befor the flying begins. |
-
-
Gets altitude over the terrain.
-
-
Returns aspect ratio
Returns:
Type |
Description |
number
|
- Aspect ratio |
-
getExtentPosition(extent, height){Vec3}
-
Gets position by viewable extent.
Name |
Type |
Description |
extent |
Extent
|
Viewable extent. |
height |
Number
|
Camera height |
Returns:
-
-
Returns camera height.
Returns:
-
-
Returns inverse projection matrix.
Returns:
Type |
Description |
Mat4
|
- Inversed projection-view matrix. |
-
-
Returns inverse projection and model matrix product.
Returns:
Type |
Description |
Mat4
|
- Inversed projection-view matrix. |
-
-
Returns camera geographical position.
Returns:
-
-
Returns normal matrix.
Returns:
Type |
Description |
Mat3
|
- Normal matrix. |
-
-
Returns projection matrix.
Returns:
Type |
Description |
Mat4
|
- Projection matrix. |
-
-
Returns projection and model matrix product.
Returns:
Type |
Description |
Mat4
|
- Projection-view matrix. |
-
-
Gets camera view angle in degrees
Returns:
Type |
Description |
number
|
angle - |
-
-
Returns model matrix.
Returns:
Type |
Description |
Mat4
|
- View matrix. |
-
-
Returns camera is flying.
Returns:
-
-
Sets camera look point
Name |
Type |
Description |
look |
Vec3
|
Look point |
up |
Vec3
|
optional
Camera up vector otherwise camera current up vector(this._u) |
-
-
Pitch the camera to the angle in degrees
Name |
Type |
Description |
angle |
number
|
Delta pitch angle in degrees |
-
-
Gets projected 3d point to the 2d screen coordiantes
Name |
Type |
Description |
v |
Vec3
|
Cartesian 3d coordiantes |
Returns:
Type |
Description |
Vec2
|
- Screen point coordinates |
-
-
Gets 3d size factor. Uses in LOD distance calculation.
Name |
Type |
Description |
p |
Vec3
|
Far point. |
r |
Vec3
|
Far point. |
Returns:
Type |
Description |
number
|
- Size factor. |
-
-
Refresh camera matrices
-
-
Roll the camera to the angle in degrees
Name |
Type |
Description |
angle |
number
|
Delta roll angle in degrees |
-
inherited
rotateAround(angle, isArc, center, up)
-
Rotates camera around center point
Name |
Type |
Description |
angle |
number
|
Rotation angle in radians |
isArc |
boolean
|
If true camera up vector gets from current up vector every frame,
otherwise up is always input parameter. |
center |
Vec3
|
Point that the camera rotates around |
up |
Vecto3
|
optional
Camera up vector |
-
-
Rotates around planet to the south pole.
Name |
Type |
Description |
angle |
number
|
Rotation angle. |
-
inherited
rotateHorizontal(angle, isArc, center, up)
-
Rotates camera around center point by horizontal.
Name |
Type |
Description |
angle |
number
|
Rotation angle in radians. |
isArc |
boolaen
|
If true camera up vector gets from current up vector every frame,
otherwise up is always input parameter. |
center |
Vec3
|
Point that the camera rotates around. |
up |
Vec3
|
optional
Camera up vector. |
-
-
Rotates around planet to the left.
Name |
Type |
Description |
angle |
number
|
Rotation angle. |
spin |
boolean
|
optional
If its true rotates around globe spin. |
-
-
Rotates around planet to the right.
Name |
Type |
Description |
angle |
number
|
Rotation angle. |
spin |
boolean
|
optional
If its true rotates around globe spin. |
-
-
Rotates around planet to the north pole.
Name |
Type |
Description |
angle |
number
|
Rotation angle. |
-
-
Rotates camera around center point by vecrtical.
Name |
Type |
Description |
angle |
number
|
Rotation angle in radians. |
center |
Vec3
|
Point that the camera rotates around. |
-
-
Sets camera to eye position
Name |
Type |
Description |
eye |
Vec3
|
Camera position |
look |
Vec3
|
Look point |
up |
Vec3
|
Camera up vector |
Returns:
Type |
Description |
Camera
|
- This camera |
-
-
Sets altitude over the terrain.
Name |
Type |
Description |
alt |
number
|
Altitude over the terrain. |
-
-
Sets aspect ratio
Name |
Type |
Description |
aspect |
Number
|
Camera aspect ratio |
-
setLonLat(lonlat, lookLonLat, up)
-
Places camera to view to the geographical point.
Name |
Type |
Description |
lonlat |
LonLat
|
New camera and camera view position. |
lookLonLat |
LonLat
|
optional
Look up coordinates. |
up |
Vec3
|
optional
Camera UP vector. Default (0,1,0) |
-
-
Sets camera view angle in degrees
Name |
Type |
Description |
angle |
number
|
View angle |
-
-
Slides camera to vector d - (du, dv, dn)
Name |
Type |
Description |
du |
number
|
delta X |
dv |
number
|
delta Y |
dn |
number
|
delta Z |
-
-
Breaks the flight.
-
-
Returns normal vector direction to to the unprojected screen point from camera eye
Name |
Type |
Description |
x |
number
|
Scren X coordinate |
y |
number
|
Scren Y coordinate |
Returns:
Type |
Description |
Vec3
|
- Direction vector |
-
-
Updates camera view space.
-
-
View current extent.
Name |
Type |
Description |
extent |
Extent
|
Current extent. |
-
-
Yaw the camera to the angle in degrees
Name |
Type |
Description |
angle |
number
|
Delta yaw angle in degrees |