SilverLining::Location Class Reference

An object representing a geographic location. More...

#include <Location.h>

List of all members.

Public Member Functions

 Location ()
 Default constructor.
void SetLatitude (double decimalLatitude)
 Set the simulated latitude.
double GetLatitude () const
 Retrieves the simulated latitude in decimal degrees form.
void SetLongitude (double decimalLongitude)
 Set the simulated longitude.
double GetLongitude () const
 Retrieves the simulated longitude in decimal degrees.
void SetAltitude (double metersAboveMeanSeaLevel)
 Sets the simulated eyepoint altitude in meters above mean sea level.
double GetAltitude () const
 Retrives the currently simulated altitude above mean sea level, in meters.
bool Serialize (std::ostream &stream)
 Flattens this object and everything in it to a stream buffer.
bool Unserialize (std::istream &stream)
 Restores this object from the stream created using Serialize().

Detailed Description

An object representing a geographic location.

A Location object must be passed to AtmosphericConditions::SetLocation() to specify the location you wish to simulate. This affects the position of the sun and moon in the sky, which in turn affects your scene's lighting. Be sure that your Location is consistent with the time zone specified in LocalTime::SetTimeZone().


Constructor & Destructor Documentation

SilverLining::Location::Location (  ) 

Default constructor.

Creates a Location object with default settings. Defaults will be read from the SilverLining.config file if this is constructed after calling Atmosphere::Initialize()


Member Function Documentation

double SilverLining::Location::GetAltitude (  )  const [inline]

Retrives the currently simulated altitude above mean sea level, in meters.

See also:
SetAltitude()
double SilverLining::Location::GetLatitude (  )  const [inline]

Retrieves the simulated latitude in decimal degrees form.

North is positive.

See also:
SetLatitude()
double SilverLining::Location::GetLongitude (  )  const [inline]

Retrieves the simulated longitude in decimal degrees.

East is positive.

See also:
SetLongitude()
bool SilverLining::Location::Serialize ( std::ostream &  stream  ) 

Flattens this object and everything in it to a stream buffer.

void SilverLining::Location::SetAltitude ( double  metersAboveMeanSeaLevel  )  [inline]

Sets the simulated eyepoint altitude in meters above mean sea level.

This altitude is only used for astronomical calculations and thereby doesn't have much of an affect on the simulation. Therefore it is not necessary to call SetAltitude() whenever your camera position changes, nor is it particularly important to set this to anything other than zero.

See also:
GetAltitude()
void SilverLining::Location::SetLatitude ( double  decimalLatitude  )  [inline]

Set the simulated latitude.

Parameters:
decimalLatitude The latitude in decimal degrees form (ie, 45.87). North is positive.
See also:
GetLatitude()
void SilverLining::Location::SetLongitude ( double  decimalLongitude  )  [inline]

Set the simulated longitude.

Parameters:
decimalLongitude The longitude in decimal degrees form (ie, -122.78). East is positive.
See also:
GetLongitude()

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2