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

#include <GteFluid2InitializeState.h>

Public Member Functions

void Execute (std::shared_ptr< GraphicsEngine > const &engine)
 
 Fluid2InitializeState (std::shared_ptr< ProgramFactory > const &factory, int xSize, int ySize, int numXThreads, int numYThreads)
 
std::shared_ptr< Texture2 > const & GetStateT () const
 
std::shared_ptr< Texture2 > const & GetStateTm1 () const
 

Private Attributes

std::shared_ptr< Texture2mDensity
 
std::shared_ptr< ComputeProgrammInitializeState
 
int mNumXGroups
 
int mNumYGroups
 
std::shared_ptr< Texture2mStateT
 
std::shared_ptr< Texture2mStateTm1
 
std::shared_ptr< Texture2mVelocity
 

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 GteFluid2InitializeState.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file GteFluid2InitializeState.cpp.

Member Function Documentation

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

Definition at line 61 of file GteFluid2InitializeState.cpp.

std::shared_ptr< Texture2 > const & gte::Fluid2InitializeState::GetStateT ( ) const
inline

Definition at line 56 of file GteFluid2InitializeState.h.

std::shared_ptr< Texture2 > const & gte::Fluid2InitializeState::GetStateTm1 ( ) const
inline

Definition at line 51 of file GteFluid2InitializeState.h.

Member Data Documentation

std::shared_ptr<Texture2> gte::Fluid2InitializeState::mDensity
private

Definition at line 40 of file GteFluid2InitializeState.h.

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

Definition at line 39 of file GteFluid2InitializeState.h.

int gte::Fluid2InitializeState::mNumXGroups
private

Definition at line 38 of file GteFluid2InitializeState.h.

int gte::Fluid2InitializeState::mNumYGroups
private

Definition at line 38 of file GteFluid2InitializeState.h.

std::string const Fluid2InitializeState::msGLSLSource
staticprivate
Initial value:
=
"layout(r32f) uniform readonly image2D density;\n"
"layout(rg32f) uniform readonly image2D velocity;\n"
"layout(rgba32f) uniform writeonly image2D stateTm1;\n"
"layout(rgba32f) uniform writeonly image2D stateT;\n"
"\n"
"layout (local_size_x = NUM_X_THREADS, local_size_y = NUM_Y_THREADS, local_size_z = 1) in;\n"
"void main()\n"
"{\n"
" ivec2 c = ivec2(gl_GlobalInvocationID.xy);\n"
" vec4 initial = vec4(imageLoad(velocity, c).xy, 0.0f, imageLoad(density, c).x);\n"
" imageStore(stateTm1, c, initial);\n"
" imageStore(stateT, c, initial);\n"
"}\n"

Definition at line 46 of file GteFluid2InitializeState.h.

std::string const Fluid2InitializeState::msHLSLSource
staticprivate
Initial value:
=
"Texture2D<float> density;\n"
"Texture2D<float2> velocity;\n"
"RWTexture2D<float4> stateTm1;\n"
"RWTexture2D<float4> stateT;\n"
"\n"
"[numthreads(NUM_X_THREADS, NUM_Y_THREADS, 1)]\n"
"void CSMain(uint2 c : SV_DispatchThreadID)\n"
"{\n"
" float4 initial = float4(velocity[c], 0.0f, density[c]);\n"
" stateTm1[c] = initial;\n"
" stateT[c] = initial;\n"
"}\n"

Definition at line 47 of file GteFluid2InitializeState.h.

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

Definition at line 48 of file GteFluid2InitializeState.h.

std::shared_ptr<Texture2> gte::Fluid2InitializeState::mStateT
private

Definition at line 43 of file GteFluid2InitializeState.h.

std::shared_ptr<Texture2> gte::Fluid2InitializeState::mStateTm1
private

Definition at line 42 of file GteFluid2InitializeState.h.

std::shared_ptr<Texture2> gte::Fluid2InitializeState::mVelocity
private

Definition at line 41 of file GteFluid2InitializeState.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