-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplane.hpp
More file actions
29 lines (20 loc) · 687 Bytes
/
plane.hpp
File metadata and controls
29 lines (20 loc) · 687 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
#ifndef PLANE_HPP
#define PLANE_HPP
#include <stdexcept>
#include "line.hpp"
namespace cpp_utils {
class Plane {
public:
Vector point, normal;
inline Plane() : point(0, 0, 0), normal(norm, norm, norm) {};
Plane(Vector setPoint, Vector setNormal);
bool operator==(const Plane &that) const;
inline bool operator!=(const Plane &that) const {
return true != (*this == that);
};
bool isOnPlane(const Vector &that) const;
Vector intersection(const Line &that) const;
};
bool between(const Line line, const Plane &plane1, const Plane &plane2);
}
#endif