Sun Class Reference

#include <sun.h>

Inheritance diagram for Sun:

Inheritance graph
[legend]
List of all members.

Detailed Description

This Sun object should support different types of lighting systems because of the lighting system createLightInfo factory method.

So other lighting systems should only need to derive from here to add more information to the lightinfo.


Public Types

 UpdateMask = BIT(0)
enum  NetMaskBits { UpdateMask = BIT(0) }

Public Member Functions

 Sun ()
 ~Sun ()
virtual bool onAdd ()
 Called when the object is added to the sim.
virtual void onRemove ()
 Called when the object is removed from the sim.
virtual void registerLights (LightManager *lm, bool lightingScene)
 Called to register the object's lights, if any, with the LightManager.
void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
U32 packUpdate (NetConnection *conn, U32 mask, BitStream *stream)
 Instructs this object to pack its state for transfer over the network.
void unpackUpdate (NetConnection *conn, BitStream *stream)
 Instructs this object to read state data previously packed with packUpdate.
 DECLARE_CONOBJECT (Sun)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Public Attributes

F32 mSunAzimuth
F32 mSunElevation

Protected Member Functions

virtual void createLightIfNeeded ()
virtual void conformLight ()

Protected Attributes

ColorF mLightColor
ColorF mLightAmbient
LightInfomLight
LightInfomRegisteredLight

Private Types

typedef NetObject Parent


Member Typedef Documentation

typedef NetObject Sun::Parent [private]

Reimplemented from NetObject.


Member Enumeration Documentation

Enumerator:
UpdateMask 


Constructor & Destructor Documentation

Sun::Sun (  ) 

Sun::~Sun (  ) 


Member Function Documentation

virtual void Sun::createLightIfNeeded (  )  [protected, virtual]

virtual void Sun::conformLight (  )  [protected, virtual]

virtual bool Sun::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from NetObject.

virtual void Sun::onRemove (  )  [virtual]

Called when the object is removed from the sim.

Reimplemented from NetObject.

virtual void Sun::registerLights ( LightManager lm,
bool  lightingScene 
) [virtual]

Called to register the object's lights, if any, with the LightManager.

Parameters:
lm LightManager to put lights into.
lightingScene True if we're currently calculating lighting information.

Reimplemented from SimObject.

void Sun::inspectPostApply (  )  [virtual]

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

See also:
inspectPreApply

Reimplemented from SimObject.

static void Sun::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDeprecatedField(), addGroup(), endGroup()

Reimplemented from NetObject.

U32 Sun::packUpdate ( NetConnection conn,
U32  mask,
BitStream stream 
) [virtual]

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

Parameters:
conn Net connection being used
mask Mask indicating fields to transmit.
stream Bitstream to pack data to
Returns:
Any bits which were not dealt with. The value is stored by the networking system. Don't set bits you weren't passed.

Reimplemented from NetObject.

void Sun::unpackUpdate ( NetConnection conn,
BitStream stream 
) [virtual]

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

Parameters:
conn Net connection being used
stream stream to read from

Reimplemented from NetObject.

Sun::DECLARE_CONOBJECT ( Sun   ) 


Member Data Documentation

ColorF Sun::mLightColor [protected]

LightInfo* Sun::mLight [protected]