fshake3d  0.0.1
FreeformDensity3DSurfaceEditor
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
GridControl.hpp
Go to the documentation of this file.
00001 #include "math.hpp"
00002 
00003 Ray makeRay(Event& e)
00004 {  
00005   Point3d p( e.getFloat(0), e.getFloat(1), e.getFloat(2) );
00006   Vec3d d( e.getFloat(3), e.getFloat(4), e.getFloat(5) );
00007   return Ray(p,d);
00008 }
00009 
00010 class Control
00011 {
00012 public:
00013   virtual void onEvent(Event& e) = 0;
00014 };
00015 
00016 class GridControl : public Control
00017 {
00018 public:
00019   virtual void onEvent(Event& e);
00020 };
00021 
00022 void GridControl::onEvent(Event& e)
00023 {
00024   switch( e.getType() )
00025   {
00026   case EVENT_RAY:
00027     Rayd r = e.getRay();
00028     break;
00029   }
00030 }