Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

TumblingView3D.h

Go to the documentation of this file.
00001 #ifndef OglGui_TumblingView3D_h
00002 #define OglGui_TumblingView3D_h
00003 
00004 #include "OglGui/WindowView3D.h"
00005 
00006 namespace OglGui
00007 {
00008 
00009 class TumblingView3D : public WindowView3D
00010 {
00011 public:
00012 
00013     TumblingView3D(Window* parent, int x, int y, int w, int h,
00014                    OGLIMAGE *oglIm=NULL) :
00015         WindowView3D(parent, x, y, w, h, oglIm)
00016     {
00017     }
00018 
00019     TumblingView3D(Window* parent, int w, int h, OGLIMAGE *oglIm=NULL) :
00020         WindowView3D(parent, w, h, oglIm)
00021     {
00022     }
00023 
00024     virtual void InitFunc()
00025     {
00026         WindowView3D::InitFunc();
00027         mView->z = -20;
00028     }
00029 
00030     virtual void MouseFunc(INT msg, INT but, INT state, INT x, INT y)
00031     {
00032         WindowView3D::MouseFunc( msg, but, state, x, y);
00033         if (msg == oglMouseUp && but == oglLeftButton && !state && mView)
00034             mView->z = -20;
00035     }
00036 
00037     virtual void InitDisplayFunc()
00038     {
00039         if (mView->z  < -3)
00040         {
00041             mView->z += 0.1f;
00042             float r = (mView->z+3) * 12.0f;
00043             view3DSys.SetRotation(mView, r, r/2.0f, r/3.0f);
00044         }
00045         SetAlwaysDraw(mView->z < -3);
00046 
00047         WindowView3D::InitDisplayFunc();
00048     }
00049 };
00050 
00051 } // namespace OglGui
00052 
00053 #endif

Generated on Fri Mar 19 09:31:39 2010 for ImpalaSrc by  doxygen 1.5.1