2 #include "ParaXStaticBase.h" 21 CParaXStaticMesh(
const char* strName =
nullptr, LPD3DXFILE pDXFileParser =
nullptr);
33 virtual int GetPolyCount();
35 virtual int GetPhysicsCount();
37 virtual const char* DumpTextureUsage();
41 virtual int GetNextPhysicsGroupID(
int nPhysicsGroup = -1);
49 virtual TextureEntity* GetDefaultReplaceableTexture(
int ReplaceableTextureID);
57 virtual HRESULT Create(
RenderDevicePtr pd3dDevice,
void* buffer, DWORD nFileSize,
bool bCheckSecondUV =
false);
58 #ifdef USE_DIRECTX_RENDERER 59 virtual HRESULT Create(
RenderDevicePtr pd3dDevice, LPD3DXFILEDATA pFileData);
63 virtual HRESULT Destroy();
66 virtual HRESULT InitDeviceObjects();
67 virtual HRESULT DeleteDeviceObjects();
70 virtual FLOAT ComputeBoundingSphere(
Vector3* vObjectCenter, FLOAT* fObjectRadius);
83 virtual HRESULT ClonePhysicsMesh(DWORD* pNumVertices,
Vector3 ** ppVerts, DWORD* pNumTriangles, WORD** ppIndices,
int* pnMeshPhysicsGroup =
nullptr,
int* pnTotalMeshGroupCount =
nullptr);
88 #ifdef USE_DIRECTX_RENDERER 89 virtual MeshHeader& GetMeshHeader(LPD3DXFILE pFileParser =
nullptr);
93 #ifdef USE_DIRECTX_RENDERER 95 virtual bool GetMeshHeaderFromFile(
CParaFile& myFile, LPD3DXFILE pFileParser);
97 virtual bool GetMeshHeaderFromFile(
CParaFile& myFile,
XFileParser* pFileParser) {
return false; };
101 bool bDrawOpaqueSubsets =
true,
102 bool bDrawAlphaSubsets =
true,
float fAlphaFactor = 1.0f);
104 bool bDrawOpaqueSubsets =
true,
105 bool bDrawAlphaSubsets =
true,
float fAlphaFactor = 1.0f,
CParameterBlock* materialParams =
nullptr);
108 LPD3DXMESH GetSysMemMesh() {
return m_pSysMemMesh; }
109 LPD3DXMESH GetLocalMesh() {
return m_pLocalMesh; }
111 LPD3DXMESH& GetSysMemMeshRef() {
return m_pSysMemMesh; }
112 LPD3DXMESH& GetLocalMeshRef() {
return m_pLocalMesh; }
115 static HRESULT GetMeshHeader(LPCSTR strFilename, LPD3DXFILE pFileParser,
Vector3& vMin,
Vector3& vMax,
bool& bHasNormal,
bool& bHasTex2);
117 HRESULT CreateMaterials(
const char* strPath, IDirect3DDevice9 *pd3dDevice, ID3DXBuffer *pAdjacencyBuffer, ID3DXBuffer *pMtrlBuffer);
119 HRESULT DrawSubSetEx(
int nIndex, D3DXATTRIBUTERANGE* pAtts);
123 LPD3DXFILE m_pDXFileParser;
124 LPD3DXMESH m_pSysMemMesh;
125 LPD3DXMESH m_pLocalMesh;
129 #ifdef USE_DIRECTX_RENDERER Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
Helper structure analogue to aiScene.
Definition: XFileHelper.h:123
different physics engine has different winding order.
Definition: EventBinding.h:32
a very thin wrapper to DirectX device with a portable version of openGL implementation.
Definition: RenderDeviceDirectX.h:10
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
The XFileParser reads a XFile either in text or binary form and builds a temporary data structure out...
Definition: XFileParser.h:19
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: StaticMesh.h:30
The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseA...
Definition: PERefPtr.h:13
Definition: effect_file.h:323
the material information for ParaX file
Definition: ParaXMaterial.h:9
it presents a real or virtual file in ParaEngine.
Definition: ParaFile.h:31
Desc: Class for loading and rendering file-based meshes.
Definition: ParaXStaticModel.h:26
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: StaticMesh.h:26
Definition: ParaXStaticBase.h:32
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object's name
Definition: StaticMesh.h:28
a list of CParameter{name, value} pairs of anything.
Definition: ParameterBlock.h:108
Desc: Class for loading and rendering file-based meshes.
Definition: StaticMesh.h:14