source: GTP/trunk/App/Demos/Illum/pathmap/SubMesh.h @ 2197

Revision 2197, 973 bytes checked in by szirmay, 18 years ago (diff)
Line 
1#pragma once
2
3#include <vector>
4#include "Vector.hpp"
5#include "Material.hpp"
6
7class TriangleMesh;
8
9class SubMesh
10{
11        friend class Mesh;
12        friend class SubEntity;
13        friend class FinalCompositionRenderStrategy;
14
15        Mesh* parent;
16        int subsetId;
17
18        int edgeStartIndex;
19        int edgeCount;
20
21        D3DXMATERIAL            material;
22        char                            bumpFileName[256];
23
24        LPDIRECT3DTEXTURE9      lambertTexture; //!< D3D textures for the materials
25        LPDIRECT3DTEXTURE9  bumpTexture;        //!< D3D texture for the bump map
26        LPDIRECT3DTEXTURE9  normalTexture;      //!< D3D texture for the normal map
27
28        Material*                       rayTraceMaterial;       //!< material used in for ray tracing
29        TriangleMesh*           rayTraceMesh;           //!< the raytracable representation of the mesh
30
31public:
32        SubMesh(Mesh* parent, int subsetId, D3DXMATERIAL& dMaterial);
33        ~SubMesh(void);
34        void loadBumpMap(LPCSTR fileName, float bumpScale);
35        void buildRayTraceMesh(DWORD startIndex, DWORD indexCount);
36
37        void drawToAtlas();
38        void draw();
39};
Note: See TracBrowser for help on using the repository browser.