A wave defined by the direction, amplitude, period, and optionally phase.
More...
#include <Noise/Wave/Wave.h>
A wave defined by the direction, amplitude, period, and optionally phase.
Definition at line 59 of file Wave.h.
◆ Wave()
Wave::Wave |
( |
Ogre::Vector2 |
dir, |
|
|
float |
A, |
|
|
float |
T, |
|
|
float |
p = 0.f |
|
) |
| |
Default constructor.
- Parameters
-
dir | Direction of the wave. |
A | Amplitude of the wave (m). |
T | Period of the wave (s). |
p | Phase of the wave (rad). |
Definition at line 38 of file Wave.cpp.
◆ ~Wave()
Destructor.
Definition at line 52 of file Wave.cpp.
◆ getAmplitude()
float Hydrax::Noise::Wave::getAmplitude |
( |
| ) |
const |
|
inline |
Returns amplitude of the wave.
- Returns
- Amplitude.
Definition at line 94 of file Wave.h.
◆ getDirection()
Ogre::Vector2 Hydrax::Noise::Wave::getDirection |
( |
| ) |
const |
|
inline |
Returns direction of the wave.
- Returns
- Direction.
Definition at line 90 of file Wave.h.
◆ getLongitude()
float Hydrax::Noise::Wave::getLongitude |
( |
| ) |
const |
|
inline |
Returns longitude of the wave.
- Returns
- Wave longitude.
Definition at line 110 of file Wave.h.
◆ getPeriod()
float Hydrax::Noise::Wave::getPeriod |
( |
| ) |
const |
|
inline |
Returns period of the wave.
- Returns
- Period.
Definition at line 98 of file Wave.h.
◆ getPhase()
float Hydrax::Noise::Wave::getPhase |
( |
| ) |
const |
|
inline |
Returns phase of the wave.
- Returns
- Phase.
Definition at line 102 of file Wave.h.
◆ getSpeed()
float Hydrax::Noise::Wave::getSpeed |
( |
| ) |
const |
|
inline |
Returns phase speed of the wave.
- Returns
- Phase speed.
Definition at line 106 of file Wave.h.
◆ getValue()
float Wave::getValue |
( |
const float & |
x, |
|
|
const float & |
y |
|
) |
| |
Get the especified x/y noise value.
- Parameters
-
- Returns
- Noise value
Definition at line 61 of file Wave.cpp.
◆ update()
void Wave::update |
( |
const Ogre::Real & |
timeSinceLastFrame | ) |
|
Call it each frame.
- Parameters
-
timeSinceLastFrame | Time since last frame(delta) |
Definition at line 56 of file Wave.cpp.
◆ mA
float Hydrax::Noise::Wave::mA |
|
private |
Amplitude.
Definition at line 122 of file Wave.h.
◆ mC
float Hydrax::Noise::Wave::mC |
|
private |
Speed (calculated)
Definition at line 128 of file Wave.h.
◆ mDir
Ogre::Vector2 Hydrax::Noise::Wave::mDir |
|
private |
Direction (must be normalised)
Definition at line 120 of file Wave.h.
◆ mF
float Hydrax::Noise::Wave::mF |
|
private |
Angular frec.
Definition at line 132 of file Wave.h.
◆ mK
float Hydrax::Noise::Wave::mK |
|
private |
Dispersion factor.
Definition at line 134 of file Wave.h.
◆ mL
float Hydrax::Noise::Wave::mL |
|
private |
Longitude (calculated)
Definition at line 130 of file Wave.h.
◆ mP
float Hydrax::Noise::Wave::mP |
|
private |
Phase.
Definition at line 126 of file Wave.h.
◆ mT
float Hydrax::Noise::Wave::mT |
|
private |
Period.
Definition at line 124 of file Wave.h.
◆ mTime
double Hydrax::Noise::Wave::mTime |
|
private |
Elapsed time.
Definition at line 117 of file Wave.h.
The documentation for this class was generated from the following files: