WaterBlock
Engine/source/environment/waterBlock.h
Public Types
EWaterType { eWater = 0 eOceanWater = 1 eRiverWater = 2 eStagnantWater = 3 eLava = 4 eHotLava = 5 eCrustyLava = 6 eQuicksand = 7 }
Private Types
MaskBits { UpdateMask = Parent::NextFreeMask NextFreeMask = Parent::NextFreeMask << 1 }
Parent
Private Attributes
Private Functions
setupPrimitiveBlock(U32 width, U32 height)
setupVertexBlock(U32 width, U32 height, U32 rowOffset)
Private Static Functions
bool
setGridSizeProperty(void * object, const char * index, const char * data)
Protected Functions
bool
innerRender(SceneRenderState * state)
bool
onAdd()
Called when the object is added to the sim.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
setShaderParams(SceneRenderState * state, BaseMatInstance * mat, const WaterMatParams & paramHandles)
setupSceneGraphInfo(SceneRenderState * state)
unpackUpdate(NetConnection * conn, BitStream * stream)
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.
distanceTo(const Point3F & pnt)
Returns the distance from this object to a point
getSurfaceHeight(const Point2F & pos)
getWaterCoverage(const Box3F & worldBox)
Called after any property of the object is changed in the world editor.
bool
isPointSubmerged(const Point3F & pos, bool worldSpace)
bool
isUnderwater(const Point3F & pnt)
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.
setTransform(const MatrixF & mat)
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