RigsofRods
Soft-body Physics Simulation
Public Member Functions | Protected Attributes
Hydrax::Noise::Noise Class Referenceabstract

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

#include <Noise.h>

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

Public Member Functions

 Noise (const Ogre::String &Name, const bool &GPUNormalMapSupported)
 Constructor. More...
 
virtual ~Noise ()
 Destructor. More...
 
virtual void create ()
 Create. More...
 
virtual void remove ()
 Remove. More...
 
virtual bool createGPUNormalMapResources (GPUNormalMapManager *g)
 Create GPUNormalMap resources. More...
 
virtual void removeGPUNormalMapResources (GPUNormalMapManager *g)
 Remove GPUNormalMap resources. More...
 
virtual void update (const Ogre::Real &timeSinceLastFrame)=0
 Call it each frame. More...
 
virtual void saveCfg (Ogre::String &Data)
 Save config. More...
 
virtual bool loadCfg (Ogre::ConfigFile &CfgFile)
 Load config. More...
 
const Ogre::String & getName () const
 Get noise name. More...
 
const bool & isCreated () const
 Is created() called? More...
 
const bool & isGPUNormalMapSupported () const
 Is GPU Normal map generation supported. More...
 
const bool & areGPUNormalMapResourcesCreated () const
 Are GPU normal map resources created? More...
 
virtual float getValue (const float &x, const float &y)=0
 Get the especified x/y noise value. More...
 

Protected Attributes

Ogre::String mName
 Module name. More...
 
bool mCreated
 Has create() been already called? More...
 
bool mGPUNormalMapSupported
 Is GPU normal map generation supported? More...
 
bool mGPUNormalMapResourcesCreated
 Are GPU normal map resources created? More...
 

Detailed Description

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

Definition at line 42 of file Noise.h.

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.

+ Here is the caller graph for this function:

◆ create()

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

Create.

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

Definition at line 42 of file Noise.cpp.

+ Here is the caller graph for this function:

◆ 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::Perlin, Hydrax::Noise::FFT, and Hydrax::Noise::Real.

Definition at line 52 of file Noise.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

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

Get noise name.

Returns
Noise name

Definition at line 92 of file Noise.h.

+ Here is the caller graph for this function:

◆ 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::Perlin, Hydrax::Noise::FFT, and Hydrax::Noise::Real.

+ Here is the caller graph for this function:

◆ 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.

+ Here is the caller graph for this function:

◆ 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.

+ Here is the caller graph for this function:

◆ loadCfg()

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

Load config.

Returns
True if is the correct noise config

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

Definition at line 87 of file Noise.cpp.

+ Here is the caller graph for this function:

◆ remove()

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

Remove.

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

Definition at line 47 of file Noise.cpp.

+ Here is the caller graph for this function:

◆ removeGPUNormalMapResources()

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

Remove GPUNormalMap resources.

Parameters
gGPUNormalMapManager pointer

Definition at line 71 of file Noise.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveCfg()

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

Save config.

Parameters
DataString reference

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

Definition at line 81 of file Noise.cpp.

+ Here is the caller graph for this function:

◆ 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::Perlin, Hydrax::Noise::FFT, and Hydrax::Noise::Real.

+ Here is the caller graph for this function:

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: