GteFluid3AdjustVelocity.h
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #pragma once
9 
13 #include <Graphics/GteTexture3.h>
14 
15 namespace gte
16 {
17 
18 class GraphicsEngine;
19 
21 {
22 public:
23  // Construction. Adjust the velocities using the solution to the
24  // Poisson equation.
25  Fluid3AdjustVelocity(std::shared_ptr<ProgramFactory> const& factory,
26  int xSize, int ySize, int zSize, int numXThreads, int numYThreads, int numZThreads,
27  std::shared_ptr<ConstantBuffer> const& parameters);
28 
29  // Update the state for the fluid simulation.
30  void Execute(std::shared_ptr<GraphicsEngine> const& engine,
31  std::shared_ptr<Texture3> const& inState,
32  std::shared_ptr<Texture3> const& poisson,
33  std::shared_ptr<Texture3> const& outState);
34 
35 private:
36  int mNumXGroups, mNumYGroups, mNumZGroups;
37  std::shared_ptr<ComputeProgram> mAdjustVelocity;
38 
39  // Shader source code as strings.
40  static std::string const msGLSLSource;
41  static std::string const msHLSLSource;
42  static std::string const* msSource[ProgramFactory::PF_NUM_API];
43 };
44 
45 }
static std::string const msGLSLSource
std::shared_ptr< ComputeProgram > mAdjustVelocity
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
static std::string const msHLSLSource
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 03:59:59