VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
makVrv::DtDropParticle Class Referenceabstract

Local class for a single drop particle on the screen.

Inheritance diagram for makVrv::DtDropParticle:
Inheritance graph
[legend]

Public Member Functions

 DtDropParticle (float px, float py, float pMass, double time, DtGridCell grid[][GRID_DIMENSION])
 
virtual ~DtDropParticle ()
 
virtual void setParent (DtDropParticle *drop)
 
virtual DtDropParticleparent () const
 
virtual float mass () const
 
virtual void setMass (float m)
 
virtual const Vector2_32velocity () const
 
virtual void affectedCells (std::vector< DtVector2< short > > &cells) const
 
virtual void computeRadius (double waterOnScreenSize)
 
virtual void update (double time, double elapsedTime, DtGridCell grid[][GRID_DIMENSION], bool &destroyFlag)=0
 
virtual void gridPosition (int &gx, int &gy) const
 
virtual bool mergeable () const
 
virtual float x () const
 
virtual float y () const
 
virtual float radius () const
 
virtual int type () const
 
virtual float intensity (void) const
 

Static Public Member Functions

static void precomputeDropletNormalsIfNeeded ()
 
static const void * precomputedDropletNormalsDataPointer (void)
 

Protected Attributes

float myX
 
float myY
 
float myRadius
 
float myMass
 
float myV0
 
double myT0
 
float myAcceleration
 
DtDropParticlemyParent
 
Vector2_32 myDirection
 
Vector2_32 myVelocity
 
int myLastGridX
 
int myLastGridY
 
bool myMergeable
 

Static Protected Attributes

static DtVector4< unsigned intthePrecomputedDropletNormals [PRECOMPUTED_DIM][PRECOMPUTED_DIM]
 
static bool myDropletInitialized
 

Private Member Functions

 DtDropParticle ()=delete
 
 DtDropParticle (const DtDropParticle &)=delete
 
DtDropParticleoperator= (const DtDropParticle &)=delete
 

Constructor & Destructor Documentation

makVrv::DtDropParticle::DtDropParticle ( float  px,
float  py,
float  pMass,
double  time,
DtGridCell  grid[][GRID_DIMENSION] 
)

constructor

virtual makVrv::DtDropParticle::~DtDropParticle ( )
virtual

destructor

makVrv::DtDropParticle::DtDropParticle ( )
privatedelete

private default constructor. not allowed.

makVrv::DtDropParticle::DtDropParticle ( const DtDropParticle )
privatedelete

prevent copy-construction

Member Function Documentation

DtDropParticle& makVrv::DtDropParticle::operator= ( const DtDropParticle )
privatedelete

prevent assignment

virtual void makVrv::DtDropParticle::setParent ( DtDropParticle drop)
virtual

If this drop was left behind from wetting from another drop, keep track of the parent drop.

virtual DtDropParticle* makVrv::DtDropParticle::parent ( ) const
virtual
virtual float makVrv::DtDropParticle::mass ( ) const
virtual

set/get the mass

virtual void makVrv::DtDropParticle::setMass ( float  m)
virtual
virtual const Vector2_32& makVrv::DtDropParticle::velocity ( ) const
virtual

get the velocity

virtual void makVrv::DtDropParticle::affectedCells ( std::vector< DtVector2< short > > &  cells) const
virtual

Gets all screen grid cells covered by this drop.

virtual void makVrv::DtDropParticle::computeRadius ( double  waterOnScreenSize)
virtual

compute radius

virtual void makVrv::DtDropParticle::update ( double  time,
double  elapsedTime,
DtGridCell  grid[][GRID_DIMENSION],
bool destroyFlag 
)
pure virtual

Update the particle.

Implemented in makVrv::DtSplashParticle, and makVrv::DtRaindropParticle.

virtual void makVrv::DtDropParticle::gridPosition ( int gx,
int gy 
) const
virtual

get the grid position

virtual bool makVrv::DtDropParticle::mergeable ( ) const
virtual

can this be merged with another particle?

virtual float makVrv::DtDropParticle::x ( ) const
virtual

get x

virtual float makVrv::DtDropParticle::y ( ) const
virtual

get y

virtual float makVrv::DtDropParticle::radius ( ) const
virtual

get radius

virtual int makVrv::DtDropParticle::type ( ) const
virtual

type (0)

Reimplemented in makVrv::DtSplashParticle.

virtual float makVrv::DtDropParticle::intensity ( void  ) const
virtual

intensity (1)

Reimplemented in makVrv::DtSplashParticle.

static void makVrv::DtDropParticle::precomputeDropletNormalsIfNeeded ( )
static

Precompute a normal map for a drop.

static const void* makVrv::DtDropParticle::precomputedDropletNormalsDataPointer ( void  )
static

accesss the grid of precomputed normals as a void* pointer (so that they can be copied into a gpu buffer for example)

Member Data Documentation

float makVrv::DtDropParticle::myX
protected
float makVrv::DtDropParticle::myY
protected
float makVrv::DtDropParticle::myRadius
protected
float makVrv::DtDropParticle::myMass
protected
float makVrv::DtDropParticle::myV0
protected
double makVrv::DtDropParticle::myT0
protected
float makVrv::DtDropParticle::myAcceleration
protected
DtDropParticle* makVrv::DtDropParticle::myParent
protected
Vector2_32 makVrv::DtDropParticle::myDirection
protected
Vector2_32 makVrv::DtDropParticle::myVelocity
protected
int makVrv::DtDropParticle::myLastGridX
protected
int makVrv::DtDropParticle::myLastGridY
protected
bool makVrv::DtDropParticle::myMergeable
protected
DtVector4<unsigned int> makVrv::DtDropParticle::thePrecomputedDropletNormals[PRECOMPUTED_DIM][PRECOMPUTED_DIM]
staticprotected
bool makVrv::DtDropParticle::myDropletInitialized
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)