Sky Class Reference#include <sky.h>
Inheritance diagram for Sky:
[legend]List of all members.
|
Public Types |
| InitMask = BIT(0) |
| VisibilityMask = BIT(1) |
| StormCloudMask = BIT(2) |
| StormFogMask = BIT(3) |
| StormRealFogMask = BIT(4) |
| WindMask = BIT(5) |
| StormCloudsOnMask = BIT(6) |
| StormFogOnMask = BIT(7) |
| SkyGlowMask = BIT(8) |
| EnvMapMaterialOffset = 6 |
| CloudMaterialOffset = 7 |
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),
SkyGlowMask = BIT(8)
} |
enum | Constants {
EnvMapMaterialOffset = 6,
CloudMaterialOffset = 7
} |
Public Member Functions |
| Sky () |
| ~Sky () |
F32 | getVisibleDistance () const |
| DECLARE_CONOBJECT (Sky) |
| Torque infrastructure.
|
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 () |
|
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) |
|
void | setWindVelocity (const Point3F &) |
const Point3F & | getWindVelocity () const |
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 |
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 (ObjectRenderInst *ri, BaseMatInstance *) |
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 (const F32 *alphaBan, const F32 *banHeights, const Point3F banPoints[][MAX_BAN_POINTS], const 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, F32 lowerBanHeight) |
Protected Attributes |
ObjectRenderInst::RenderDelegate | mRenderDelegate |
Private Types |
typedef SceneObject | Parent |
Private Member Functions |
void | calcPoints () |
void | loadVBPoints () |
void | setupStateBlocks () |
Private Attributes |
StormCloudData | mStormCloudData |
StormFogData | mStormFogData |
GFXTexHandle | mSkyHandle [6] |
F32 | mCloudHeight [MAX_NUM_LAYERS] |
F32 | mCloudSpeed [MAX_NUM_LAYERS] |
Cloud | mCloudLayer [MAX_NUM_LAYERS] |
F32 | mRadius |
Point3F | mPoints [10] |
Point2F | mTexCoord [4] |
FileName | 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 |
F32 | mBanOffsetHeight |
SkyState | mFogState |
S32 | mNumCloudLayers |
Point3F | mWindVelocity |
F32 | mLastVisDisMod |
GFXVertexBufferHandle< GFXVertexPCT > | mSkyVB |
bool | mStormCloudsOn |
bool | mStormFogOn |
bool | mSetFog |
bool | mSkyGlow |
ColorF | mSkyGlowColor |
GFXStateBlockRef | mClearSB |
GFXStateBlockRef | mSkyBoxSB |
GFXStateBlockRef | mRenderBansSB |
Static Private Attributes |
static bool | smCloudsOn |
static bool | smCloudOutlineOn |
static bool | smSkyOn |
static S32 | smNumCloudsOn |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
InitMask |
|
VisibilityMask |
|
StormCloudMask |
|
StormFogMask |
|
StormRealFogMask |
|
WindMask |
|
StormCloudsOnMask |
|
StormFogOnMask |
|
SkyGlowMask |
|
- Enumerator:
-
EnvMapMaterialOffset |
|
CloudMaterialOffset |
|
Constructor & Destructor Documentation
Member Function Documentation
void Sky::calcPoints |
( |
|
) |
[private] |
void Sky::loadVBPoints |
( |
|
) |
[private] |
void Sky::setupStateBlocks |
( |
|
) |
[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::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 |
( |
const F32 * |
alphaBan, |
|
|
const F32 * |
banHeights, |
|
|
const Point3F |
banPoints[][MAX_BAN_POINTS], |
|
|
const Point3F * |
cornerPoints | |
|
) |
| | [protected] |
void Sky::inspectPostApply |
( |
|
) |
[protected, virtual] |
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] |
F32 Sky::getVisibleDistance |
( |
|
) |
const [inline] |
const Point3F& Sky::getWindVelocity |
( |
|
) |
const |
Sky::DECLARE_CONOBJECT |
( |
Sky |
|
) |
|
static void Sky::initPersistFields |
( |
|
) |
[static] |
static void Sky::consoleInit |
( |
|
) |
[static] |
Register global constant variables and do other one-time initialization tasks in a subclass of ConsoleObject.
- See also:
- console
Reimplemented from ConsoleObject.
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.
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] |
Member Data Documentation
|