Sky Class Reference#include <sky.h>
Inheritance diagram for Sky:
[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 () |
|
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 &) |
Point3F | getWindVelocity () |
|
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
Member Enumeration Documentation
- Enumerator:
-
InitMask |
|
VisibilityMask |
|
StormCloudMask |
|
StormFogMask |
|
StormRealFogMask |
|
WindMask |
|
StormCloudsOnMask |
|
StormFogOnMask |
|
- Enumerator:
-
EnvMapMaterialOffset |
|
CloudMaterialOffset |
|
Constructor & Destructor Documentation
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.
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::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] |
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] |
void Sky::stormCloudsShow |
( |
bool |
|
) |
|
void Sky::stormFogShow |
( |
bool |
|
) |
|
TextureHandle Sky::getEnvironmentMap |
( |
|
) |
[inline] |
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.
- 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.
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] |
Field Documentation
|