-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvertex.h
47 lines (39 loc) · 1.26 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
#ifndef VERTEX_H_
#define VERTEX_H_
#include "vector.h"
/*
*
* Vertex related class
*
*/
namespace BE {
class Vertex {
/*
*
* A vertex is defined by:
*
* Position: x,y,z space coordinates (euclidean space)
* Normal: a normal vector (it must be calcultated)
* Texture: x,y texture coordinates (0,0 means no texture)
*
*/
void init();
void init(const Vector3 &p);
void init(const Vector3 &p, const Vector3 &n);
void init(const Vector3 &p, const Vector3 &n, const Vector3 &c);
void init(const Vector3 &p, const Vector3 &n, const Vector3 &c, const Vector2 &t);
public:
Vertex() {};
Vertex(const float &px, const float &py, const float &pz);
Vertex(const Vector3 &p);
Vertex(const Vector3 &p, const Vector3 &n);
Vertex(const Vector3 &p, const Vector3 &n, const Vector3 &c);
Vertex(const Vector3 &p, const Vector3 &n, const Vector3 &c, const Vector2 &t);
~Vertex() {};
Vector3 position; // Position
Vector3 normal; // Normal
Vector3 color;
Vector2 texCoord; // Texture coordinates
};
}
#endif /*VERTEX_H_*/