refactoring
This commit is contained in:
parent
e4cdc106d8
commit
614ae5348c
4 changed files with 13 additions and 7 deletions
|
|
@ -185,10 +185,16 @@ namespace MatterHackers.Plugins.EditorTools
|
|||
|
||||
private Matrix4X4 GetRingTransform()
|
||||
{
|
||||
Vector3 newBottomCenter = ObjectSpace.GetCenterPosition(RootSelection, placement);
|
||||
var rotation = Matrix4X4.CreateRotation(new Quaternion(RootSelection.Matrix));
|
||||
var translation = Matrix4X4.CreateTranslation(newBottomCenter);
|
||||
return rotation * translation;
|
||||
var rootSelection = RootSelection;
|
||||
if (rootSelection != null)
|
||||
{
|
||||
Vector3 newBottomCenter = ObjectSpace.GetCenterPosition(RootSelection, placement);
|
||||
var rotation = Matrix4X4.CreateRotation(new Quaternion(RootSelection.Matrix));
|
||||
var translation = Matrix4X4.CreateTranslation(newBottomCenter);
|
||||
return rotation * translation;
|
||||
}
|
||||
|
||||
return Matrix4X4.Identity;
|
||||
}
|
||||
|
||||
public override void Draw(DrawGlContentEventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue