commit 9342fc77c659e5bb4fdf963577758e87bc3fb338 parent ccdd57d8674881500b5ea2f94ab171609c3775fd Author: Michael Savage <mikejsavage@gmail.com> Date: Sun, 29 Oct 2017 19:09:21 +0200 AABB( MinMax ) Diffstat:
aabb.h | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/aabb.h b/aabb.h @@ -67,6 +67,11 @@ struct AABB { centre = c; extents = e; } + + explicit AABB( const MinMax & aabb ) { + centre = ( aabb.maxs + aabb.mins ) * 0.5f; + extents = ( aabb.maxs - aabb.mins ) * 0.5f; + } }; forceinline MinMaxu32 MinMaxu32::quadrant( int q ) const {