K3dAim.h

Go to the documentation of this file.
00001 
00011 /***************************************************************************
00012  *   Copyright (C) 2007 by Jan Koci   *
00013  *   honza.koci@email.cz   *
00014  *   http://kengine.sourceforge.net/tutorial/
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  *   This program is distributed in the hope that it will be useful,       *
00022  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00024  *   GNU General Public License for more details.                          *
00025  *                                                                         *
00026  *   You should have received a copy of the GNU General Public License     *
00027  *   along with this program; if not, write to the                         *
00028  *   Free Software Foundation, Inc.,                                       *
00029  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00030  ***************************************************************************/
00031 
00032 #pragma once
00033 
00034 #include "../System/GameData/K3dGameData.h"
00035 #include "K3dMath.h"
00036 #include "../Geometry/K3dRay.h"
00037 #include "../Geometry/K3dRayObj.h"
00038 #include "../Geometry/K3dCameraObj.h"
00039 #include "K3dVector2.h"
00040 #include "../System/Builder/K3dRayBuild.h"
00041 
00042 
00043 class K3dAim
00044 {
00045                 K3dGameData *m_pGameData;       
00046                 float m_fAverage;                       
00047                 //K3dRay m_kRay;                                ///< Aiming ray
00048                 float m_fFarDist;                       
00049                 K3dRayObj *m_pRay;                      
00050                 K3dRayBuild *m_pRayBuild;       
00051 
00052                 void CalcAimRayAverage ( const float _fFarDist );
00053 
00054         public:
00055                 K3dAim ( K3dGameData *_pGameData );
00056                 ~K3dAim();
00057 
00058                 void CreateAimRay();
00059                 void CalcAimRay();
00060 
00061 
00063                 float &GetAverage()
00064                 {
00065                         return m_fAverage;
00066                 }
00067 
00069                 float &GetFarDist()
00070                 {
00071                         return m_fFarDist;
00072                 }
00073 };
00074 

Generated on Thu Aug 16 23:53:27 2007 for K3dEngine by  doxygen 1.5.0