Esempio n. 1
0
            internal void CreatePolydata(ref vtkPolyData polydata)
            {
                vtkPoints points = vtkPoints.New();

                points.InsertNextPoint(this.origin[0], this.origin[1], this.origin[2]);

                float[] x = new float[3];
                float[] y = new float[3];
                float[] z = new float[3];

                Add(this.origin, this.xDirection, ref x);
                Add(this.origin, this.yDirection, ref y);
                Add(this.origin, this.zDirection, ref z);

                points.InsertNextPoint(x[0], x[1], x[2]);
                points.InsertNextPoint(y[0], y[1], y[2]);
                points.InsertNextPoint(z[0], z[1], z[2]);

                polydata.SetPoints(points);

                vtkVertexGlyphFilter vertexGlyphFilter = vtkVertexGlyphFilter.New();

#if VTK_MAJOR_VERSION_5
                vertexGlyphFilter.AddInput(polydata);
#else
                vertexGlyphFilter.AddInputData(polydata);
#endif
                vertexGlyphFilter.Update();
                polydata.ShallowCopy(vertexGlyphFilter.GetOutput());
            }