Files Classes Functions Hierarchy
#include <graphmisc.h>
Static Public Member Functions | |
| static void | lookatxz (commandline &cmd, doublec camerax_=0.0, doublec cameraz_=2.0) |
| Moves OpenGL camera. | |
| static void | lookat (commandline &cmd, doublec camerax_=0.0, doublec cameray_=0.0, doublec cameraz_=2.0) |
Definition at line 242 of file graphmisc.h.
| void camera::lookat | ( | commandline & | cmd, | |
| doublec | camerax_ = 0.0, |
|||
| doublec | cameray_ = 0.0, |
|||
| doublec | cameraz_ = 2.0 | |||
| ) | [static] |
Definition at line 17 of file graphmisc.cpp.
References commandline::mapvar().
Referenced by test01(), and vrmltest::test02().
00023 { 00024 double camerax(camerax_); 00025 double cameray(cameray_); 00026 double cameraz(cameraz_); 00027 00028 cmd.mapvar(camerax,"camerax"); 00029 cmd.mapvar(cameray,"cameray"); 00030 cmd.mapvar(cameraz,"cameraz"); 00031 00032 glMatrixMode(GL_MODELVIEW); 00033 00034 glLoadIdentity(); 00035 gluLookAt 00036 ( 00037 camerax, cameray, cameraz, // Eye - creates a x: [-2,2] y: [-2,2] screen. 00038 camerax, cameray, 0.0, // Center 00039 0.0, 1.0, 0.0 // Up 00040 ); 00041 glutPostRedisplay(); 00042 }
| void camera::lookatxz | ( | commandline & | cmd, | |
| doublec | camerax_ = 0.0, |
|||
| doublec | cameraz_ = 2.0 | |||
| ) | [static] |
Moves OpenGL camera.
Default is [-2,-2,2,2] window looking at origin. $ ./main camerax=2.0 ...
Definition at line 6 of file graphmisc.cpp.
Referenced by helixtestscope::helixtest::test01(), helixtestscope::helixtest::test02(), and helixtestscope::helixtest::test03().
00011 { 00012 lookat(cmd,camerax_,0.0,cameraz_); 00013 }
1.5.8