00001 //## begin module%3728CD150118.cm preserve=no 00002 // %X% %Q% %Z% %W% 00003 //## end module%3728CD150118.cm 00004 00005 //## begin module%3728CD150118.cp preserve=no 00006 //## end module%3728CD150118.cp 00007 00008 //## Module: GL_Sphere%3728CD150118; Pseudo Package body 00009 //## Source file: C:\project\mpk\code\OpenGL\GL_Sphere.cpp 00010 00011 //## begin module%3728CD150118.additionalIncludes preserve=no 00012 //## end module%3728CD150118.additionalIncludes 00013 00014 //## begin module%3728CD150118.includes preserve=yes 00015 #include "glos.h" 00016 #include <gl\glu.h> 00017 //## end module%3728CD150118.includes 00018 00019 // GL_Sphere 00020 #include "OpenGL\GL_Sphere.h" 00021 //## begin module%3728CD150118.additionalDeclarations preserve=yes 00022 //## end module%3728CD150118.additionalDeclarations 00023 00024 00025 // Class GL_Sphere 00026 00027 00028 00029 GL_Sphere::GL_Sphere (FrameManager* frameManager) 00030 //## begin GL_Sphere::GL_Sphere%925420848.hasinit preserve=no 00031 : slices(10), stacks(5) 00032 //## end GL_Sphere::GL_Sphere%925420848.hasinit 00033 //## begin GL_Sphere::GL_Sphere%925420848.initialization preserve=yes 00034 ,MPK_Sphere( frameManager ), 00035 OpenGLInterface() 00036 //## end GL_Sphere::GL_Sphere%925420848.initialization 00037 { 00038 //## begin GL_Sphere::GL_Sphere%925420848.body preserve=yes 00039 //## end GL_Sphere::GL_Sphere%925420848.body 00040 } 00041 00042 GL_Sphere::GL_Sphere (const GL_Sphere& right) 00043 //## begin GL_Sphere::GL_Sphere%925852816.hasinit preserve=no 00044 : slices(10), stacks(5) 00045 //## end GL_Sphere::GL_Sphere%925852816.hasinit 00046 //## begin GL_Sphere::GL_Sphere%925852816.initialization preserve=yes 00047 ,MPK_Sphere( right ) 00048 //## end GL_Sphere::GL_Sphere%925852816.initialization 00049 { 00050 //## begin GL_Sphere::GL_Sphere%925852816.body preserve=yes 00051 slices = right.slices ; 00052 stacks = right.stacks ; 00053 //## end GL_Sphere::GL_Sphere%925852816.body 00054 } 00055 00056 00057 GL_Sphere::~GL_Sphere() 00058 { 00059 //## begin GL_Sphere::~GL_Sphere%.body preserve=yes 00060 //## end GL_Sphere::~GL_Sphere%.body 00061 } 00062 00063 00064 00065 //## Other Operations (implementation) 00066 Entity* GL_Sphere::Clone () const 00067 { 00068 //## begin GL_Sphere::Clone%925852815.body preserve=yes 00069 return new GL_Sphere( *this ) ; 00070 //## end GL_Sphere::Clone%925852815.body 00071 } 00072 00073 bool GL_Sphere::DrawExplicit () const 00074 { 00075 //## begin GL_Sphere::DrawExplicit%950474931.body preserve=yes 00076 glPushMatrix() ; 00077 glTranslated( position[ 0 ], position[ 1 ], position[ 2 ] ) ; 00078 GLUquadricObj* sphere = gluNewQuadric(); 00079 gluSphere( sphere, radius, slices, stacks ); 00080 gluDeleteQuadric( sphere ) ; 00081 glPopMatrix() ; 00082 return true ; 00083 //## end GL_Sphere::DrawExplicit%950474931.body 00084 } 00085 00086 // Additional Declarations 00087 //## begin GL_Sphere%3728CD150118.declarations preserve=yes 00088 //## end GL_Sphere%3728CD150118.declarations 00089 00090 //## begin module%3728CD150118.epilog preserve=yes 00091 //## end module%3728CD150118.epilog