Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::SkyParameters Class Reference

Provides a reasonable (but not 100% physically correct) set of lighting parameters based on the time of day. More...

#include <SkyParameters.h>

List of all members.

Public Types

enum  { SUN, MOON }

Public Member Functions

GLight directionalLight () const
void setLatitude (float _latitude)
void setTime (const GameTime _time)
 SkyParameters (const GameTime _time, bool _physicallyCorrect=true, float _latitude=42.71f)
 SkyParameters ()

Public Attributes

Color3 ambient
Color3 diffuseAmbient
Color3 emissiveScale
float geoLatitude
Color3 lightColor
Vector3 lightDirection
double moonPhase
Vector3 moonPosition
bool physicallyCorrect
Color3 skyAmbient
enum G3D::SkyParameters:: { ... }  source
CoordinateFrame starFrame
Vector3 starVec
Vector3 sunPosition
Vector3 trueMoonPosition
CoordinateFrame trueStarFrame
Vector3 trueSunPosition


Detailed Description

Provides a reasonable (but not 100% physically correct) set of lighting parameters based on the time of day.

See also G3D::Lighting, which describes a rich lighting environment.


Member Enumeration Documentation

anonymous enum

Enumerator:
SUN 
MOON 


Constructor & Destructor Documentation

G3D::SkyParameters::SkyParameters (  ) 

G3D::SkyParameters::SkyParameters ( const GameTime  _time,
bool  _physicallyCorrect = true,
float  _latitude = 42.71f 
)

Sets light parameters for the sun/moon based on the specified time since midnight, as well as geographic latitude for starfield orientation (positive for north of the equator and negative for south) and geographic longitude for sun positioning (postive for east of Greenwich, and negative for west).

The latitude and longitude is set by default to that of Williamstown, MA, USA.


Member Function Documentation

GLight G3D::SkyParameters::directionalLight (  )  const

Returns a directional light composed from the light direction and color.

void G3D::SkyParameters::setLatitude ( float  _latitude  ) 

void G3D::SkyParameters::setTime ( const GameTime  _time  ) 


Member Data Documentation

Use this for objects that do not receive directional lighting (e.g.

billboards).

Multiply this by all emissive values when rendering.

Some algorithms (e.g. contrib/ArticulatedModel/ToneMap) scale down light intensity to preserve dynamic range.

Geographic position.

Directional light color.

Only one light source, the sun or moon, is active at a given time.

Using physically correct parameters.

When false, the sun and moon travel in a perfectly east-west arc where +x = east and -x = west.

Modulate sky box color.

The coordinate frame and vector related to the starfield.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:47 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo