Files Classes Functions Hierarchy
#include <test01obj.h>
Public Member Functions | |
| test01obj (pftessinit tessinit, P *cp, int &argc, char **&argv, uintc mode, uintc x, uintc y, string const &title) | |
| void | keyboard (unsigned char key, int x, int y) |
| Derived classes define keyboard. | |
| void | display () |
| Derived classes define display. | |
| void | eval () |
| Generally responsible for graphics initialization. | |
Public Attributes | |
| zpr | zz |
| menu01< test01obj< P, PD > > | menu |
| gobjContainer | xGraphics |
| d3tess * | mesh |
| d3tessdraw * | meshdraw |
| d3clipping * | clip |
| d2partitiondraw< PD > * | hdraw |
Definition at line 12 of file test01obj.h.
| test01obj< P, PD >::test01obj | ( | pftessinit | tessinit, | |
| P * | cp, | |||
| int & | argc, | |||
| char **& | argv, | |||
| uintc | mode, | |||
| uintc | x, | |||
| uintc | y, | |||
| string const & | title | |||
| ) | [inline] |
Definition at line 29 of file test01obj.h.
References test01obj< P, PD >::clip, d3tessdraw::graphicsDeffered, test01obj< P, PD >::hdraw, test01obj< P, PD >::menu, test01obj< P, PD >::mesh, menu01< T >::meshAoffset, test01obj< P, PD >::meshdraw, d3tessdraw::meshupdate(), d3tessdraw::multicolor, d3tessdraw::points, gobjContainer::set(), d3tessdraw::simplexes, test01obj< P, PD >::xGraphics, and d3clipping::zero.
00039 : myglutgui(argc,argv,mode,x,y,title), menu(*this) 00040 { 00041 set(); 00042 00043 xGraphics.set(); 00044 00045 unsigned int N(1000); 00046 mesh = new d3tess(N); 00047 assert(tessinit!=0); 00048 (*tessinit)(*mesh); 00049 00050 meshdraw = new d3tessdraw(*mesh); 00051 meshdraw->graphicsDeffered.v[d3tessdraw::multicolor]->isdrawn = true; 00052 meshdraw->graphicsDeffered.v[d3tessdraw::points]->isdrawn = true; 00053 meshdraw->graphicsDeffered.v[d3tessdraw::simplexes]->isdrawn = true; 00054 meshdraw->meshupdate(); 00055 00056 xGraphics.push_back(new gobjglPushMatrix()); 00057 xGraphics.push_back(& menu.meshAoffset); 00058 00059 xGraphics.push_back(meshdraw); 00060 00061 xGraphics.push_back(new gobjglPopMatrix()); 00062 00063 clip = new d3clipping(*mesh,*cp); 00064 clip->zero = 1.0e-10; 00065 00066 hdraw = new d2partitiondraw<PD>(*new PD(*cp)); 00067 xGraphics.push_back(hdraw); 00068 //cout << SHOW(xGraphics.vg.size()) << endl; 00069 }
| void test01obj< P, PD >::display | ( | ) | [inline, virtual] |
Derived classes define display.
Implements myglutgui.
Definition at line 74 of file test01obj.h.
References gobjContainer::draw(), menu01< T >::draw(), glerrordisplay(), test01obj< P, PD >::menu, and test01obj< P, PD >::xGraphics.
00075 { 00076 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 00077 00078 menu.draw(); 00079 00080 xGraphics.draw(); 00081 00082 glerrordisplay(); 00083 glutSwapBuffers(); 00084 }
| void test01obj< P, PD >::eval | ( | ) | [inline, virtual] |
Generally responsible for graphics initialization.
Not useful for classes with multiple initializations and hence this function is not abstract.
Reimplemented from myglutgui.
Definition at line 86 of file test01obj.h.
References gobjContainer::set(), zpr::update(), test01obj< P, PD >::xGraphics, and test01obj< P, PD >::zz.
Referenced by main().
00087 { 00088 OpenGLinitialisation(); 00089 00090 glEnable(GL_DEPTH_TEST); 00091 glEnable(GL_CULL_FACE); 00092 00093 xGraphics.set(); 00094 00095 glMatrixMode(GL_MODELVIEW); 00096 glLoadIdentity(); 00097 gluLookAt 00098 ( 00099 3.0,0.0,6.0, // Eye 00100 3.0,0.0,0.0, // Center 00101 0.0,1.0,0.0 // Up 00102 ); 00103 00104 zz.update(); 00105 00106 00107 glutPostRedisplay(); 00108 }
| void test01obj< P, PD >::keyboard | ( | unsigned char | key, | |
| int | x, | |||
| int | y | |||
| ) | [inline, virtual] |
Derived classes define keyboard.
Reimplemented from myglutgui.
Definition at line 71 of file test01obj.h.
References test01obj< P, PD >::menu, and menusystem::read().
| d3clipping* test01obj< P, PD >::clip |
| d2partitiondraw< PD >* test01obj< P, PD >::hdraw |
Definition at line 18 of file test01obj.h.
Referenced by test01obj< P, PD >::display(), test01obj< P, PD >::keyboard(), and test01obj< P, PD >::test01obj().
| d3tessdraw* test01obj< P, PD >::meshdraw |
| gobjContainer test01obj< P, PD >::xGraphics |
Definition at line 20 of file test01obj.h.
Referenced by test01obj< P, PD >::display(), test01obj< P, PD >::eval(), and test01obj< P, PD >::test01obj().
1.5.8