Exemple #1
0
        public new vtkCellArray NewInstance()
        {
            vtkCellArray result      = null;
            uint         mteStatus   = 0u;
            uint         mteIndex    = 4294967295u;
            uint         rawRefCount = 0u;
            IntPtr       intPtr      = vtkCellArray.vtkCellArray_NewInstance_26(base.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                result = (vtkCellArray)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
            }
            return(result);
        }
Exemple #2
0
        public new static vtkCellArray SafeDownCast(vtkObjectBase o)
        {
            vtkCellArray vtkCellArray = null;
            uint         mteStatus    = 0u;
            uint         mteIndex     = 4294967295u;
            uint         rawRefCount  = 0u;
            IntPtr       intPtr       = vtkCellArray.vtkCellArray_SafeDownCast_30((o == null) ? default(HandleRef) : o.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkCellArray = (vtkCellArray)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkCellArray.Register(null);
                }
            }
            return(vtkCellArray);
        }
Exemple #3
0
        public vtkCellArray GetCells()
        {
            vtkCellArray vtkCellArray = null;
            uint         mteStatus    = 0u;
            uint         mteIndex     = 4294967295u;
            uint         rawRefCount  = 0u;
            IntPtr       intPtr       = vtkUnstructuredGrid.vtkUnstructuredGrid_GetCells_21(base.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkCellArray = (vtkCellArray)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkCellArray.Register(null);
                }
            }
            return(vtkCellArray);
        }
 public virtual void TessellateFace(vtkGenericAdaptorCell cell, vtkGenericAttributeCollection att, long index, vtkDoubleArray points, vtkCellArray cellArray, vtkPointData internalPd)
 {
     vtkGenericCellTessellator.vtkGenericCellTessellator_TessellateFace_13(base.GetCppThis(), (cell == null) ? default(HandleRef) : cell.GetCppThis(), (att == null) ? default(HandleRef) : att.GetCppThis(), index, (points == null) ? default(HandleRef) : points.GetCppThis(), (cellArray == null) ? default(HandleRef) : cellArray.GetCppThis(), (internalPd == null) ? default(HandleRef) : internalPd.GetCppThis());
 }
Exemple #5
0
 public override void Clip(double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray pts, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, long cellId, vtkCellData outCd, int insideOut)
 {
     vtkVertex.vtkVertex_Clip_02(base.GetCppThis(), value, (cellScalars == null) ? default(HandleRef) : cellScalars.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (pts == null) ? default(HandleRef) : pts.GetCppThis(), (inPd == null) ? default(HandleRef) : inPd.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (inCd == null) ? default(HandleRef) : inCd.GetCppThis(), cellId, (outCd == null) ? default(HandleRef) : outCd.GetCppThis(), insideOut);
 }
 public static void DecomposeStrip(int npts, IntPtr pts, vtkCellArray tris)
 {
     vtkTriangleStrip.vtkTriangleStrip_DecomposeStrip_04(npts, pts, (tris == null) ? default(HandleRef) : tris.GetCppThis());
 }
Exemple #7
0
 public void ClipBox2D(vtkPoints newPoints, vtkGenericCell cell, vtkIncrementalPointLocator locator, vtkCellArray tets, vtkPointData inPD, vtkPointData outPD, vtkCellData inCD, long cellId, vtkCellData outCD)
 {
     vtkBoxClipDataSet.vtkBoxClipDataSet_ClipBox2D_05(base.GetCppThis(), (newPoints == null) ? default(HandleRef) : newPoints.GetCppThis(), (cell == null) ? default(HandleRef) : cell.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (tets == null) ? default(HandleRef) : tets.GetCppThis(), (inPD == null) ? default(HandleRef) : inPD.GetCppThis(), (outPD == null) ? default(HandleRef) : outPD.GetCppThis(), (inCD == null) ? default(HandleRef) : inCD.GetCppThis(), cellId, (outCD == null) ? default(HandleRef) : outCD.GetCppThis());
 }
Exemple #8
0
 public void WedgeToTetra(IntPtr wedgeId, IntPtr cellIds, vtkCellArray newCellArray)
 {
     vtkBoxClipDataSet.vtkBoxClipDataSet_WedgeToTetra_37(base.GetCppThis(), wedgeId, cellIds, (newCellArray == null) ? default(HandleRef) : newCellArray.GetCppThis());
 }
Exemple #9
0
 public void CreateTetra(long npts, IntPtr cellIds, vtkCellArray newCellArray)
 {
     vtkBoxClipDataSet.vtkBoxClipDataSet_CreateTetra_11(base.GetCppThis(), npts, cellIds, (newCellArray == null) ? default(HandleRef) : newCellArray.GetCppThis());
 }
Exemple #10
0
 public virtual void Clip(double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray connectivity, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, long cellId, vtkCellData outCd, int insideOut)
 {
     vtkCell.vtkCell_Clip_02(base.GetCppThis(), value, (cellScalars == null) ? default(HandleRef) : cellScalars.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (connectivity == null) ? default(HandleRef) : connectivity.GetCppThis(), (inPd == null) ? default(HandleRef) : inPd.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (inCd == null) ? default(HandleRef) : inCd.GetCppThis(), cellId, (outCd == null) ? default(HandleRef) : outCd.GetCppThis(), insideOut);
 }
Exemple #11
0
 public virtual void Contour(vtkContourValues values, vtkImplicitFunction f, vtkGenericAttributeCollection attributes, vtkGenericCellTessellator tess, vtkIncrementalPointLocator locator, vtkCellArray verts, vtkCellArray lines, vtkCellArray polys, vtkPointData outPd, vtkCellData outCd, vtkPointData internalPd, vtkPointData secondaryPd, vtkCellData secondaryCd)
 {
     vtkGenericAdaptorCell.vtkGenericAdaptorCell_Contour_02(base.GetCppThis(), (values == null) ? default(HandleRef) : values.GetCppThis(), (f == null) ? default(HandleRef) : f.GetCppThis(), (attributes == null) ? default(HandleRef) : attributes.GetCppThis(), (tess == null) ? default(HandleRef) : tess.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (verts == null) ? default(HandleRef) : verts.GetCppThis(), (lines == null) ? default(HandleRef) : lines.GetCppThis(), (polys == null) ? default(HandleRef) : polys.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (outCd == null) ? default(HandleRef) : outCd.GetCppThis(), (internalPd == null) ? default(HandleRef) : internalPd.GetCppThis(), (secondaryPd == null) ? default(HandleRef) : secondaryPd.GetCppThis(), (secondaryCd == null) ? default(HandleRef) : secondaryCd.GetCppThis());
 }
Exemple #12
0
 public virtual void Clip(double value, vtkImplicitFunction f, vtkGenericAttributeCollection attributes, vtkGenericCellTessellator tess, int insideOut, vtkIncrementalPointLocator locator, vtkCellArray connectivity, vtkPointData outPd, vtkCellData outCd, vtkPointData internalPd, vtkPointData secondaryPd, vtkCellData secondaryCd)
 {
     vtkGenericAdaptorCell.vtkGenericAdaptorCell_Clip_01(base.GetCppThis(), value, (f == null) ? default(HandleRef) : f.GetCppThis(), (attributes == null) ? default(HandleRef) : attributes.GetCppThis(), (tess == null) ? default(HandleRef) : tess.GetCppThis(), insideOut, (locator == null) ? default(HandleRef) : locator.GetCppThis(), (connectivity == null) ? default(HandleRef) : connectivity.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (outCd == null) ? default(HandleRef) : outCd.GetCppThis(), (internalPd == null) ? default(HandleRef) : internalPd.GetCppThis(), (secondaryPd == null) ? default(HandleRef) : secondaryPd.GetCppThis(), (secondaryCd == null) ? default(HandleRef) : secondaryCd.GetCppThis());
 }
Exemple #13
0
 public void DeepCopy(vtkCellArray ca)
 {
     vtkCellArray.vtkCellArray_DeepCopy_02(base.GetCppThis(), (ca == null) ? default(HandleRef) : ca.GetCppThis());
 }
Exemple #14
0
    void PolyDataToMesh()
    {
        mesh.Clear();

        triangleFilter.Update();
        Kitware.VTK.vtkPolyData pd = triangleFilter.GetOutput();

        // Points / Vertices
        int numVertices = pd.GetNumberOfPoints();

        Vector3[] vertices = new Vector3[numVertices];
        for (int i = 0; i < numVertices; ++i)
        {
            double[] pnt = pd.GetPoint(i);
            // Flip z-up to y-up
            vertices[i] = new Vector3(-(float)pnt[0], (float)pnt[2], (float)pnt[1]);
        }
        mesh.vertices = vertices;

        // Texture coordinates
        Kitware.VTK.vtkDataArray vtkTexCoords = pd.GetPointData().GetTCoords();
        if (vtkTexCoords != null)
        {
            int       numCoords = vtkTexCoords.GetNumberOfTuples();
            Vector2[] uvs       = new Vector2[numCoords];
            for (int i = 0; i < numCoords; ++i)
            {
                double[] texCoords = vtkTexCoords.GetTuple2(i);
                uvs[i] = new Vector2((float)texCoords[0], (float)texCoords[1]);
            }
            mesh.uv = uvs;
        }

        // Vertex colors
        if (numVertices > 0 && colorArray != null)
        {
            Color32[] colors = new Color32[numVertices];

            for (int i = 0; i < numVertices; ++i)
            {
                colors[i] = GetColor32AtIndex(i);
            }

            mesh.colors32 = colors;
        }

        // Triangles / Cells
        int numTriangles = pd.GetNumberOfPolys();

        Kitware.VTK.vtkCellArray polys = pd.GetPolys();
        if (polys.GetNumberOfCells() > 0)
        {
            int[] triangles           = new int[numTriangles * 3];
            int   prim                = 0;
            Kitware.VTK.vtkIdList pts = Kitware.VTK.vtkIdList.New();
            polys.InitTraversal();
            while (polys.GetNextCell(pts) != 0)
            {
                for (int i = 0; i < pts.GetNumberOfIds(); ++i)
                {
                    triangles[prim * 3 + i] = pts.GetId(i);
                }

                ++prim;
            }
            mesh.SetTriangles(triangles, 0);
            mesh.RecalculateNormals();
            mesh.RecalculateBounds();
            return;
        }

        // Lines
        Kitware.VTK.vtkCellArray lines = pd.GetLines();
        if (lines.GetNumberOfCells() > 0)
        {
            ArrayList             idList = new ArrayList();
            Kitware.VTK.vtkIdList pts    = Kitware.VTK.vtkIdList.New();
            lines.InitTraversal();
            while (lines.GetNextCell(pts) != 0)
            {
                for (int i = 0; i < pts.GetNumberOfIds() - 1; ++i)
                {
                    idList.Add(pts.GetId(i));
                    idList.Add(pts.GetId(i + 1));
                }
            }

            mesh.SetIndices(idList.ToArray(typeof(int)) as int[], MeshTopology.Lines, 0);
            mesh.RecalculateBounds();
            return;
        }

        // Points
        Kitware.VTK.vtkCellArray points = pd.GetVerts();
        int numPointCells = points.GetNumberOfCells();

        if (numPointCells > 0)
        {
            ArrayList             idList = new ArrayList();
            Kitware.VTK.vtkIdList pts    = Kitware.VTK.vtkIdList.New();
            points.InitTraversal();
            while (points.GetNextCell(pts) != 0)
            {
                for (int i = 0; i < pts.GetNumberOfIds(); ++i)
                {
                    idList.Add(pts.GetId(i));
                }
            }

            mesh.SetIndices(idList.ToArray(typeof(int)) as int[], MeshTopology.Points, 0);
            mesh.RecalculateBounds();
            return;
        }

        //Debug.Log("Number of point data arrays: " + pd.GetPointData().GetNumberOfArrays());
        //Debug.Log("  - " + pd.GetPointData().GetArrayName(0));
        //Debug.Log("Number of cell data arrays: " + pd.GetCellData().GetNumberOfArrays());
        //Debug.Log("  - " + pd.GetCellData().GetArrayName(0));
        //Debug.Log(name + " - Vertices: " + numPoints + ", triangle: " + numTriangles + ", UVs: " + numCoords);
    }
 public override void Triangulate(vtkGenericAdaptorCell cell, vtkGenericAttributeCollection att, vtkDoubleArray points, vtkCellArray cellArray, vtkPointData internalPd)
 {
     vtkSimpleCellTessellator.vtkSimpleCellTessellator_Triangulate_17(base.GetCppThis(), (cell == null) ? default(HandleRef) : cell.GetCppThis(), (att == null) ? default(HandleRef) : att.GetCppThis(), (points == null) ? default(HandleRef) : points.GetCppThis(), (cellArray == null) ? default(HandleRef) : cellArray.GetCppThis(), (internalPd == null) ? default(HandleRef) : internalPd.GetCppThis());
 }
Exemple #16
0
 public void SetCells(vtkUnsignedCharArray cellTypes, vtkIdTypeArray cellLocations, vtkCellArray cells, vtkIdTypeArray faceLocations, vtkIdTypeArray faces)
 {
     vtkUnstructuredGrid.vtkUnstructuredGrid_SetCells_60(base.GetCppThis(), (cellTypes == null) ? default(HandleRef) : cellTypes.GetCppThis(), (cellLocations == null) ? default(HandleRef) : cellLocations.GetCppThis(), (cells == null) ? default(HandleRef) : cells.GetCppThis(), (faceLocations == null) ? default(HandleRef) : faceLocations.GetCppThis(), (faces == null) ? default(HandleRef) : faces.GetCppThis());
 }
Exemple #17
0
 public static int GenerateSlidingNormals(vtkPoints arg0, vtkCellArray arg1, vtkDataArray arg2, IntPtr firstNormal)
 {
     return(vtkPolyLine.vtkPolyLine_GenerateSlidingNormals_08((arg0 == null) ? default(HandleRef) : arg0.GetCppThis(), (arg1 == null) ? default(HandleRef) : arg1.GetCppThis(), (arg2 == null) ? default(HandleRef) : arg2.GetCppThis(), firstNormal));
 }
Exemple #18
0
 public virtual void TriangulateFace(vtkGenericAttributeCollection attributes, vtkGenericCellTessellator tess, int index, vtkPoints points, vtkIncrementalPointLocator locator, vtkCellArray cellArray, vtkPointData internalPd, vtkPointData pd, vtkCellData cd)
 {
     vtkGenericAdaptorCell.vtkGenericAdaptorCell_TriangulateFace_46(base.GetCppThis(), (attributes == null) ? default(HandleRef) : attributes.GetCppThis(), (tess == null) ? default(HandleRef) : tess.GetCppThis(), index, (points == null) ? default(HandleRef) : points.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (cellArray == null) ? default(HandleRef) : cellArray.GetCppThis(), (internalPd == null) ? default(HandleRef) : internalPd.GetCppThis(), (pd == null) ? default(HandleRef) : pd.GetCppThis(), (cd == null) ? default(HandleRef) : cd.GetCppThis());
 }
Exemple #19
0
 public void ClipHexahedron0D(vtkGenericCell cell, vtkIncrementalPointLocator locator, vtkCellArray verts, vtkPointData inPD, vtkPointData outPD, vtkCellData inCD, long cellId, vtkCellData outCD)
 {
     vtkBoxClipDataSet.vtkBoxClipDataSet_ClipHexahedron0D_07(base.GetCppThis(), (cell == null) ? default(HandleRef) : cell.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (verts == null) ? default(HandleRef) : verts.GetCppThis(), (inPD == null) ? default(HandleRef) : inPD.GetCppThis(), (outPD == null) ? default(HandleRef) : outPD.GetCppThis(), (inCD == null) ? default(HandleRef) : inCD.GetCppThis(), cellId, (outCD == null) ? default(HandleRef) : outCD.GetCppThis());
 }
 public static void ComputeInterpolationWeights(IntPtr x, vtkPoints pts, vtkCellArray tris, IntPtr weights)
 {
     vtkMeanValueCoordinatesInterpolator.vtkMeanValueCoordinatesInterpolator_ComputeInterpolationWeights_02(x, (pts == null) ? default(HandleRef) : pts.GetCppThis(), (tris == null) ? default(HandleRef) : tris.GetCppThis(), weights);
 }
Exemple #21
0
 public void PyramidToTetra(IntPtr pyramId, IntPtr cellIds, vtkCellArray newCellArray)
 {
     vtkBoxClipDataSet.vtkBoxClipDataSet_PyramidToTetra_29(base.GetCppThis(), pyramId, cellIds, (newCellArray == null) ? default(HandleRef) : newCellArray.GetCppThis());
 }
 public void BuildLinks(vtkDataSet data, vtkCellArray Connectivity)
 {
     vtkCellLinks.vtkCellLinks_BuildLinks_04(base.GetCppThis(), (data == null) ? default(HandleRef) : data.GetCppThis(), (Connectivity == null) ? default(HandleRef) : Connectivity.GetCppThis());
 }
Exemple #23
0
 public void CellGrid(long typeobj, long npts, IntPtr cellIds, vtkCellArray newCellArray)
 {
     vtkBoxClipDataSet.vtkBoxClipDataSet_CellGrid_01(base.GetCppThis(), typeobj, npts, cellIds, (newCellArray == null) ? default(HandleRef) : newCellArray.GetCppThis());
 }
Exemple #24
0
 public static void DecomposeAPolyhedronCell(vtkCellArray polyhedronCellArray, ref long nCellpts, ref long nCellfaces, vtkCellArray cellArray, vtkIdTypeArray faces)
 {
     vtkUnstructuredGrid.vtkUnstructuredGrid_DecomposeAPolyhedronCell_07((polyhedronCellArray == null) ? default(HandleRef) : polyhedronCellArray.GetCppThis(), ref nCellpts, ref nCellfaces, (cellArray == null) ? default(HandleRef) : cellArray.GetCppThis(), (faces == null) ? default(HandleRef) : faces.GetCppThis());
 }
Exemple #25
0
 public override void Clip(double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray tetras, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, long cellId, vtkCellData outCd, int insideOut)
 {
     vtkQuadraticLinearWedge.vtkQuadraticLinearWedge_Clip_02(base.GetCppThis(), value, (cellScalars == null) ? default(HandleRef) : cellScalars.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (tetras == null) ? default(HandleRef) : tetras.GetCppThis(), (inPd == null) ? default(HandleRef) : inPd.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (inCd == null) ? default(HandleRef) : inCd.GetCppThis(), cellId, (outCd == null) ? default(HandleRef) : outCd.GetCppThis(), insideOut);
 }
Exemple #26
0
 public static void DecomposeAPolyhedronCell(long nCellFaces, IntPtr inFaceStream, ref long nCellpts, vtkCellArray cellArray, vtkIdTypeArray faces)
 {
     vtkUnstructuredGrid.vtkUnstructuredGrid_DecomposeAPolyhedronCell_09(nCellFaces, inFaceStream, ref nCellpts, (cellArray == null) ? default(HandleRef) : cellArray.GetCppThis(), (faces == null) ? default(HandleRef) : faces.GetCppThis());
 }
 public override void Contour(double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray verts, vtkCellArray lines, vtkCellArray polys, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, long cellId, vtkCellData outCd)
 {
     vtkBiQuadraticTriangle.vtkBiQuadraticTriangle_Contour_03(base.GetCppThis(), value, (cellScalars == null) ? default(HandleRef) : cellScalars.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (verts == null) ? default(HandleRef) : verts.GetCppThis(), (lines == null) ? default(HandleRef) : lines.GetCppThis(), (polys == null) ? default(HandleRef) : polys.GetCppThis(), (inPd == null) ? default(HandleRef) : inPd.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (inCd == null) ? default(HandleRef) : inCd.GetCppThis(), cellId, (outCd == null) ? default(HandleRef) : outCd.GetCppThis());
 }
Exemple #28
0
 public void SetCells(IntPtr types, vtkCellArray cells)
 {
     vtkUnstructuredGrid.vtkUnstructuredGrid_SetCells_58(base.GetCppThis(), types, (cells == null) ? default(HandleRef) : cells.GetCppThis());
 }
Exemple #29
0
 public override void Contour(double value, vtkDataArray cellScalars, vtkIncrementalPointLocator locator, vtkCellArray verts1, vtkCellArray lines, vtkCellArray verts2, vtkPointData inPd, vtkPointData outPd, vtkCellData inCd, long cellId, vtkCellData outCd)
 {
     vtkVertex.vtkVertex_Contour_03(base.GetCppThis(), value, (cellScalars == null) ? default(HandleRef) : cellScalars.GetCppThis(), (locator == null) ? default(HandleRef) : locator.GetCppThis(), (verts1 == null) ? default(HandleRef) : verts1.GetCppThis(), (lines == null) ? default(HandleRef) : lines.GetCppThis(), (verts2 == null) ? default(HandleRef) : verts2.GetCppThis(), (inPd == null) ? default(HandleRef) : inPd.GetCppThis(), (outPd == null) ? default(HandleRef) : outPd.GetCppThis(), (inCd == null) ? default(HandleRef) : inCd.GetCppThis(), cellId, (outCd == null) ? default(HandleRef) : outCd.GetCppThis());
 }
 public void SetVerts(vtkCellArray v)
 {
     vtkPolyData.vtkPolyData_SetVerts_74(base.GetCppThis(), (v == null) ? default(HandleRef) : v.GetCppThis());
 }