Index: ui/gfx/box_f.h |
diff --git a/ui/gfx/box_f.h b/ui/gfx/box_f.h |
index fb2c1910a96ebe18375ab8eee821f136ea0b51a5..11770ee58acaa224a3d4984dd8ab2b9d7faa6fcc 100644 |
--- a/ui/gfx/box_f.h |
+++ b/ui/gfx/box_f.h |
@@ -94,7 +94,20 @@ class GFX_EXPORT BoxF { |
const Point3F& origin() const { return origin_; } |
void set_origin(const Point3F& origin) { origin_ = origin; } |
+ // Expands |this| to contain the given point, if necessary. Please note, even |
+ // if |this| is empty, after the function |this| will continue to contain its |
+ // |origin_|. |
+ void ExpandTo(const Point3F& point); |
+ |
private: |
+ // Expands the box to contain the two given points. It is required that each |
+ // component of |min| is less than or equal to the corresponding component in |
+ // |max|. Precisely, what this function does is ensure that after the function |
+ // completes, |this| contains origin_, min, max, and origin_ + (width_, |
+ // height_, depth_), even if the box is empty. Emptiness checks are handled in |
+ // the public function Union. |
+ void ExpandTo(const Point3F& min, const Point3F& max); |
+ |
Point3F origin_; |
float width_; |
float height_; |