Commit b4ccabd7 by gsell

coding style fixes, cleanup obsolete comment

parent 78c39f8c
 ... @@ -46,8 +46,6 @@ ArbitraryDomain::ArbitraryDomain( BoundaryGeometry * bgeom, ... @@ -46,8 +46,6 @@ ArbitraryDomain::ArbitraryDomain( BoundaryGeometry * bgeom, maxCoords_m = bgeom->getmaxcoords(); maxCoords_m = bgeom->getmaxcoords(); geomCentroid_m = (minCoords_m + maxCoords_m)/2.0; geomCentroid_m = (minCoords_m + maxCoords_m)/2.0; // TODO: THis needs to be made into OPTION of the geometry. // A user defined point that is INSIDE with 100% certainty. -DW bool have_inside_pt = bgeom->getInsidePoint(globalInsideP0_m); bool have_inside_pt = bgeom->getInsidePoint(globalInsideP0_m); if (have_inside_pt == false) { if (have_inside_pt == false) { throw OpalException( throw OpalException( ... ...
 ... @@ -1089,9 +1089,9 @@ BoundaryGeometry::isInside ( ... @@ -1089,9 +1089,9 @@ BoundaryGeometry::isInside ( box (Q). We also know the number of intersections n_i of this line box (Q). We also know the number of intersections n_i of this line segment with the geometry. segment with the geometry. If n_i is odd, Q in inside the boundary! If n_i is odd, Q is inside the boundary! while (tru); do while (true); do bisect the line segment [P_out, Q], let B the bisecting point. bisect the line segment [P_out, Q], let B the bisecting point. compute number of intersections of the line segment [P_out, B] compute number of intersections of the line segment [P_out, B] ... @@ -1112,8 +1112,8 @@ BoundaryGeometry::findInsidePoint ( ... @@ -1112,8 +1112,8 @@ BoundaryGeometry::findInsidePoint ( /* /* find line segment find line segment */ */ Vector_t Q{(maxExtent_m + minExtent_m) / 2}; Vector_t Q {(maxExtent_m + minExtent_m) / 2}; std::vector P_outs{ std::vector P_outs { {minExtent_m[0]-0.01, Q[1], Q[2]}, {minExtent_m[0]-0.01, Q[1], Q[2]}, {maxExtent_m[0]+0.01, Q[1], Q[2]}, {maxExtent_m[0]+0.01, Q[1], Q[2]}, {Q[0], minExtent_m[1]-0.01, Q[2]}, {Q[0], minExtent_m[1]-0.01, Q[2]}, ... @@ -1123,7 +1123,7 @@ BoundaryGeometry::findInsidePoint ( ... @@ -1123,7 +1123,7 @@ BoundaryGeometry::findInsidePoint ( }; }; int n_i = 0; int n_i = 0; Vector_t P_out; Vector_t P_out; for(const auto& P: P_outs) { for (const auto& P: P_outs) { n_i = fastIsInside (P, Q); n_i = fastIsInside (P, Q); if (n_i != 0) { if (n_i != 0) { P_out = P; P_out = P; ... @@ -1141,7 +1141,7 @@ BoundaryGeometry::findInsidePoint ( ... @@ -1141,7 +1141,7 @@ BoundaryGeometry::findInsidePoint ( return true; return true; } } while (true) { while (true) { Vector_t B{(P_out + Q) / 2}; Vector_t B {(P_out + Q) / 2}; n_i = fastIsInside (P_out, B); n_i = fastIsInside (P_out, B); if (n_i % 2 == 1) { if (n_i % 2 == 1) { insidePoint_m = B; insidePoint_m = B; ... @@ -1167,7 +1167,7 @@ BoundaryGeometry::fastIsInside ( ... @@ -1167,7 +1167,7 @@ BoundaryGeometry::fastIsInside ( const Vector_t& reference_pt, // [in] reference pt inside the boundary const Vector_t& reference_pt, // [in] reference pt inside the boundary const Vector_t& P // [in] pt to test const Vector_t& P // [in] pt to test ) { ) { const Voxel c(minExtent_m, maxExtent_m); const Voxel c (minExtent_m, maxExtent_m); if (!c.isInside (P)) return 1; if (!c.isInside (P)) return 1; IpplTimings::startTimer (TfastIsInside_m); IpplTimings::startTimer (TfastIsInside_m); #ifdef ENABLE_DEBUG #ifdef ENABLE_DEBUG ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!