#include <HeightMapModifier.hpp>
Public Types | |
enum | Source { SOURCE_Z_POSITION , SOURCE_ELEVATION } |
Public Member Functions | |
HeightMapModifier () | |
void | initialize (MainWindow *mainWindow) |
void | setSource (Source source) |
void | setColormap (const QString &name, int colorCount) |
void | setPreviewEnabled (bool enabled, bool update=true, bool reload=false) |
bool | isPreviewEnabled () |
void | applyModifier (Page *page) |
void | apply (QWidget *widget) |
Protected Member Functions | |
std::vector< Vector3< double > > | createColormap (const QString &name, int colorCount) |
Protected Attributes | |
MainWindow * | mainWindow_ |
Editor * | editor_ |
bool | previewEnabled_ |
Source | source_ |
std::vector< Vector3< double > > | colormap_ |
QMutex | mutex_ |
This class represents Height Map model.
An instance of this class is shared memory resource between main window GUI thread and editor thread. Most of the code must not be run by multiple threads at once. A mutex is used to protect concurrent read/write access to shared memory.
HeightMapModifier::HeightMapModifier | ( | ) |
void HeightMapModifier::apply | ( | QWidget * | widget | ) |
Referenced by HeightMapWidget::apply().
void HeightMapModifier::applyModifier | ( | Page * | page | ) |
Referenced by HeightMapPlugin::applyModifier().
|
protected |
Referenced by initialize(), and setColormap().
void HeightMapModifier::initialize | ( | MainWindow * | mainWindow | ) |
Referenced by HeightMapPlugin::initialize().
bool HeightMapModifier::isPreviewEnabled | ( | ) |
Referenced by HeightMapPlugin::isModifierEnabled().
void HeightMapModifier::setColormap | ( | const QString & | name, |
int | colorCount | ||
) |
Referenced by HeightMapWidget::colorCountChanged(), and HeightMapWidget::colormapChanged().
void HeightMapModifier::setPreviewEnabled | ( | bool | enabled, |
bool | update = true , |
||
bool | reload = false |
||
) |
void HeightMapModifier::setSource | ( | Source | source | ) |
Referenced by HeightMapWidget::sourceChanged().
|
protected |
Referenced by applyModifier(), initialize(), and setColormap().
|
protected |
Referenced by apply(), applyModifier(), initialize(), and setPreviewEnabled().
|
protected |
Referenced by apply(), initialize(), and setPreviewEnabled().
|
protected |
Referenced by applyModifier(), isPreviewEnabled(), setColormap(), setPreviewEnabled(), and setSource().
|
protected |
Referenced by isPreviewEnabled(), setColormap(), setPreviewEnabled(), and setSource().
|
protected |
Referenced by applyModifier(), and setSource().