Custom render object that draws animated tracks/waves on the water. More...
#include <W3DWaterTracks.h>
Public Member Functions | |
| WaterTracksObj (void) | |
| ~WaterTracksObj (void) | |
| virtual void | Render (void) |
| virtual void | Get_Obj_Space_Bounding_Sphere (SphereClass &sphere) const |
| draw this object | |
| virtual void | Get_Obj_Space_Bounding_Box (AABoxClass &aabox) const |
| bounding box of this object | |
| Int | freeWaterTracksResources (void) |
| free W3D assets used for this track | |
| void | init (Real width, Real length, Vector2 &start, Vector2 &end, Char *texturename, Int waveTimeOffset) |
| allocate W3D resources and set size | |
| void | init (Real width, Vector2 &start, Vector2 &end, Char *texturename) |
| allocate W3D resources and set size | |
| Int | update (Int msElapsed) |
| update animation state | |
| Int | render (DX8VertexBufferClass *vertexBuffer, Int batchStart) |
| draw this object | |
Protected Attributes | |
| TextureClass * | m_stageZeroTexture |
| primary texture | |
| SphereClass | m_boundingSphere |
| bounding sphere of WaterTracks | |
| AABoxClass | m_boundingBox |
| bounding box of WaterTracks | |
| waveType | m_type |
| used for render state sorting (set this to texture pointer for now). | |
| Int | m_x |
| vertex count | |
| Int | m_y |
| vertex count | |
| Bool | m_bound |
| object is bound to owner and accepts new edges | |
| Vector2 | m_startPos |
| starting position of wave | |
| Vector2 | m_waveDir |
| direction of wave travel | |
| Vector2 | m_perpDir |
| direction perpendicular to wave travel | |
| Vector2 | m_initStartPos |
| original settings used to create wave | |
| Vector2 | m_initEndPos |
| original settings used to create wave | |
| Int | m_initTimeOffset |
| time offset when wave is added into the system | |
| Int | m_fadeMs |
| time for wave to fade out after it stops moving | |
| Int | m_totalMs |
| amount of time to complete full motion | |
| Int | m_elapsedMs |
| amount of time since start of motion | |
| Real | m_waveInitialWidth |
| width of wave segment when it first appears | |
| Real | m_waveInitialHeight |
| height of wave segment when it first appears | |
| Real | m_waveFinalWidth |
| width of wave segment at full size | |
| Real | m_waveFinalWidthPeakFrac |
| fraction along path when wave reaches full width | |
| Real | m_waveFinalHeight |
| final height of unstretched wave | |
| Real | m_initialVelocity |
| Real | m_waveDistance |
| Real | m_timeToReachBeach |
| Real | m_frontSlowDownAcc |
| Real | m_timeToStop |
| Real | m_timeToRetreat |
| Real | m_backSlowDownAcc |
| Real | m_timeToCompress |
| Real | m_flipU |
| force uv coordinates to flip | |
| WaterTracksObj * | m_nextSystem |
| next track in system | |
| WaterTracksObj * | m_prevSystem |
| previous track in system | |
Friends | |
| class | WaterTracksRenderSystem |
Custom render object that draws animated tracks/waves on the water.
This is an object which draws a small breaking wave or splash animation. These objects are to be managed/accessed only by the WaterTracksRenderObjClassSystem
Definition at line 38 of file W3DWaterTracks.h.
| WaterTracksObj::WaterTracksObj | ( | void | ) |
Constructor. Just nulls out some variables.
Definition at line 135 of file W3DWaterTracks.cpp.
| WaterTracksObj::~WaterTracksObj | ( | void | ) |
Destructor. Releases w3d assets.
Definition at line 125 of file W3DWaterTracks.cpp.
| Int WaterTracksObj::freeWaterTracksResources | ( | void | ) |
free W3D assets used for this track
Free any W3D resources associated with this object
Definition at line 167 of file W3DWaterTracks.cpp.
|
virtual |
bounding box of this object
WW3D method that returns object bounding box used in collision detection
Definition at line 157 of file W3DWaterTracks.cpp.
|
virtual |
draw this object
bounding sphere of this object
WW3D method that returns object bounding sphere used in frustum culling
Definition at line 147 of file W3DWaterTracks.cpp.
| void WaterTracksObj::init | ( | Real | width, |
| Real | length, | ||
| Vector2 & | start, | ||
| Vector2 & | end, | ||
| Char * | texturename, | ||
| Int | waveTimeOffset ) |
allocate W3D resources and set size
Setup size settings and allocate W3D texture The width/length define the size of the polygon quad which will contain the specified texture.
<width of wave segment when it first appears
<height of wave segment when it first appears
<width of wave segment at full size
<final height of unstretched wave
Definition at line 181 of file W3DWaterTracks.cpp.
allocate W3D resources and set size
Setup size settings and allocate W3D texture Alternate version of init where: (start, end) define a vector perpendicular to wave travel. The length of this vector is used as the length of the wave segment. The line between start-end defines the maximum distance the wave will reach.
Definition at line 253 of file W3DWaterTracks.cpp.
|
inlinevirtual |
Definition at line 47 of file W3DWaterTracks.h.
| Int WaterTracksObj::render | ( | DX8VertexBufferClass * | vertexBuffer, |
| Int | batchStart ) |
draw this object
Draws the object in it's current state.
Definition at line 311 of file W3DWaterTracks.cpp.
update animation state
Update state of object - advance animations and other states.
Definition at line 284 of file W3DWaterTracks.cpp.
|
friend |
Definition at line 40 of file W3DWaterTracks.h.
|
protected |
Definition at line 90 of file W3DWaterTracks.h.
|
protected |
object is bound to owner and accepts new edges
Definition at line 65 of file W3DWaterTracks.h.
|
protected |
bounding box of WaterTracks
Definition at line 60 of file W3DWaterTracks.h.
|
protected |
bounding sphere of WaterTracks
Definition at line 59 of file W3DWaterTracks.h.
|
protected |
amount of time since start of motion
Definition at line 75 of file W3DWaterTracks.h.
|
protected |
time for wave to fade out after it stops moving
Definition at line 73 of file W3DWaterTracks.h.
|
protected |
force uv coordinates to flip
Definition at line 92 of file W3DWaterTracks.h.
|
protected |
Definition at line 87 of file W3DWaterTracks.h.
|
protected |
original settings used to create wave
Definition at line 71 of file W3DWaterTracks.h.
|
protected |
Definition at line 84 of file W3DWaterTracks.h.
|
protected |
original settings used to create wave
Definition at line 70 of file W3DWaterTracks.h.
|
protected |
time offset when wave is added into the system
Definition at line 72 of file W3DWaterTracks.h.
|
protected |
next track in system
Definition at line 94 of file W3DWaterTracks.h.
|
protected |
direction perpendicular to wave travel
Definition at line 69 of file W3DWaterTracks.h.
|
protected |
previous track in system
Definition at line 95 of file W3DWaterTracks.h.
|
protected |
primary texture
Definition at line 58 of file W3DWaterTracks.h.
|
protected |
starting position of wave
Definition at line 66 of file W3DWaterTracks.h.
|
protected |
Definition at line 91 of file W3DWaterTracks.h.
|
protected |
Definition at line 86 of file W3DWaterTracks.h.
|
protected |
Definition at line 89 of file W3DWaterTracks.h.
|
protected |
Definition at line 88 of file W3DWaterTracks.h.
|
protected |
amount of time to complete full motion
Definition at line 74 of file W3DWaterTracks.h.
|
protected |
used for render state sorting (set this to texture pointer for now).
Definition at line 62 of file W3DWaterTracks.h.
|
protected |
direction of wave travel
Definition at line 68 of file W3DWaterTracks.h.
|
protected |
Definition at line 85 of file W3DWaterTracks.h.
|
protected |
final height of unstretched wave
Definition at line 82 of file W3DWaterTracks.h.
|
protected |
width of wave segment at full size
Definition at line 80 of file W3DWaterTracks.h.
|
protected |
fraction along path when wave reaches full width
Definition at line 81 of file W3DWaterTracks.h.
|
protected |
height of wave segment when it first appears
Definition at line 79 of file W3DWaterTracks.h.
|
protected |
width of wave segment when it first appears
Definition at line 78 of file W3DWaterTracks.h.
|
protected |
vertex count
Definition at line 63 of file W3DWaterTracks.h.
|
protected |
vertex count
Definition at line 64 of file W3DWaterTracks.h.