14#include <lagrange/Mesh.h>
15#include <lagrange/raycasting/EmbreeRayCaster.h>
35template <
typename Scalar>
36std::unique_ptr<EmbreeRayCaster<Scalar>> create_ray_caster(
40 if (engine & 0b1111) {
42 int flags =
static_cast<int>(RTC_SCENE_FLAG_NONE);
44 flags |=
static_cast<int>(RTC_SCENE_FLAG_DYNAMIC);
47 flags |=
static_cast<int>(RTC_SCENE_FLAG_ROBUST);
50 flags |=
static_cast<int>(RTC_SCENE_FLAG_COMPACT);
54 RTCBuildQuality build = RTC_BUILD_QUALITY_LOW;
62 return std::make_unique<EmbreeRayCaster<Scalar>>(
static_cast<RTCSceneFlags
>(flags), build);
64 std::stringstream err_msg;
65 err_msg <<
"Unknown ray caster engine: " << engine;
66 throw std::runtime_error(err_msg.str());
RayCasterType
Definition: create_ray_caster.h:22
@ EMBREE_DYNAMIC
Corresponds to RTC_SCENE_FLAG_DYNAMIC.
Definition: create_ray_caster.h:24
@ EMBREE_DEFAULT
Corresponds to RTC_SCENE_FLAG_NONE.
Definition: create_ray_caster.h:23
@ EMBREE_COMPACT
Corresponds to RTC_SCENE_FLAG_COMPACT.
Definition: create_ray_caster.h:26
@ EMBREE_ROBUST
Corresponds to RTC_SCENE_FLAG_ROBUST.
Definition: create_ray_caster.h:25
RayCasterQuality
Definition: create_ray_caster.h:29
@ BUILD_QUALITY_MEDIUM
Corresponds to RTC_BUILD_QUALITY_MEDIUM.
Definition: create_ray_caster.h:31
@ BUILD_QUALITY_HIGH
Corresponds to RTC_BUILD_QUALITY_HIGH.
Definition: create_ray_caster.h:32
@ BUILD_QUALITY_LOW
Corresponds to RTC_BUILD_QUALITY_LOW.
Definition: create_ray_caster.h:30
Main namespace for Lagrange.
Definition: AABBIGL.h:30