Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray3D::cDXMesh Class Reference

#include <cDXMesh.h>

Public Member Functions

 cDXMesh (ID3DXMesh *pMesh=nullptr)
 
ID3DXMesh * get_Mesh () const
 
HRESULT OptimizeInplace (DWORD *pAdjacency)
 
HRESULT OptimizeInplace (ID3DXBuffer *pAdjacency)
 
DWORD ComputeMeshBoundingBox (OUT cBounds3f &tBox) const
 
DWORD ComputeMeshBoundingSphere (const cMatrix4x4f &CombinedTransformationMatrix, OUT cSphereWork &bsphere) const
 

Public Attributes

cIUnkPtr< ID3DXMesh > m_pMesh
 supports ID3DXMeshBase as well. More...
 

Detailed Description

A single simple ID3DXMesh mesh. _D3DXMESHDATA similar to cModelXMeshCont but not as complex.

Constructor & Destructor Documentation

◆ cDXMesh()

Gray3D::cDXMesh::cDXMesh ( ID3DXMesh *  pMesh = nullptr)
inline

Member Function Documentation

◆ ComputeMeshBoundingBox()

DWORD Gray3D::cDXMesh::ComputeMeshBoundingBox ( OUT cBounds3f &  tBox) const

Compute a Box in Mesh space.

Note
This is not a true bbox for the model. (box rotation makes it incorrect)
Returns
number of Vertices

◆ ComputeMeshBoundingSphere()

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

Compute a sphere in model space. Done in 2 passes. transform from mesh space to do correct union similar to D3DXComputeBoundingSphere()

Returns
number of Vertices

◆ get_Mesh()

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

◆ OptimizeInplace() [1/2]

HRESULT Gray3D::cDXMesh::OptimizeInplace ( DWORD *  pAdjacency)

◆ OptimizeInplace() [2/2]

HRESULT Gray3D::cDXMesh::OptimizeInplace ( ID3DXBuffer *  pAdjacency)

Member Data Documentation

◆ m_pMesh

cIUnkPtr<ID3DXMesh> Gray3D::cDXMesh::m_pMesh

supports ID3DXMeshBase as well.


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