<div dir="ltr"><div><br></div>I'm not sure what you mean by "properly encodes empty". The box does encode empty by having at least one max point less then its min point. There is a function isEmpty() that checks if a box is empty. I've used bound box classes in several libraries that all work this way. It is the user's responsibility to check if a box is empty (call isEmpty()) before doing any operations that require a valid box. I'm not sure there is a better approach here, except maybe that the area/volume of an empty box should return 0.<div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 10:46 AM Matt Brown <<a href="mailto:matt.brown@kitware.com">matt.brown@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">intersection() could throw a warning that one of the boxes is empty, but it should still return 0 intersection area, I would think. </div></blockquote><div>The issue is, intersection() returns a bounding box, not an area. So there isn't a clear ideal way to return a bounding box that properly encodes "empty." Right now, it returns a bounding box with all properties populated in an undefined manner.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div>Is there a reason to utilize bounding_box class to also support boxes that are not axis aligned, which is all Eigen::AlignBox supports?</div></div></blockquote><div>I think non-axis-aligned bounding boxes might have utility in the future, but bounding_box is currently configured to only specify axis-aligned boxes. So, we would have to completely redefine the interface to bounding_box to support non-axis-aligned boxes.</div><div><br></div><div>~Matt</div></div></div>
</blockquote></div>