"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSMathLib/Src/Line/LSMRay3Base.h

00001 
00016 #ifndef __LSM_RAY3BASE_H__
00017 #define __LSM_RAY3BASE_H__
00018 
00019 #include "../LSMMathLib.h"
00020 
00021 namespace lsm {
00022 
00029         template <typename _tType, typename _tVec3Type>
00030         class CRay3Base {
00031                 // All is public.  This class has no secrets.
00032         public :
00033                 // == Various constructors.
00034                 LSE_INLINE LSE_CALLCTOR                 CRay3Base() {
00035                 }
00036                 LSE_INLINE LSE_CALLCTOR                 CRay3Base( const CRay3Base<_tType, _tVec3Type> &_rRay ) {
00037                         (*this) = _rRay;
00038                 }
00039                 LSE_INLINE LSE_CALLCTOR                 CRay3Base( const _tVec3Type &_vPos, const _tVec3Type &_vDir ) {
00040                         p = _vPos;
00041                         dir = _vDir;
00042                         dir.Normalize();
00043                 }
00044 
00045 
00046                 // == Functions.
00054                 LSE_INLINE LSVOID LSE_FCALL             CreateBetweenPoints( const _tVec3Type &_vPos0, const _tVec3Type &_vPos1 ) {
00055                         p = _vPos0;
00056                         dir = _vPos1 - _vPos0;
00057                         dir.Normalize();
00058                 }
00059 
00060 
00061                 // == Members.
00065                 _tVec3Type                                              p;
00066 
00070                 _tVec3Type                                              dir;
00071 
00072         };
00073 
00074 }       // namespace lsm
00075 
00076 #endif  // __LSM_RAY3BASE_H__
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator