|
Heightfield 1.0
|
A sediment deposition simulation on the GPU. Simulation only adds matter on a given bedrock. More...
#include <gpusediment.h>
Public Member Functions | |
| GPU_Deposition () | |
| Constructor. | |
| ~GPU_Deposition () | |
| Destructor. | |
| void | Init (const HeightField &) |
| GPU buffers initialization from given heightfield. Shader and Uniforms are also initialized. | |
| void | SetSourceMap (const ScalarField2 &) |
| Sets a source map for the sediments. Sediments will be produced by the source map, and transported everywhere according to the simulation. | |
| void | Step (int) |
| Launches nb_steps steps of the deposition simulation. | |
| void | SetUniforms (float deposition_strength) |
| Set the uniform variable associated to deposition strength. | |
| void | GetHeight (ScalarField2 &hf) |
| Gets the elevation data back to the CPU. | |
| void | GetStream (ScalarField2 &hf) |
| Gets the sediment stream data back to the CPU. | |
| void | GetSed (ScalarField2 &hf) |
| Gets the added sediment data back to the CPU. | |
| void | GetDebug (ScalarField2 &hf) |
| Gets the debug data back to the CPU. The content of the debug buffer can be modified in the shader. | |
A sediment deposition simulation on the GPU. Simulation only adds matter on a given bedrock.
| void GPU_Deposition::GetDebug | ( | ScalarField2 & | sf | ) |
Gets the debug data back to the CPU. The content of the debug buffer can be modified in the shader.
| sf | ScalarField to store the debug data. |
| void GPU_Deposition::GetHeight | ( | ScalarField2 & | sf | ) |
Gets the elevation data back to the CPU.
| sf | ScalarField to store the elevation data. |
| void GPU_Deposition::GetSed | ( | ScalarField2 & | sf | ) |
Gets the added sediment data back to the CPU.
| sf | ScalarField to store the added sediment data. |
| void GPU_Deposition::GetStream | ( | ScalarField2 & | sf | ) |
Gets the sediment stream data back to the CPU.
| sf | ScalarField to store the stream data. |
| void GPU_Deposition::Init | ( | const HeightField & | hf | ) |
GPU buffers initialization from given heightfield. Shader and Uniforms are also initialized.
| hf | Heightfield to be used as bedrock. |
| void GPU_Deposition::SetSourceMap | ( | const ScalarField2 & | source_map | ) |
Sets a source map for the sediments. Sediments will be produced by the source map, and transported everywhere according to the simulation.
| source_map | ScalarField to be used as source map. |
| void GPU_Deposition::SetUniforms | ( | float | deposition_strength | ) |
Set the uniform variable associated to deposition strength.
| deposition_strength | Deposition strength value. |
| void GPU_Deposition::Step | ( | int | nb_steps | ) |
Launches nb_steps steps of the deposition simulation.
| nb_steps | Number of simulation steps to launch. |