"L. Spiro Engine"
|
00001 00016 #ifndef __LSP_KDOP_H__ 00017 #define __LSP_KDOP_H__ 00018 00019 #include "../LSPPhysicsLib.h" 00020 #include "Plane/LSMPlane3.h" 00021 #include "Vector/LSTLSVectorPoD.h" 00022 00023 namespace lsp { 00024 00031 class CKDop { 00032 public : 00033 // == Various constructors. 00034 LSE_INLINE LSE_CALLCTOR CKDop(); 00035 LSE_INLINE LSE_CALLCTOR CKDop( LSUINT32 _ui32AllocPlanes ); 00036 00037 00038 // == Operators. 00045 LSE_INLINE CPlane3 & LSE_CALL operator [] ( LSUINT32 _ui32I ); 00046 00053 LSE_INLINE const CPlane3 & LSE_CALL operator [] ( LSUINT32 _ui32I ) const; 00054 00055 00056 // == Functions. 00062 LSE_INLINE LSUINT32 LSE_CALL TotalPlanes() const; 00063 00070 LSE_INLINE LSBOOL LSE_CALL AddPlane( const CPlane3 &_pPlane ); 00071 00075 LSE_INLINE LSVOID LSE_CALL Reset(); 00076 00080 LSE_INLINE LSVOID LSE_CALL ResetNoDealloc(); 00081 00082 00083 protected : 00084 // == Members. 00088 CSVectorPoD<CPlane3> m_pPlanes; 00089 }; 00090 00091 00092 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00093 // DEFINITIONS 00094 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00095 // == Various constructors. 00096 LSE_CALLCTOR CKDop::CKDop() { 00097 } 00098 LSE_INLINE LSE_CALLCTOR CKDop::CKDop( LSUINT32 _ui32AllocPlanes ) : 00099 m_pPlanes( _ui32AllocPlanes ) { 00100 } 00101 00102 // == Operators. 00109 LSE_INLINE CPlane3 & LSE_CALL CKDop::operator [] ( LSUINT32 _ui32I ) { 00110 return m_pPlanes[_ui32I]; 00111 } 00112 00119 LSE_INLINE const CPlane3 & LSE_CALL CKDop::operator [] ( LSUINT32 _ui32I ) const { 00120 return m_pPlanes[_ui32I]; 00121 } 00122 00123 // == Functions. 00129 LSE_INLINE LSUINT32 LSE_CALL CKDop::TotalPlanes() const { 00130 return m_pPlanes.Length(); 00131 } 00132 00139 LSE_INLINE LSBOOL LSE_CALL CKDop::AddPlane( const CPlane3 &_pPlane ) { 00140 return m_pPlanes.Push( _pPlane ); 00141 } 00142 00146 LSE_INLINE LSVOID LSE_CALL CKDop::Reset() { 00147 m_pPlanes.Reset(); 00148 } 00149 00153 LSE_INLINE LSVOID LSE_CALL CKDop::ResetNoDealloc() { 00154 m_pPlanes.ResetNoDealloc(); 00155 } 00156 00157 } // namespace lsp 00158 00159 #endif // __LSP_KDOP_H__