Sync changes from upstream repository

Co-authored-by: Bozo <bozo@mcneel.com>
Co-authored-by: croudyj <croudyj@gmail.com>
Co-authored-by: Dale Fugier <dale@mcneel.com>
Co-authored-by: Dale Lear <dalelear@mcneel.com>
Co-authored-by: Joshua Kennedy <joshuakennedy102@gmail.com>
Co-authored-by: Jussi Aaltonen <jussi@mcneel.com>
Co-authored-by: kike-garbo <kike@mcneel.com>
Co-authored-by: Luis Fraguada <luis@mcneel.com>
Co-authored-by: piac <giulio@mcneel.com>
Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com>
This commit is contained in:
Bozo the Builder
2023-12-12 03:17:38 -08:00
parent d41d779de7
commit 9988ac106a
39 changed files with 12175 additions and 334 deletions

View File

@@ -353,16 +353,20 @@ bool ON_Text::GetTextXform(
{
ON_Xform tp2sxf; // Text point to view plane rotation
ON_3dPoint text_point_3d = Plane().origin;
ON_3dVector text_xdir = textobjectplane.xaxis;
ON_3dVector text_ydir = textobjectplane.yaxis;
ON_3dVector text_zdir = textobjectplane.zaxis;
const ON_3dVector& text_xdir = textobjectplane.xaxis;
const ON_3dVector& text_ydir = textobjectplane.yaxis;
const ON_3dVector& text_zdir = textobjectplane.zaxis;
ON_3dVector view_xdir = view_x;
ON_3dVector view_ydir = view_y;
ON_3dVector view_zdir = view_z;
if (nullptr != model_xform)
{
text_xdir.Transform(*model_xform);
text_ydir.Transform(*model_xform);
text_zdir.Transform(*model_xform);
auto inverse = model_xform->Inverse();
view_xdir.Transform(inverse);
view_ydir.Transform(inverse);
view_zdir.Transform(inverse);
}
rotation_xf.Rotation(text_point_3d, text_xdir, text_ydir, text_zdir, text_point_3d, view_x, view_y, view_z);
rotation_xf.Rotation(text_point_3d, text_xdir, text_ydir, text_zdir, text_point_3d, view_xdir, view_ydir, view_zdir);
text_xform_out = wcs2obj_xf * textscale_xf;
text_xform_out = rotation_xf * text_xform_out;
return true;