Esempio n. 1
0
            protected void LoadCellTypes(VtkDataSet dataSet)
            {
                var n = GetCount();

                Debug.WriteLine(string.Format("CELL_TYPES size: {0}", n));
                for (int i = 0; i < n; i++)
                {
                    var cellType = (VtkCellType)GetIntData();
                    dataSet.Cells[i].Type = cellType;
                }
            }
Esempio n. 2
0
            protected void LoadPoints(VtkDataSet dataSet)
            {
                int         n      = GetCount();
                VtkDataType dtType = GetDataType();

                Debug.WriteLine(string.Format("POINTS size: {0}", n));
                Debug.WriteLine(string.Format("POINTS data type: {0}", dtType.ToString()));
                dataSet.PointDataType = dtType;
                dataSet.Points        = new List <Vector3>(n);
                for (int i = 0; i < n; i++)
                {
                    dataSet.Points.Add(new Vector3()
                    {
                        X = GetDataAsFloat(dtType),
                        Y = GetDataAsFloat(dtType),
                        Z = GetDataAsFloat(dtType)
                    });
                }
            }
Esempio n. 3
0
            protected void LoadCells(VtkDataSet dataSet)
            {
                var n = GetCount();

                Debug.WriteLine(string.Format("CELLS size: {0}", n));
                var size = GetCount();

                Debug.WriteLine(string.Format("CELLS size: {0}", size));
                dataSet.Cells = new List <Cell>(n);
                for (int c = 0, s = 0; c < n && s < size; c++)
                {
                    var iCountPerCell = GetIntData();
                    s++;
                    var cell = new Cell();
                    cell.Indices = new List <int>(iCountPerCell);
                    for (int i = 0; i < iCountPerCell; i++)
                    {
                        cell.Indices.Add(GetIntData());
                        s++;
                    }
                    dataSet.Cells.Add(cell);
                }
            }