55 virtual float mass()
const;
59 virtual const osg::Vec2f&
velocity()
const;
62 virtual void affectedCells(std::vector<osg::Vec2s>& cells)
const;
68 virtual void update(
double time,
double elapsedTime,
70 bool& destroyFlag) = 0;
double myT0
Definition: DtDropParticle.h:95
virtual void gridPosition(int &gx, int &gy) const
get the grid position
float myX
Definition: DtDropParticle.h:94
virtual const osg::Vec2f & velocity() const
get the velocity
static bool myDropletInitialized
Definition: DtDropParticle.h:92
bool myMergeable
Definition: DtDropParticle.h:102
float myAcceleration
Definition: DtDropParticle.h:96
int myLastGridY
Definition: DtDropParticle.h:100
osg::Vec2f myVelocity
Definition: DtDropParticle.h:99
int myLastGridX
Definition: DtDropParticle.h:100
DtDropParticle()
private default constructor. not allowed.
virtual void renderToNormalMap(osg::Image *image)
Draw the droplet into the normal map for postprocessing.
virtual ~DtDropParticle()
destructor
virtual void update(double time, double elapsedTime, DtGridCell grid[][GRID_DIMENSION], bool &destroyFlag)=0
Update the particle.
float myY
Definition: DtDropParticle.h:94
float myMass
Definition: DtDropParticle.h:94
virtual void computeRadius(double waterOnScreenSize)
compute radius
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
DtDropParticle * myParent
Definition: DtDropParticle.h:97
Internal struct for one cell of our grid of glass properties.
Definition: DtGridCell.h:19
#define GRID_DIMENSION
Definition: DtWaterOnScreenDefines.h:56
Local class for a single drop particle on the screen.
Definition: DtDropParticle.h:29
Contains DLL export macros.
static unsigned int myPrecomputedDroplet[PRECOMPUTED_DIM][PRECOMPUTED_DIM]
Definition: DtDropParticle.h:91
virtual void setMass(float m)
virtual void setParent(DtDropParticle *drop)
If this drop was left behind from wetting from another drop, keep track of the parent drop...
virtual void affectedCells(std::vector< osg::Vec2s > &cells) const
Gets all screen grid cells covered by this drop.
Contains makVrv::DtGridCell struct.
float myV0
Definition: DtDropParticle.h:94
static void precomputeDroplet()
Precompute a normal map for a drop.
virtual unsigned int precomputedDropletTexel(float x, float y)
float myRadius
Definition: DtDropParticle.h:94
DtDropParticle & operator=(const DtDropParticle &)
prevent assignment
#define PRECOMPUTED_DIM
Definition: DtWaterOnScreenDefines.h:42
osg::Vec2f myDirection
Definition: DtDropParticle.h:99
virtual float mass() const
set/get the mass
virtual DtDropParticle * parent() const
virtual bool mergeable() const
can this be merged with another particle?