From 9704b6ea336bffcb05ebd719841eda458eb76a52 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Fri, 29 Jan 2016 20:24:06 +0100 Subject: [PATCH] Add `getGridRows` and `getGridCols` methods --- src/Surfaces/GridWarpSurface.cpp | 8 ++++++++ src/Surfaces/GridWarpSurface.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/Surfaces/GridWarpSurface.cpp b/src/Surfaces/GridWarpSurface.cpp index 6fc089f..5119137 100644 --- a/src/Surfaces/GridWarpSurface.cpp +++ b/src/Surfaces/GridWarpSurface.cpp @@ -35,6 +35,14 @@ int GridWarpSurface::getType(){ return SurfaceType::GRID_WARP_SURFACE; } +int GridWarpSurface::getGridRows(){ + return _gridRows; +} + +int GridWarpSurface::getGridCols(){ + return _gridCols; +} + bool GridWarpSurface::hitTest(ofVec2f p){ ofPolyline pl; int vertsPerCol = _gridRows + 1; diff --git a/src/Surfaces/GridWarpSurface.h b/src/Surfaces/GridWarpSurface.h index 2b58012..d0dabaf 100644 --- a/src/Surfaces/GridWarpSurface.h +++ b/src/Surfaces/GridWarpSurface.h @@ -16,6 +16,8 @@ class GridWarpSurface : public BaseSurface { void moveBy(ofVec2f v); int getType(); + int getGridRows(); + int getGridCols(); bool hitTest(ofVec2f p);