fxLight Class Reference

#include <fxLight.h>

Inheritance diagram for fxLight:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 fxLight ()
 ~fxLight ()
virtual void buildObjectBox ()
virtual void calculateLightPosition ()
virtual SceneObjectgetAttachedObject ()
void setEnable (bool Status)
void setFlareBitmap (const char *Name)
void reset (void)
bool onNewDataBlock (GameBaseData *dptr)
 Called when a new datablock is set.
void processTick (const Move *)
 Processes a move event and updates object state once every 32 milliseconds.
bool prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState)
 Called when the SceneGraph is ready for the registration of RenderImages.
bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
void registerLights (LightManager *lightManager, bool lightingScene)
 Called to register the object's lights, if any, with the LightManager.
U32 packUpdate (NetConnection *, U32, BitStream *)
 Instructs this object to pack its state for transfer over the network.
void unpackUpdate (NetConnection *, BitStream *)
 Instructs this object to read state data previously packed with packUpdate.
 DECLARE_CONOBJECT (fxLight)

Static Public Member Functions

static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.
static void consoleInit ()
 Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.

Public Attributes

U32 mountPoint
MatrixF mountTransform
bool mEnable
F32 mIconSize
ColorF mAnimationColour
F32 mAnimationBrightness
F32 mAnimationRadius
Point3F mAnimationPosition
Point3F mAnimationOffset
F32 mAnimationRotation
F32 mColourElapsedTime
F32 mBrightnessElapsedTime
F32 mRadiusElapsedTime
F32 mOffsetElapsedTime
F32 mRotationElapsedTime
F32 mColourTimeScale
F32 mBrightnessTimeScale
F32 mRadiusTimeScale
F32 mOffsetTimeScale
F32 mRotationTimeScale
U32 mRedKeysLength
U32 mGreenKeysLength
U32 mBlueKeysLength
U32 mBrightnessKeysLength
U32 mRadiusKeysLength
U32 mOffsetKeysLength
U32 mRotationKeysLength

Protected Types

 fxLightConfigChangeMask = Parent::NextFreeMask << 1
 fxLightAttachChange = fxLightConfigChangeMask << 1
enum  {
  fxLightConfigChangeMask = Parent::NextFreeMask << 1,
  fxLightAttachChange = fxLightConfigChangeMask << 1
}

Protected Member Functions

U32 CheckKeySyntax (StringTableEntry Key)
void CheckAnimationKeys (void)
F32 GetLerpKey (StringTableEntry Key, U32 PosFrom, U32 PosTo, F32 ValueFrom, F32 ValueTo, F32 Lerp)
void AnimateLight (void)
void InitialiseAnimation (void)
void ResetAnimation (void)
bool TestLOS (const Point3F &ObjectPosition, SceneObject *AttachedObj)
void renderObject (ObjectRenderInst *ri, BaseMatInstance *)

Protected Attributes

bool mAddedToScene
MRandomLCG RandomGen
GFXTexHandle mIconTextureHandle
GFXTexHandle mFlareTextureHandle
LightInfomLight
U32 mLastAnimateTime
U32 mLastRenderTime
F32 mFlareScale
bool mAttached
GFXStateBlockRef mBlendOneSB
GFXStateBlockRef mBlendInvSrcAlphaSB
GFXStateBlockRef mBlendOne2SB
GFXStateBlockRef mIconSB
ObjectRenderInst::RenderDelegate mRenderDelegate

Static Protected Attributes

static char * smIconTextureFilename

Private Types

typedef GameBase Parent

Private Attributes

fxLightDatamDataBlock

Member Typedef Documentation

typedef GameBase fxLight::Parent [private]

Reimplemented from GameBase.

Reimplemented in sgLightObject, and VolumeLight.


Member Enumeration Documentation

anonymous enum [protected]

Enumerator:
fxLightConfigChangeMask 
fxLightAttachChange 


Constructor & Destructor Documentation

fxLight::fxLight (  ) 

fxLight::~fxLight (  ) 


Member Function Documentation

U32 fxLight::CheckKeySyntax ( StringTableEntry  Key  )  [protected]

void fxLight::CheckAnimationKeys ( void   )  [protected]

F32 fxLight::GetLerpKey ( StringTableEntry  Key,
U32  PosFrom,
U32  PosTo,
F32  ValueFrom,
F32  ValueTo,
F32  Lerp 
) [protected]

void fxLight::AnimateLight ( void   )  [protected]

void fxLight::InitialiseAnimation ( void   )  [protected]

void fxLight::ResetAnimation ( void   )  [protected]

bool fxLight::TestLOS ( const Point3F ObjectPosition,
SceneObject AttachedObj 
) [protected]

void fxLight::renderObject ( ObjectRenderInst ri,
BaseMatInstance  
) [protected]

Reimplemented in sgLightObject, and VolumeLight.

virtual void fxLight::buildObjectBox (  )  [inline, virtual]

Reimplemented in VolumeLight.

virtual void fxLight::calculateLightPosition (  )  [inline, virtual]

Reimplemented in sgLightObject.

virtual SceneObject* fxLight::getAttachedObject (  )  [inline, virtual]

Reimplemented in sgLightObject.

void fxLight::setEnable ( bool  Status  ) 

void fxLight::setFlareBitmap ( const char *  Name  ) 

void fxLight::reset ( void   ) 

bool fxLight::onNewDataBlock ( GameBaseData dptr  )  [virtual]

Called when a new datablock is set.

This allows subclasses to appropriately handle new datablocks.

See also:
setDataBlock()
Parameters:
dptr New datablock

Reimplemented from GameBase.

Reimplemented in sgLightObject, and VolumeLight.

void fxLight::processTick ( const Move  )  [virtual]

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

This takes place both on the client and server, every 32 milliseconds (1 tick).

See also:
ProcessList
Parameters:
move Move event corresponding to this tick, or NULL.

Reimplemented from GameBase.

Reimplemented in sgLightObject.

bool fxLight::prepRenderImage ( SceneState state,
const U32  stateKey,
const U32  startZone,
const bool  modifyBaseZoneState 
) [virtual]

Called when the SceneGraph is ready for the registration of RenderImages.

See also:
SceneState
Parameters:
state SceneState
stateKey State key of the current SceneState
startZone Base zone index
modifyBaseZoneState If true, the object needs to modify the zone state.

Reimplemented from SceneObject.

Reimplemented in VolumeLight.

bool fxLight::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from GameBase.

Reimplemented in sgLightObject, and VolumeLight.

void fxLight::onRemove (  )  [virtual]

Called when the object is removed from the sim.

Reimplemented from GameBase.

Reimplemented in VolumeLight.

void fxLight::inspectPostApply (  )  [virtual]

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

See also:
inspectPreApply

Reimplemented from GameBase.

Reimplemented in sgLightObject, and VolumeLight.

void fxLight::registerLights ( LightManager lightManager,
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.

Reimplemented in sgLightObject.

U32 fxLight::packUpdate ( NetConnection ,
U32  ,
BitStream  
) [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 GameBase.

Reimplemented in sgLightObject, and VolumeLight.

void fxLight::unpackUpdate ( NetConnection ,
BitStream  
) [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 GameBase.

Reimplemented in sgLightObject, and VolumeLight.

static void fxLight::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

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

Reimplemented from GameBase.

Reimplemented in sgLightObject, and VolumeLight.

static void fxLight::consoleInit (  )  [static]

Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.

See also:
console

Reimplemented from GameBase.

fxLight::DECLARE_CONOBJECT ( fxLight   ) 


Member Data Documentation

Reimplemented from GameBase.

Reimplemented in sgLightObject, and VolumeLight.

char* fxLight::smIconTextureFilename [static, protected]

LightInfo* fxLight::mLight [protected]

Reimplemented in sgLightObject.

bool fxLight::mAttached [protected]