![]() |
VR-Forces 4.8 Class Documentation
|
Local class for a single drop particle on the screen. More...

Public Member Functions | |
| DtDropParticle (float px, float py, float pMass, double time, DtGridCell grid[][GRID_DIMENSION]) | |
| constructor More... | |
| virtual | ~DtDropParticle () |
| destructor More... | |
| virtual void | setParent (DtDropParticle *drop) |
| If this drop was left behind from wetting from another drop, keep track of the parent drop. More... | |
| virtual DtDropParticle * | parent () const |
| virtual float | mass () const |
| set/get the mass More... | |
| virtual void | setMass (float m) |
| virtual const osg::Vec2f & | velocity () const |
| get the velocity More... | |
| virtual void | affectedCells (std::vector< osg::Vec2s > &cells) const |
| Gets all screen grid cells covered by this drop. More... | |
| virtual void | computeRadius (double waterOnScreenSize) |
| compute radius More... | |
| virtual void | update (double time, double elapsedTime, DtGridCell grid[][GRID_DIMENSION], bool &destroyFlag)=0 |
| Update the particle. More... | |
| virtual void | gridPosition (int &gx, int &gy) const |
| get the grid position More... | |
| virtual void | renderToNormalMap (osg::Image *image) |
| Draw the droplet into the normal map for postprocessing. More... | |
| virtual bool | mergeable () const |
| can this be merged with another particle? More... | |
| virtual unsigned int | precomputedDropletTexel (float x, float y) |
Static Public Member Functions | |
| static void | precomputeDroplet () |
| Precompute a normal map for a drop. More... | |
Protected Attributes | |
| float | myX |
| float | myY |
| float | myRadius |
| float | myMass |
| float | myV0 |
| double | myT0 |
| float | myAcceleration |
| DtDropParticle * | myParent |
| osg::Vec2f | myDirection |
| osg::Vec2f | myVelocity |
| int | myLastGridX |
| int | myLastGridY |
| bool | myMergeable |
Static Protected Attributes | |
| static unsigned int | myPrecomputedDroplet [PRECOMPUTED_DIM][PRECOMPUTED_DIM] |
| static bool | myDropletInitialized |
Private Member Functions | |
| DtDropParticle () | |
| private default constructor. not allowed. More... | |
| DtDropParticle (const DtDropParticle &) | |
| prevent copy-construction More... | |
| DtDropParticle & | operator= (const DtDropParticle &) |
| prevent assignment More... | |
Local class for a single drop particle on the screen.
| makVrv::DtDropParticle::DtDropParticle | ( | float | px, |
| float | py, | ||
| float | pMass, | ||
| double | time, | ||
| DtGridCell | grid[][GRID_DIMENSION] | ||
| ) |
constructor
|
virtual |
destructor
|
private |
private default constructor. not allowed.
|
private |
prevent copy-construction
|
private |
prevent assignment
|
virtual |
If this drop was left behind from wetting from another drop, keep track of the parent drop.
|
virtual |
|
virtual |
set/get the mass
|
virtual |
|
virtual |
get the velocity
|
virtual |
Gets all screen grid cells covered by this drop.
|
virtual |
compute radius
|
pure virtual |
Update the particle.
Implemented in makVrv::DtSplashParticle, and makVrv::DtRaindropParticle.
get the grid position
|
virtual |
Draw the droplet into the normal map for postprocessing.
This is where most of the time is spent. If further optimization is needed, we could only redraw drops that have moved instead of drawing every drop every frame. Or, we could render the drops using hardware and render to texture. Note this is a lot faster in release builds.
Reimplemented in makVrv::DtSplashParticle.
|
virtual |
can this be merged with another particle?
|
static |
Precompute a normal map for a drop.
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |