TimeOfDay

Engine/source/environment/timeOfDay.h

More...

Protected Types

enum
NetMaskBits {
  OrbitMask = Parent::NextFreeMask << 0
  AnimateMask = Parent::NextFreeMask << 1
}

Private Types

Parent 

Public Static Attributes

Protected Attributes

bool

Used to specify an azimuth that will stay constant throughout the day cycle.

length of day in real world seconds.

The 0-360 normalized elevation for the next update.

bool

The 0-360 normalized elevation for the previous update.

The time of day this object begins at.

The zero to one time of day where zero is the start of a day and one is the end.

Public Functions

addTimeEvent(F32 triggerElevation, const UTF8 * identifier)
animate(F32 time, F32 speed)

Called after any property of the object is changed in the world editor.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Processes a move event and updates object state once every 32 milliseconds.

setPlay(bool play)

Instructs this object to read state data previously packed with packUpdate.

Protected Functions

_addColorTarget(F32 ele, const LinearColorF & color, F32 bandMod, const LinearColorF & bandColor)

Adds a color target to our set of targets.

_calcAzimuth(F32 lat, F32 dec, F32 mer)
_calcElevation(F32 lat, F32 dec, F32 mer)

Adds all of our target colors to our COLOR_TARGETS.

_onTimeEvent(const String & identifier)

Protected Static Functions

bool
setDayLength(void * object, const char * index, const char * data)
bool
setPlay(void * object, const char * index, const char * data)
bool
setTimeOfDay(void * object, const char * index, const char * data)

Detailed Description

Protected Types

NetMaskBits

Enumerator

OrbitMask = Parent::NextFreeMask << 0
AnimateMask = Parent::NextFreeMask << 1

Private Types

typedef SceneObject Parent 

Public Static Attributes

S32 smCurrentTime 
F32 smTimeScale 

Protected Attributes

bool mAnimate 
F32 mAnimateSpeed 
F32 mAnimateTime 
F32 mAxisTilt 
F32 mAzimuth 
F32 mAzimuthOverride 

Used to specify an azimuth that will stay constant throughout the day cycle.

COLOR_TARGETS mColorTargets 
F32 mDayLen 

length of day in real world seconds.

F32 mDayScale 
F32 mElevation 
F32 mNextElevation 

The 0-360 normalized elevation for the next update.

F32 mNightScale 
bool mPlay 
F32 mPrevElevation 

The 0-360 normalized elevation for the previous update.

F32 mStartTimeOfDay 

The time of day this object begins at.

Vector< TimeOfDayEvent > mTimeEvents 
F32 mTimeOfDay 

The zero to one time of day where zero is the start of a day and one is the end.

VectorF mZenithDirection 

Protected Static Attributes

TimeOfDayUpdateSignal smTimeOfDayUpdateSignal 

Public Functions

TimeOfDay()

~TimeOfDay()

addTimeEvent(F32 triggerElevation, const UTF8 * identifier)

animate(F32 time, F32 speed)

DECLARE_CONOBJECT(TimeOfDay )

getAzimuthDegrees()

getAzimuthRads()

getElevationDegrees()

getElevationRads()

getSunColor(LinearColorF * outColor)

inspectPostApply()

Reimplemented from: SceneObject

onAdd()

Reimplemented from: SceneObject

onRemove()

Reimplemented from: SceneObject

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: SceneObject

processTick(const Move * move)

Reimplemented from: ProcessObject

setDayLength(F32 length)

setPlay(bool play)

setTimeOfDay(F32 time)

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: SceneObject

Public Static Functions

consoleInit()

getTimeOfDayUpdateSignal()

initPersistFields()

Protected Functions

_addColorTarget(F32 ele, const LinearColorF & color, F32 bandMod, const LinearColorF & bandColor)

Adds a color target to our set of targets.

Parameters:

ele

[in] target sun elevation.

color

[in] target color.

bandMod

[in]

bandColor

[in]

_calcAzimuth(F32 lat, F32 dec, F32 mer)

_calcElevation(F32 lat, F32 dec, F32 mer)

_getSunColor(LinearColorF * outColor)

_initColors()

Adds all of our target colors to our COLOR_TARGETS.

_onGhostAlwaysDone()

_onTimeEvent(const String & identifier)

_updatePosition()

_updateTimeEvents()

Protected Static Functions

setDayLength(void * object, const char * index, const char * data)

setPlay(void * object, const char * index, const char * data)

setTimeOfDay(void * object, const char * index, const char * data)