Browse Source

Add grid row and col command todos for next iteration

master
Krisjanis Rijnieks 9 years ago
parent
commit
7fb4a1f53f
  1. 2
      src/Commands/AddGridColCmd.cpp
  2. 2
      src/Commands/AddGridRowCmd.cpp
  3. 2
      src/Commands/RmGridColCmd.cpp
  4. 2
      src/Commands/RmGridRowCmd.cpp

2
src/Commands/AddGridColCmd.cpp

@ -9,6 +9,8 @@ AddGridColCmd::AddGridColCmd(GridWarpSurface * s, ProjectionEditor * e){
} }
void AddGridColCmd::exec(){ void AddGridColCmd::exec(){
// TODO: Figure out nice math to not loose existing vertex positions
_vertices = _surface->getVertices(); _vertices = _surface->getVertices();
_texCoords = _surface->getTexCoords(); _texCoords = _surface->getTexCoords();
_surface->setGridCols(_surface->getGridCols() + 1); _surface->setGridCols(_surface->getGridCols() + 1);

2
src/Commands/AddGridRowCmd.cpp

@ -9,6 +9,8 @@ AddGridRowCmd::AddGridRowCmd(GridWarpSurface * s, ProjectionEditor * e){
} }
void AddGridRowCmd::exec(){ void AddGridRowCmd::exec(){
// TODO: Figure out nice math to not loose existing vertex positions
_vertices = _surface->getVertices(); _vertices = _surface->getVertices();
_texCoords = _surface->getTexCoords(); _texCoords = _surface->getTexCoords();
_surface->setGridRows(_surface->getGridRows() + 1); _surface->setGridRows(_surface->getGridRows() + 1);

2
src/Commands/RmGridColCmd.cpp

@ -11,6 +11,8 @@ RmGridColCmd::RmGridColCmd(GridWarpSurface * s, ProjectionEditor * e){
void RmGridColCmd::exec(){ void RmGridColCmd::exec(){
// TODO: Figure out nice math to not loose existing vertex positions
if(_surface->getGridCols() > 1){ if(_surface->getGridCols() > 1){
_vertices = _surface->getVertices(); _vertices = _surface->getVertices();
_texCoords = _surface->getTexCoords(); _texCoords = _surface->getTexCoords();

2
src/Commands/RmGridRowCmd.cpp

@ -11,6 +11,8 @@ RmGridRowCmd::RmGridRowCmd(GridWarpSurface * s, ProjectionEditor * e){
void RmGridRowCmd::exec(){ void RmGridRowCmd::exec(){
// TODO: Figure out nice math to not loose existing vertex positions
if(_surface->getGridRows() > 1){ if(_surface->getGridRows() > 1){
_vertices = _surface->getVertices(); _vertices = _surface->getVertices();
_texCoords = _surface->getTexCoords(); _texCoords = _surface->getTexCoords();

Loading…
Cancel
Save