Example #1
0
    public VtkToUnity(Kitware.VTK.vtkAlgorithmOutput outputPort, string name)
    {
        this.name      = name;
        triangleFilter = Kitware.VTK.vtkTriangleFilter.New();
        triangleFilter.SetInputConnection(outputPort);
        go = new GameObject(name);

        MeshFilter meshFilter = go.AddComponent <MeshFilter>();

        meshFilter.sharedMesh = mesh;
        go.AddComponent <MeshRenderer>();
    }
Example #2
0
        public new vtkTriangleFilter NewInstance()
        {
            vtkTriangleFilter result = null;
            uint   mteStatus         = 0u;
            uint   mteIndex          = 4294967295u;
            uint   rawRefCount       = 0u;
            IntPtr intPtr            = vtkTriangleFilter.vtkTriangleFilter_NewInstance_06(base.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                result = (vtkTriangleFilter)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
            }
            return(result);
        }
Example #3
0
    public VtkToUnity(Kitware.VTK.vtkAlgorithmOutput outputPort, GameObject newGo)
    {
        name           = newGo.name;
        triangleFilter = Kitware.VTK.vtkTriangleFilter.New();
        triangleFilter.SetInputConnection(outputPort);

        GameObject.DestroyImmediate(newGo.GetComponent <MeshFilter>());
        GameObject.DestroyImmediate(newGo.GetComponent <MeshRenderer>());

        go = newGo;

        MeshFilter meshFilter = go.AddComponent <MeshFilter> ();

        meshFilter.sharedMesh = mesh;
        go.AddComponent <MeshRenderer> ();
    }
Example #4
0
        public new static vtkTriangleFilter SafeDownCast(vtkObjectBase o)
        {
            vtkTriangleFilter vtkTriangleFilter = null;
            uint   mteStatus   = 0u;
            uint   mteIndex    = 4294967295u;
            uint   rawRefCount = 0u;
            IntPtr intPtr      = vtkTriangleFilter.vtkTriangleFilter_SafeDownCast_11((o == null) ? default(HandleRef) : o.GetCppThis(), ref mteStatus, ref mteIndex, ref rawRefCount);

            if (IntPtr.Zero != intPtr)
            {
                bool flag;
                vtkTriangleFilter = (vtkTriangleFilter)Methods.CreateWrappedObject(mteStatus, mteIndex, rawRefCount, intPtr, true, out flag);
                if (flag)
                {
                    vtkTriangleFilter.Register(null);
                }
            }
            return(vtkTriangleFilter);
        }