00001 /* 00008 * LEGAL: COPYRIGHT (C) 2007 JIM E. BROOKS 00009 * THIS SOURCE CODE IS RELEASED UNDER THE TERMS 00010 * OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2). 00011 *****************************************************************************/ 00012 00013 #if COMPILING_MODULE 00014 #ifndef MOD_BASE_CHASE_PLANE_HH 00015 #define MOD_BASE_CHASE_PLANE_HH 1 00016 00017 #include "mod_base_craft.hh" 00018 00019 namespace mod_base { 00020 00045 class ChasePlane : public Shared 00046 { 00047 00048 friend class Craft; 00049 public: 00050 ChasePlane( const SharedPtr<Craft> target ); 00051 ~ChasePlane(); 00052 void Sync( void ); // sync matrix of ChasePlane with its target 00053 void Enable( const bool enable = true ); 00054 void Rotate( uint axis, Radian rad ); 00055 void Translate( uint axis, fp inc ); 00056 void Reset( void ); 00057 00058 private: 00059 void SetPosition( const WorldVertex& position ); 00060 void Update( void ); 00061 void ZoomOutFromTarget_( void ); // subroutine of Update() 00062 void ChangeEye_( void ); // subroutine of Update() 00063 00064 private: 00065 CLASS_VAR SharedPtr0<Craft> msActiveTarget; 00066 const SharedPtr<Craft> mTarget; 00067 Matrix mViewMatrix; 00068 fp mDistanceFromTarget; 00069 bool mNeedInitialSync; 00070 }; 00071 00072 } // namespace mod_base 00073 00074 #endif // MOD_BASE_CHASE_PLANE_HH 00075 #endif // COMPILING_MODULE
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:11 2007