HelixToolkit.Wpf.LinesVisual3D.UpdateGeometry C# (CSharp) Method

UpdateGeometry() protected method

Updates the geometry.
protected UpdateGeometry ( ) : void
return void
        protected override void UpdateGeometry()
        {
            if (this.Points == null)
            {
                this.Mesh.Positions = null;
                return;
            }

            int n = this.Points.Count;
            if (n > 0)
            {
                if (this.Mesh.TriangleIndices.Count != n * 3)
                {
                    this.Mesh.TriangleIndices = this.builder.CreateIndices(n);
                }

                this.Mesh.Positions = this.builder.CreatePositions(this.Points, this.Thickness, this.DepthOffset);
            }
            else
            {
                this.Mesh.Positions = null;
            }
        }