-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelFormats.h
More file actions
51 lines (38 loc) · 1.01 KB
/
Copy pathModelFormats.h
File metadata and controls
51 lines (38 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// ===========================================================================
/// <summary>
/// ModelFormats.h
/// DirectXIntroduction
/// created by Mehrdad Soleimanimajd on 08.09.2019
/// </summary>
/// <created>ʆϒʅ, 08.09.2019</created>
/// <changed>ʆϒʅ, 04.07.2023</changed>
// ===========================================================================
#ifndef MODELFORMATS_H
#define MODELFORMATS_H
#include <DirectXMath.h>
struct Vertex
{
DirectX::XMFLOAT3 position;
DirectX::XMFLOAT4 color;
};
struct VertexT
{
DirectX::XMFLOAT3 position;
DirectX::XMFLOAT2 texture;
};
struct VertexL
{
DirectX::XMFLOAT3 position;
DirectX::XMFLOAT2 texture;
DirectX::XMFLOAT3 normal; // normal light
};
// Format: vertex containing the texture and diffuse light properties
// each triangle is read and written in one line
class VertexTexDiffuseL
{
public:
static unsigned int read (const char*, VertexL**); //
static void write (VertexL*, unsigned int&);
};
#endif // MODELFORMATS_H