K3dRay.h

Go to the documentation of this file.
00001 
00012 /***************************************************************************
00013  *   Copyright (C) 2007 by Jan Koci   *
00014  *   honza.koci@email.cz   *
00015  *   http://kengine.sourceforge.net/tutorial/
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  *   This program is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00025  *   GNU General Public License for more details.                          *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU General Public License     *
00028  *   along with this program; if not, write to the                         *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00031  ***************************************************************************/
00032 
00033 #pragma once
00034 
00035 #include "../MathCore/K3dVector3Obj.h"
00036 
00037 
00038 class K3dRay
00039 {
00040                 // Ray is R(t) = P+t*D for t >= 0.  D is not necessarily unit length.
00041 
00042                 K3dVector3Obj *m_pOrigin;  // P
00043                 K3dVector3Obj *m_pDirection;  // D
00044         public:
00045                 K3dRay ( K3dVector3Obj *_pOrigin, K3dVector3Obj *_pDirection );
00046                 K3dRay();
00047                 ~K3dRay();
00048 
00049                 K3dRay& operator= ( K3dRay& _rkRay );
00050 
00051                 K3dVector3Obj* GetOrigin()
00052                 {
00053                         return m_pOrigin;
00054                 }
00055 
00056                 const K3dVector3Obj* GetOrigin() const
00057                 {
00058                         return m_pOrigin;
00059                 }
00060 
00061                 void SetOrigin ( K3dVector3Obj* _pOrigin )
00062                 {
00063                         m_pOrigin = _pOrigin;
00064                 }
00065 
00066                 K3dVector3Obj* GetDirection()
00067                 {
00068                         return m_pDirection;
00069                 }
00070 
00071                 const K3dVector3Obj* GetDirection() const
00072                 {
00073                         return m_pDirection;
00074                 }
00075 
00076                 void SetDirection ( K3dVector3Obj* _pDirection )
00077                 {
00078                         m_pDirection = _pDirection;
00079                 }
00080 };
00081 

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