mod_base_guidance.hh

Go to the documentation of this file.
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_GUIDANCE_HH
00015 #define MOD_BASE_GUIDANCE_HH 1
00016 
00017 namespace mod_base {
00018 
00022 class Guidance
00023 {
00024 
00025 public:
00026                     Guidance( const Vector3& direction, const Matrix& matrix, const bool transpose );
00027                     ~Guidance();
00028     Vector3         Guide( const Milliseconds millisecElapsed, SharedPtr<game::Actor> target );
00029     Vector3         GetDirection( void ) { return mDirection; }
00030     bool            IfHitTarget( void ) { return mHit; }
00031     Matrix          GetMatrix( void ) { return mMatrix; }
00032 
00033 private:
00034     enum eState { eState_ROLL, eState_PITCH, eState_EXPLODE };
00035     Vector3     mDirection;
00036     Matrix      mMatrix;
00037     fp          mStep;
00038     eState      mState;
00039     Radian      mManeuverAngleRoll;
00040     Radian      mManeuverAnglePitch;
00041     fp          mPredictedManeuverAngleSign;    
00042     bool        mHit;
00043 };
00044 
00045 } // namespace mod_base
00046 
00047 #endif // MOD_BASE_GUIDANCE_HH
00048 #endif // COMPILING_MODULE
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:12 2007