Exemple #1
0
        public override MyShape Clone()
        {
            MyShapeEllipsoid ellipsoid1 = new MyShapeEllipsoid();

            ellipsoid1.Transformation = base.Transformation;
            ellipsoid1.Radius         = this.Radius;
            return(ellipsoid1);
        }
        private MyBrushEllipsoid()
        {
            m_shape = new MyShapeEllipsoid();
            m_transform = MatrixD.Identity;

            float step = MySessionComponentVoxelHand.VOXEL_SIZE / 4;

            m_radiusX = new MyBrushGUIPropertyNumberSlider(
                MinScale, MinScale, MaxScale, step,
                MyVoxelBrushGUIPropertyOrder.First, MyStringId.GetOrCompute("Radius X")
            );
            m_radiusX.ValueChanged += RadiusChanged;

            m_radiusY = new MyBrushGUIPropertyNumberSlider(
                MinScale, MinScale, MaxScale, step,
                MyVoxelBrushGUIPropertyOrder.Second, MyStringId.GetOrCompute("Radius Y")
            );
            m_radiusY.ValueChanged += RadiusChanged;

            m_radiusZ = new MyBrushGUIPropertyNumberSlider(
                MinScale, MinScale, MaxScale, step,
                MyVoxelBrushGUIPropertyOrder.Third, MyStringId.GetOrCompute("Radius Z")
            );
            m_radiusZ.ValueChanged += RadiusChanged;

            m_list = new List<MyGuiControlBase>();
            m_radiusX.AddControlsToList(m_list);
            m_radiusY.AddControlsToList(m_list);
            m_radiusZ.AddControlsToList(m_list);

            RecomputeShape();
        }