can also contain a TimePrimitive ( or ). Time
values in Camera affect historical imagery, sunlight, and the display of time-stamped
features. For more information, read Time with AbstractViews in the Time and Animation
chapter of the Developer's Guide.
provides full six-degrees-of-freedom control over the view, so you can
position the Camera in space and then rotate it around the X, Y, and Z axes. Most
importantly, you can tilt the camera view so that you're looking above the horizon
into the sky.
Defines the virtual camera that views the scene. This element defines the position
of the camera relative to the Earth's surface as well as the viewing direction of
the camera. The camera position is defined by , , ,
and either or . The viewing direction of the camera
is defined by , , and . can be a child element of
any Feature or of . A parent element cannot contain both a
and a at the same time.
Defining a View
The X axis points toward the right of the camera and is called the right vector.
The Y axis defines the "up" direction relative to the screen and is called the up
vector. The Z axis points from the center of the screen toward the eye point. The
camera looks down the −Z axis, which is called the view vector.
The following diagram shows the X, Y, and Z axes, which are attached to the virtual
camera.
Within a Feature or , use either a or a object
(but not both in the same object). The object defines the viewpoint in
terms of the viewer's position and orientation. The object allows you to
specify a view that is not on the Earth's surface. The object defines the
viewpoint in terms of what is being viewed. The object is more limited
in scope than and generally requires that the view direction intersect
the Earth's surface.
Syntax:
<Camera id="ID">
<!-- inherited from AbstractView element -->
<TimePrimitive>...</TimePrimitive> <!-- gx:TimeSpan or gx:TimeStamp -->
<!-- specific to Camera -->
<longitude>0</longitude> <!-- kml:angle180 -->
<latitude>0</latitude> <!-- kml:angle90 -->
<altitude>0</altitude> <!-- double -->
<heading>0</heading> <!-- kml:angle360 -->
<tilt>0</tilt> <!-- kml:anglepos180 -->
<roll>0</roll> <!-- kml:angle180 -->
<altitudeMode>clampToGround</altitudeMode>
<!-- kml:altitudeModeEnum: relativeToGround, clampToGround, or absolute -->
<!-- or, gx:altitudeMode can be substituted: clampToSeaFloor, relativeToSeaFloor -->
</Camera>
setAbstractViewObjectExtension(java.util.List<AbstractObject> abstractViewObjectExtension)
Sets the value of the abstractViewObjectExtension property Objects of the following type(s) are allowed in the list List.
void
setAbstractViewSimpleExtension(java.util.List<java.lang.Object> abstractViewSimpleExtension)
Sets the value of the abstractViewSimpleExtension property Objects of the following type(s) are allowed in the list List
Longitude of the point the camera is looking at. Angular distance in degrees, relative
to the Prime Meridian. Values west of the Meridian range from −180 to 0 degrees.
Values east of the Meridian range from 0 to 180 degrees.
Longitude of the virtual camera (eye point). Angular distance in degrees, relative
to the Prime Meridian. Values west of the Meridian range from −180 to 0 degrees.
Values east of the Meridian range from 0 to 180 degrees.
latitude
protected double latitude
Latitude of the point the camera is looking at. Degrees north or south of the Equator
(0 degrees). Values range from −90 degrees to 90 degrees.
Latitude of the virtual camera. Degrees north or south of the Equator (0 degrees).
Values range from −90 degrees to 90 degrees.
altitude
protected double altitude
Distance from the earth's surface, in meters. Interpreted according to the LookAt's
altitude mode.
Distance of the camera from the earth's surface, in meters. Interpreted according
to the Camera's or .
Specifies the distance above the earth's surface, in meters, and is interpreted
according to the altitude mode.
heading
protected double heading
Direction (azimuth) of the camera, in degrees. Default=0 (true North). (See diagram.)
Values range from 0 to 360 degrees.
Direction (that is, North, South, East, West), in degrees. Default=0 (North). (See
diagram below.) Values range from 0 to 360 degrees.
Direction (that is, North, South, East, West), in degrees. Default=0 (North). (See
diagram.) Values range from 0 to 360 degrees.
Rotation about the z axis (normal to the Earth's surface). A value of 0 (the default)
equals North. A positive rotation is clockwise around the z axis and specified in
degrees from 0 to 360.
tilt
protected double tilt
Angle between the direction of the LookAt position and the normal to the surface
of the earth. (See diagram below.) Values range from 0 to 90 degrees. Values for
cannot be negative. A value of 0 degrees indicates viewing from directly
above. A value of 90 degrees indicates viewing along the horizon.
Rotation about the x axis. A positive rotation is clockwise around the x axis and
specified in degrees from 0 to 360.
Rotation, in degrees, of the camera around the X axis. A value of 0 indicates that
the view is aimed straight down toward the earth (the most common case). A value
for 90 for indicates that the view is aimed toward the horizon. Values greater
than 90 indicate that the view is pointed up into the sky. Values for are
clamped at +180 degrees.
roll
protected double roll
Rotation about the z axis (normal to the Earth's surface). A value of
0 (the default) equals North. A positive rotation is clockwise around the z axis
and specified in degrees from 0 to 360. Rotation about the x axis. A positive
rotation is clockwise around the x axis and specified in degrees from 0 to 360.
Rotation about the y axis. A positive rotation is clockwise around the y
axis and specified in degrees from 0 to 360. This diagram illustrates the typical
orientation of a model's axes:
Rotation about the y axis. A positive rotation is clockwise around the y axis and
specified in degrees from 0 to 360.
Rotation, in degrees, of the camera around the Z axis. Values range from −180 to
+180 degrees.
This diagram illustrates the typical orientation of a model's axes: