コード例 #1
0
 /// <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);
     });
 }
コード例 #2
0
ファイル: MRecipeDevice.cs プロジェクト: AdilGM/2DCAD
        /// <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);
            }
        }
コード例 #3
0
        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()
                       ));
        }
コード例 #4
0
ファイル: MRecipePlate.cs プロジェクト: AdilGM/2DCAD
 public void AddDeviceArray(MRecipeDevice device)
 {
     device.Parent = this;
     Devices.Add(device);
 }
コード例 #5
0
ファイル: MRecipePlate.cs プロジェクト: AdilGM/2DCAD
 public MRecipePlate(string nameIn, MRecipeDevice device)
     : this(nameIn)
 {
     Devices.Add(device);
 }