|
Arches 1.0
|
Material stack for the Arches model. More...
#include <arches.h>
Public Member Functions | |
| MaterialStack () | |
| Creates an empty material stack. | |
| ~MaterialStack () | |
| Empty. | |
| const MaterialBox & | at (int i) const |
| Access to the i-th layer. | |
| MaterialBox & | at (int i) |
| Access to the i-th layer. | |
| int | Size () const |
| Returns the number of layers in the stack. | |
| void | CheckLayersHeight (int=0) |
| Permet de decaler eventuellement les hauteurs min et max de chaque couche de la pile. On doit partir d'un endroit dont on est sur de la hauteur max ! | |
| TypeMater | GetMaterial (int) const |
| Returns the material type at a given height in the stack. | |
| int | MaxLayerHeight (int) const |
| Get the maximum height of the layer at a given height. | |
| int | Memory () const |
| Compute the amount of memory used by the material stack. | |
| void | AddMaterialAt (int, int, TypeMater) |
| Adds a given amount of material at a given height. | |
| void | RemoveMaterial (TypeMater) |
| Removes all material from a material stack. | |
| int | FindLayer (int, TypeMater) const |
| Finds the location of a given material layer in the material stack. | |
| bool | CheckMaterialInside (int, int, TypeMater) const |
| Checks if a some given material exists within a given height span. | |
| void | AddMaterialOnTop (TypeMater, int) |
| Adds a given material to the top of a material stack. | |
| void | AddRockLayer (int, int) |
| Adds rock which replaces any other existing material. | |
| void | RemoveRockLayer (int, int) |
| Removes rock. | |
| void | AddOnGroundRock (int, int) |
| Add rock to the ground. | |
| void | RemoveOnGroundRock (int, int) |
| Remove rock on the ground. | |
| void | AddOnCeilRock (int, int) |
| Adds rock to the ceiling. | |
| void | RemoveOnCeilRock (int, int) |
| Removes rock above a given height. | |
| void | AddToHeightRock (int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> | |
| void | RemoveToHeightRock (int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> | |
| void | RemoveSandLayer (int, int) |
| Remove a complete sand layer. | |
| int | positionToAddSand (int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter du sable. | |
| void | RemoveStoneLayer (int, int) |
| Remove a stone layer. | |
| int | positionToAddStone (int) const |
| Find the highest elevation to add rock. | |
| void | RemoveEarthAt (int, int) |
| Removes some soil at a given height. | |
| void | RemoveStoneAt (int, int) |
| Removes some stone at a given height. | |
| void | RemoveSandAt (int, int) |
| Remove sand at a given elevation. | |
| void | RemoveSnowAt (int, int) |
| Remove Snow. | |
| void | RemoveWaterAt (int, int) |
| Remove water. | |
| void | RemoveEarthLayer (int, int) |
| Remove earth. | |
| int | positionToAddEarth (int) const |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter du Earth. | |
| void | RemoveSnowLayer (int, int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> | |
| int | positionToAddSnow (int) const |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter du Snow. | |
| void | RemoveWaterLayer (int, int) |
| Remove water. | |
| QVector< int > | remplirCouchesWATER (int, int, int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> Rempli de l'eau dans l'interval [hmin,hmax]. Rempli jusqu'a hauteurMaxEau si hMax et hauteurMaxEau est dans le meme layer. | |
| int | positionToAddWater (int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter de l'eau. | |
| QVector< int > | getLayerWater (int, int) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche les layers d'eau entre deux hauteurs. | |
| int | getMaxWaterHeight (int) |
| Get the maximum water elevation. | |
| int | truncationWaterHeight (int, int) |
| Clamp the water height. | |
| int | FreeHeight (int) const |
| Compute the amount of free space above a given height position in the material stack. | |
| const int | GetLayerIndexFromHeight (int) const |
| Given an integer input height, get the corresponding layer index. | |
| void | OrderStack () |
| Sorts a material stack so that material layers should be in the right order. | |
| void | ErosionRock (int, int, bool, double, double) |
| Erode and transform rock in sand and stone. | |
| void | Discretisation (int, int, int &, int &) |
| <FONT COLOR="AA2222"><B>Warning</B></FONT> | |
| int | findPositionAir (int) const |
| Find air layer. | |
| int | GetHeight () const |
| Return the maximum height of a material stack. | |
| TypeMater | GetHighestNonAirMaterial () const |
| Returns the highest material type of the stack different from air. | |
| void | FindAirLayers (QVector< int > &) const |
| Find air layer is a material stack. | |
Protected Member Functions | |
| void | InsertBetweenLayers (int, int, TypeMater) |
| Insert a given material thickness between two existing layers. This function also checks that sand or stones fall underwater or in the air. | |
Protected Attributes | |
| QVector< MaterialBox > | stack |
| The material stack itself. | |
Static Protected Attributes | |
| static const short | sizeZ = 10000 |
| Maximum material stack size, coded as a static short integer. | |
Material stack for the Arches model.
| void MaterialStack::AddMaterialAt | ( | int | e, |
| int | h, | ||
| TypeMater | t ) |
Adds a given amount of material at a given height.
| e | Thickness. |
| h | Height. |
| t | Material type. |
References GetLayerIndexFromHeight(), and InsertBetweenLayers().
Referenced by Arches::AddGaussian(), Arches::AddRandomStone(), ErosionRock(), Arches::StabilizeEarthStack(), Arches::StabilizeSandStack(), Arches::StabilizeSnowStack(), and Arches::StabilizeStoneStack().
| void MaterialStack::AddMaterialOnTop | ( | TypeMater | t, |
| int | e ) |
Adds a given material to the top of a material stack.
Sand and stones fall underwater if the top of the material stack is water.
| t | Material type. |
| e | Thickness. |
References at(), MaterialBox::GetB(), GetHeight(), MaterialBox::GetMaterial(), MaterialBox::SetB(), sizeZ, and stack.
Referenced by Arches::Arches(), InsertBetweenLayers(), and Arches::LoadArchesCube().
| void MaterialStack::AddOnCeilRock | ( | int | ajout, |
| int | z ) |
Adds rock to the ceiling.
| ajout | Epaisseur de roche a ajouter. |
| z | Position en dessus de laquelle l'ajout va avoir lieu. |
References MaterialBox::AIR, at(), MaterialBox::GetAB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetA(), MaterialBox::SetB(), MaterialBox::SetMaterial(), and Size().
| void MaterialStack::AddOnGroundRock | ( | int | epaisseur, |
| int | position ) |
Add rock to the ground.
| epaisseur | : Epaisseur de roche a ajouter. |
| position | : Position en dessous de laquelle l'ajout va avoir lieu. |
References MaterialBox::AIR, at(), CheckLayersHeight(), MaterialBox::GetAB(), GetHeight(), GetLayerIndexFromHeight(), MaterialBox::GetMaterial(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetB(), Size(), sizeZ, and stack.
Referenced by Arches::AddOnGroundRock(), and AddToHeightRock().
| void MaterialStack::AddRockLayer | ( | int | hMin, |
| int | hMax ) |
Adds rock which replaces any other existing material.
| hMin,hMax | Elevation interval. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetHeight(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), sizeZ, and stack.
Referenced by Arches::AddRockSphere(), Arches::HorizontalSurfaceRock(), and Arches::SmoothZone().
| void MaterialStack::CheckLayersHeight | ( | int | deb = 0 | ) |
Permet de decaler eventuellement les hauteurs min et max de chaque couche de la pile. On doit partir d'un endroit dont on est sur de la hauteur max !
| deb | : position de la couche de debut de la zone a eventuellement decaler. |
References at(), MaterialBox::GetAB(), MaterialBox::GetB(), MaterialBox::SetA(), MaterialBox::SetB(), and stack.
Referenced by AddOnGroundRock(), and RemoveOnGroundRock().
| bool MaterialStack::CheckMaterialInside | ( | int | a, |
| int | b, | ||
| TypeMater | t ) const |
Checks if a some given material exists within a given height span.
| a,b | Heights. |
| t | Material type. |
References at(), GetHeight(), GetLayerIndexFromHeight(), GetMaterial(), and Size().
| void MaterialStack::ErosionRock | ( | int | z, |
| int | e, | ||
| bool | status, | ||
| double | pSand, | ||
| double | pStone ) |
Erode and transform rock in sand and stone.
| z | Input height |
| e | Thickness |
| status | Indication sur la transformation de la pierre en matiere |
| pSand | Pourcentage de transformation en sable. |
| pStone | Pourcentage de transformation en pierre. |
References AddMaterialAt(), at(), MaterialBox::GetA(), MaterialBox::GetB(), GetLayerIndexFromHeight(), RemoveRockLayer(), MaterialBox::SAND, Size(), and MaterialBox::STONE.
| void MaterialStack::FindAirLayers | ( | QVector< int > & | indexes | ) | const |
Find air layer is a material stack.
| indexes | Array storing the indexes of air layers. |
References MaterialBox::AIR, at(), GetMaterial(), and stack.
| int MaterialStack::FindLayer | ( | int | position, |
| TypeMater | t ) const |
Finds the location of a given material layer in the material stack.
| position | Searches under this height. |
| t | Material type. |
References at(), GetLayerIndexFromHeight(), GetMaterial(), and Size().
Referenced by Arches::IsEarthStackUnstable(), Arches::IsSandStackUnstable(), Arches::isSnowStackUnstable(), Arches::IsStoneStackUnstable(), Arches::StabilizeEarthStack(), Arches::StabilizeSandStack(), Arches::StabilizeSnowStack(), and Arches::StabilizeStoneStack().
| int MaterialStack::findPositionAir | ( | int | position | ) | const |
Find air layer.
| position | Starting elevation. |
References MaterialBox::AIR, at(), MaterialBox::GetA(), GetHeight(), GetLayerIndexFromHeight(), GetMaterial(), and Size().
| int MaterialStack::FreeHeight | ( | int | h | ) | const |
Compute the amount of free space above a given height position in the material stack.
| h | Height |
References MaterialBox::AIR, at(), MaterialBox::GetAB(), GetHeight(), GetLayerIndexFromHeight(), GetMaterial(), MaterialBox::ROCK, Size(), and sizeZ.
Referenced by Arches::IsEarthStackUnstable(), Arches::IsSandStackUnstable(), Arches::isSnowStackUnstable(), Arches::IsStoneStackUnstable(), Arches::StabilizeEarthStack(), Arches::StabilizeSandStack(), Arches::StabilizeSnowStack(), and Arches::StabilizeStoneStack().
| TypeMater MaterialStack::GetHighestNonAirMaterial | ( | ) | const |
Returns the highest material type of the stack different from air.
If the stack is empty, the function returns air.
References MaterialBox::AIR, at(), MaterialBox::GetMaterial(), and stack.
| const int MaterialStack::GetLayerIndexFromHeight | ( | int | z | ) | const |
Given an integer input height, get the corresponding layer index.
| z | Integer input height |
Referenced by AddMaterialAt(), AddOnCeilRock(), AddOnGroundRock(), AddRockLayer(), AddToHeightRock(), CheckMaterialInside(), Arches::DeleteSmallElements(), Discretisation(), ErosionRock(), FindLayer(), findPositionAir(), Arches::findThicknessEmptyness(), FreeHeight(), getLayerWater(), positionToAddEarth(), positionToAddSand(), positionToAddSnow(), positionToAddStone(), positionToAddWater(), RemoveEarthAt(), RemoveEarthLayer(), RemoveOnCeilRock(), RemoveOnGroundRock(), RemoveRockLayer(), RemoveSandAt(), RemoveSandLayer(), RemoveSnowAt(), RemoveSnowLayer(), RemoveStoneAt(), RemoveStoneLayer(), RemoveToHeightRock(), RemoveWaterAt(), RemoveWaterLayer(), remplirCouchesWATER(), Arches::SmoothZone(), and Arches::SurfaceAnalysis().
| QVector< int > MaterialStack::getLayerWater | ( | int | hMin, |
| int | hMax ) |
<FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche les layers d'eau entre deux hauteurs.
| hMin | : Hauteur minimum du layer. |
| hMax | : Hauteur maximum du layer. |
References at(), GetLayerIndexFromHeight(), GetMaterial(), Size(), and MaterialBox::WATER.
| TypeMater MaterialStack::GetMaterial | ( | int | h | ) | const |
Returns the material type at a given height in the stack.
| h | The height parameter. If height is negative, then the function returns MaterialBox::ROCK. |
References MaterialBox::AIR, at(), MaterialBox::GetMaterial(), MaterialBox::ROCK, and stack.
Referenced by AddOnCeilRock(), AddOnGroundRock(), AddRockLayer(), AddToHeightRock(), CheckMaterialInside(), Discretisation(), FindAirLayers(), FindLayer(), findPositionAir(), FreeHeight(), getLayerWater(), Arches::GetMaterial(), getMaxWaterHeight(), InsertBetweenLayers(), OrderStack(), positionToAddEarth(), positionToAddSand(), positionToAddSnow(), positionToAddWater(), RemoveEarthAt(), RemoveEarthLayer(), RemoveMaterial(), RemoveOnCeilRock(), RemoveOnGroundRock(), RemoveRockLayer(), RemoveSandAt(), RemoveSandLayer(), RemoveSnowAt(), RemoveSnowLayer(), RemoveToHeightRock(), RemoveWaterAt(), RemoveWaterLayer(), remplirCouchesWATER(), Arches::SmoothZone(), and truncationWaterHeight().
| int MaterialStack::getMaxWaterHeight | ( | int | c | ) |
Get the maximum water elevation.
| c | Column. |
References at(), MaterialBox::GetA(), MaterialBox::GetB(), GetHeight(), GetMaterial(), Size(), and MaterialBox::WATER.
|
protected |
Insert a given material thickness between two existing layers. This function also checks that sand or stones fall underwater or in the air.
| i | Layer index where insertion will be performed. |
| e | Thickness. |
| t | Material type. |
References AddMaterialOnTop(), MaterialBox::AIR, at(), MaterialBox::GetA(), MaterialBox::GetAB(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetA(), MaterialBox::SetMaterial(), Size(), and stack.
Referenced by AddMaterialAt().
| int MaterialStack::MaxLayerHeight | ( | int | z | ) | const |
Get the maximum height of the layer at a given height.
| z | The height parameter which is passed as an integer. |
References at(), MaterialBox::GetB(), GetHeight(), and stack.
Referenced by Arches::SmoothZone().
| void MaterialStack::OrderStack | ( | ) |
Sorts a material stack so that material layers should be in the right order.
This function is invoked whenever complex changes have been made to a material stack to guarantee the consistency of the data-structure.
References MaterialBox::AIR, at(), MaterialBox::GetAB(), MaterialBox::GetB(), MaterialBox::GetMaterial(), GetMaterial(), MaterialBox::ROCK, MaterialBox::SetA(), MaterialBox::SetB(), and stack.
Referenced by AddOnCeilRock(), AddOnGroundRock(), AddRockLayer(), Arches::DeleteSmallElements(), InsertBetweenLayers(), RemoveEarthAt(), RemoveEarthLayer(), RemoveMaterial(), RemoveOnCeilRock(), RemoveOnGroundRock(), RemoveRockLayer(), RemoveSandAt(), RemoveSandLayer(), RemoveSnowAt(), RemoveSnowLayer(), RemoveStoneAt(), RemoveStoneLayer(), RemoveWaterAt(), RemoveWaterLayer(), and Arches::SmoothZone().
| int MaterialStack::positionToAddEarth | ( | int | position | ) | const |
<FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter du Earth.
| position | : Position de depart de la recherche. |
References MaterialBox::AIR, at(), MaterialBox::EARTH, MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), and Size().
Referenced by Arches::IsEarthStackUnstable(), and Arches::StabilizeEarthStack().
| int MaterialStack::positionToAddSand | ( | int | position | ) |
<FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter du sable.
| position | : Position de depart de la recherche. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), MaterialBox::SAND, and Size().
Referenced by Arches::IsSandStackUnstable(), and Arches::StabilizeSandStack().
| int MaterialStack::positionToAddSnow | ( | int | position | ) | const |
<FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter du Snow.
| position | : Position de depart de la recherche. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), Size(), and MaterialBox::SNOW.
Referenced by Arches::isSnowStackUnstable(), and Arches::StabilizeSnowStack().
| int MaterialStack::positionToAddStone | ( | int | position | ) | const |
Find the highest elevation to add rock.
| position | Starting position. |
References MaterialBox::AIR, at(), MaterialBox::b, GetLayerIndexFromHeight(), Size(), and MaterialBox::STONE.
Referenced by Arches::IsStoneStackUnstable(), and Arches::StabilizeStoneStack().
| int MaterialStack::positionToAddWater | ( | int | position | ) |
<FONT COLOR="AA2222"><B>Warning</B></FONT> Recherche la hauteur maximale pour ajouter de l'eau.
| position | : Position de depart de la recherche. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), Size(), and MaterialBox::WATER.
| void MaterialStack::RemoveEarthAt | ( | int | e, |
| int | h ) |
Removes some soil at a given height.
| e | Thickness. |
| h | Height. |
References MaterialBox::AIR, at(), MaterialBox::EARTH, MaterialBox::GetAB(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), and stack.
Referenced by Arches::RemoveGaussian(), and Arches::StabilizeEarthStack().
| void MaterialStack::RemoveEarthLayer | ( | int | hMin, |
| int | hMax ) |
Remove earth.
| hMin,hMax | Elevation interval. |
References MaterialBox::AIR, at(), MaterialBox::EARTH, MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), sizeZ, and stack.
Referenced by Arches::RemoveMaterialSphere().
| void MaterialStack::RemoveMaterial | ( | TypeMater | t | ) |
Removes all material from a material stack.
The algorithm first converts sand layers into air and then reorders the different layers if need be.
Note that the material should not be rock.
| t | Material type. |
References MaterialBox::AIR, at(), GetMaterial(), OrderStack(), MaterialBox::SetMaterial(), and Size().
Referenced by Arches::RemoveMaterial().
| void MaterialStack::RemoveOnCeilRock | ( | int | ajout, |
| int | position ) |
Removes rock above a given height.
| ajout | Amount of rock. |
| position | Starting elevation. |
References MaterialBox::AIR, at(), MaterialBox::GetA(), MaterialBox::GetAB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetA(), MaterialBox::SetMaterial(), Size(), and stack.
| void MaterialStack::RemoveOnGroundRock | ( | int | t, |
| int | z ) |
Remove rock on the ground.
| t | Thickness of rock that will be removed |
| z | Height where rock is going to be removed |
References MaterialBox::AIR, at(), CheckLayersHeight(), MaterialBox::GetAB(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), and stack.
Referenced by Arches::RemoveOnGroundRock(), and RemoveToHeightRock().
| void MaterialStack::RemoveRockLayer | ( | int | hMin, |
| int | hMax ) |
Removes rock.
| hMin,hMax | Elevation interval. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), sizeZ, and stack.
Referenced by ErosionRock(), Arches::RemoveMaterialSphere(), and Arches::SmoothZone().
| void MaterialStack::RemoveSandAt | ( | int | t, |
| int | position ) |
Remove sand at a given elevation.
| t | Sand thickness. |
| position | Position where sand will be removed. |
References MaterialBox::AIR, at(), MaterialBox::GetAB(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SAND, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), and stack.
Referenced by Arches::RemoveGaussian(), and Arches::StabilizeSandStack().
| void MaterialStack::RemoveSandLayer | ( | int | hMin, |
| int | hMax ) |
Remove a complete sand layer.
| hMin,hMax | Elevation interval. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::SAND, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), sizeZ, and stack.
Referenced by Arches::RemoveMaterialSphere().
| void MaterialStack::RemoveSnowAt | ( | int | t, |
| int | p ) |
Remove Snow.
| t | Snow thickness. |
| p | Position where snow is removed. |
References MaterialBox::AIR, at(), MaterialBox::GetAB(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::ROCK, MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), MaterialBox::SNOW, and stack.
Referenced by Arches::RemoveGaussian(), and Arches::StabilizeSnowStack().
| void MaterialStack::RemoveStoneAt | ( | int | e, |
| int | h ) |
Removes some stone at a given height.
| e | Thickness. |
| h | Height. |
References MaterialBox::AIR, at(), MaterialBox::b, MaterialBox::GetAB(), GetLayerIndexFromHeight(), OrderStack(), MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), stack, and MaterialBox::STONE.
Referenced by Arches::RemoveGaussian(), and Arches::StabilizeStoneStack().
| void MaterialStack::RemoveStoneLayer | ( | int | hMin, |
| int | hMax ) |
Remove a stone layer.
| hMin,hMax | Interval. |
References MaterialBox::AIR, at(), MaterialBox::b, GetLayerIndexFromHeight(), OrderStack(), MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), sizeZ, stack, and MaterialBox::STONE.
Referenced by Arches::RemoveMaterialSphere().
| void MaterialStack::RemoveWaterAt | ( | int | t, |
| int | position ) |
Remove water.
| t | Water thickness. |
| position | Position. |
References MaterialBox::AIR, at(), MaterialBox::GetAB(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), stack, and MaterialBox::WATER.
Referenced by Arches::RemoveGaussian(), and truncationWaterHeight().
| void MaterialStack::RemoveWaterLayer | ( | int | hMin, |
| int | hMax ) |
Remove water.
| hMin,hMax | Interval. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetLayerIndexFromHeight(), GetMaterial(), OrderStack(), MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), sizeZ, stack, and MaterialBox::WATER.
Referenced by Arches::RemoveMaterialSphere().
| QVector< int > MaterialStack::remplirCouchesWATER | ( | int | hMin, |
| int | hMax, | ||
| int | hauteurMaxEau ) |
<FONT COLOR="AA2222"><B>Warning</B></FONT> Rempli de l'eau dans l'interval [hmin,hmax]. Rempli jusqu'a hauteurMaxEau si hMax et hauteurMaxEau est dans le meme layer.
| hMin | : hauteur minimum de remplissage. |
| hMax | : hauteur maximum de remplissage. |
| hauteurMaxEau | : hauteur maximal de remplissage de l'eau si hMax est dans le meme layer. |
References MaterialBox::AIR, at(), MaterialBox::GetB(), GetHeight(), GetLayerIndexFromHeight(), GetMaterial(), MaterialBox::SetB(), MaterialBox::SetMaterial(), Size(), stack, and MaterialBox::WATER.
| int MaterialStack::truncationWaterHeight | ( | int | c, |
| int | h ) |
Clamp the water height.
| c | Column. |
| h | Minimum elevation. |
References at(), MaterialBox::GetB(), GetMaterial(), RemoveWaterAt(), Size(), and MaterialBox::WATER.