gradientspace / geometry3Sharp

C# library for 2D/3D geometric computation, mesh algorithms, and so on. Boost license.
http://www.gradientspace.com
Boost Software License 1.0
1.71k stars 384 forks source link

Aligned Bounding Box #139

Open petrasvestartas opened 4 years ago

petrasvestartas commented 4 years ago

How can I create aligned bounding box to a frame?

Is it possible to do so? I need to check point inclusion in a rotated box that is constructed from a frame and two min.max points.

I use method AxisAlignedBox3d:

g3.AxisAlignedBox3d box = new g3.AxisAlignedBox3d(bbox[0], bbox[1], bbox[2], bbox[3], bbox[4], bbox[5]);

For example:

B05887_7_6

rms80 commented 4 years ago

Box3d is the oriented-box class and has a constructor that takes a Frame and extents (your Size).