コード例 #1
0
ファイル: CubeOid.cs プロジェクト: SharlCvan/WareHouse
        public object Clone()
        {
            CubeOid clone = new CubeOid
                            (
                this.Xside, this.Yside, this.Zside, this.Id, this.Weight, this.Description, this.IsFragile, this.InsuranceValue
                            );

            return(clone);
        }
コード例 #2
0
        private I3DObject CreateBox(BoxSpecs box)
        {
            this.Id++;
            I3DObject shape;

            if (box.Description == "CubeOid")
            {
                shape = new CubeOid(box.XLength, box.YLength, box.ZLength, Id, box.Weight, box.Description, box.IsFragile, box.InsuranceValue);
            }
            else if (box.Description == "Blob")
            {
                shape = new Blob(box.XLength, Id, box.Weight, box.Description, box.InsuranceValue);
            }
            else if (box.Description == "Cube")
            {
                shape = new Cube(box.XLength, Id, box.Weight, box.Description, box.IsFragile, box.InsuranceValue);
            }
            else
            {
                shape = new Sphere((box.XLength * 2), Id, box.Weight, box.Description, box.IsFragile, box.InsuranceValue);
            }
            return(shape);
        }