From: Alexander Schmidt Date: Fri, 15 Jul 2016 11:26:10 +0000 (+0200) Subject: Added unit length getter X-Git-Url: http://git.treefish.org/~alex/seamulator.git/commitdiff_plain/e0522b705b9988ff07e42ab14689bd0b8c4745cb?ds=inline Added unit length getter --- diff --git a/watersurface.cpp b/watersurface.cpp index 930cf7f..c27e7db 100644 --- a/watersurface.cpp +++ b/watersurface.cpp @@ -24,6 +24,11 @@ int WaterSurface::size() const return m_size; } +double WaterSurface::unitLength() const +{ + return m_unitLength; +} + void WaterSurface::draw() const { glScalef(m_unitLength, m_unitLength, 1.0f); diff --git a/watersurface.h b/watersurface.h index 7882197..31e0e60 100644 --- a/watersurface.h +++ b/watersurface.h @@ -13,6 +13,7 @@ class WaterSurface SurfacePoint& at(int x, int y); const SurfacePoint& at(int x, int y) const; int size() const; + double unitLength() const; void draw() const; void drawSingleTile(int x, int y) const;