-
Notifications
You must be signed in to change notification settings - Fork 1
/
vertex.h
63 lines (53 loc) · 1.05 KB
/
vertex.h
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
52
53
54
55
56
57
58
59
60
61
62
63
/******************************************************
g-Matrix3D Neo Engine
Copyright (c)2003 Kim Seong Wan (kaswan, Â𻧱ͽÅ)
E-mail: kaswan@hitel.net
http://www.g-matrix.pe.kr
*******************************************************/
#ifndef VERTEX_H
#define VERTEX_H
#include "vector.h"
struct Vertex{
Vector3 pos; //float x, y, z
Vector4 color;
Vector3 normal;
Vector2 texcoord;
Vertex(){};
Vertex(Vector3 p, Vector4 c, Vector3 n, Vector2 t)
{
pos = p;
color = c;
normal = n;
texcoord = t;
};
~Vertex(){};
};
struct ViewVertex{
Vector4 pos; //float x, y, z
Vector3 normal;
int clipflag;
bool IsLit;
ViewVertex(){};
ViewVertex(Vector3 p, Vector3 n)
{
pos = p;
normal = n;
};
~ViewVertex(){};
};
struct TLVertex{
Vector4 pos; //float x, y, z, w;
Vector4 diffuse;
Vector4 specular;
Vector3 texcoord;
TLVertex(){};
TLVertex(Vector4 p, Vector4 d, Vector4 s, Vector2 t)
{
pos = p;
diffuse = d;
specular = s;
texcoord = t;
};
~TLVertex(){};
};
#endif