Files Classes Functions Hierarchy
#include <visenv.h>
Public Member Functions | |
| visenv (int argc, char **argv, boolc graphics=true) | |
| Interpret string expecting three numbers. | |
| void | defaultsettings () |
| void | defaultgraphics (int argc, char **argv) |
| void | graphicsloop () |
| Infinite graphics loop. | |
Static Public Member Functions | |
| static void | keyboard (unsigned char key, int x, int y) |
| static void | display () |
| Displays the gobj::global with double buffering. | |
Public Attributes | |
| gobjContainer | xGraphics |
| Global graphics stream. | |
| vector< pt3 > | pi |
| Global points. | |
Definition at line 22 of file visenv.h.
| visenv::visenv | ( | int | argc, | |
| char ** | argv, | |||
| boolc | graphics = true | |||
| ) |
Interpret string expecting three numbers.
Construct in good state.
Definition at line 6 of file visenv.cpp.
References defaultgraphics(), and defaultsettings().
00007 { 00008 defaultsettings(); 00009 00010 if (graphics) 00011 defaultgraphics(argc,argv); 00012 }
| void visenv::defaultgraphics | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 29 of file visenv.cpp.
References display(), gobjpush, keyboard(), gobjContainer::set(), and xGraphics.
Referenced by visenv().
00030 { 00031 glutInit(&argc,argv); 00032 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); 00033 glutInitWindowSize(800,600); 00034 glutCreateWindow(""); 00035 glutDisplayFunc(display); 00036 glutKeyboardFunc(keyboard); 00037 00038 OpenGLinitialisation(); 00039 glEnable(GL_CULL_FACE); 00040 glEnable(GL_NORMALIZE); 00041 00042 xGraphics.set(); 00043 00044 /* 00045 sphere01 = new gobjQuadric(); 00046 00047 sphere01->radius = 0.05; 00048 sphere01->slices = 30; 00049 sphere01->loops = 7; 00050 */ 00051 00052 gobjpush(new myaxes(1.0)); 00053 00054 // pointdisplay=true; 00055 }
| void visenv::defaultsettings | ( | ) |
Definition at line 68 of file visenv.cpp.
References pi, and visoperator::set().
Referenced by visenv().
00069 { 00070 visoperator::set(*this); 00071 00072 pi.clear(); 00073 pi.push_back(point3<double>()); 00074 00075 //pointdisplay=false; 00076 }
| void visenv::display | ( | ) | [static] |
Displays the gobj::global with double buffering.
Definition at line 57 of file visenv.cpp.
References gobjContainer::draw(), glerrordisplay(), and gobj::global.
Referenced by defaultgraphics().
00058 { 00059 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 00060 00061 gobj::global->draw(); 00062 glerrordisplay(); 00063 00064 glutSwapBuffers(); 00065 }
| void visenv::graphicsloop | ( | ) |
Infinite graphics loop.
Definition at line 101 of file visenv.cpp.
References zpr::update().
Referenced by vistest::test02().
| void visenv::keyboard | ( | unsigned char | key, | |
| int | x, | |||
| int | y | |||
| ) | [static] |
| vector< pt3 > visenv::pi |
Global points.
Definition at line 35 of file visenv.h.
Referenced by defaultsettings(), visline::handlecommand(), visconvex::handlecommand(), vispointxml::piaddpoint(), vistest::test01(), vistest::test02(), and vistest::test03().
Global graphics stream.
Definition at line 29 of file visenv.h.
Referenced by defaultgraphics(), and vistest::test02().
1.5.8