SilverLining
Public Member Functions | List of all members
SilverLining::Location Class Reference

An object representing a geographic location. More...

#include <Location.h>

Inheritance diagram for SilverLining::Location:
Inheritance graph
[legend]
Collaboration diagram for SilverLining::Location:
Collaboration graph
[legend]

Public Member Functions

 Location ()
 Default constructor.
 
void SILVERLINING_API SetLatitude (double decimalLatitude)
 Set the simulated latitude.
 
double SILVERLINING_API GetLatitude () const
 Retrieves the simulated latitude in decimal degrees form.
 
void SILVERLINING_API SetLongitude (double decimalLongitude)
 Set the simulated longitude.
 
double SILVERLINING_API GetLongitude () const
 Retrieves the simulated longitude in decimal degrees.
 
void SILVERLINING_API SetAltitude (double metersAboveMeanSeaLevel)
 Sets the simulated eyepoint altitude in meters above mean sea level.
 
double SILVERLINING_API GetAltitude () const
 Retrives the currently simulated altitude above mean sea level, in meters.
 
bool SILVERLINING_API Serialize (std::ostream &stream)
 Flattens this object and everything in it to a stream buffer.
 
bool SILVERLINING_API 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(), unless you are choose to set all times as GMT/UTC rather than local time.

Constructor & Destructor Documentation

◆ Location()

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

◆ GetAltitude()

double SILVERLINING_API SilverLining::Location::GetAltitude ( ) const
inline

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

See also
SetAltitude()

◆ GetLatitude()

double SILVERLINING_API SilverLining::Location::GetLatitude ( ) const
inline

Retrieves the simulated latitude in decimal degrees form.

North is positive.

See also
SetLatitude()

◆ GetLongitude()

double SILVERLINING_API SilverLining::Location::GetLongitude ( ) const
inline

Retrieves the simulated longitude in decimal degrees.

East is positive.

See also
SetLongitude()

◆ Serialize()

bool SILVERLINING_API SilverLining::Location::Serialize ( std::ostream &  stream)

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

◆ SetAltitude()

void SILVERLINING_API 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()

◆ SetLatitude()

void SILVERLINING_API SilverLining::Location::SetLatitude ( double  decimalLatitude)
inline

Set the simulated latitude.

Parameters
decimalLatitudeThe latitude in decimal degrees form (ie, 45.87). North is positive. this value must be in the range of -90 to 90.
See also
GetLatitude()

◆ SetLongitude()

void SILVERLINING_API SilverLining::Location::SetLongitude ( double  decimalLongitude)
inline

Set the simulated longitude.

Parameters
decimalLongitudeThe longitude in decimal degrees form (ie, -122.78). East is positive. This value must be in the range of -180.0 to 180.0.
See also
GetLongitude()

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