"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSModelLib/Src/Models/LSDIntermediateMeshInstance.h

00001 
00017 #ifndef __LSD_INTERMEDIATEMESHINSTANCE_H__
00018 #define __LSD_INTERMEDIATEMESHINSTANCE_H__
00019 
00020 #include "../LSDModelLib.h"
00021 #include "BoundingBoxes/LSPAabb.h"
00022 #include "LSDIntermediateSharedMesh.h"
00023 #include "Matrix/LSMMatrix4x4.h"
00024 #include "Sphere/LSMSphere.h"
00025 #include "String/LSTLString.h"
00026 
00027 namespace lsd {
00028 
00036         class CIntermediateMeshInstance {
00037         public :
00038                 // == Various constructors.
00039                 LSE_CALLCTOR                                                    CIntermediateMeshInstance();
00040                 LSE_CALLCTOR                                                    ~CIntermediateMeshInstance();
00041 
00042 
00043                 // == Operators.
00050                 CIntermediateMeshInstance & LSE_CALL    operator = ( const CIntermediateMeshInstance &_imiOther );
00051 
00052 
00053                 // == Functions.
00062                 LSSTD_ERRORS LSE_CALL                                   LoadFromStream( const lsstd::IStream &_sStream, CAllocator * _paAllocator, LSUINT32 _ui32Version );
00063 
00069                 LSVOID LSE_CALL                                                 SetAllocator( CAllocator * _paAllocator );
00070 
00074                 LSVOID LSE_CALL                                                 Reset();
00075 
00079                 LSVOID LSE_CALL                                                 Trash();
00080 
00086                 const CString & LSE_CALL                                GetName() const;
00087 
00093                 const CMatrix4x4 & LSE_CALL                             GetTransform() const;
00094 
00100                 LSUINT32 LSE_CALL                                               GetMeshIndex() const;
00101 
00107                 LSUINT64 LSE_CALL                                               UniqueId() const;
00108 
00114                 LSUINT64 LSE_CALL                                               ParentUniqueId() const;
00115 
00121                 LSE_INLINE const CAabb & LSE_CALL               Aabb() const;
00122 
00128                 LSE_INLINE const CSphere & LSE_CALL             BoundingSphere() const;
00129 
00130 
00131         protected :
00132                 // == Members.
00136                 CString                                                                 m_sName;
00137 
00141                 CMatrix4x4                                                              m_mTrans;
00142 
00146                 CMatrix4x4                                                              m_mLocalTrans;
00147 
00151                 LSUINT32                                                                m_ui32MeshIndex;
00152 
00156                 LSUINT64                                                                m_ui64Id;
00157 
00161                 LSUINT64                                                                m_ui64ParentId;
00162 
00166                 CAabb                                                                   m_aAabbBox;
00167 
00171                 CSphere                                                                 m_sBoundingSphere;
00172 
00173 
00174                 // == Functions.
00182                 static LSBOOL LSE_CALL                                  ReadString( const lsstd::IStream &_sStream, CString &_sRet );
00183         };
00184 
00185 
00186         // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00187         // DEFINITIONS
00188         // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00189         // == Functions.
00195         LSE_INLINE const CAabb & LSE_CALL CIntermediateMeshInstance::Aabb() const {
00196                 return m_aAabbBox;
00197         }
00198 
00204         LSE_INLINE const CSphere & LSE_CALL CIntermediateMeshInstance::BoundingSphere() const {
00205                 return m_sBoundingSphere;
00206         }
00207 
00208 }       // namespace lsd
00209 
00210 #endif  // __LSD_INTERMEDIATEMESHINSTANCE_H__
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator