WaterBlock

Engine/source/environment/waterBlock.h

More...

Public Types

enum
EWaterType {
  eWater = 0
  eOceanWater = 1
  eRiverWater = 2
  eStagnantWater = 3
  eLava = 4
  eHotLava = 5
  eCrustyLava = 6
  eQuicksand = 7
}

Private Types

enum
MaskBits {
  UpdateMask =   Parent::NextFreeMask
  NextFreeMask = Parent::NextFreeMask << 1
}
Parent 

Private Functions

Private Static Functions

bool
setGridSizeProperty(void * object, const char * index, const char * data)

Protected Functions

_getWaterPlane(const Point3F & camPos, PlaneF & outPlane, Point3F & outPos)
bool
castRay(const Point3F & start, const Point3F & end, RayInfo * info)

Casts a ray and obtain collision information, returns true if RayInfo is modified.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Instructs this object to read state data previously packed with packUpdate.

Public Functions

bool
buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Builds a list of polygons which intersect a bounding volume.

Returns the distance from this object to a point

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

bool
isPointSubmerged(const Point3F & pos, bool worldSpace)
onStaticModified(const char * slotName, const char * newValue)

Specifically, these are called by setDataField when a static or dynamic field is modified, see the console details.

Sets the scale for the object.

Sets the Object -> World transform.

Public Static Functions

Detailed Description

Public Types

EWaterType

Enumerator

eWater = 0
eOceanWater = 1
eRiverWater = 2
eStagnantWater = 3
eLava = 4
eHotLava = 5
eCrustyLava = 6
eQuicksand = 7

Private Types

MaskBits

Enumerator

UpdateMask = Parent::NextFreeMask
NextFreeMask = Parent::NextFreeMask << 1
typedef WaterObject Parent 

Private Attributes

GFXTexHandle mBumpTex 
F32 mElapsedTime 
bool mGenerateVB 
F32 mGridElementSize 
U32 mHeight 
Vector< GFXPrimitiveBufferHandle * > mPrimBuffList 
GFXPrimitiveBufferHandle mRadialPrimBuff 
GFXVertexBufferHandle< GFXVertexPC > mRadialVertBuff 
GFXTexHandle mReflectTex 
GFXStateBlockRef mUnderwaterSB 
Vector< GFXVertexBufferHandle< GFXWaterVertex > * > mVertBuffList 
U32 mWidth 

Private Functions

clearVertBuffers()

setMultiPassProjection()

setupPrimitiveBlock(U32 width, U32 height)

setupVertexBlock(U32 width, U32 height, U32 rowOffset)

Private Static Functions

setGridSizeProperty(void * object, const char * index, const char * data)

Protected Functions

_getWaterPlane(const Point3F & camPos, PlaneF & outPlane, Point3F & outPos)

Reimplemented from: WaterObject

castRay(const Point3F & start, const Point3F & end, RayInfo * info)

Reimplemented from: SceneObject

innerRender(SceneRenderState * state)

Reimplemented from: WaterObject

onAdd()

Reimplemented from: WaterObject

onRemove()

Reimplemented from: WaterObject

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: WaterObject

setShaderParams(SceneRenderState * state, BaseMatInstance * mat, const WaterMatParams & paramHandles)

Reimplemented from: WaterObject

setupSceneGraphInfo(SceneRenderState * state)

setupVBIB()

Reimplemented from: WaterObject

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: WaterObject

Public Functions

WaterBlock()

~WaterBlock()

buildPolyList(PolyListContext context, AbstractPolyList * polyList, const Box3F & box, const SphereF & sphere)

Reimplemented from: SceneObject

DECLARE_CONOBJECT(WaterBlock )

distanceTo(const Point3F & pnt)

Reimplemented from: SceneObject

getSurfaceHeight(const Point2F & pos)

Reimplemented from: WaterObject

getWaterCoverage(const Box3F & worldBox)

Reimplemented from: WaterObject

inspectPostApply()

Reimplemented from: WaterObject

isPointSubmerged(const Point3F & pos, bool worldSpace)

isUnderwater(const Point3F & pnt)

Reimplemented from: WaterObject

onStaticModified(const char * slotName, const char * newValue)

Reimplemented from: SimObject

setScale(const Point3F & scale)

Reimplemented from: SceneObject

setTransform(const MatrixF & mat)

Reimplemented from: SceneObject

Public Static Functions

initPersistFields()