Calculate tag width and height in 3D view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to calculate the width and height of tags in a 3D view( the orientation of the view is locked for tagging)
My approach is to get the tag bounding box and calculate the transformed Min and Max point using "ViewTransform.Inverse" and use the new Min, and Max values to calculate the height and width of the tag. but it's not working and apparently, I'm missing something
For example, I have the following values :
original tag bounding box (have different values for Z, which make sense because the owner view is a 3d view) :
{
min:{(-47.074143208, -15.850938760, -40.609650058)} ,
max:{(-41.774670872, -10.914666422, -37.766495175)}
}
using _viewTransform.Inverse.OfPoint() function I calculate the new Min, and Max points :
{
min:{(-47.156694713, -18.400440257, -39.421324664)} ,
max:{(-39.954705195, -15.824059362, -37.997130226)}
}
but the transformed points still have different values on "Z" which does not make sense to me, because I expect that using _viewTransform.Inverse these points transformed into a 2D plane instead of a 3D plane