00001 #include "TiltEvent.h" 00002 #include "TiltInterface.h" 00003 00004 namespace RenderTools { 00005 00006 TiltEvent::TiltEvent( Type type, const Vec3 & orientation ): 00007 m_type( type ), 00008 m_orientation( orientation ){ 00009 switch( m_type ){ 00010 case TILT_START: 00011 TiltInterface::s_state = true; 00012 break; 00013 case TILT_STOP: 00014 TiltInterface::s_state = false; 00015 break; 00016 case TILT_CHANGED: 00017 TiltInterface::s_orientation = m_orientation; 00018 break; 00019 } 00020 } 00021 00022 TiltEvent::Type TiltEvent::getType( void ) const { 00023 return( m_type ); 00024 } 00025 00026 const Vec3 & TiltEvent::getOrientation( void ) const { 00027 return( m_orientation ); 00028 } 00029 00030 }; 00031