proj home

Files   Classes   Functions   Hierarchy  

pointsurfacetest Class Reference

Test pointsurface class. More...

#include <pointsurfacetest.h>

Collaboration diagram for pointsurfacetest:

List of all members.

Public Member Functions

 pointsurfacetest ()
int test01 (int argc, char **argv)
 Displaying a 2D oval using 2D input.
int test02 (int argc, char **argv)
 Displaying the surface of a sphere using 3D input.
int test03 (int argc, char **argv)
 Displaying a parallelogram with points.

Public Attributes

gobjContainer xGraphics
 Global graphics container.


Detailed Description

Test pointsurface class.

Definition at line 9 of file pointsurfacetest.h.


Constructor & Destructor Documentation

pointsurfacetest::pointsurfacetest (  )  [inline]

Definition at line 16 of file pointsurfacetest.h.

00017     : xGraphics(true) {}


Member Function Documentation

int pointsurfacetest::test01 ( int  argc,
char **  argv 
)

Displaying a 2D oval using 2D input.

Mouse interaction.

Definition at line 66 of file pointsurfacetest.cpp.

References pointsurface< T, G >::addsurface2D(), gobjpush, pointsurfacetestdisplay01(), pointsurfacetestkeyboard01(), gobjContainerPrePost::pre, gobjContainer::push(), gobjContainer::set(), and xGraphics.

00067 {
00068   glutInit(&argc,argv);
00069   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
00070   glutInitWindowSize(800,600);
00071   glutCreateWindow("");
00072   glutDisplayFunc(pointsurfacetestdisplay01);
00073   glutKeyboardFunc(pointsurfacetestkeyboard01);
00074 
00075   OpenGLinitialisation();
00076 
00077   glEnable(GL_DEPTH_TEST);
00078   glEnable(GL_CULL_FACE);
00079   glEnable(GL_NORMALIZE);
00080 
00081   xGraphics.set();
00082 
00083   pointsurfacetestOval f;
00084 
00085   pointsurface<> ps(2000);
00086   ps.pre.push(new gobjglColor3f(1.0,0.0,0.0) );
00087 
00088   ps.addsurface2D(f);
00089 
00090   gobjpush(&ps);
00091 
00093   zpr zz;
00094 
00095   glutMainLoop();
00096 
00097   return 0;
00098 }

int pointsurfacetest::test02 ( int  argc,
char **  argv 
)

Displaying the surface of a sphere using 3D input.

Mouse interaction.

Definition at line 101 of file pointsurfacetest.cpp.

References pointsurface< T, G >::addsurface3D(), gobjpush, pointsurfacetestdisplay01(), pointsurfacetestkeyboard01(), gobjContainerPrePost::pre, gobjContainer::push(), gobjContainer::set(), and xGraphics.

00102 {
00103   glutInit(&argc,argv);
00104   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
00105   glutInitWindowSize(800,600);
00106   glutCreateWindow("");
00107   glutDisplayFunc(pointsurfacetestdisplay01);
00108   glutKeyboardFunc(pointsurfacetestkeyboard01);
00109 
00110   OpenGLinitialisation();
00111 
00112   glEnable(GL_DEPTH_TEST);
00113   glEnable(GL_CULL_FACE);
00114   glEnable(GL_NORMALIZE);
00115 
00117   zpr zz;
00118 
00119   xGraphics.set();
00120 
00121   pointsurfaceSphere f;
00122 
00123   pointsurface<> ps(2000);
00124   ps.pre.push(new gobjglColor3ub(184,134,11) );
00125 
00126 /*
00127 
00128   pointsurfacetestSphere f;
00129 
00130   pointsurface<> ps(2000);
00131   ps.pre.push(new gobjglColor3f(1.0,0.0,0.0) );
00132 */
00133 
00134   ps.addsurface3D(f);
00135 
00136   gobjpush(&ps);
00137 
00138   glutMainLoop();
00139 
00140   return 0;
00141 }

int pointsurfacetest::test03 ( int  argc,
char **  argv 
)

Displaying a parallelogram with points.

Mouse interaction.

Definition at line 144 of file pointsurfacetest.cpp.

References pointsurface< T, G >::addsurface2D(), gobjpush, pointsurfacetestdisplay01(), pointsurfacetestkeyboard01(), gobjContainerPrePost::pre, gobjContainer::push(), gobjContainer::set(), and xGraphics.

00145 {
00146   glutInit(&argc,argv);
00147   glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
00148   glutInitWindowSize(800,600);
00149   glutCreateWindow("");
00150   glutDisplayFunc(pointsurfacetestdisplay01);
00151   glutKeyboardFunc(pointsurfacetestkeyboard01);
00152 
00153   OpenGLinitialisation();
00154 
00155   glEnable(GL_DEPTH_TEST);
00156   glEnable(GL_CULL_FACE);
00157   glEnable(GL_NORMALIZE);
00158 
00160   zpr zz;
00161 
00162   xGraphics.set();
00163 
00164   pointsurfaceParallelogram f
00165   ( 
00166     point3<double>(0.1,0.1,0.0),
00167     point3<double>(0.3,0.1,0.0),
00168     point3<double>(0.0,0.0,0.2)
00169   );
00170 
00171   pointsurface<> ps(2000);
00172   ps.pre.push(new gobjglColor3ub(184,134,11) );
00173 
00174   ps.addsurface2D(f);
00175 
00176   gobjpush(&ps);
00177 
00178   glutMainLoop();
00179 
00180   return 0;
00181 }


Member Data Documentation

Global graphics container.

Definition at line 14 of file pointsurfacetest.h.

Referenced by test01(), test02(), and test03().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:10 2011 for Chelton Evans Source by  doxygen 1.5.8