public void TestOffsets() { //Bounds Boundary bounds = new Boundary(); bounds.Shape = MuCell.Model.BoundaryShapes.Cuboid; bounds.Width = 10.0f; bounds.Height = 10.0f; bounds.Depth = 10.0f; NutrientField nf = new NutrientField(); nf.InitialDistribution = InitialNutrientDistribution.DenselyCentredSphere; nf.InitialQuantity = 1.0f; nf.InitialRadius = 5.0f; nf.InitialPosition = new Vector3(0, 0, 0); nf.Resolution = 0.5f; nf.DiffusionRate = 0f; nf.InitField(bounds); nf.PrintCubes(); }
/// <summary> /// Clones a NutrientField /// </summary> /// <returns></returns> public Object Clone() { NutrientField newInstance = new NutrientField(this.index); newInstance.Col = this.col; newInstance.CubeArea = this.cubeArea; newInstance.CubeLength = this.cubeLength; newInstance.CubeVolume = this.cubeVolume; newInstance.DiffusionRate = this.diffusionRate; newInstance.Dim = (int[])this.dim.Clone(); newInstance.Field = (float[][][])this.field.Clone(); newInstance.FieldLoaded = this.FieldLoaded; newInstance.InitialDistribution = this.initialDistribution; newInstance.InitialPosition = this.InitialPosition; newInstance.InitialQuantity = this.InitialQuantity; newInstance.InitialRadius = this.InitialRadius; newInstance.Name = this.name; newInstance.Resolution = this.resolution; newInstance.WorldOffset = this.worldOffset; return newInstance; }