-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFace.h
More file actions
64 lines (48 loc) · 1.43 KB
/
Copy pathFace.h
File metadata and controls
64 lines (48 loc) · 1.43 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
// Tyrus Malmstrom
// Header file for the Face.cpp
#ifndef FACE_H_INCLUDE
#define FACE_H_INCLUDE
// directives:
#include <iostream>
#include <string>
#include <Eigen/Dense>
using Eigen::Matrix3d;
using Eigen::MatrixXd;
using Eigen::Vector3d;
// for overloading operator<<
using std::cout;
using std::ostream;
class Face{
public:
// Default Constructor:
Face(): A(0.0),B(0.0),C(0.0), material( Matrix3d::Zero() ), surface_normal( Vector3d() ){};
Face(const double& A_, const double& B_, const double& C_, const Matrix3d& _material, const Vector3d& _surface_normal): A(A_),B(B_),C(C_),material(_material), surface_normal(_surface_normal){};
// Member functions:
void map(const MatrixXd& mat, const Matrix3d& fm, const Vector3d& sn);
void pprint(ostream& out = cout) const;
Face getFace(const int& index) const;
const Vector3d getA() const;
const Vector3d getB() const;
const Vector3d getC() const;
// copy assignment operator: 1 of the BIG THREE
// This doesn't really make sense yet...
const Face& operator= (const Face& rhs){
if( this != &rhs ){ // Standard alias test...
A = rhs.A;
B = rhs.B;
C = rhs.C;
mvil = rhs.mvil;
}
return *this;
}
public:
double A;
double B;
double C;
Matrix3d material;
Vector3d surface_normal;
Vector3d ptof = Vector3d(-1,-1,-1); // by default
Matrix3d mvil;
};
ostream& operator<< (ostream& out, const Face& f);
#endif // FACE_H_INCLUDE