|
| | GPUStreamPowerOptimized () |
| | Default constructor.
|
|
| ~GPUStreamPowerOptimized () |
| | Destructor. Destroys the OpenGl buffers and shader program.
|
| void | Init (const HeightField &) |
| | Init function, must be called if the underlying heightfield changed.
|
| void | Step (int n) |
| | Simulate n step of stream power erosion.
|
| void | Step (int, const Vector2 &, double) |
| | Simulate n step of stream power erosion in a circular domain.
|
| void | SetUniforms (int erosionMode, float uplift, float k, float p_sa, float p_sl, float k_h, float k_d) |
| | Set the uniforms for the shader.
|
| void | SetDt (float dt) const |
| | Set the delta time for a simulation step.
|
| void | SetKParameter (ScalarField2 kParam) |
| | Set the map for the parameter 'k' (erosion strength) of the stream power erosion.
|
| void | UseKParameter (bool use=true) |
| | Flag for using the 'k' map or not.
|
| void | SetMParameter (ScalarField2 mParam) |
| | Set the map for the parameter 'm' (stream area exponent) of the stream power erosion.
|
| void | UseMParameter (bool use=true) |
| | Flag for using the 'm' map or not.
|
| void | SetNParameter (ScalarField2 nParam) |
| | Set the map for the parameter 'n' (slope exponent) of the stream power erosion.
|
| void | UseNParameter (bool use=true) |
| | Flag for using the 'n' map or not.
|
| void | SetLaplacianParameter (ScalarField2 laplacianParam) |
| | Set the map for the laplacian parameter 'l' of the stream power erosion.
|
| void | UseLaplacianParameter (bool use=true) |
| | Flag for using the 'laplacian' map or not.
|
| void | SetFlowMode (int flowMode) |
| | Set the flow mode. 0 = steepest, 1 = L-p with p the flow exponent.
|
| void | SetFlowExponent (float flow_p) |
| | Set the flow distribution exponent (only used if flowMode == 1). Using flow_p = 1 is equivalent to L-1, and flow_p = 2 is equivalent to L-2.
|
| void | SetUplift (const ScalarField2 &uplift) |
| | Set the uplift map.
|
| void | UseUplift (bool use=true) |
| | Flag for using the uplift map or not.
|
| void | SetBoundary (Array2I boundary) |
| | Set the boundary flag map. The array must be of the same size as the base heightfield.
|
| void | SetRetargeting (ScalarField2 retargetAlpha) |
| | Set the retargeting alpha map.
|
| void | UseRetargeting (bool use=true) |
| | Flag for using the retargeting alpha map or not.
|
| void | UseHardness (bool use=true) |
| | Flag for using the hardness function or not.
|
| void | SetHardnessFunc (int hardnessFunc) |
| | Flag for setting the hardness function index.
|
| void | UseDynamicHardness (bool use=true) |
| | Flag for using the dynamic, time-evolving hardness. Note that the simulation cannot converge if dynamic hardness is activated.
|
|
GLuint | GetData () const |
| | Returns the OpenGL latest elevation buffer.
|
|
void | GetData (ScalarField2 &) |
| | Reads back newest bedrock elevation from the GPU, into initialized scalarfields.
|
|
void | GetData (ScalarField2 &, ScalarField2 &) |
| | Reads back newest bedrock elevation and stream area from the GPU, into initialized scalarfields.
|
|
void | GetData (ScalarField2 &, ScalarField2 &, ScalarField2 &) |
| | Reads back newest bedrock elevation, stream area and hardness from the GPU, into initialized scalarfields.
|
|
void | GetHardness (ScalarField2 &) |
| | Reads back newest hardness from the GPU, into initialized scalarfields.
|
|
double | GetLastStepElevationDifference () |
| | Computes the total difference of elevation for the last simulation step. Useful for knowing if the simulation has reached steady-state.
|
|
|
GLShader | simulationShader |
| | Compute shader.
|
|
GLBuffer | bedrockBuffer |
| | Bedrock elevation buffer.
|
|
GLBuffer | outBedrockBuffer |
| | Output bedrock elevation buffer.
|
|
GLBuffer | streamBuffer |
| | Water elevation buffer.
|
|
GLBuffer | outStreamBuffer |
| | Output water elevation buffer.
|
|
GLBuffer | outHardnessBuffer |
| | Output hardness buffer (to read back from the GPU).
|
|
GLOptionalStorageBuffer | upliftBuffer |
| | Optional uplift buffer.
|
|
GLOptionalStorageBuffer | boundaryBuffer |
| | Optional boundary buffer.
|
|
GLOptionalStorageBuffer | mParamBuffer |
| | Optional exponent map buffer.
|
|
GLOptionalStorageBuffer | nParamBuffer |
| | Optional exponent map buffer.
|
|
GLOptionalStorageBuffer | kParamBuffer |
| | Optional erosion factor map buffer.
|
|
GLOptionalStorageBuffer | retargetBuffer |
| | Optional retargeting alpha buffer.
|
|
GLOptionalStorageBuffer | laplacianBuffer |
| | Optional laplacian factor buffer.
|
|
bool | dynamicHardness |
| | Flag for dynamic hardness.
|
|
int | totalBufferSize |
| | Total buffer size defined as nx * ny.
|
|
int | dispatchSize |
| | Single dispatch size.
|
|
std::vector< float > | tmpData |
| | Temporary array for retreiving GPU data.
|
Stream power erosion simulation on the GPU.