-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVertex.h
More file actions
102 lines (83 loc) · 1.91 KB
/
Vertex.h
File metadata and controls
102 lines (83 loc) · 1.91 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//
// Created by madhawa on 2020-02-01.
//
#ifndef NANOGUI_TEST_VERTEX_H
#include <nanogui/common.h>
namespace WingedEdge {
#define NANOGUI_TEST_VERTEX_H
class Edge;
/**
* WingedEdge Vertex definition according to the Wikipedia article https://en.wikipedia.org/wiki/Winged_edge
*/
class Vertex {
private:
nanogui::Vector3f mPosition;
Edge *mEdge;
public:
/**
* Construct a vertex with specified coordinates
* @param x X coordinate
* @param y Y coordinate
* @param z Z coordinate
*/
Vertex(float x, float y, float z);
/**
* Construct a vertex with coordinates (0,0,0)
*/
Vertex();
/**
* Returns X coordinate
* @return
*/
float getX();
/**
* Returns Y coordinate
* @return
*/
float getY();
/**
* Returns Z coordinate
* @return
*/
float getZ();
/**
* Sets X coordinate
* @param x
*/
void setX(float x);
/**
* Sets Y coordinate
* @param y
*/
void setY(float y);
/**
* Sets Z coordinate
* @param z
*/
void setZ(float z);
/**
* Retrieve position
* @return
*/
nanogui::Vector3f getPosition();
/**
* Set position
* @param x X coordinate
* @param y Y coordinate
* @param z Z coordinate
*/
void setPosition(float x, float y, float z);
void setPosition(nanogui::Vector3f pos);
/**
* Retrieve an adjacent edge
* @return
*/
Edge *getEdge();
/**
* Set an adjacent edge
* @param nEdge
*/
void setEdge(Edge *nEdge);
};
}
#endif //NANOGUI_TEST_VERTEX_H