internal static void QueryBlockMeshesINT(IntPtr mesh, PXCMBlockMesh[] meshes, Int32 nmeshes) { IntPtr umeshes=PXCMBlockMeshingData_QueryBlockMeshes(mesh); for (int i = 0; i < nmeshes; i++) { if (meshes[i]==null) meshes[i] = new PXCMBlockMesh(); Marshal.PtrToStructure(umeshes, meshes[i]); umeshes = new IntPtr(umeshes.ToInt64()+Marshal.SizeOf(typeof(PXCMBlockMesh))); } }
internal static void QueryBlockMeshesINT(IntPtr mesh, PXCMBlockMesh[] meshes, Int32 nmeshes) { IntPtr umeshes = PXCMBlockMeshingData_QueryBlockMeshes(mesh); for (int i = 0; i < nmeshes; i++) { if (meshes[i] == null) { meshes[i] = new PXCMBlockMesh(); } Marshal.PtrToStructure(umeshes, meshes[i]); umeshes = new IntPtr(umeshes.ToInt64() + Marshal.SizeOf(typeof(PXCMBlockMesh))); } }
/** @brief: Returns an array of PXCBlockMesh objects with length same as QueryNumberOfBlockMeshes() */ public PXCMBlockMesh[] QueryBlockMeshes(PXCMBlockMesh[] meshes) { int nmeshes = QueryNumberOfBlockMeshes(); if (nmeshes <= 0) return null; if (meshes == null) meshes = new PXCMBlockMesh[nmeshes]; QueryBlockMeshesINT(instance, meshes, nmeshes); return meshes; }