#include <math.h>#include "Sea.h"Include dependency graph for wave_z_compute_byHand.cpp:

Go to the source code of this file.
Data Structures | |
| struct | seaDatas |
Defines | |
| #define | pi 3.14159265358979 |
| #define | LUTLEN 64 |
| #define | LUTLENF 64.0f |
Functions | |
| void | fillWaveLuts () |
| fill sine and cosine look up tables | |
| __inline float | Wcos (float xarg) |
| Cosine approximation using LUT. | |
| __inline float | Wsin (float xarg) |
| Sine approximation using LUT. | |
| void | wave_init () |
| Initialize and allocate memory for sea data. | |
| void | wave_z_compute (datas *d) |
| Compute sea-mesh. | |
| void | free_wave_variables () |
| Free sea data memory. | |
| void | Draw_sea () |
| Draws the sea. | |
Variables | |
| float | sinLUT [LUTLEN] |
| Look Up Table for sine function (used for wave drawing). | |
| float | cosLUT [LUTLEN] |
| Look Up Table for cosine function (used for wave drawing). | |
| seaDatas | seaDat |
| seaDatas * | sd = &seaDat |
Definition in file wave_z_compute_byHand.cpp.
|
|
Definition at line 26 of file wave_z_compute_byHand.cpp. Referenced by fillWaveLuts(). |
|
|
Definition at line 27 of file wave_z_compute_byHand.cpp. Referenced by fillWaveLuts(), and Wcos(). |
|
|
Definition at line 25 of file wave_z_compute_byHand.cpp. |
|
|
Draws the sea. Once initialization with wave_init() is done, and after each call of wave_z_compute(), this function can be called to actually draw the sea. The code of this function contains OpenGL code. Definition at line 159 of file wave_z_compute_byHand.cpp. References f(), seaDatas::L, seaDatas::N, sd, and seaDatas::z. Referenced by DrawGLScene(). |
|
|
fill sine and cosine look up tables
Definition at line 40 of file wave_z_compute_byHand.cpp. References cosLUT, f(), LUTLEN, LUTLENF, pi, and sinLUT. Referenced by wave_init(). |
|
|
Free sea data memory. Free memory allocated by wave_init(). Definition at line 144 of file wave_z_compute_byHand.cpp. References seaDatas::B, seaDatas::G, seaDatas::R, sd, and seaDatas::z. Referenced by mexFunction(). |
|
|
Initialize and allocate memory for sea data. Don't forget to call free_wave_variables() Definition at line 82 of file wave_z_compute_byHand.cpp. References seaDatas::B, fillWaveLuts(), seaDatas::G, seaDatas::L, seaDatas::N, seaDatas::R, sd, and seaDatas::z. Referenced by mexFunction(). |
|
|
Compute sea-mesh.
Fill the sea-mesh containig wave heigth on a
Definition at line 109 of file wave_z_compute_byHand.cpp. References f(), seaDatas::L, datas::Lambda0, datas::Lambda1, datas::Lambda2, seaDatas::N, pi, sd, datas::t, datas::V_wave0, datas::V_wave1, datas::V_wave2, datas::Wave_amp0, datas::Wave_amp1, datas::Wave_amp2, datas::Wave_angle0, datas::Wave_angle1, datas::Wave_angle2, Wcos(), Wsin(), datas::x, datas::y, and seaDatas::z. Referenced by DrawGLScene(). |
|
|
Cosine approximation using LUT.
Definition at line 56 of file wave_z_compute_byHand.cpp. References cosLUT, LUTLENF, and pi. Referenced by wave_z_compute(), and Wsin(). |
|
|
Sine approximation using LUT.
Definition at line 72 of file wave_z_compute_byHand.cpp. References f(), pi, and Wcos(). Referenced by wave_z_compute(). |
|
|
Look Up Table for cosine function (used for wave drawing).
Definition at line 31 of file wave_z_compute_byHand.cpp. Referenced by fillWaveLuts(), and Wcos(). |
|
|
Definition at line 34 of file wave_z_compute_byHand.cpp. Referenced by Draw_sea(), free_wave_variables(), wave_init(), and wave_z_compute(). |
|
|
Definition at line 33 of file wave_z_compute_byHand.cpp. |
|
|
Look Up Table for sine function (used for wave drawing).
Definition at line 30 of file wave_z_compute_byHand.cpp. Referenced by fillWaveLuts(). |
1.4.6-NO