Beispiel #1
0
        public override MyShape Clone()
        {
            MyShapeCapsule capsule1 = new MyShapeCapsule();

            capsule1.Transformation = base.Transformation;
            capsule1.A      = this.A;
            capsule1.B      = this.B;
            capsule1.Radius = this.Radius;
            return(capsule1);
        }
        private MyBrushCapsule()
        {
            m_shape = new MyShapeCapsule();
            m_transform = MatrixD.Identity;

            m_radius = new MyBrushGUIPropertyNumberSlider(
                MinScale, MinScale, MaxScale,
                MySessionComponentVoxelHand.VOXEL_HALF,
                MyVoxelBrushGUIPropertyOrder.First, MyCommonTexts.VoxelHandProperty_Capsule_Radius
            );
            m_radius.ValueChanged += RecomputeShape;

            m_length = new MyBrushGUIPropertyNumberSlider(
                MinScale, MinScale, MaxScale,
                MySessionComponentVoxelHand.VOXEL_HALF,
                MyVoxelBrushGUIPropertyOrder.Second, MyCommonTexts.VoxelHandProperty_Capsule_Length
            );
            m_length.ValueChanged += RecomputeShape;

            m_list = new List<MyGuiControlBase>();
            m_radius.AddControlsToList(m_list);
            m_length.AddControlsToList(m_list);

            RecomputeShape();
        }