Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/geode/mesh/helpers/aabb_edged_curve_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

#include <geode/mesh/helpers/aabb_edged_curve_helpers.hpp>

#include <async++.h>

#include <geode/geometry/aabb.hpp>
#include <geode/geometry/basic_objects/segment.hpp>
#include <geode/geometry/coordinate_system.hpp>
Expand All @@ -48,13 +46,13 @@ namespace geode
{
absl::FixedArray< BoundingBox< dimension > > box_vector(
mesh.nb_edges() );
async::parallel_for( async::irange( index_t{ 0 }, mesh.nb_edges() ),
[&box_vector, &mesh]( index_t e ) {
BoundingBox< dimension > bbox;
bbox.add_point( mesh.point( mesh.edge_vertex( { e, 0 } ) ) );
bbox.add_point( mesh.point( mesh.edge_vertex( { e, 1 } ) ) );
box_vector[e] = std::move( bbox );
} );
for( const auto e : Range{ mesh.nb_edges() } )
{
box_vector[e].add_point(
mesh.point( mesh.edge_vertex( { e, 0 } ) ) );
box_vector[e].add_point(
mesh.point( mesh.edge_vertex( { e, 1 } ) ) );
}
return AABBTree< dimension >{ box_vector };
}

Expand Down
31 changes: 14 additions & 17 deletions src/geode/mesh/helpers/aabb_solid_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

#include <geode/mesh/helpers/aabb_solid_helpers.hpp>

#include <async++.h>

#include <geode/geometry/aabb.hpp>
#include <geode/geometry/basic_objects/tetrahedron.hpp>
#include <geode/geometry/distance.hpp>
Expand All @@ -39,16 +37,14 @@
{
absl::FixedArray< BoundingBox< dimension > > box_vector(
mesh.nb_polyhedra() );
async::parallel_for( async::irange( index_t{ 0 }, mesh.nb_polyhedra() ),
[&box_vector, &mesh]( index_t p ) {
BoundingBox< dimension > bbox;
for( const auto v : LRange{ mesh.nb_polyhedron_vertices( p ) } )
{
bbox.add_point(
mesh.point( mesh.polyhedron_vertex( { p, v } ) ) );
}
box_vector[p] = std::move( bbox );
} );
for( const auto p : Range{ mesh.nb_polyhedra() } )
{
for( const auto v : LRange{ mesh.nb_polyhedron_vertices( p ) } )
{
box_vector[p].add_point(
mesh.point( mesh.polyhedron_vertex( { p, v } ) ) );
}
}
return AABBTree< dimension >{ box_vector };
}

Expand All @@ -66,17 +62,18 @@
{
const auto tetrahedron_vertices =
mesh_.tetrahedron( cur_box ).vertices();
const auto p0 =
const auto point0 =
coordinate_system_.coordinates( tetrahedron_vertices[0] );

Check failure on line 66 in src/geode/mesh/helpers/aabb_solid_helpers.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/mesh/helpers/aabb_solid_helpers.cpp:66:31 [clang-diagnostic-error]

implicit instantiation of undefined template 'geode::CoordinateSystem<3>'
const auto p1 =
const auto point1 =
coordinate_system_.coordinates( tetrahedron_vertices[1] );

Check failure on line 68 in src/geode/mesh/helpers/aabb_solid_helpers.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/mesh/helpers/aabb_solid_helpers.cpp:68:31 [clang-diagnostic-error]

implicit instantiation of undefined template 'geode::CoordinateSystem<3>'
const auto p2 =
const auto point2 =
coordinate_system_.coordinates( tetrahedron_vertices[2] );

Check failure on line 70 in src/geode/mesh/helpers/aabb_solid_helpers.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/mesh/helpers/aabb_solid_helpers.cpp:70:31 [clang-diagnostic-error]

implicit instantiation of undefined template 'geode::CoordinateSystem<3>'
const auto p3 =
const auto point3 =
coordinate_system_.coordinates( tetrahedron_vertices[3] );

Check failure on line 72 in src/geode/mesh/helpers/aabb_solid_helpers.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/mesh/helpers/aabb_solid_helpers.cpp:72:31 [clang-diagnostic-error]

implicit instantiation of undefined template 'geode::CoordinateSystem<3>'
const Tetrahedron tetrahedron_in_metric_space{ p0, p1, p2, p3 };
const Tetrahedron tetrahedron_in_metric_space{ point0, point1, point2,
point3 };
const auto query_in_metric_space =
coordinate_system_.coordinates( query );

Check failure on line 76 in src/geode/mesh/helpers/aabb_solid_helpers.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/mesh/helpers/aabb_solid_helpers.cpp:76:31 [clang-diagnostic-error]

implicit instantiation of undefined template 'geode::CoordinateSystem<3>'
return std::get< 0 >( point_tetrahedron_distance(
query_in_metric_space, tetrahedron_in_metric_space ) );
}
Expand Down
20 changes: 8 additions & 12 deletions src/geode/mesh/helpers/aabb_surface_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

#include <geode/mesh/helpers/aabb_surface_helpers.hpp>

#include <async++.h>

#include <geode/geometry/aabb.hpp>
#include <geode/geometry/basic_objects/triangle.hpp>
#include <geode/geometry/coordinate_system.hpp>
Expand All @@ -47,16 +45,14 @@ namespace geode
{
absl::FixedArray< BoundingBox< dimension > > box_vector(
mesh.nb_polygons() );
async::parallel_for( async::irange( index_t{ 0 }, mesh.nb_polygons() ),
[&box_vector, &mesh]( index_t p ) {
BoundingBox< dimension > bbox;
for( const auto v : LRange{ mesh.nb_polygon_vertices( p ) } )
{
bbox.add_point(
mesh.point( mesh.polygon_vertex( { p, v } ) ) );
}
box_vector[p] = std::move( bbox );
} );
for( const auto p : Range{ mesh.nb_polygons() } )
{
for( const auto v : LRange{ mesh.nb_polygon_vertices( p ) } )
{
box_vector[p].add_point(
mesh.point( mesh.polygon_vertex( { p, v } ) ) );
}
}
return AABBTree< dimension >{ box_vector };
}

Expand Down
Loading