From e0522b705b9988ff07e42ab14689bd0b8c4745cb Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Fri, 15 Jul 2016 13:26:10 +0200 Subject: [PATCH 1/1] Added unit length getter --- watersurface.cpp | 5 +++++ watersurface.h | 1 + 2 files changed, 6 insertions(+) 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; -- 2.39.5