| 188 | } |
| 189 | |
| 190 | double area( const MeshTopology & topology, const VertCoords & points, const FaceBitSet & fs ) |
| 191 | { |
| 192 | MR_TIMER; |
| 193 | |
| 194 | return 0.5 * parallel_deterministic_reduce( tbb::blocked_range( 0_f, FaceId{ topology.faceSize() }, 1024 ), 0.0, |
| 195 | [&] ( const auto & range, double curr ) |
| 196 | { |
| 197 | for ( FaceId f = range.begin(); f < range.end(); ++f ) |
| 198 | if ( fs.test( f ) && topology.hasFace( f ) ) |
| 199 | curr += dblArea( topology, points, f ); |
| 200 | return curr; |
| 201 | }, |
| 202 | [] ( auto a, auto b ) { return a + b; } ); |
| 203 | } |
| 204 | |
| 205 | double projArea( const MeshTopology & topology, const VertCoords & points, const Vector3f & dir, const FaceBitSet & fs ) |
| 206 | { |