bovisual3d
#2
As you have already found out, you can use Rect3D.Contains only on axis aligned 3D rectangles.

If you have a rotated rectangle, then the easiest way to check if a 3D point is in that rectangle to first transform the 3D position with inversed rotation matrix - after that you can do a simple Rect3D.Contains check on the original rectangle.

To transform with inversed rotation matrix you can use the following code (assuming boxVisual3D is an instance of BoxVisual3D):
Code:
boxVisual3D.Transform.Inverse.Transform(point3D);
Andrej Benedik
  


Messages In This Thread
bovisual3d - by kreativasas - 09-07-2021, 04:09 PM
RE: bovisual3d - by abenedik - 09-14-2021, 01:21 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)