"L. Spiro Engine"
Public Member Functions | Static Protected Member Functions | Protected Attributes

lsd::CIntermediateMeshInstance Class Reference

An instance of the shared intemediate mesh data loaded from a file/stream. More...

#include <LSDIntermediateMeshInstance.h>

List of all members.

Public Member Functions

CIntermediateMeshInstance &LSE_CALL operator= (const CIntermediateMeshInstance &_imiOther)
LSSTD_ERRORS LSE_CALL LoadFromStream (const lsstd::IStream &_sStream, CAllocator *_paAllocator, LSUINT32 _ui32Version)
LSVOID LSE_CALL SetAllocator (CAllocator *_paAllocator)
LSVOID LSE_CALL Reset ()
LSVOID LSE_CALL Trash ()
const CString &LSE_CALL GetName () const
const CMatrix4x4 &LSE_CALL GetTransform () const
LSUINT32 LSE_CALL GetMeshIndex () const
LSUINT64 LSE_CALL UniqueId () const
LSUINT64 LSE_CALL ParentUniqueId () const
LSE_INLINE const CAabb &LSE_CALL Aabb () const
LSE_INLINE const CSphere &LSE_CALL BoundingSphere () const

Static Protected Member Functions

static LSBOOL LSE_CALL ReadString (const lsstd::IStream &_sStream, CString &_sRet)

Protected Attributes

CString m_sName
CMatrix4x4 m_mTrans
CMatrix4x4 m_mLocalTrans
LSUINT32 m_ui32MeshIndex
LSUINT64 m_ui64Id
LSUINT64 m_ui64ParentId
CAabb m_aAabbBox
CSphere m_sBoundingSphere

Detailed Description

An instance of the shared intemediate mesh data loaded from a file/stream.

Class CIntermediateMeshInstance Description: An instance of the shared intemediate mesh data loaded from a file/stream. An instance simply contains a pointer to the mesh data it shares, a name, and a transform.


Member Function Documentation

LSE_INLINE const CAabb &LSE_CALL lsd::CIntermediateMeshInstance::Aabb ( ) const

Gets the AABB for this instance, non-transformed.

Returns:
Returns the AABB for this instance.
LSE_INLINE const CSphere &LSE_CALL lsd::CIntermediateMeshInstance::BoundingSphere ( ) const

Gets the bounding sphere for this instance, non-transformed.

Returns:
Returns the bounding sphere for this instance.
LSUINT32 LSE_CALL lsd::CIntermediateMeshInstance::GetMeshIndex ( ) const

Gets the index of this mesh instance.

Returns:
Returns the index of this mesh instance.
const CString& LSE_CALL lsd::CIntermediateMeshInstance::GetName ( ) const

Gets the name of this mesh instance.

Returns:
Returns the name of this mesh instance.
const CMatrix4x4& LSE_CALL lsd::CIntermediateMeshInstance::GetTransform ( ) const

Gets the matrix of this mesh instance.

Returns:
Returns the matrix of this mesh instance.
LSSTD_ERRORS LSE_CALL lsd::CIntermediateMeshInstance::LoadFromStream ( const lsstd::IStream _sStream,
CAllocator *  _paAllocator,
LSUINT32  _ui32Version 
)

Load mesh instance data from a stream.

Parameters:
_sStreamThe stream from which to load the mesh data.
_paAllocatorThe allocator to use for all data allocated by this object.
_ui32VersionThe file version number.
Returns:
Returns an error code indicating the type of error or success.
CIntermediateMeshInstance& LSE_CALL lsd::CIntermediateMeshInstance::operator= ( const CIntermediateMeshInstance _imiOther)

Copy operator.

Parameters:
_imiOtherThe object to copy.
Returns:
Returns the copied object.
LSUINT64 LSE_CALL lsd::CIntermediateMeshInstance::ParentUniqueId ( ) const

Gets the unique ID of this mesh's parent.

Returns:
Returns this object's parent's unique ID.
static LSBOOL LSE_CALL lsd::CIntermediateMeshInstance::ReadString ( const lsstd::IStream _sStream,
CString &  _sRet 
) [static, protected]

Read a string from a stream.

Parameters:
_sStreamThe stream from which to read a string.
_sRetThe returned string.
Returns:
Returns true if there was enough memory to complete the operation.
LSVOID LSE_CALL lsd::CIntermediateMeshInstance::Reset ( )

Reset all data.

LSVOID LSE_CALL lsd::CIntermediateMeshInstance::SetAllocator ( CAllocator *  _paAllocator)

Set the allocator for this object. Can be done only once.

Parameters:
_paAllocatorThe allocator to use for all data allocated by this object.
LSVOID LSE_CALL lsd::CIntermediateMeshInstance::Trash ( )

Trash all data.

LSUINT64 LSE_CALL lsd::CIntermediateMeshInstance::UniqueId ( ) const

Gets the unique ID of this mesh instance.

Returns:
Returns this object's unique ID.

Member Data Documentation

Our bounding box.

Our local transform.

Our transform.

Our bounding sphere.

Our name.

Index of the shared mesh.

Our unique ID.

Our parent ID.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator