00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00025 #ifndef _RUNNER_H_
00026 #define _RUNNER_H_
00027
00028 #include "IRunner.h"
00029 #include "IMenuListener.h"
00030 #include "IMouseListener.h"
00031 #include "MenuEntry.h"
00032
00033 #include "Render.h"
00034 #include "Logic.h"
00035
00036 namespace CUDARayCasting
00037 {
00038
00044 class Runner :
00045 public GlutWrapper::IRunner, public GlutWrapper::IMenuListener, public GlutWrapper::IMouseListener
00046 {
00047 public:
00049 Runner(int width, int height);
00050
00052 ~Runner(void);
00053
00057 void InitializeOpengl(void);
00058
00063 void Run(float elapsedTime);
00064
00070 void Reshape(int width, int height);
00071
00077 void ProcessMenuEvents(int option);
00078
00081 void ProcessMouse(const GlutWrapper::MouseState& mouseState);
00082
00087 const std::vector<GlutWrapper::MenuEntry>& GetMenuEntries(void) const;
00088
00089 private:
00090 static const Vector3 m_fontColor;
00091
00093 std::vector<GlutWrapper::MenuEntry> m_entries;
00094
00096 Render m_render;
00097
00099 Logic m_logic;
00100
00101 int m_width;
00102
00103 int m_height;
00104
00105 float m_lastElapsedTime;
00106
00108 Runner(const Runner&);
00109
00111 Runner& operator=(const Runner&);
00112
00114 void Render(float elapsedTime);
00115
00116 void Update(float elapsedTime);
00117
00118 void DisplayMetrics(float elapsedTime);
00119 };
00120
00121 }
00122 #endif