Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Gray3D::cModelXMeshCont Class Reference

#include <cModelX.h>

Inheritance diagram for Gray3D::cModelXMeshCont:
_D3DXMESHCONTAINER

Public Member Functions

 cModelXMeshCont (const ATOMCHAR_t *pszName)
 
virtual ~cModelXMeshCont ()
 
virtual HRESULT DisposeThis ()
 
void InitAdjacency (const DWORD *pAdjacencyInit, DWORD dwNumFaces)
 
HRESULT InitTangents (DWORD dwOpt, IDirect3DDevice9 *pDXDev)
 
void InitMaterials (const _D3DXMATERIAL *pMaterials2, DWORD dwNumMaterials)
 
void InitEffectInstances (const _D3DXEFFECTINSTANCE *pEffects2, DWORD dwNumMaterials)
 
DWORD ComputeMeshBoundingBox (cBounds3f &tBox) const
 
DWORD ComputeMeshBoundingSphere (const cMatrix4x4f &CombinedTransformationMatrix, cSphereWork &bsphere) const
 
DWORD ComputePointCloud (const cMatrix4x4f &CombinedTransformationMatrix, cArrayStruct< cVector3f > &cloud)
 
HRESULT GetIndexedFaceMesh (_Inout_ DWORD &rdwFaceToFind, OUT cTriangle3f &tri) const
 
DWORD get_NumMaterials () const
 
HRESULT GetMaterialTexName (int iMaterial, cStringF &sFileName) const
 
cModelXMeshContget_NextMeshCont () const
 
ID3DXMesh * get_Mesh () const
 
void put_MeshX (ID3DXMesh *pMesh)
 
HRESULT CountIntersections (const cVector3f &v1, const cVector3f &vDir, float *pfDistHit)
 

Public Attributes

cStringA m_sName
 stores the name of this mesh. More...
 
cBounds3f m_BBoxMesh
 pre-transformed. local mesh coord units. More...
 
cSpheref m_BSphereMesh
 pre-transformed. local mesh coord units. More...
 
cArrayStruct< cModelXMaterialm_aMaterials
 materials and effects on the material. (NumMaterials) for (pMaterials and pEffects) More...
 
- Public Attributes inherited from _D3DXMESHCONTAINER
char * Name
 
_D3DXMESHDATA MeshData
 
_D3DXMATERIALpMaterials
 
_D3DXEFFECTINSTANCEpEffects
 
DWORD NumMaterials
 
DWORD * pAdjacency
 
ID3DXSkinInfo * pSkinInfo
 
struct _D3DXMESHCONTAINERpNextMeshContainer
 

Static Public Attributes

static const _D3DVERTEXELEMENT9 k_VertDeclX [5]
 

Detailed Description

A single mesh + materials + shader props. similar to cDXMesh but as a member of a cModelX derived from D3DXMESHCONTAINER so we can add some app-specific info that will be stored with each mesh (_D3DXMATERIAL,DXEFFECTINSTANCE,ID3DXSkinInfo) m_pMesh = MeshData.pMesh, where MeshData.Type==D3DXMESHTYPE_MESH

Constructor & Destructor Documentation

◆ cModelXMeshCont()

Gray3D::cModelXMeshCont::cModelXMeshCont ( const ATOMCHAR_t pszName)

◆ ~cModelXMeshCont()

Gray3D::cModelXMeshCont::~cModelXMeshCont ( )
virtual

Member Function Documentation

◆ ComputeMeshBoundingBox()

DWORD Gray3D::cModelXMeshCont::ComputeMeshBoundingBox ( cBounds3f &  tBox) const

number of Vertices

◆ ComputeMeshBoundingSphere()

DWORD Gray3D::cModelXMeshCont::ComputeMeshBoundingSphere ( const cMatrix4x4f CombinedTransformationMatrix,
cSphereWork bsphere 
) const

transform to do correct union

Returns
number of Vertices

◆ ComputePointCloud()

DWORD Gray3D::cModelXMeshCont::ComputePointCloud ( const cMatrix4x4f CombinedTransformationMatrix,
cArrayStruct< cVector3f > &  cloud 
)
Returns
number of faces

◆ CountIntersections()

HRESULT Gray3D::cModelXMeshCont::CountIntersections ( const cVector3f v1,
const cVector3f vDir,
float *  pfDistHit 
)

◆ DisposeThis()

HRESULT Gray3D::cModelXMeshCont::DisposeThis ( )
virtual

◆ get_Mesh()

ID3DXMesh* Gray3D::cModelXMeshCont::get_Mesh ( ) const
inline

ID3DXBaseMesh ??

◆ get_NextMeshCont()

cModelXMeshCont* Gray3D::cModelXMeshCont::get_NextMeshCont ( ) const
inline

Next mesh in a list.

◆ get_NumMaterials()

DWORD Gray3D::cModelXMeshCont::get_NumMaterials ( ) const
inline

◆ GetIndexedFaceMesh()

HRESULT Gray3D::cModelXMeshCont::GetIndexedFaceMesh ( _Inout_ DWORD &  rdwFaceToFind,
OUT cTriangle3f tri 
) const

Get the triangle for a particular face.

Returns
S_OK = got it. S_FALSE = not in my range.

◆ GetMaterialTexName()

HRESULT Gray3D::cModelXMeshCont::GetMaterialTexName ( int  iMaterial,
cStringF sFileName 
) const

◆ InitAdjacency()

void Gray3D::cModelXMeshCont::InitAdjacency ( const DWORD *  pAdjacencyInit,
DWORD  dwNumFaces 
)

◆ InitEffectInstances()

void Gray3D::cModelXMeshCont::InitEffectInstances ( const _D3DXEFFECTINSTANCE pEffects2,
DWORD  dwNumMaterials 
)

◆ InitMaterials()

void Gray3D::cModelXMeshCont::InitMaterials ( const _D3DXMATERIAL pMaterials2,
DWORD  dwNumMaterials 
)

◆ InitTangents()

HRESULT Gray3D::cModelXMeshCont::InitTangents ( DWORD  dwOpt,
IDirect3DDevice9 *  pDXDev 
)

Make sure the mesh has proper FVF What if it already has tangents ?

  • dwOpt = get_Mesh()->GetOptions()
  • pDXDDev = m_pd3dDevice

◆ put_MeshX()

void Gray3D::cModelXMeshCont::put_MeshX ( ID3DXMesh *  pMesh)
inline

Member Data Documentation

◆ k_VertDeclX

const _D3DVERTEXELEMENT9 Gray3D::cModelXMeshCont::k_VertDeclX
static
Initial value:
=
{
}

◆ m_aMaterials

cArrayStruct<cModelXMaterial> Gray3D::cModelXMeshCont::m_aMaterials

materials and effects on the material. (NumMaterials) for (pMaterials and pEffects)

◆ m_BBoxMesh

cBounds3f Gray3D::cModelXMeshCont::m_BBoxMesh

pre-transformed. local mesh coord units.

◆ m_BSphereMesh

cSpheref Gray3D::cModelXMeshCont::m_BSphereMesh

pre-transformed. local mesh coord units.

◆ m_sName

cStringA Gray3D::cModelXMeshCont::m_sName

stores the name of this mesh.


The documentation for this class was generated from the following files: