/// <summary> /// Returns all layers in the recipe device auto generating based on its array info. /// Sacrifice order/arrangement for speed. /// </summary> /// <param name="plateIn">The device</param> /// <param name="callbackIn">A callback to receive the recipe layers</param> public static void BeginGetAllLayers_Parallel(MRecipeDevice deviceIn, Action <MRecipeDeviceLayer> callbackIn) { deviceIn.BeginGetAllLayers_Parallel((layer) => { callbackIn(layer); }); }
/// <summary> /// The copy constructor. /// </summary> /// <param name="device"></param> private MRecipeDevice(MRecipeDevice device) : base(device) { Layers = new ObservableCollection <MRecipeDeviceLayer>(); foreach (var layer in device.Layers) { var l = (MRecipeDeviceLayer)layer.Clone(); l.Parent = this; Layers.Add(l); } }
public static Matrix4x4 GetRelativeTransform(MRecipe recipe, MRecipeDevice device) { if (device.Parent == null) { recipe.UpdateParents(); } return(GeometricArithmeticModule.CombineTransformations( // add device's transform device.TransformInfo.ToMatrix4x4(), // add plate's transform (device.Parent as MRecipeBaseNode).TransformInfo.ToMatrix4x4() )); }
public void AddDeviceArray(MRecipeDevice device) { device.Parent = this; Devices.Add(device); }
public MRecipePlate(string nameIn, MRecipeDevice device) : this(nameIn) { Devices.Add(device); }