2005-10-04 04:50:59 +02:00
|
|
|
#include "maths/Vector3D.h"
|
|
|
|
|
2006-04-17 22:02:51 +02:00
|
|
|
class TerrainOverlay;
|
|
|
|
|
2005-10-04 04:50:59 +02:00
|
|
|
namespace AtlasMessage {
|
|
|
|
|
|
|
|
struct Brush
|
|
|
|
{
|
|
|
|
Brush();
|
|
|
|
~Brush();
|
|
|
|
|
2006-04-21 05:53:10 +02:00
|
|
|
void SetData(int w, int h, const std::vector<float>& data);
|
2005-10-04 04:50:59 +02:00
|
|
|
|
|
|
|
void SetRenderEnabled(bool enabled); // initial state is disabled
|
|
|
|
|
2005-12-08 03:50:55 +01:00
|
|
|
void GetCentre(int& x, int& y) const;
|
2006-04-17 22:02:51 +02:00
|
|
|
void GetBottomLeft(int& x, int& y) const;
|
|
|
|
void GetTopRight(int& x, int& y) const;
|
2005-10-04 04:50:59 +02:00
|
|
|
|
|
|
|
float Get(int x, int y) const
|
|
|
|
{
|
|
|
|
debug_assert(x >= 0 && x < m_W && y >= 0 && y < m_H);
|
|
|
|
return m_Data[x + y*m_W];
|
|
|
|
}
|
|
|
|
|
|
|
|
int m_W, m_H;
|
|
|
|
CVector3D m_Centre;
|
|
|
|
private:
|
2006-04-17 22:02:51 +02:00
|
|
|
TerrainOverlay* m_TerrainOverlay; // NULL if rendering is not enabled
|
2006-04-21 05:53:10 +02:00
|
|
|
std::vector<float> m_Data;
|
2005-10-04 04:50:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Brush g_CurrentBrush;
|
|
|
|
|
|
|
|
}
|