refactored the new floorplan
new helper methods/operator toe geo classes
This commit is contained in:
10
geo/BBox3.h
10
geo/BBox3.h
@@ -18,8 +18,12 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
/** empty ctor */
|
||||
BBox3() : p1(MAX,MAX,MAX), p2(MIN,MIN,MIN) {;}
|
||||
|
||||
/** ctor with min and max */
|
||||
BBox3(const Point3 min, const Point3 max) : p1(min), p2(max) {;}
|
||||
|
||||
/** adjust the bounding-box by adding this point */
|
||||
void add(const Point3& p) {
|
||||
|
||||
@@ -71,6 +75,12 @@ public:
|
||||
p2 += p; // increase maximum
|
||||
}
|
||||
|
||||
/** set both, min/max z to the same value */
|
||||
void setZ(const float z) {
|
||||
p1.z = z;
|
||||
p2.z = z;
|
||||
}
|
||||
|
||||
/** does the bbox contain the given point? */
|
||||
bool contains(const Point3& p) const {
|
||||
if (p.x < p1.x) {return false;}
|
||||
|
||||
Reference in New Issue
Block a user