Public Member Functions | Private Attributes | Static Private Attributes | List of all members
gte::Fluid3InitializeState Class Reference

#include <GteFluid3InitializeState.h>

Public Member Functions

void Execute (std::shared_ptr< GraphicsEngine > const &engine)
 
 Fluid3InitializeState (std::shared_ptr< ProgramFactory > const &factory, int xSize, int ySize, int zSize, int numXThreads, int numYThreads, int numZThreads)
 
std::shared_ptr< Texture3 > const & GetStateT () const
 
std::shared_ptr< Texture3 > const & GetStateTm1 () const
 

Private Attributes

std::shared_ptr< Texture3mDensity
 
std::shared_ptr< ComputeProgrammInitializeState
 
int mNumXGroups
 
int mNumYGroups
 
int mNumZGroups
 
std::shared_ptr< Texture3mStateT
 
std::shared_ptr< Texture3mStateTm1
 
std::shared_ptr< Texture3mVelocity
 

Static Private Attributes

static std::string const msGLSLSource
 
static std::string const msHLSLSource
 
static std::string const * msSource [ProgramFactory::PF_NUM_API]
 

Detailed Description

Definition at line 19 of file GteFluid3InitializeState.h.

Constructor & Destructor Documentation

Fluid3InitializeState::Fluid3InitializeState ( std::shared_ptr< ProgramFactory > const &  factory,
int  xSize,
int  ySize,
int  zSize,
int  numXThreads,
int  numYThreads,
int  numZThreads 
)

Definition at line 15 of file GteFluid3InitializeState.cpp.

Member Function Documentation

void Fluid3InitializeState::Execute ( std::shared_ptr< GraphicsEngine > const &  engine)

Definition at line 63 of file GteFluid3InitializeState.cpp.

std::shared_ptr< Texture3 > const & gte::Fluid3InitializeState::GetStateT ( ) const
inline

Definition at line 54 of file GteFluid3InitializeState.h.

std::shared_ptr< Texture3 > const & gte::Fluid3InitializeState::GetStateTm1 ( ) const
inline

Definition at line 49 of file GteFluid3InitializeState.h.

Member Data Documentation

std::shared_ptr<Texture3> gte::Fluid3InitializeState::mDensity
private

Definition at line 38 of file GteFluid3InitializeState.h.

std::shared_ptr<ComputeProgram> gte::Fluid3InitializeState::mInitializeState
private

Definition at line 37 of file GteFluid3InitializeState.h.

int gte::Fluid3InitializeState::mNumXGroups
private

Definition at line 36 of file GteFluid3InitializeState.h.

int gte::Fluid3InitializeState::mNumYGroups
private

Definition at line 36 of file GteFluid3InitializeState.h.

int gte::Fluid3InitializeState::mNumZGroups
private

Definition at line 36 of file GteFluid3InitializeState.h.

std::string const Fluid3InitializeState::msGLSLSource
staticprivate
Initial value:
=
"layout(r32f) uniform readonly image3D density;\n"
"layout(rgba32f) uniform readonly image3D velocity;\n"
"layout(rgba32f) uniform writeonly image3D stateTm1;\n"
"layout(rgba32f) uniform writeonly image3D stateT;\n"
"\n"
"layout (local_size_x = NUM_X_THREADS, local_size_y = NUM_Y_THREADS, local_size_z = NUM_Z_THREADS) in;\n"
"void main()\n"
"{\n"
" ivec3 c = ivec3(gl_GlobalInvocationID.xyz);\n"
" vec4 initial = vec4(imageLoad(velocity, c).xyz, imageLoad(density, c).x);\n"
" imageStore(stateTm1, c, initial);\n"
" imageStore(stateT, c, initial);\n"
"}\n"

Definition at line 44 of file GteFluid3InitializeState.h.

std::string const Fluid3InitializeState::msHLSLSource
staticprivate
Initial value:
=
"Texture3D<float> density;\n"
"Texture3D<float4> velocity;\n"
"RWTexture3D<float4> stateTm1;\n"
"RWTexture3D<float4> stateT;\n"
"\n"
"[numthreads(NUM_X_THREADS, NUM_Y_THREADS, NUM_Z_THREADS)]\n"
"void CSMain(uint3 c : SV_DispatchThreadID)\n"
"{\n"
" float4 initial = float4(velocity[c].xyz, density[c]);\n"
" stateTm1[c] = initial;\n"
" stateT[c] = initial;\n"
"}\n"

Definition at line 45 of file GteFluid3InitializeState.h.

std::string const * Fluid3InitializeState::msSource
staticprivate
Initial value:

Definition at line 46 of file GteFluid3InitializeState.h.

std::shared_ptr<Texture3> gte::Fluid3InitializeState::mStateT
private

Definition at line 41 of file GteFluid3InitializeState.h.

std::shared_ptr<Texture3> gte::Fluid3InitializeState::mStateTm1
private

Definition at line 40 of file GteFluid3InitializeState.h.

std::shared_ptr<Texture3> gte::Fluid3InitializeState::mVelocity
private

Definition at line 39 of file GteFluid3InitializeState.h.


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


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:06