  * \author Michael Krone <michael.krone@visus.uni-stuttgart.de>
  * \author John Stone <johns@ks.uiuc.edu>
  *
- * \copyright 
+ * \copyright
  * (C) Copyright 1995-2019 The Board of Trustees of the
  * University of Illinois, All Rights Reserved \n
- * UIUC Open Source License: 
+ * UIUC Open Source License:
  * http://www.ks.uiuc.edu/Research/vmd/plugins/pluginlicense.html
  */
 

}


float CUDAMarchingCubes::computeSurfaceArea(float3 *verts, unsigned int triaCount) {
    // do nothing for zero triangles
    if(triaCount <= 0) return 0.0f;

    // initialize and allocate device arrays
    float *d_areas;
    unsigned long memSize = sizeof(float) * triaCount;
    if (cudaMalloc((void**) &d_areas, memSize) != cudaSuccess) {
        return -1.0f;
    }



    // recalculate flag
    unsigned int cubeindex;
    cubeindex = ((unsigned int)(field[0] < isoValue));
    cubeindex += ((unsigned int)(field[1] < isoValue)) * 2;
    cubeindex += ((unsigned int)(field[2] < isoValue)) * 4;
    cubeindex += ((unsigned int)(field[3] < isoValue)) * 8;
    cubeindex += ((unsigned int)(field[4] < isoValue)) * 16;
    cubeindex += ((unsigned int)(field[5] < isoValue)) * 32;
    cubeindex += ((unsigned int)(field[6] < isoValue)) * 64;
    cubeindex += ((unsigned int)(field[7] < isoValue)) * 128;

    // find the vertices where the surface intersects the cube
    // Note: SIMD marching cubes implementations have no need
    //       for an edge table, because branch divergence eliminates any
    //       potential performance gain from only computing the per-edge
