source: GTP/trunk/App/Demos/Illum/DepthOfField/Mesh.h @ 760

Revision 760, 816 bytes checked in by szirmay, 19 years ago (diff)

Added a folder remotely

Line 
1#pragma once
2
3class Mesh
4{
5        //IDirect3DDevice9* pd3dDevice;
6        ID3DXMesh* pMesh;
7
8        DWORD numMaterials;
9        D3DXVECTOR3 originalSize;
10        float originalDiameter;
11        float preferredDiameter;
12        D3DXVECTOR3 position;
13        D3DXVECTOR3 containerSize;
14
15        HRESULT hr;
16
17public:
18        Mesh(float preferredDiameter);
19        Mesh(LPCWSTR fileName, float preferredDiameter, D3DXVECTOR3 offset);
20        ~Mesh();
21        void Move(D3DXVECTOR3 movement);
22
23        void Load(LPCWSTR fileName);
24
25        HRESULT Draw();
26       
27        D3DXVECTOR3 GetMeshSize()   { return GetMeshScale() * originalSize; }
28        float GetMeshScale()            { return preferredDiameter / originalDiameter; }
29        D3DXVECTOR3 GetMeshOffset()     { return position; }
30        void SetContainerSize(D3DXVECTOR3 size) { containerSize = size; }
31        void computeTangent();
32       
33protected:
34        HRESULT CalculateMeshSize( );
35};
Note: See TracBrowser for help on using the repository browser.