7 #include "imstkCapsule.h" 8 #include "imstkCollisionHandling.h" 9 #include "imstkGeometry.h" 10 #include "imstkMath.h" 11 #include "imstkMeshIO.h" 12 #include "imstkPbdModel.h" 13 #include "imstkPbdModelConfig.h" 14 #include "imstkPbdObject.h" 15 #include "imstkPbdObjectCollision.h" 16 #include "imstkPointSetToCapsuleCD.h" 17 #include "imstkPointwiseMap.h" 18 #include "imstkRbdConstraint.h" 19 #include "imstkScene.h" 20 #include "imstkSphere.h" 21 #include "imstkSurfaceMesh.h" 22 #include "imstkSurfaceMeshToCapsuleCD.h" 23 #include "imstkTetrahedralMesh.h" 24 #include "imstkGeometryUtilities.h" 26 #include <benchmark/benchmark.h> 28 using namespace imstk;
30 std::shared_ptr<SurfaceMesh>
31 makeSurfaceMesh(
int dim)
40 BM_SurfaceMeshToCapsuleCD(benchmark::State& state)
42 auto mesh = makeSurfaceMesh(state.range(0));
46 auto capsule = std::make_shared<Capsule>(Vec3d{ 0, 0, 0 }, 0.005, 0.01);
49 cd.setInputGeometryA(mesh);
50 cd.setInputGeometryB(capsule);
60 BENCHMARK(BM_SurfaceMeshToCapsuleCD)
61 ->Unit(benchmark::kMicrosecond)->Arg(4)->Arg(6)->Arg(8)->Arg(10)->Arg(12)->Arg(16)->Arg(24)->Arg(32)->Arg(48)->Arg(62)->Arg(78)->Arg(100);
std::shared_ptr< SurfaceMesh > toTriangleGrid(const Vec3d ¢er, const Vec2d &size, const Vec2i &dim, const Quatd orientation=Quatd::Identity(), const double uvScale=1.0)
Produces a triangle grid on a plane given the imstkPlane.
void setGenerateCD(const bool generateA, const bool generateB)
If generateA is false, CD data will not be generated for input0,A Similarly, if generateB is false...
void update()
Do the actual algorithm.
SurfaceMesh to Capsule collision detection Generates vertex-triangle, point-edge, and point-point CD ...