mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
conform hydrolicErosion to the same spec as thermal
This commit is contained in:
parent
315f05ea47
commit
262ff405fa
2 changed files with 60 additions and 43 deletions
|
|
@ -332,16 +332,23 @@ class HydraulicErosionAction : public TerrainAction
|
|||
{
|
||||
public:
|
||||
HydraulicErosionAction(TerrainEditor* editor)
|
||||
: TerrainAction(editor)
|
||||
: TerrainAction(editor),
|
||||
mNoiseSize(256)
|
||||
{
|
||||
mNoise.setSeed(1);//Sim::getCurrentTime() );
|
||||
mNoiseData.setSize(mNoiseSize * mNoiseSize);
|
||||
mNoise.fBm(&mNoiseData, mNoiseSize, 12, 1.0f, 5.0f);
|
||||
mNoise.getMinMax(&mNoiseData, &mMinMaxNoise.x, &mMinMaxNoise.y, mNoiseSize);
|
||||
mScale = 1.5f / (mMinMaxNoise.x - mMinMaxNoise.y);
|
||||
}
|
||||
|
||||
StringTableEntry getName() { return("hydraulicErode"); }
|
||||
void process(Selection* sel, const Gui3DMouseEvent& event, bool selChanged, Type type);
|
||||
const U32 mNoiseSize;
|
||||
Noise2D mNoise;
|
||||
Vector<F32> mNoiseData;
|
||||
Vector<F32> mTerrainHeights;
|
||||
Point2F mMinMaxNoise;
|
||||
F32 mScale;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue