Xinqi Bao's Git

XbSlicer, re-organized the entire project
[XbSlicer.git] / src / Vec3d.hh
1 #pragma once
2
3 /*
4 @author: Xinqi Bao
5 3-D vector, with 3 double vaule points.
6 */
7
8 #include <iostream>
9
10 #include "BufferReadBinary.hh"
11
12 class Vec3d
13 {
14 public:
15 double x, y, z;
16 void readBuffer(BufferReadBinary& buffer);
17 bool equal(const Vec3d& v) const;
18 bool equal(const Vec3d* v) const;
19 double sum() const;
20
21 Vec3d();
22 Vec3d(double x, double y, double z);
23
24 friend std::istream& operator>>(std::istream& s, Vec3d& v);
25 friend std::istream& operator>>(std::istream& s, Vec3d* v);
26 friend std::ostream& operator<<(std::ostream& s, const Vec3d& v);
27 friend std::ostream& operator<<(std::ostream& s, const Vec3d* v);
28 };