Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
Hydrax::Noise::Noise Class Referenceabstract

Description

Base noise class, Override it for create different ways of create water noise.

Definition at line 42 of file Noise.h.

+ Inheritance diagram for Hydrax::Noise::Noise:

Public Member Functions

 Noise (const Ogre::String &Name, const bool &GPUNormalMapSupported)
 
virtual ~Noise ()
 
virtual void create ()
 
virtual void remove ()
 
virtual bool createGPUNormalMapResources (GPUNormalMapManager *g)
 
virtual void removeGPUNormalMapResources (GPUNormalMapManager *g)
 
virtual void update (const Ogre::Real &timeSinceLastFrame)=0
 
virtual void saveCfg (Ogre::String &Data)
 
virtual bool loadCfg (Ogre::ConfigFile &CfgFile)
 
const Ogre::String & getName () const
 
const bool & isCreated () const
 
const bool & isGPUNormalMapSupported () const
 
const bool & areGPUNormalMapResourcesCreated () const
 
virtual float getValue (const float &x, const float &y)=0
 

Protected Attributes

Ogre::String mName
 
bool mCreated
 
bool mGPUNormalMapSupported
 
bool mGPUNormalMapResourcesCreated
 

Constructor & Destructor Documentation

◆ Noise()

Hydrax::Noise::Noise::Noise ( const Ogre::String &  Name,
const bool &  GPUNormalMapSupported 
)

Constructor.

Parameters
NameNoise name
GPUNormalMapSupportedIs GPU normal map generation supported?

Definition at line 30 of file Noise.cpp.

◆ ~Noise()

Hydrax::Noise::Noise::~Noise ( )
virtual

Destructor.

Definition at line 38 of file Noise.cpp.

Member Function Documentation

◆ areGPUNormalMapResourcesCreated()

const bool & Hydrax::Noise::Noise::areGPUNormalMapResourcesCreated ( ) const
inline

Are GPU normal map resources created?

Returns
true if yes, false if not

Definition at line 116 of file Noise.h.

◆ create()

void Hydrax::Noise::Noise::create ( )
virtual

Create.

Reimplemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

Definition at line 42 of file Noise.cpp.

◆ createGPUNormalMapResources()

bool Hydrax::Noise::Noise::createGPUNormalMapResources ( GPUNormalMapManager *  g)
virtual

Create GPUNormalMap resources.

Parameters
gGPUNormalMapManager pointer
Returns
true if it needs to be created, false if not

Reimplemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

Definition at line 52 of file Noise.cpp.

◆ getName()

const Ogre::String & Hydrax::Noise::Noise::getName ( ) const
inline

Get noise name.

Returns
Noise name

Definition at line 92 of file Noise.h.

◆ getValue()

virtual float Hydrax::Noise::Noise::getValue ( const float &  x,
const float &  y 
)
pure virtual

Get the especified x/y noise value.

Parameters
xX Coord
yY Coord
Returns
Noise value

Implemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

◆ isCreated()

const bool & Hydrax::Noise::Noise::isCreated ( ) const
inline

Is created() called?

Returns
true if create() have been already called

Definition at line 100 of file Noise.h.

◆ isGPUNormalMapSupported()

const bool & Hydrax::Noise::Noise::isGPUNormalMapSupported ( ) const
inline

Is GPU Normal map generation supported.

Returns
true if yes, false if not

Definition at line 108 of file Noise.h.

◆ loadCfg()

bool Hydrax::Noise::Noise::loadCfg ( Ogre::ConfigFile &  CfgFile)
virtual

Load config.

Returns
True if is the correct noise config

Reimplemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

Definition at line 87 of file Noise.cpp.

◆ remove()

void Hydrax::Noise::Noise::remove ( )
virtual

Remove.

Reimplemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

Definition at line 47 of file Noise.cpp.

◆ removeGPUNormalMapResources()

void Hydrax::Noise::Noise::removeGPUNormalMapResources ( GPUNormalMapManager *  g)
virtual

Remove GPUNormalMap resources.

Parameters
gGPUNormalMapManager pointer

Definition at line 71 of file Noise.cpp.

◆ saveCfg()

void Hydrax::Noise::Noise::saveCfg ( Ogre::String &  Data)
virtual

Save config.

Parameters
DataString reference

Reimplemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

Definition at line 81 of file Noise.cpp.

◆ update()

virtual void Hydrax::Noise::Noise::update ( const Ogre::Real &  timeSinceLastFrame)
pure virtual

Call it each frame.

Parameters
timeSinceLastFrameTime since last frame(delta)

Implemented in Hydrax::Noise::FFT, Hydrax::Noise::Perlin, and Hydrax::Noise::Real.

Field Documentation

◆ mCreated

bool Hydrax::Noise::Noise::mCreated
protected

Has create() been already called?

Definition at line 132 of file Noise.h.

◆ mGPUNormalMapResourcesCreated

bool Hydrax::Noise::Noise::mGPUNormalMapResourcesCreated
protected

Are GPU normal map resources created?

Definition at line 137 of file Noise.h.

◆ mGPUNormalMapSupported

bool Hydrax::Noise::Noise::mGPUNormalMapSupported
protected

Is GPU normal map generation supported?

Definition at line 135 of file Noise.h.

◆ mName

Ogre::String Hydrax::Noise::Noise::mName
protected

Module name.

Definition at line 130 of file Noise.h.


The documentation for this class was generated from the following files: