-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFace.h
More file actions
50 lines (35 loc) · 922 Bytes
/
Copy pathFace.h
File metadata and controls
50 lines (35 loc) · 922 Bytes
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
/*
* Face.h
*
* Created on: Sep 16, 2012
* Author: prathamesh
*/
#ifndef FACE_H_
#define FACE_H_
#include "Vertex.h"
class Face
{
public:
Face();
// Default class constructor
Face(Vertex *vertex1, Vertex *vertex2, Vertex *vertex3);
// Construction of face by passing addresses of the three vertices that define it.
Face(Vertex *vertex1, Vertex *vertex2, Vertex *vertex3, double *norm);
// Construction of face by passing addresses of the three vertices and the normal vector that define it.
~Face();
// Default class destructor.
Vertex *v1;
Vertex *v2;
Vertex *v3;
// Addresses of the vertices that define the face.
double normal[3];
// Normal vector for the face.
double edgeLength[3];
double semiperimeter;
double faceArea;
void computeLengths(void);
// Compute length of the face edges.
double computeArea(void);
// Compute area of the face.
};
#endif /* FACE_H_ */