WaterBlock Class Reference#include <waterBlock.h>
Inheritance diagram for WaterBlock:
[legend]List of all members.
|
Public Types |
| eWater = 0 |
| eOceanWater = 1 |
| eRiverWater = 2 |
| eStagnantWater = 3 |
| eLava = 4 |
| eHotLava = 5 |
| eCrustyLava = 6 |
| eQuicksand = 7 |
| BASE_PASS = 0 |
| UNDERWATER_PASS = 1 |
| FOG_PASS = 2 |
| BLEND = 3 |
| NO_REFLECT = 4 |
| NUM_MAT_TYPES |
enum | EWaterType {
eWater = 0,
eOceanWater = 1,
eRiverWater = 2,
eStagnantWater = 3,
eLava = 4,
eHotLava = 5,
eCrustyLava = 6,
eQuicksand = 7
} |
enum | MaterialType {
BASE_PASS = 0,
UNDERWATER_PASS = 1,
FOG_PASS = 2,
BLEND = 3,
NO_REFLECT = 4,
NUM_MAT_TYPES
} |
Public Member Functions |
| WaterBlock () |
virtual | ~WaterBlock () |
bool | isPointSubmerged (const Point3F &pos, bool worldSpace=true) const |
AudioEnvironment * | getAudioEnvironment () |
EWaterType | getLiquidType () const |
bool | isUnderwater (const Point3F &pnt) |
virtual void | updateReflection () |
| This is a callback for objects that have reflections and are added to the "reflectiveSet" SimSet.
|
virtual void | inspectPostApply () |
| Called after any property of the object is changed in the world editor.
|
| DECLARE_CONOBJECT (WaterBlock) |
Static Public Member Functions |
static void | initPersistFields () |
| Register dynamic fields in a subclass of ConsoleObject.
|
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 *overrideMat) |
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 | onGhostAlwaysDone () |
bool | castRay (const Point3F &start, const Point3F &end, RayInfo *info) |
| Casts a ray and obtain collision information, returns true if RayInfo is modified.
|
Private Types |
typedef SceneObject | Parent |
| InitialUpdateMask = Parent::NextFreeMask |
| UpdateMask = InitialUpdateMask << 1 |
| NextFreeMask = UpdateMask << 1 |
| MAX_WAVES = 3 |
| NUM_ANIM_FRAMES = 32 |
enum | MaskBits {
InitialUpdateMask = Parent::NextFreeMask,
UpdateMask = InitialUpdateMask << 1,
NextFreeMask = UpdateMask << 1
} |
enum | consts {
MAX_WAVES = 3,
NUM_ANIM_FRAMES = 32
} |
Private Member Functions |
SceneGraphData | setupSceneGraphInfo (SceneState *state) |
void | setShaderParams (BaseMatInstance *mat, const WaterMatParams ¶mHandles) |
void | setShaderXForms (BaseMatInstance *mat) |
void | setupVBIB () |
void | setupVertexBlock (U32 width, U32 height, U32 rowOffset) |
void | setupPrimitiveBlock (U32 width, U32 height) |
void | drawUnderwaterFilter () |
void | render1_1 (SceneState *, SceneGraphData &sgData, const Point3F &camPosition) |
void | render2_0 (SceneState *, SceneGraphData &sgData, const Point3F &camPosition) |
void | animBumpTex (SceneState *state) |
void | setupRadialVBIB () |
void | setMultiPassProjection () |
void | clearVertBuffers () |
void | initMaterials () |
void | cleanupMaterials () |
Private Attributes |
Point2F | mWaveDir [MAX_WAVES] |
F32 | mWaveSpeed [MAX_WAVES] |
Point2F | mWaveTexScale [MAX_WAVES] |
Vector< GFXVertexBufferHandle<
GFXVertexPCT > * > | mVertBuffList |
Vector< GFXPrimitiveBufferHandle * > | mPrimBuffList |
GFXVertexBufferHandle< GFXVertexPC > | mRadialVertBuff |
GFXPrimitiveBufferHandle | mRadialPrimBuff |
bool | mRender11 |
bool | mFullReflect |
F32 | mGridElementSize |
U32 | mWidth |
U32 | mHeight |
F32 | mElapsedTime |
ColorI | mBaseColor |
ColorI | mUnderwaterColor |
F32 | mClarity |
F32 | mFresnelBias |
F32 | mFresnelPower |
F32 | mVisibilityDepth |
bool | mRenderFogMesh |
Point3F | mPrevScale |
GFXTexHandle | mBumpTex |
EWaterType | mLiquidType |
| Type of liquid: Water? Lava? What?
|
ReflectPlane | mReflectPlane |
U32 | mReflectTexSize |
const char * | mSurfMatName [NUM_MAT_TYPES] |
BaseMatInstance * | mMatInstances [NUM_MAT_TYPES] |
WaterMatParams | mMatParamHandles [NUM_MAT_TYPES] |
AlignedArray< Point2F > | mConstArray |
GFXStateBlockRef | mUnderwaterSB |
ObjectRenderInst::RenderDelegate | mRenderDelegate |
U32 | mRenderUpdateCount |
U32 | mReflectUpdateCount |
U32 | mReflectUpdateTicks |
Classes |
struct | WaterMatParams |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
-
eWater |
|
eOceanWater |
|
eRiverWater |
|
eStagnantWater |
|
eLava |
|
eHotLava |
|
eCrustyLava |
|
eQuicksand |
|
- Enumerator:
-
BASE_PASS |
|
UNDERWATER_PASS |
|
FOG_PASS |
|
BLEND |
|
NO_REFLECT |
|
NUM_MAT_TYPES |
|
- Enumerator:
-
InitialUpdateMask |
|
UpdateMask |
|
NextFreeMask |
|
- Enumerator:
-
MAX_WAVES |
|
NUM_ANIM_FRAMES |
|
Constructor & Destructor Documentation
WaterBlock::WaterBlock |
( |
|
) |
|
virtual WaterBlock::~WaterBlock |
( |
|
) |
[virtual] |
Member Function Documentation
void WaterBlock::setupVBIB |
( |
|
) |
[private] |
void WaterBlock::setupVertexBlock |
( |
U32 |
width, |
|
|
U32 |
height, |
|
|
U32 |
rowOffset | |
|
) |
| | [private] |
void WaterBlock::setupPrimitiveBlock |
( |
U32 |
width, |
|
|
U32 |
height | |
|
) |
| | [private] |
void WaterBlock::drawUnderwaterFilter |
( |
|
) |
[private] |
void WaterBlock::setupRadialVBIB |
( |
|
) |
[private] |
void WaterBlock::setMultiPassProjection |
( |
|
) |
[private] |
void WaterBlock::clearVertBuffers |
( |
|
) |
[private] |
void WaterBlock::initMaterials |
( |
|
) |
[private] |
void WaterBlock::cleanupMaterials |
( |
|
) |
[private] |
bool WaterBlock::onAdd |
( |
|
) |
[protected, virtual] |
Called when the object is added to the sim.
Reimplemented from SceneObject.
void WaterBlock::onRemove |
( |
|
) |
[protected, virtual] |
Called when the object is removed from the sim.
Reimplemented from SceneObject.
bool WaterBlock::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.
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 WaterBlock::onGhostAlwaysDone |
( |
|
) |
[protected] |
Casts a ray and obtain collision information, returns true if RayInfo is modified.
- Parameters:
-
| start | Start point of ray |
| end | End point of ray |
| info | Collision information obtained (out) |
Reimplemented from SceneObject.
bool WaterBlock::isPointSubmerged |
( |
const Point3F & |
pos, |
|
|
bool |
worldSpace = true | |
|
) |
| | const [inline] |
AudioEnvironment* WaterBlock::getAudioEnvironment |
( |
|
) |
[inline] |
static void WaterBlock::initPersistFields |
( |
|
) |
[static] |
EWaterType WaterBlock::getLiquidType |
( |
|
) |
const [inline] |
virtual void WaterBlock::updateReflection |
( |
|
) |
[virtual] |
This is a callback for objects that have reflections and are added to the "reflectiveSet" SimSet.
Reimplemented from SceneObject.
virtual void WaterBlock::inspectPostApply |
( |
|
) |
[virtual] |
Member Data Documentation
Type of liquid: Water? Lava? What?
|