"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSMathLib/Src/Triangle/LSMTriangle3I.h

00001 
00017 #ifndef __LSM_TRIANGLE3I_H__
00018 #define __LSM_TRIANGLE3I_H__
00019 
00020 #include "../LSMMathLib.h"
00021 
00022 namespace lsm {
00023 
00029         class CTriangle3I {
00030                 // All is public.  This class has no secrets.
00031         public :
00032                 // == Various constructors.
00033                 LSE_INLINE LSE_CALLCTOR                                         CTriangle3I();
00034                 LSE_INLINE LSE_CALLCTOR                                         CTriangle3I( const CTriangle3I &_t3iTri );
00035                 LSE_INLINE LSE_CALLCTOR                                         CTriangle3I( LSUINT32 _ui32A, LSUINT32 _ui32B, LSUINT32 _ui32C );
00036 
00037 
00038                 // == Operators.
00045                 LSE_INLINE LSUINT32 LSE_FCALL                           operator [] ( LSUINT32 _ui32Index ) const;
00046 
00053                 LSE_INLINE LSUINT32 & LSE_FCALL                         operator [] ( LSUINT32 _ui32Index );
00054 
00061                 LSE_INLINE LSBOOL LSE_FCALL                                     operator == ( const CTriangle3I &_t3iTri ) const;
00062 
00069                 LSE_INLINE LSBOOL LSE_FCALL                                     operator != ( const CTriangle3I &_t3iTri ) const;
00070 
00071 
00072                 // == Functions.
00076                 LSE_INLINE LSVOID LSE_FCALL                                     ReverseOrder();
00077 
00078                 // == Members.
00079 #pragma pack( push, 1 )
00080 
00083                 LSUINT32                                                                        a, b, c;
00084 #pragma pack( pop )
00085         };
00086 
00087 
00088         // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00089         // DEFINITIONS
00090         // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00091         // == Various constructors.
00092         LSE_INLINE LSE_CALLCTOR CTriangle3I::CTriangle3I() {
00093         }
00094         LSE_INLINE LSE_CALLCTOR CTriangle3I::CTriangle3I( const CTriangle3I &_t3iTri ) {
00095                 a = _t3iTri.a;
00096                 b = _t3iTri.b;
00097                 c = _t3iTri.c;
00098         }
00099         LSE_INLINE LSE_CALLCTOR CTriangle3I::CTriangle3I( LSUINT32 _ui32A, LSUINT32 _ui32B, LSUINT32 _ui32C ) {
00100                 a = _ui32A;
00101                 b = _ui32B;
00102                 c = _ui32C;
00103         }
00104 
00105         // == Operators.
00112         LSE_INLINE LSUINT32 LSE_FCALL CTriangle3I::operator [] ( LSUINT32 _ui32Index ) const { return reinterpret_cast<const LSUINT32 *>(this)[_ui32Index]; }
00113 
00120         LSE_INLINE LSUINT32 & LSE_FCALL CTriangle3I::operator [] ( LSUINT32 _ui32Index ) { return reinterpret_cast<LSUINT32 *>(this)[_ui32Index]; }
00121 
00128         LSE_INLINE LSBOOL LSE_FCALL CTriangle3I::operator == ( const CTriangle3I &_t3iTri ) const {
00129                 return a == _t3iTri.a && b == _t3iTri.b && c == _t3iTri.c;
00130         }
00131 
00138         LSE_INLINE LSBOOL LSE_FCALL CTriangle3I::operator != ( const CTriangle3I &_t3iTri ) const {
00139                 return a != _t3iTri.a || b != _t3iTri.b || c != _t3iTri.c;
00140         }
00141 
00142         // == Functions.
00146         LSE_INLINE LSVOID LSE_FCALL CTriangle3I::ReverseOrder() {
00147                 CMathLib::Swap( a, c );
00148         }
00149 
00150 }       // namespace lsm
00151 
00152 #endif  // __LSM_TRIANGLE3I_H__
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator