diff --git a/opglwidget.cpp b/opglwidget.cpp index 4cf24ee..b7f0211 100644 --- a/opglwidget.cpp +++ b/opglwidget.cpp @@ -50,9 +50,6 @@ void OPGLWidget::paintGL() { } void OPGLWidget::reorient() { - float F_mag = pow(pow(loc[0], 2) + pow(loc[1], 2) +pow(loc[2], 2), 0.5); - GLfloat f[] = {-loc[0]/F_mag, -loc[1] / F_mag, -loc[2] / F_mag}; - GLfloat s[] = {-f[2], 0, f[0]}; float s_mag = pow(pow(s[0], 2) + pow(s[1], 2) + pow(s[2], 2), 0.5); diff --git a/opglwidget.h b/opglwidget.h index 206fa48..e5430a5 100644 --- a/opglwidget.h +++ b/opglwidget.h @@ -12,6 +12,7 @@ protected: void reorient(); int mtl_idx = -1; - float loc[3] = {10, 0, 10}; + float loc[3] = {0, 0, 10}; + float f[3] = {0, 0, -1}; ObjectLoader obj; };