Add helper method for clarity

This commit is contained in:
John Lewin 2018-03-22 13:41:24 -07:00
parent df43cdb9b4
commit e066a6d254
2 changed files with 7 additions and 1 deletions

View file

@ -42,6 +42,11 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
{
public static class Object3DExtensions
{
public static bool IsRoot(this IObject3D object3D)
{
return object3D.Parent == null;
}
public static IObject3D Translate(this IObject3D objectToTranslate, double x = 0, double y = 0, double z = 0, string name = "")
{
return objectToTranslate.Translate(new Vector3(x, y, z), name);