Esempio n. 1
0
        public override void Render(BaseRenderer renderer)
        {
            if (ParametrizationChanged)
            {
                RecalculateParametrizationPoints();
            }
            if (Changed)
            {
                RecalculatePoints();
            }
            base.Render(renderer);

            renderer.ModelMatrix   = GetMatrix(false, new Vector3());
            renderer.SelectedColor = IsSelected ? Colors.LimeGreen : Colors.White;
            renderer.UseIndices    = true;

            if (ShowPolygon)
            {
                renderer.Indices = Indices;
                renderer.Points  = EnumerateCatPoints().Select(x => x.Position).ToList();


                renderer.Transform();
                renderer.DrawLines();
            }


            renderer.Indices = meshIndices;
            renderer.Points  = mesh;

            renderer.Transform();
            renderer.DrawLines();
        }
Esempio n. 2
0
 public override void Render(BaseRenderer renderer)
 {
     base.Render(renderer);
     renderer.UseIndices  = true;
     renderer.Points      = points;
     renderer.Indices     = indices;
     renderer.ModelMatrix = Transform.CreateTransformMatrix();
     renderer.Transform();
     renderer.DrawLines();
 }
Esempio n. 3
0
        public override void Render(BaseRenderer renderer)
        {
            base.Render(renderer);
            if (changed)
            {
                GenerateModel();
            }
            renderer.SelectedColor = IsSelected ? Colors.LimeGreen : Colors.White;
            renderer.UseIndices    = true;
            renderer.Points        = points;
            renderer.Indices       = indices;
            renderer.ModelMatrix   = Transform.CreateTransformMatrix();
            renderer.Transform();
            renderer.DrawLines();

            renderer.Indices       = outlineIndices;
            renderer.SelectedColor = IsSelected ? Colors.OrangeRed : Colors.White;
            renderer.DrawLines();
        }
Esempio n. 4
0
        public override void Render(BaseRenderer renderer)
        {
            base.Render(renderer);
            renderer.ModelMatrix = Matrix4.CreateIdentity();
            renderer.UseIndices  = false;

            renderer.SelectedColor = !IsSelected ? Colors.White : Colors.LightGreen;

            renderer.Points = curvePoints;
            renderer.Transform();
            renderer.DrawLines();
        }
Esempio n. 5
0
        public override void Render(BaseRenderer renderer)
        {
            base.Render(renderer);
            renderer.Points        = catPoints.Select(x => x.Position).ToList();
            renderer.Indices       = indices;
            renderer.UseIndices    = true;
            renderer.ModelMatrix   = Matrix4.CreateIdentity();
            renderer.SelectedColor = IsSelected ? Colors.DarkViolet : Colors.White;

            renderer.Transform();
            renderer.DrawLines();
        }
Esempio n. 6
0
        public void Render(BaseRenderer renderer)
        {
            renderer.UseIndices    = true;
            renderer.SelectedColor = Colors.BurlyWood;
            renderer.Points        = renderPoints.Select(x => x.Position).ToList();
            renderer.Indices       = indices;


            renderer.ModelMatrix = Matrix4.CreateIdentity();
            renderer.Transform();
            renderer.DrawLines();
        }
Esempio n. 7
0
        public override void Render(BaseRenderer renderer)
        {
            CountBezierPoints(points.Select(x => x.Point.Position).ToList());
            base.Render(renderer);

            var pointList = points.Select(x => x.Point.Position).ToList();

            if (ShowPolygon)
            {
                renderer.Points = pointList;
                renderer.Transform();
                renderer.DrawLines();
            }
        }
Esempio n. 8
0
        public void Render(BaseRenderer renderer)
        {
            if (changed)
            {
                RecalculateMesh();
            }

            renderer.Points        = mesh;
            renderer.Indices       = meshIndices;
            renderer.UseIndices    = true;
            renderer.SelectedColor = Colors.Crimson;

            renderer.Transform();
            renderer.DrawLines();
        }
Esempio n. 9
0
        public override void Render(BaseRenderer renderer)
        {
            if (!Visible)
            {
                return;
            }
            base.Render(renderer);
            var cursorScale = (Transform.Position - scene.ActiveCamera.CameraPosition).Length() / 10;

            renderer.ModelMatrix = Transform.CreateTransformMatrix(true, new Math.Vector3(cursorScale, cursorScale, cursorScale));
            renderer.Points      = points;
            renderer.Indices     = indices;
            renderer.UseIndices  = true;
            renderer.Transform();
            renderer.DrawLines();
        }
Esempio n. 10
0
 public override void Render(BaseRenderer renderer)
 {
     base.Render(renderer);
     if (!modelReady)
     {
         GenerateModel(bigRadius, smallRadius, bigAngleDensity, smallAngleDensity);
     }
     modelMat               = Transform.CreateTransformMatrix();
     normalMat              = modelMat.Inversed().Transposed();
     renderer.UseIndices    = true;
     renderer.SelectedColor = IsSelected ? Colors.LimeGreen : Colors.White;
     renderer.ModelMatrix   = Transform.CreateTransformMatrix();
     renderer.Points        = points;
     renderer.Indices       = indices;
     renderer.Transform();
     renderer.DrawLines();
 }
Esempio n. 11
0
        public override void Render(BaseRenderer renderer)
        {
            CalculateWhatever();
            if (berensteinPoints != null && berensteinPoints.Count > 1)
            {
                CountBezierPoints(berensteinPoints);
                base.Render(renderer);
            }


            if (ShowPolygon && berensteinPoints != null && berensteinPoints.Count > 1)
            {
                renderer.Points = berensteinPoints;
                renderer.Transform();
                renderer.DrawLines();
            }
            //renderer.Points = renderPoints;
            //renderer.UseIndices = false;
            //renderer.Transform();
            //renderer.DrawLines();
        }
Esempio n. 12
0
        public override void Render(BaseRenderer renderer)
        {
            var berPtsList = berensteinPoints.Select(x => x.Position).ToList();

            CountBezierPoints(berPtsList);
            base.Render(renderer);

            if (ShowPolygon)
            {
                switch (currentType)
                {
                case BezierType.Berenstein:
                    renderer.Points = berPtsList;
                    break;

                case BezierType.BSpline:
                    renderer.Points = points.Select(x => x.Point.Position).ToList();

                    break;
                }
                renderer.Transform();
                renderer.DrawLines();
            }
        }