コード例 #1
0
 public BezierCurveC2(RayCaster rayCaster, string data) : this(rayCaster)
 {
     var parts = data.Split(' ');
     Name = parts[0];
     for (int i = 1; i < parts.Length; i++)
     {
         var vert = new Vertex();
         vert.SetParent(this);
         vert.StringToPosition(parts[i]);
     }
 }
コード例 #2
0
 public InterpolatingCurve(RayCaster rayCaster, string data) : this(rayCaster)
 {
     var parts = data.Split(' ');
     Name = parts[0];
     //Chords = parts[1] == "1";
     for (int i = 1; i < parts.Length; i++)
     {
         var vert = new Vertex();
         vert.SetParent(this);
         vert.StringToPosition(parts[i]);
     }
 }
コード例 #3
0
        public BezierCylinderC2(RayCaster rayCaster) : base(rayCaster)
        {
            Name = nameof(BezierCylinderC2) + " " + _count++.ToString();

            _height          = 5;
            _range           = 5;
            HeightPatchCount = 2;
            WidthPatchCount  = 2;
            DrawHeightCount  = 5;
            DrawWidthCount   = 5;
            InitVertices();
        }
コード例 #4
0
        public BezierSurfaceC2(RayCaster rayCaster) : base(rayCaster)
        {
            Name = nameof(BezierSurfaceC2) + " " + _count++.ToString();

            _height          = 10;
            _width           = 10;
            HeightPatchCount = 2;
            WidthPatchCount  = 2;
            DrawHeightCount  = 5;
            DrawWidthCount   = 5;
            InitVertices();
        }
コード例 #5
0
ファイル: InputManager.cs プロジェクト: McThrok/ModelEditor
        public InputManager(Panel bitmapConatiner, BitmapBuffer bb, Scene scene, RayCaster rayCaster)
        {
            _bitmapConatiner = bitmapConatiner;
            _bb        = bb;
            _scene     = scene;
            _rayCaster = rayCaster;

            InitMoveActions();

            _scene.Cursor.GlobalMatrixChange += UpdateCursorScreenPosition;
            _scene.Camera.GlobalMatrixChange += UpdateCursorScreenPosition;

            UpdateCursorScreenPosition(this, new ChangeMatrixEventArgs(_scene.Cursor.GlobalMatrix, _scene.Cursor.GlobalMatrix));
        }
コード例 #6
0
ファイル: Scene.cs プロジェクト: McThrok/ModelEditor
        internal void Init(RayCaster rayCaster)
        {
            RayCaster = rayCaster;
            Camera    = AddObj(new Camera(), this);
            ResetCamera();
            Cursor = AddObj(new Cursor(RayCaster), this);

            //var a = (BezierSurfaceC2)AddBezierSurfaceC2(this);
            //a.WidthPatchCount = 1;
            //a.HeightPatchCount = 1;
            //a.Height = 6;
            //a.Width = 6;
            //a.Rotate( Math.PI / 2, 0, 0);
            ////a.Scale(0.1, 0.1, 0.1);

            //var b = (BezierSurfaceC2)AddBezierSurfaceC2(this);
            //b.WidthPatchCount = 1;
            //b.HeightPatchCount = 1;
            //b.Height = 6;
            //b.Width = 6;
            ////b.Scale(0.1, 0.1, 0.1);
        }
コード例 #7
0
        public BezierSurfaceC2(RayCaster rayCaster, string data) : base(rayCaster)
        {
            DrawHeightCount = 5;
            DrawWidthCount  = 5;

            var parts = data.Split(' ');

            Name             = parts[0];
            HeightPatchCount = int.Parse(parts[1]);
            WidthPatchCount  = int.Parse(parts[2]);
            int h = HeightVertexCount;
            int w = WidthVertexCount;

            InitVertices();

            for (int i = 0; i < h; i++)
            {
                for (int j = 0; j < w; j++)
                {
                    var vert = _controlVertices[i][j];
                    vert.StringToPosition(parts[i * w + j + 3]);
                }
            }
        }
コード例 #8
0
 public BezierCurveC2(RayCaster rayCaster) : base(rayCaster)
 {
     Spline = true;
     Name   = nameof(BezierCurveC2) + " " + _count++.ToString();
     base.Children.CollectionChanged += Children_CollectionChanged;
 }
コード例 #9
0
 public InterpolatingCurve(RayCaster rayCaster) : base(rayCaster)
 {
     Name = nameof(InterpolatingCurve) + " " + _count++.ToString();
 }
コード例 #10
0
 public BezierSurfaceBaseC0(RayCaster rayCaster)
 {
     Holdable   = false;
     ShowGrid   = true;
     _rayCaster = rayCaster;
 }
コード例 #11
0
 public BezierCurveC0(RayCaster rayCaster) : base(rayCaster)
 {
     Name = nameof(BezierCurveC0) + " " + _count++.ToString();
 }
コード例 #12
0
 public BezierCurveBase(RayCaster rayCaster)
 {
     Holdable   = false;
     _rayCaster = rayCaster;
 }