Skip to content
Snippets Groups Projects
Commit 59a9dbe5 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdo_compute_concave_overlap_areas: simplify assignment

parent b19ff332
No related branches found
No related tags found
1 merge request!164M214003/develop
......@@ -174,9 +174,7 @@ cdo_compute_concave_overlap_areas(size_t numSearchCells, CellSearch &search, con
// the triangulation algorithm only works for cells that only have great circle edges
enum yac_edge_type edgeTypes[3] = { GREAT_CIRCLE_EDGE, GREAT_CIRCLE_EDGE, GREAT_CIRCLE_EDGE };
double coordinates_xyz[3][3] = { { -1.0, -1.0, -1.0 }, { -1.0, -1.0, -1.0 }, { -1.0, -1.0, -1.0 } };
coordinates_xyz[0][0] = baseCorner[0];
coordinates_xyz[0][1] = baseCorner[1];
coordinates_xyz[0][2] = baseCorner[2];
for (int k = 0; k < 3; ++k) coordinates_xyz[0][k] = baseCorner[k];
// data structure to hold the triangles of the target cell
struct grid_cell partialCell;
......@@ -203,12 +201,8 @@ cdo_compute_concave_overlap_areas(size_t numSearchCells, CellSearch &search, con
auto edgeDirection = get_edge_direction(baseCorner, cornerA, cornerB);
partialCell.coordinates_xyz[1][0] = cornerA[0];
partialCell.coordinates_xyz[1][1] = cornerA[1];
partialCell.coordinates_xyz[1][2] = cornerA[2];
partialCell.coordinates_xyz[2][0] = cornerB[0];
partialCell.coordinates_xyz[2][1] = cornerB[1];
partialCell.coordinates_xyz[2][2] = cornerB[2];
for (int k = 0; k < 3; ++k) partialCell.coordinates_xyz[1][k] = cornerA[k];
for (int k = 0; k < 3; ++k) partialCell.coordinates_xyz[2][k] = cornerB[k];
// clip the current target cell triangle with all source cells
yac_cell_clipping(numSearchCells, sourceCells.data(), partialCell, overlapCells.data());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment