Fixed Camera.SetPos modifying the gaze
Changed default camera position to a sane default
This commit is contained in:
parent
37e525d6ee
commit
6209e91c28
3 changed files with 4 additions and 2 deletions
|
@ -116,6 +116,8 @@ int main(int argc, char** argv)
|
|||
|
||||
glutTimerFunc(50,update_angle,0);
|
||||
|
||||
OGLE::camera.set_position({10,0,10});
|
||||
OGLE::camera.rotate({0,1.5*M_PI_4,0});
|
||||
|
||||
// Enters main loop, managed by GLUT
|
||||
glutMainLoop();
|
||||
|
|
|
@ -56,7 +56,7 @@ void Camera::look()
|
|||
|
||||
void Camera::set_position(const Vec3d& eye_pos)
|
||||
{
|
||||
gaze = eye_pos;
|
||||
eye = eye_pos;
|
||||
}
|
||||
|
||||
const Vec3d& Camera::get_eyepos() const
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace OGLE
|
|||
/// Display function provided at setup.
|
||||
void (*custom_display)();
|
||||
static double aspect_ratio;
|
||||
static Camera camera({10,0,10},{-10,0,-10},{0,1,0});
|
||||
static Camera camera({0,0,0},{1,0,0},{0,1,0});
|
||||
|
||||
void reshape(int new_x, int new_y)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue