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

lsd::CIntermediateSharedMesh Class Reference

Assists with the model-loading process. More...

#include <LSDIntermediateSharedMesh.h>

List of all members.

Classes

struct  LSD_FACE
struct  LSD_MATERIAL_ARRAY
struct  LSD_UV_LAYER
struct  LSD_VERTEX

Public Types

typedef struct
lsd::CIntermediateSharedMesh::LSD_UV_LAYER
LPLSD_UV_LAYER
typedef struct
lsd::CIntermediateSharedMesh::LSD_UV_LAYER 
LPCLSD_UV_LAYER
typedef struct
lsd::CIntermediateSharedMesh::LSD_VERTEX
LPLSD_VERTEX
typedef struct
lsd::CIntermediateSharedMesh::LSD_VERTEX 
LPCLSD_VERTEX
typedef struct
lsd::CIntermediateSharedMesh::LSD_FACE
LPLSD_FACE
typedef struct
lsd::CIntermediateSharedMesh::LSD_FACE 
LPCLSD_FACE
typedef struct
lsd::CIntermediateSharedMesh::LSD_MATERIAL_ARRAY
LPLSD_MATERIAL_ARRAY
typedef struct
lsd::CIntermediateSharedMesh::LSD_MATERIAL_ARRAY 
LPCLSD_MATERIAL_ARRAY

Public Member Functions

CIntermediateSharedMesh &LSE_CALL operator= (const CIntermediateSharedMesh &_ismOther)
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 CVectorPoD< CVector3,
LSUINT32 > &LSE_CALL 
GetVertices () const
CVectorPoD< CVector3, LSUINT32 >
&LSE_CALL 
Vertices ()
const CVectorPoD< CVector3,
LSUINT32 > &LSE_CALL 
GetNormals () const
CVectorPoD< CVector3, LSUINT32 >
&LSE_CALL 
Normals ()
const CVectorPoD< LSUINT32,
LSUINT32 > &LSE_CALL 
GetColors () const
CVectorPoD< LSUINT32, LSUINT32 >
&LSE_CALL 
Colors ()
const CVector< CVector
< LSD_FACE, LSUINT32 >
> &LSE_CALL 
GetFaces () const
CVector< CVector< LSD_FACE,
LSUINT32 > > &LSE_CALL 
Faces ()
const CVector< LSD_UV_LAYER,
LSUINT32 > &LSE_CALL 
GetUvLayers () const
CVector< LSD_UV_LAYER,
LSUINT32 > &LSE_CALL 
UvLayers ()
const CVector
< LSD_MATERIAL_ARRAY >
&LSE_CALL 
GetMaterials () const
CVector< LSD_MATERIAL_ARRAY >
&LSE_CALL 
Materials ()

Static Protected Member Functions

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

Protected Attributes

CVectorPoD< CVector3, LSUINT32 > m_vVertices
CVectorPoD< CVector3, LSUINT32 > m_vNormals
CVectorPoD< LSUINT32, LSUINT32 > m_vColors
CVector< LSD_UV_LAYER, LSUINT32 > m_vUvLayers
CVector< LSD_MATERIAL_ARRAYm_vMaterialLayers
CVector< CVector< LSD_FACE,
LSUINT32 > > 
m_vFaces

Detailed Description

Assists with the model-loading process.

Class CIntermediateSharedMesh Description: Assists with the model-loading process. Meshes in model files may be shared between several mesh instances, but are written to the file only once to save space. This class loads them from the given stream, producing intermediate mesh data.


Member Typedef Documentation

A single face. A face has 3 or more vertices and a material.

An array of materials.

A UV layer.

A single vertex for a face.


Member Function Documentation

CVectorPoD<LSUINT32, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::Colors ( )

Get the color list for read and write.

Returns:
Returns a reference to the list of colors for this mesh.
CVector<CVector<LSD_FACE, LSUINT32> >& LSE_CALL lsd::CIntermediateSharedMesh::Faces ( )

Get the list of faces for read and write.

Returns:
Returns a reference to the list of faces for this mesh.
const CVectorPoD<LSUINT32, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::GetColors ( ) const

Get the color list for read only.

Returns:
Returns a constant reference to the list of colors for this mesh.
const CVector<CVector<LSD_FACE, LSUINT32> >& LSE_CALL lsd::CIntermediateSharedMesh::GetFaces ( ) const

Get the list of faces for read only.

Returns:
Returns a constant reference to the list of faces for this mesh.
const CVector<LSD_MATERIAL_ARRAY>& LSE_CALL lsd::CIntermediateSharedMesh::GetMaterials ( ) const

Get the list of materials for read only.

Returns:
Returns a constant reference to the list of materials for this mesh.
const CVectorPoD<CVector3, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::GetNormals ( ) const

Get the normal list for read only.

Returns:
Returns a constant reference to the list of normals for this mesh.
const CVector<LSD_UV_LAYER, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::GetUvLayers ( ) const

Get the list of UV layers for read only.

Returns:
Returns a constant reference to the list of UV layers for this mesh.
const CVectorPoD<CVector3, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::GetVertices ( ) const

Get the vertex list for read only.

Returns:
Returns a constant reference to the list of vertices for this mesh.
LSSTD_ERRORS LSE_CALL lsd::CIntermediateSharedMesh::LoadFromStream ( const lsstd::IStream _sStream,
CAllocator *  _paAllocator,
LSUINT32  _ui32Version 
)

Load shared mesh 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.
CVector<LSD_MATERIAL_ARRAY>& LSE_CALL lsd::CIntermediateSharedMesh::Materials ( )

Get the list of materials for read and write.

Returns:
Returns a reference to the list of materials for this mesh.
CVectorPoD<CVector3, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::Normals ( )

Get the normal list for read and write.

Returns:
Returns a reference to the list of normals for this mesh.
CIntermediateSharedMesh& LSE_CALL lsd::CIntermediateSharedMesh::operator= ( const CIntermediateSharedMesh _ismOther)

Copy operator.

Parameters:
_ismOtherThe object to copy.
Returns:
Returns the copied object.
static LSBOOL LSE_CALL lsd::CIntermediateSharedMesh::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::CIntermediateSharedMesh::Reset ( )

Reset all data.

LSVOID LSE_CALL lsd::CIntermediateSharedMesh::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::CIntermediateSharedMesh::Trash ( )

Trash all data.

CVector<LSD_UV_LAYER, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::UvLayers ( )

Get the list of UV layers for read and write.

Returns:
Returns a reference to the list of UV layers for this mesh.
CVectorPoD<CVector3, LSUINT32>& LSE_CALL lsd::CIntermediateSharedMesh::Vertices ( )

Get the vertex list for read and write.

Returns:
Returns a reference to the list of vertices for this mesh.

Member Data Documentation

CVectorPoD<LSUINT32, LSUINT32> lsd::CIntermediateSharedMesh::m_vColors [protected]

Our color buffer.

CVector<CVector<LSD_FACE, LSUINT32> > lsd::CIntermediateSharedMesh::m_vFaces [protected]

Array of an array of faces.

Stack of material arrays. One entry here for each layer.

CVectorPoD<CVector3, LSUINT32> lsd::CIntermediateSharedMesh::m_vNormals [protected]

Our normal buffer.

Our UV layers.

CVectorPoD<CVector3, LSUINT32> lsd::CIntermediateSharedMesh::m_vVertices [protected]

Our vertex buffer.


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