]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/boundingbox.h
Optimize bounding box bisection with more early culling
[libs/math.git] / source / geometry / boundingbox.h
index ac384ecd19760a5274f8a09bfa3a38adaeff3c81..4ae29354d2ce2b69b3c48478bf0928bb4ad35129 100644 (file)
@@ -27,6 +27,9 @@ public:
        T get_minimum_coordinate(unsigned i) const { return min_pt[i]; }
        const LinAl::Vector<T, D> &get_maximum_point() const { return max_pt; }
        T get_maximum_coordinate(unsigned i) const { return max_pt[i]; }
+       LinAl::Vector<T, D> get_dimensions() const { return max_pt-min_pt; }
+       T get_dimension(unsigned i) const { return max_pt[i]-min_pt[i]; }
+
        bool is_empty() const { return empty && !negated; }
        bool is_space() const { return empty && negated; }
        bool is_negated() const { return negated; }