Working on scale width depth corner control

This commit is contained in:
LarsBrubaker 2021-04-16 09:03:38 -07:00
parent 40de31d8d7
commit feb2276137
6 changed files with 590 additions and 142 deletions

View file

@ -358,11 +358,7 @@ namespace MatterHackers.Plugins.EditorTools
Vector3 arrowCenter = topPosition;
arrowCenter.Z += arrowSize / 2 * distBetweenPixelsWorldSpace;
var normal = Vector3.UnitZ.Transform(selectedItem.Matrix);
var up = Vector3.UnitX.Transform(selectedItem.Matrix);
var rotation = Matrix4X4.LookAt(Vector3.Zero, normal, up);
rotation = Matrix4X4.Identity;
var rotation = Matrix4X4.CreateRotation(new Quaternion(selectedItem.Matrix));
TotalTransform = rotation * Matrix4X4.CreateScale(distBetweenPixelsWorldSpace) * Matrix4X4.CreateTranslation(arrowCenter);
}