-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1805007_Point.h
45 lines (36 loc) · 1.01 KB
/
1805007_Point.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
#include "1805007_Matrix.h"
#ifndef POINT_H
#define POINT_H
class Point {
private:
double px, py, pz, w;
Matrix matrix;
friend Point operator*(double, const Point &);
friend ostream &operator<<(ostream &, const Point &);
friend istream &operator>>(istream &, Point &);
public:
Point();
Point(double, double, double);
Point(double, double, double, double);
Point(const Point &);
Point(const Matrix &);
Point &operator=(const Point &);
Point operator+(const Point &) const;
Point operator-(const Point &) const;
Point operator*(const Point &) const;
Point operator*(double) const;
double getPx() const;
double getPy() const;
double getPz() const;
double getW() const;
Matrix getMatrix() const;
void setPx(double);
void setPy(double);
void setPz(double);
void setW(double);
Point transform(const Matrix &) const;
void normalize();
Point scaleDown() const;
static double dot(const Point &, const Point &);
};
#endif