diff --git a/README.md b/README.md index 0476b0f..6b56b86 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,14 @@ The actual file being represented below [is data/BigPictureBG.tga](http://www.do ```shell ./configure -d RELEASE && cd build && make -./voidstar --move --spin ../data/* +./voidstar --move ../data/* # Press H and L to switch between files # Use A W S D Z X and your mouse to move in the 3D space # Press F for full screen # Use the arrows to slide and enlarge the sliding window -# Press M to slide the window to the end and SPACE to spin the shape +# Press M to slide the window to the end +# SPACE to toggle spinning the shape +# Press O to reset the camera position # ESC to quit ``` diff --git a/src/Arguments.cc b/src/Arguments.cc index 4804906..8fd2952 100644 --- a/src/Arguments.cc +++ b/src/Arguments.cc @@ -21,7 +21,7 @@ usage(const char* prgname) { << " -w, --sliding Length of sliding window" << std::endl << " -s, --slide-step Amount of points slid" << std::endl << " -m, --move Move sliding window forward" << std::endl - << " -n, --spin Spin shape on itself" << std::endl + << " -n, --spin Don't spin shape on itself" << std::endl << std::endl << " -b, --begin begin offset for the range" << std::endl << " -e, --end end offset for the range" << std::endl @@ -96,7 +96,7 @@ parseArgs(int argc, char *argv[]) { args->move_window = true; break; case 'n': - args->spin_shape = true; + args->spin_shape = false; break; case 's': args->sliding_step = std::stoul(optarg); diff --git a/src/Scene3D.cc b/src/Scene3D.cc index 5f8cd3d..fcea148 100644 --- a/src/Scene3D.cc +++ b/src/Scene3D.cc @@ -88,8 +88,9 @@ Scene3D::load(std::shared_ptr algorithm) { std::cout << "#indices: " << Manager::size2str(indices_.size()) << std::endl; load_buffers(); - camera_.setPosition(glm::vec3(0, 0, 4)); - camera_.setNearAndFarPlanes(0.1, 100.); + // camera_.setPosition(glm::vec3(0, -0.1, 3)); + // camera_.lookAt(glm::vec3(0,0,4)); + // camera_.setNearAndFarPlanes(0.1, 100.); } bool @@ -115,7 +116,10 @@ Scene3D::update(std::shared_ptr manager, float elapsedTime) { camera_.offsetPosition(elapsedTime * move_speed_ * -glm::vec3(0,1,0)); else if (events->keyDown('X')) camera_.offsetPosition(elapsedTime * move_speed_ * glm::vec3(0,1,0)); - + if (events->keyPressed('O')) { + camera_.setPosition(glm::vec3(0, -0.1, 3.8)); + camera_.lookAt(glm::vec3(0,0,4)); + } if (events->keyPressed(' ')) manager->args()->spin_shape = !manager->args()->spin_shape; if (events->keyPressed('M')) diff --git a/src/include/Arguments.hh b/src/include/Arguments.hh index 40457d8..e345280 100644 --- a/src/include/Arguments.hh +++ b/src/include/Arguments.hh @@ -13,8 +13,8 @@ struct Arguments { range_begin(0), range_end(0), fullscreen(false), keep_chrome(false), - sliding_window_length(2*1024), sliding_step(1024), move_window(false), - spin_shape(false) + sliding_window_length(37*1024), sliding_step(1024), move_window(false), + spin_shape(true) {} std::vector paths;