src/types/boundingbox.h

changeset 1370
c6d5ba08c62c
parent 1326
69a90bd2dba2
equal deleted inserted replaced
1369:1e2391b78d17 1370:c6d5ba08c62c
26 class BoundingBox 26 class BoundingBox
27 { 27 {
28 public: 28 public:
29 BoundingBox(); 29 BoundingBox();
30 30
31 void calcVertex(const Vertex& vertex); 31 void consider(const Vertex& vertex);
32 Vertex center() const; 32 Vertex center() const;
33 bool isEmpty() const; 33 bool isEmpty() const;
34 double longestMeasurement() const; 34 double longestMeasure() const;
35 void reset(); 35 void clear();
36 const Vertex& vertex0() const; 36 const Vertex& minimumVertex() const;
37 const Vertex& vertex1() const; 37 const Vertex& maximumVertex() const;
38 double spaceDiagonal() const;
38 39
39 BoundingBox& operator<<(const Vertex& v); 40 BoundingBox& operator<<(const Vertex& v);
40 41
41 private: 42 private:
42 bool m_isEmpty; 43 bool storedIsEmpty = true;
43 Vertex m_vertex0; 44 Vertex minimum {inf, inf, inf};
44 Vertex m_vertex1; 45 Vertex maximum {-inf, -inf, -inf};
45 }; 46 };

mercurial