Commit f68859b80a6682f8363ae5acd9ee0684b18670a5

Authored by Pavel Govyadinov
1 parent c0c0ea39

changed the code to facilitate the new vec3 implementation

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
main.cpp
... ... @@ -79,9 +79,9 @@ void glut_render_modelview(){
79 79  
80 80 glMatrixMode(GL_MODELVIEW); //load the modelview matrix for editing
81 81 glLoadIdentity(); //start with the identity matrix
82   - stim::vec<float> eye = cam.getPosition(); //get the camera position (eye point)
83   - stim::vec<float> focus = cam.getLookAt(); //get the camera focal point
84   - stim::vec<float> up = cam.getUp(); //get the camera "up" orientation
  82 + stim::vec3<float> eye = cam.getPosition(); //get the camera position (eye point)
  83 + stim::vec3<float> focus = cam.getLookAt(); //get the camera focal point
  84 + stim::vec3<float> up = cam.getUp(); //get the camera "up" orientation
85 85  
86 86 gluLookAt(eye[0], eye[1], eye[2], focus[0], focus[1], focus[2], up[0], up[1], up[2]); //set up the OpenGL camera
87 87 }
... ... @@ -187,7 +187,7 @@ void glut_initialize(){
187 187  
188 188 texture_initialize(); //set up texture mapping (create texture maps, enable features)
189 189  
190   - stim::vec<float> c = bb.center(); //get the center of the network bounding box
  190 + stim::vec3<float> c = bb.center(); //get the center of the network bounding box
191 191  
192 192 //place the camera along the z-axis at a distance determined by the network size along x and y
193 193 cam.setPosition(c + stim::vec<float>(0, 0, camera_factor * std::max(bb.size()[0], bb.size()[1])));
... ... @@ -303,4 +303,4 @@ int main(int argc, char* argv[])
303 303 glut_initialize(); //create the GLUT window and set callback functions
304 304 glutMainLoop(); // enter GLUT event processing cycle
305 305 }
306   -}
307 306 \ No newline at end of file
  307 +}
... ...