|
"L. Spiro Engine"
|
Provides the shared model data that model instances use. More...
#include <LSDSharedModel.h>
Classes | |
| struct | LSD_MODEL_IMAGE |
Public Types | |
| typedef struct lsd::CSharedModel::LSD_MODEL_IMAGE * | LPLSD_MODEL_IMAGE |
|
typedef struct lsd::CSharedModel::LSD_MODEL_IMAGE | LPCLSD_MODEL_IMAGE |
Public Member Functions | |
| CSharedModel &LSE_CALL | operator= (const CSharedModel &_smOther) |
| LSSTD_ERRORS LSE_CALL | LoadFromFile (const LSCHAR *_pcFile) |
| virtual LSSTD_ERRORS LSE_CALL | LoadFromStream (const lsstd::IStream &_sStream) |
| virtual LSVOID LSE_CALL | Reset () |
| LSE_INLINE LSUINT32 LSE_CALL | TotalMeshes () const |
| LSE_INLINE const CIntermediateMeshInstance &LSE_CALL | MeshByIndex (LSUINT32 _ui32Index) const |
| LSE_INLINE CIntermediateMeshInstance &LSE_CALL | MeshByIndex (LSUINT32 _ui32Index) |
| const CIntermediateMeshInstance *LSE_CALL | MeshById (LSUINT64 _ui64Id) const |
| LSE_INLINE const CAabb &LSE_CALL | Aabb () const |
| LSE_INLINE const CSphere &LSE_CALL | BoundingSphere () const |
Protected Member Functions | |
| LSSTD_ERRORS LSE_CALL | LoadMaterials (const lsstd::IStream &_sStream) |
| LSSTD_ERRORS LSE_CALL | LoadTextures (const lsstd::IStream &_sStream, LSUINT8 &_ui8TexturesLoaded) |
| LSSTD_ERRORS LSE_CALL | LoadImages (const lsstd::IStream &_sStream) |
Static Protected Member Functions | |
| static LSBOOL LSE_CALL | ReadString (const lsstd::IStream &_sStream, CString &_sRet) |
Protected Attributes | |
| CVectorPoD < CIntermediateSharedMesh *, LSUINT32 > | m_vSharedMeshes |
| CVector < CIntermediateMeshInstance, LSUINT32 > | m_vMeshInstances |
| CVectorPoD< CMaterial *, LSUINT32 > | m_vMaterials |
| CVector< CModelTexture > | m_vTextures |
| CVector< LSD_MODEL_IMAGE > | m_vImages |
| CAabb | m_aAabb |
| CSphere | m_sBoundingSphere |
| CStdAllocator * | m_psaAllocator |
| CAllocator | m_aVecAllocator |
Provides the shared model data that model instances use.
Class CSharedModel Description: Provides the shared model data that model instances use. A model is composed of several sub- models. For example, bringing together a sub-model for the head, torsoa, legs, and arms will result in the final model object, represented by this class. This class only manages its sub-models, and has no vertex data in it. Additionally, this class has no rendering or animation capabilities. These are added by other classes through inheritance.
| typedef struct lsd::CSharedModel::LSD_MODEL_IMAGE * lsd::CSharedModel::LPLSD_MODEL_IMAGE |
Images.
| LSE_INLINE const CAabb &LSE_CALL lsd::CSharedModel::Aabb | ( | ) | const |
Gets the AABB for this instance, non-transformed.
| LSE_INLINE const CSphere &LSE_CALL lsd::CSharedModel::BoundingSphere | ( | ) | const |
Gets the bounding sphere for this instance, non-transformed.
| LSSTD_ERRORS LSE_CALL lsd::CSharedModel::LoadFromFile | ( | const LSCHAR * | _pcFile | ) |
Load a model master object (shared model) from a file. The path must be given in UTF-8 format.
| _pcFile | Path to the file to load. |
| virtual LSSTD_ERRORS LSE_CALL lsd::CSharedModel::LoadFromStream | ( | const lsstd::IStream & | _sStream | ) | [virtual] |
Load a model master object (shared model) from any stream type.
| _sStream | The stream from which to load the model data. |
Reimplemented in lsd::CDrawableSharedModel.
| LSSTD_ERRORS LSE_CALL lsd::CSharedModel::LoadImages | ( | const lsstd::IStream & | _sStream | ) | [protected] |
Load images from a stream.
| _sStream | The stream from which to load images. |
| LSSTD_ERRORS LSE_CALL lsd::CSharedModel::LoadMaterials | ( | const lsstd::IStream & | _sStream | ) | [protected] |
Load materials from a stream.
| _sStream | The stream from which to load materials. |
| LSSTD_ERRORS LSE_CALL lsd::CSharedModel::LoadTextures | ( | const lsstd::IStream & | _sStream, |
| LSUINT8 & | _ui8TexturesLoaded | ||
| ) | [protected] |
Load textures from a stream.
| _sStream | The stream from which to load textures. |
| _ui8TexturesLoaded | Returned by the function. Indicates whether or not texture data was loaded. If false, textures need to be loaded from disk. |
| const CIntermediateMeshInstance* LSE_CALL lsd::CSharedModel::MeshById | ( | LSUINT64 | _ui64Id | ) | const |
Gets a mesh by its unique ID. If no mesh has the given ID, NULL is returned.
| _ui64Id | ID of the mesh to find. |
| LSE_INLINE CIntermediateMeshInstance &LSE_CALL lsd::CSharedModel::MeshByIndex | ( | LSUINT32 | _ui32Index | ) |
Gets a mesh by index. The index must be below TotalMeshes().
| _ui32Index | Index of the mesh to be returned. |
| LSE_INLINE const CIntermediateMeshInstance &LSE_CALL lsd::CSharedModel::MeshByIndex | ( | LSUINT32 | _ui32Index | ) | const |
Gets a mesh by index. The index must be below TotalMeshes().
| _ui32Index | Index of the mesh to be returned. |
| CSharedModel& LSE_CALL lsd::CSharedModel::operator= | ( | const CSharedModel & | _smOther | ) |
Assignment operator. Copies the given object into this one.
| _smOther | The object to copy. |
| static LSBOOL LSE_CALL lsd::CSharedModel::ReadString | ( | const lsstd::IStream & | _sStream, |
| CString & | _sRet | ||
| ) | [static, protected] |
Read a string from a stream.
| _sStream | The stream from which to read a string. |
| _sRet | The returned string. |
| virtual LSVOID LSE_CALL lsd::CSharedModel::Reset | ( | ) | [virtual] |
Reset the model to scratch.
Reimplemented in lsd::CDrawableSharedModel.
| LSE_INLINE LSUINT32 LSE_CALL lsd::CSharedModel::TotalMeshes | ( | ) | const |
Gets the number of meshes on this model.
CAabb lsd::CSharedModel::m_aAabb [protected] |
The non-transformed AABB for this model.
CAllocator lsd::CSharedModel::m_aVecAllocator [protected] |
Allocator for vectors. It uses m_psaAllocator.
CStdAllocator* lsd::CSharedModel::m_psaAllocator [protected] |
Allocator to use for all allocations made by this object.
CSphere lsd::CSharedModel::m_sBoundingSphere [protected] |
Our bounding sphere.
CVector<LSD_MODEL_IMAGE> lsd::CSharedModel::m_vImages [protected] |
Array of images.
CVectorPoD<CMaterial *, LSUINT32> lsd::CSharedModel::m_vMaterials [protected] |
Array of materials.
CVector<CIntermediateMeshInstance, LSUINT32> lsd::CSharedModel::m_vMeshInstances [protected] |
Array of mesh instances.
CVectorPoD<CIntermediateSharedMesh *, LSUINT32> lsd::CSharedModel::m_vSharedMeshes [protected] |
Array of shared mesh data.
CVector<CModelTexture> lsd::CSharedModel::m_vTextures [protected] |
Array of textures.
1.7.3