-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPoint.h
48 lines (36 loc) · 1022 Bytes
/
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
46
47
48
#ifndef POINT_H
#define POINT_H
#include "common.h"
class Point: public Geometry {
public:
// Constructor
Point();
Point(const RTdouble &);
Point(const RTdouble &, const RTdouble &, const RTdouble &);
// = operator
Point & operator =(const Point &);
// Copy Constructor
Point(const Point &);
// Destructor
~Point();
// Achieve Value
RTdouble getX() const;
RTdouble getY() const;
RTdouble getZ() const;
RTdouble getW() const;
// normalization
void normalize(); // / w
// print, instantiation of virtual function of base class
void print(const string &) const;
string to_rep() const;
// distance between 2 points
RTdouble distance(const Point &) const;
// Set Value
void setX(RTdouble);
void setY(RTdouble);
void setZ(RTdouble);
void setW(RTdouble);
private:
RTdouble x, y, z, w;
};
#endif