torque Torque Game Engine Documentation
TGE Version 1.5.2

Sky Class Reference

#include <sky.h>

Inheritance diagram for Sky:

Inheritance graph
[legend]

Public Types

enum  NetMaskBits {
  InitMask = BIT(0),
  VisibilityMask = BIT(1),
  StormCloudMask = BIT(2),
  StormFogMask = BIT(3),
  StormRealFogMask = BIT(4),
  WindMask = BIT(5),
  StormCloudsOnMask = BIT(6),
  StormFogOnMask = BIT(7)
}
enum  Constants {
  EnvMapMaterialOffset = 6,
  CloudMaterialOffset = 7
}

Public Member Functions

 Sky ()
 ~Sky ()
F32 getVisibleDistance () const
 DECLARE_CONOBJECT (Sky)
 Torque infrastructure.
bool processArguments (S32 argc, const char **argv)
 Process constructor options. (ie, new SimObject(1,2,3)).
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.
void updateVisibility ()
void applySkyChanges ()
Storm management.
void stormCloudsShow (bool)
void stormFogShow (bool)
void stormCloudsOn (S32 state, F32 time)
void stormFogOn (F32 percentage, F32 time)
void stormRealFog (S32 value, F32 max, F32 min, F32 speed)
Wind velocity
void setWindVelocity (const Point3F &)
Point3F getWindVelocity ()
Environment mapping
TextureHandle getEnvironmentMap ()

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.

Data Fields

bool mEffectPrecip
Point2F mWindDir

Protected Member Functions

bool onAdd ()
 Called when the object is added to the sim.
void onRemove ()
 Called when the object is removed from the sim.
bool prepRenderImage (SceneState *state, const U32 stateKey, const U32 startZone, const bool modifyBaseZoneState=false)
 Called when the SceneGraph is ready for the registration of RenderImages.
void renderObject (SceneState *state, SceneRenderImage *image)
 Called when the object is supposed to render itself.
void render (SceneState *state)
void calcAlphas_Heights (F32 zCamPos, F32 *banHeights, F32 *alphaBan, F32 DepthInFog)
void renderSkyBox (F32 lowerBanHeight, F32 alphaIn)
void calcBans (F32 *banHeights, Point3F banPoints[][MAX_BAN_POINTS], Point3F *cornerPoints)
void renderBans (F32 *alphaBan, F32 *banHeights, Point3F banPoints[][MAX_BAN_POINTS], Point3F *cornerPoints)
void inspectPostApply ()
 Called after any property of the object is changed in the world editor.
void startStorm ()
void setVisibility ()
void initSkyData ()
bool loadDml ()
void updateFog ()
void updateRealFog ()
void startStormFog ()
void setRenderPoints (Point3F *renderPoints, S32 index)
void calcTexCoords (Point2F *texCoords, Point3F *renderPoints, S32 index)

Private Types

typedef SceneObject Parent

Private Member Functions

void calcPoints ()

Private Attributes

StormCloudData mStormCloudData
StormFogData mStormFogData
TextureHandle mSkyHandle [6]
StringTableEntry mCloudText [MAX_NUM_LAYERS]
F32 mCloudHeight [MAX_NUM_LAYERS]
F32 mCloudSpeed [MAX_NUM_LAYERS]
Cloud mCloudLayer [MAX_NUM_LAYERS]
F32 mRadius
Point3F mPoints [10]
Point2F mTexCoord [4]
StringTableEntry mMaterialListName
Point3F mSkyBoxPt
Point3F mTopCenterPt
Point3F mSpherePt
ColorI mRealFogColor
ColorI mRealSkyColor
MaterialList mMaterialList
ColorF mFogColor
bool mSkyTexturesOn
bool mRenderBoxBottom
ColorF mSolidFillColor
F32 mFogDistance
F32 mVisibleDistance
U32 mNumFogVolumes
FogVolume mFogVolumes [MaxFogVolumes]
F32 mFogLine
F32 mFogTime
F32 mFogPercentage
S32 mFogVolume
S32 mRealFog
F32 mRealFogMax
F32 mRealFogMin
F32 mRealFogSpeed
bool mNoRenderBans
bool mLastForce16Bit
bool mLastForcePaletted
SkyState mFogState
S32 mNumCloudLayers
Point3F mWindVelocity
F32 mLastVisDisMod
bool mStormCloudsOn
bool mStormFogOn
bool mSetFog

Static Private Attributes

static bool smCloudsOn
static bool smCloudOutlineOn
static bool smSkyOn
static S32 smNumCloudsOn

Member Typedef Documentation

typedef SceneObject Sky::Parent [private]

Reimplemented from SceneObject.


Member Enumeration Documentation

Enumerator:
InitMask 
VisibilityMask 
StormCloudMask 
StormFogMask 
StormRealFogMask 
WindMask 
StormCloudsOnMask 
StormFogOnMask 

Enumerator:
EnvMapMaterialOffset 
CloudMaterialOffset 


Constructor & Destructor Documentation

Sky::Sky (  ) 

Sky::~Sky (  ) 


Member Function Documentation

void Sky::calcPoints (  )  [private]

bool Sky::onAdd (  )  [protected, virtual]

Called when the object is added to the sim.

Reimplemented from SceneObject.

void Sky::onRemove (  )  [protected, virtual]

Called when the object is removed from the sim.

Reimplemented from SceneObject.

bool Sky::prepRenderImage ( SceneState state,
const U32  stateKey,
const U32  startZone,
const bool  modifyBaseZoneState = false 
) [protected, 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.

void Sky::renderObject ( SceneState state,
SceneRenderImage image 
) [protected, virtual]

Called when the object is supposed to render itself.

Parameters:
state Current rendering state.
See also:
SceneState
Parameters:
image Image associated with this object to render.
See also:
SceneRenderImage

Reimplemented from SceneObject.

void Sky::render ( SceneState state  )  [protected]

void Sky::calcAlphas_Heights ( F32  zCamPos,
F32 banHeights,
F32 alphaBan,
F32  DepthInFog 
) [protected]

void Sky::renderSkyBox ( F32  lowerBanHeight,
F32  alphaIn 
) [protected]

void Sky::calcBans ( F32 banHeights,
Point3F  banPoints[][MAX_BAN_POINTS],
Point3F cornerPoints 
) [protected]

void Sky::renderBans ( F32 alphaBan,
F32 banHeights,
Point3F  banPoints[][MAX_BAN_POINTS],
Point3F cornerPoints 
) [protected]

void Sky::inspectPostApply (  )  [protected, virtual]

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

See also:
inspectPreApply

Reimplemented from SceneObject.

void Sky::startStorm (  )  [protected]

void Sky::setVisibility (  )  [protected]

void Sky::initSkyData (  )  [protected]

bool Sky::loadDml (  )  [protected]

void Sky::updateFog (  )  [protected]

void Sky::updateRealFog (  )  [protected]

void Sky::startStormFog (  )  [protected]

void Sky::setRenderPoints ( Point3F renderPoints,
S32  index 
) [protected]

void Sky::calcTexCoords ( Point2F texCoords,
Point3F renderPoints,
S32  index 
) [protected]

F32 Sky::getVisibleDistance (  )  const [inline]

void Sky::stormCloudsShow ( bool   ) 

void Sky::stormFogShow ( bool   ) 

void Sky::stormCloudsOn ( S32  state,
F32  time 
)

void Sky::stormFogOn ( F32  percentage,
F32  time 
)

void Sky::stormRealFog ( S32  value,
F32  max,
F32  min,
F32  speed 
)

void Sky::setWindVelocity ( const Point3F  ) 

Point3F Sky::getWindVelocity (  ) 

TextureHandle Sky::getEnvironmentMap (  )  [inline]

Sky::DECLARE_CONOBJECT ( Sky   ) 

Torque infrastructure.

static void Sky::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

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

Reimplemented from SceneObject.

static void Sky::consoleInit (  )  [static]

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

Deprecated:
You should use ConsoleMethod and ConsoleFunction, not this, to register methods or commands.
See also:
console

Reimplemented from ConsoleObject.

bool Sky::processArguments ( S32  argc,
const char **  argv 
) [virtual]

Process constructor options. (ie, new SimObject(1,2,3)).

Reimplemented from SimObject.

U32 Sky::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 Sky::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.

void Sky::updateVisibility (  ) 

void Sky::applySkyChanges (  )  [inline]


Field Documentation

TextureHandle Sky::mSkyHandle[6] [private]

StringTableEntry Sky::mCloudText[MAX_NUM_LAYERS] [private]

F32 Sky::mCloudHeight[MAX_NUM_LAYERS] [private]

F32 Sky::mCloudSpeed[MAX_NUM_LAYERS] [private]

Cloud Sky::mCloudLayer[MAX_NUM_LAYERS] [private]

F32 Sky::mRadius [private]

Point3F Sky::mPoints[10] [private]

Point2F Sky::mTexCoord[4] [private]

bool Sky::mSkyTexturesOn [private]

bool Sky::mRenderBoxBottom [private]

FogVolume Sky::mFogVolumes[MaxFogVolumes] [private]

F32 Sky::mFogLine [private]

F32 Sky::mFogTime [private]

S32 Sky::mFogVolume [private]

S32 Sky::mRealFog [private]

F32 Sky::mRealFogMax [private]

F32 Sky::mRealFogMin [private]

bool Sky::mNoRenderBans [private]

bool Sky::mLastForce16Bit [private]

bool Sky::mLastForcePaletted [private]

bool Sky::smCloudsOn [static, private]

bool Sky::smCloudOutlineOn [static, private]

bool Sky::smSkyOn [static, private]

S32 Sky::smNumCloudsOn [static, private]

bool Sky::mStormCloudsOn [private]

bool Sky::mStormFogOn [private]

bool Sky::mSetFog [private]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen