#include <dispmap.h>
Public Member Functions | |
| void | clear () |
| DisplacementMap (int w, int h) | |
| void | generate (DisplacementMapFunc func, void *info=NULL) |
| float | getDisplacement (int x, int y) const |
| int | getHeight () const |
| int | getWidth () const |
| void | setDisplacement (int x, int y, float d) |
| ~DisplacementMap () | |
Private Attributes | |
| float * | disp |
| int | height |
| int | width |
|
||||||||||||
|
Definition at line 13 of file dispmap.cpp. References disp, height, and width. 00013 : 00014 width(w), height(h), disp(NULL) 00015 { 00016 disp = new float[width * height]; 00017 }
|
|
|
Definition at line 19 of file dispmap.cpp. References disp. 00020 {
00021 if (disp != NULL)
00022 delete[] disp;
00023 }
|
|
|
Definition at line 26 of file dispmap.cpp. References disp, height, and width. 00027 {
00028 int size = width * height;
00029 for (int i = 0; i < size; i++)
00030 disp[i] = 0.0f;
00031 }
|
|
||||||||||||
|
Definition at line 34 of file dispmap.cpp. References disp, height, and width. 00035 {
00036 for (int i = 0; i < height; i++)
00037 {
00038 for (int j = 0; j < width; j++)
00039 {
00040 disp[i * width + j] = func((float) j / (float) width,
00041 (float) i / (float) height, info);
00042 }
00043 }
00044 }
|
|
||||||||||||
|
Definition at line 40 of file dispmap.h.
|
|
|
Definition at line 25 of file dispmap.h. References height. 00025 { return height; };
|
|
|
Definition at line 24 of file dispmap.h. References width. 00024 { return width; };
|
|
||||||||||||||||
|
Definition at line 45 of file dispmap.h.
|
|
|
Definition at line 34 of file dispmap.h. Referenced by clear(), DisplacementMap(), generate(), getDisplacement(), setDisplacement(), and ~DisplacementMap(). |
|
|
Definition at line 33 of file dispmap.h. Referenced by clear(), DisplacementMap(), generate(), and getHeight(). |
|
|
Definition at line 32 of file dispmap.h. Referenced by clear(), DisplacementMap(), generate(), getDisplacement(), getWidth(), and setDisplacement(). |
1.4.1