refactored the new floorplan

new helper methods/operator toe geo classes
This commit is contained in:
kazu
2016-05-24 17:01:56 +02:00
parent d0801606b7
commit 51cab55d37
10 changed files with 937 additions and 9 deletions

View File

@@ -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;}