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

lsd::CIntermediateDrawableMeshInstance Class Reference

Provides rendering functionality to models. More...

#include <LSDIntermediateDrawableMeshInstance.h>

List of all members.

Classes

struct  LSD_INTERM_MAT_LIST
struct  LSD_RENDER_LAYER
struct  LSD_RENDER_PART
struct  LSD_RENDER_TYPE_DATA

Public Types

typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_RENDER_LAYER
LPLSD_RENDER_LAYER
typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_RENDER_LAYER 
LPCLSD_RENDER_LAYER
typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_RENDER_TYPE_DATA
LPLSD_RENDER_TYPE_DATA
typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_RENDER_TYPE_DATA 
LPCLSD_RENDER_TYPE_DATA
typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_RENDER_PART
LPLSD_RENDER_PART
typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_RENDER_PART 
LPCLSD_RENDER_PART

Public Member Functions

CIntermediateDrawableMeshInstance
&LSE_CALL 
operator= (const CIntermediateDrawableMeshInstance &_idmiOther)
LSSTD_ERRORS LSE_CALL CreateGraphicsData (const CIntermediateMeshInstance &_imiInstance, const CIntermediateSharedMesh **_ppismMeshes, const CMaterial **_ppmMaterials, LSUINT32 _ui32TotalMaterials, const CModelTexture *_pmtTextures, LSUINT32 _ui32TotalTextures, const CVector< CSharedModel::LSD_MODEL_IMAGE > &_vModelImages)
LSVOID LSE_CALL SetAllocator (CAllocator *_paAllocator)
LSE_INLINE CVector
< LSD_RENDER_PART, LSUINT32 >
&LSE_CALL 
GetRenderParts ()
LSVOID LSE_CALL DebugRender (CModelTexture *_pmtTextures, LSBOOL _bOpaque)

Protected Types

typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_INTERM_MAT_LIST
LPLSD_INTERM_MAT_LIST
typedef struct
lsd::CIntermediateDrawableMeshInstance::LSD_INTERM_MAT_LIST 
LPCLSD_INTERM_MAT_LIST

Protected Member Functions

LSUINT32 LSE_CALL FindTextureByName (const CModelTexture *_pmtTextures, LSUINT32 _ui32Total, const CString &_sName)
LSUINT32 LSE_CALL FindImageByFileName (const CVector< CSharedModel::LSD_MODEL_IMAGE > &_vModelImages, const CString &_sFileName)
LSVOID LSE_CALL ComputeTangentBinormal (LSD_RENDER_PART &_rpPart, LSUINT32 _ui32Index, LSUINT32 _ui32Slot=0UL)

Protected Attributes

CVector< LSD_RENDER_PART,
LSUINT32 > 
m_vRenderParts

Detailed Description

Provides rendering functionality to models.

Class CIntermediateDrawableMeshInstance Description: Provides rendering functionality to models. This class represents one part of a model, such as an arm, leg, etc.


Member Typedef Documentation

An intermediate material set is used to break a mesh into the necessary vertex buffers to render it. All vertices on a mesh will have the same general properties, such as having normals, colors, number of UV layers, etc. The only difference is the number of types of materials.

A layer in a render part.

List of render parts.

Data needed for a render type. For example, ambient-only pass, lighting pass, etc.


Member Function Documentation

LSVOID LSE_CALL lsd::CIntermediateDrawableMeshInstance::ComputeTangentBinormal ( LSD_RENDER_PART _rpPart,
LSUINT32  _ui32Index,
LSUINT32  _ui32Slot = 0UL 
) [protected]

Compute the tangent and binormal for a vertex. Used for normal mapping.

Parameters:
_rpPartThe render part to update with the tangent and binormal.
_ui32IndexIndex of the first vertex on the face.
_ui32SlotSlot of the face. Vertices and normals are assumed to be slot 0. _ui32Slot is used for UV coordinates only.
LSSTD_ERRORS LSE_CALL lsd::CIntermediateDrawableMeshInstance::CreateGraphicsData ( const CIntermediateMeshInstance _imiInstance,
const CIntermediateSharedMesh **  _ppismMeshes,
const CMaterial **  _ppmMaterials,
LSUINT32  _ui32TotalMaterials,
const CModelTexture _pmtTextures,
LSUINT32  _ui32TotalTextures,
const CVector< CSharedModel::LSD_MODEL_IMAGE > &  _vModelImages 
)

Create graphics data from the given mesh instance and shared mesh data.

Parameters:
_imiInstanceThe instance from which to generate graphics data.
_ppismMeshesThe shared mesh data needed as a reference for polygon data.
_ppmMaterialsMaterials used by the model.
_ui32TotalMaterialsTotal materials to which _ppmMaterials points.
_pmtTexturesTexture instances used by the model.
_ui32TotalTexturesTotal textures to which _pmtTextures points.
_vModelImagesModel image data.
Returns:
Returns an error code indicating the type of error or success.
LSVOID LSE_CALL lsd::CIntermediateDrawableMeshInstance::DebugRender ( CModelTexture _pmtTextures,
LSBOOL  _bOpaque 
)

Debug rendering of objects.

Parameters:
_pmtTexturesTextures referenced by this model.
_bOpaqueIf true, opaque objects are rendered, otherwise transparent ones are.
LSUINT32 LSE_CALL lsd::CIntermediateDrawableMeshInstance::FindImageByFileName ( const CVector< CSharedModel::LSD_MODEL_IMAGE > &  _vModelImages,
const CString &  _sFileName 
) [protected]

Find an image by its file name.

Parameters:
_vModelImagesArray of images.
_sPathFile name of the image to find.
Returns:
Returns the index of the image with the given file name, if any. ~0UL otherwise.
LSUINT32 LSE_CALL lsd::CIntermediateDrawableMeshInstance::FindTextureByName ( const CModelTexture _pmtTextures,
LSUINT32  _ui32Total,
const CString &  _sName 
) [protected]

Find a texture by its name.

Parameters:
_pmtTexturesPonter to an array of textures.
_ui32TotalNumber of textures to which _pmtTextures points.
_sNameName of the texture to find.
Returns:
Returns the index of the texture with the given name, if any. ~0UL otherwise.
LSE_INLINE CVector< CIntermediateDrawableMeshInstance::LSD_RENDER_PART, LSUINT32 > &LSE_CALL lsd::CIntermediateDrawableMeshInstance::GetRenderParts ( )

Get the render parts of this mesh for read and write.

Returns:
Returns the render parts of this mesh for reading and writing.
CIntermediateDrawableMeshInstance& LSE_CALL lsd::CIntermediateDrawableMeshInstance::operator= ( const CIntermediateDrawableMeshInstance _idmiOther)

Copy operator.

Parameters:
_idmiOtherThe object to copy.
Returns:
Returns the copied object.
LSVOID LSE_CALL lsd::CIntermediateDrawableMeshInstance::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.

Member Data Documentation

Vertex buffers used by this model part.


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