VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSplashParticle.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2020 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
6 #pragma once
7 
11 
17 
18 #include <tbb/parallel_for.h>
19 #include <tbb/blocked_range2d.h>
20 
21 namespace osg
22 {
23  class Image;
24 }
25 
26 namespace makVrv
27 {
28  // Basically a static drop with no physics whatsoever.
30  {
31  public:
33  DtSplashParticle(float px, float py, float pMass, double time,
34  DtGridCell grid[][GRID_DIMENSION],
35  float pIntensity);
36 
38  virtual ~DtSplashParticle();
39  private:
42 
45 
48  public:
49 
51  virtual void update(double time, double elapsedTime,
52  DtGridCell grid[][GRID_DIMENSION],
53  bool& destroyFlag);
54 
56  virtual void renderToNormalMap(osg::Image *image);
57 
59  virtual unsigned int precomputedSplashTexel(float x, float y);
60 
61  // ! \brief Precompute a normal map for a drop
62  static void precomputeSplash();
63 
64  protected:
65 
67  static bool mySplashInitialized;
68 
69  float myIntensity;
70  };
71 
72 }
static bool mySplashInitialized
Definition: DtSplashParticle.h:67
virtual ~DtSplashParticle()
destructor
virtual void update(double time, double elapsedTime, DtGridCell grid[][GRID_DIMENSION], bool &destroyFlag)
update
Contains makVrv::DtDropParticle class.
float myIntensity
Definition: DtSplashParticle.h:69
DtSplashParticle()
private default constructor. not allowed.
Contains makVrv::DtSplashPrecompute class.
static unsigned int myPrecomputedSplash[PRECOMPUTED_DIM][PRECOMPUTED_DIM]
Definition: DtSplashParticle.h:66
Definition: DtSplashParticle.h:29
DtSplashParticle & operator=(const DtSplashParticle &)
prevent assignment
virtual unsigned int precomputedSplashTexel(float x, float y)
Precompute the splash.
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))
virtual void renderToNormalMap(osg::Image *image)
render to normal map
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.
Contains makVrv::DtGridCell struct.
static void precomputeSplash()
#define PRECOMPUTED_DIM
Definition: DtWaterOnScreenDefines.h:42

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)