Browse Source

Add `getGridRows` and `getGridCols` methods

master
Krisjanis Rijnieks 9 years ago
parent
commit
9704b6ea33
  1. 8
      src/Surfaces/GridWarpSurface.cpp
  2. 2
      src/Surfaces/GridWarpSurface.h

8
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;

2
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);

Loading…
Cancel
Save