From 484cfa60ef4e6fff806807b49bd2dacd95457de8 Mon Sep 17 00:00:00 2001
From: Fabio Pellacini <fabio.pellacini@gmail.com>
Date: Tue, 30 Jan 2024 19:39:47 +0100
Subject: [PATCH] updated

---
 libs/yocto/yocto_raycasting.h | 232 ----------------------------------
 1 file changed, 232 deletions(-)

diff --git a/libs/yocto/yocto_raycasting.h b/libs/yocto/yocto_raycasting.h
index f130b5140..259374384 100644
--- a/libs/yocto/yocto_raycasting.h
+++ b/libs/yocto/yocto_raycasting.h
@@ -539,58 +539,6 @@ intersection3f intersect_instance_ebvh(const scene_ebvh& bvh,
 
 }  // namespace yocto
 
-// -----------------------------------------------------------------------------
-// EMBREE BACKWARD COMPATIBILITY
-// -----------------------------------------------------------------------------
-namespace yocto {
-
-// backward compatibility
-using shape_embree_bvh = shape_ebvh;
-using scene_embree_bvh = scene_ebvh;
-
-// Build the bvh acceleration structure.
-[[deprecated]] inline shape_embree_bvh make_shape_embree_bvh(
-    const shape_data& shape, bool highquality = false) {
-  return make_shape_ebvh(shape, highquality);
-}
-[[deprecated]] inline scene_embree_bvh make_scene_embree_bvh(
-    const scene_data& scene, bool highquality = false,
-    bool noparallel = false) {
-  return make_scene_ebvh(scene, highquality, noparallel);
-}
-
-// Refit bvh data
-[[deprecated]] inline void refit_shape_embree_bvh(
-    shape_embree_bvh& bvh, const shape_data& shape) {
-  return refit_shape_ebvh(bvh, shape);
-}
-[[deprecated]] inline void update_scene_embree_bvh(scene_ebvh& bvh,
-    const scene_data& scene, const vector<int>& updated_instances,
-    const vector<int>& updated_shapes) {
-  return refit_scene_ebvh(bvh, scene, updated_instances, updated_shapes);
-}
-
-// Intersect ray with a bvh returning either the first or any intersection
-// depending on `find_any`. Returns the ray distance , the instance id,
-// the shape element index and the element barycentric coordinates.
-[[deprecated]] inline intersection3f intersect_shape_embree_bvh(
-    const shape_ebvh& bvh, const shape_data& shape, const ray3f& ray,
-    bool find_any = false) {
-  return intersect_shape_ebvh(bvh, shape, ray, find_any);
-}
-[[deprecated]] inline intersection3f intersect_scene_embree_bvh(
-    const scene_ebvh& bvh, const scene_data& scene, const ray3f& ray,
-    bool find_any = false) {
-  return intersect_scene_ebvh(bvh, scene, ray, find_any);
-}
-[[deprecated]] inline intersection3f intersect_instance_embree_bvh(
-    const scene_ebvh& bvh, const scene_data& scene, int instance,
-    const ray3f& ray, bool find_any = false) {
-  return intersect_instance_ebvh(bvh, scene, instance, ray, find_any);
-}
-
-}  // namespace yocto
-
 // -----------------------------------------------------------------------------
 //
 //
@@ -1091,106 +1039,6 @@ inline bool overlap_bbox(const bbox3f& bbox1, const bbox3f& bbox2) {
 
 }  // namespace yocto
 
-// -----------------------------------------------------------------------------
-// BACKWARD COMPATIBILITY
-// -----------------------------------------------------------------------------
-namespace yocto {
-
-// Intersect a ray with a point (approximate)
-[[deprecated]] inline bool intersect_point(
-    const ray3f& ray, vec3f p, float r, vec2f& uv, float& dist) {
-  auto intersection = intersect_point(ray, p, r);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Intersect a ray with a line
-[[deprecated]] inline bool intersect_line(const ray3f& ray, vec3f p0, vec3f p1,
-    float r0, float r1, vec2f& uv, float& dist) {
-  auto intersection = intersect_line(ray, p0, p1, r0, r1);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Intersect a ray with a sphere
-[[deprecated]] inline bool intersect_sphere(
-    const ray3f& ray, vec3f p, float r, vec2f& uv, float& dist) {
-  auto intersection = intersect_sphere(ray, p, r);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Intersect a ray with a triangle
-[[deprecated]] inline bool intersect_triangle(
-    const ray3f& ray, vec3f p0, vec3f p1, vec3f p2, vec2f& uv, float& dist) {
-  auto intersection = intersect_triangle(ray, p0, p1, p2);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Intersect a ray with a quad.
-[[deprecated]] inline bool intersect_quad(const ray3f& ray, vec3f p0, vec3f p1,
-    vec3f p2, vec3f p3, vec2f& uv, float& dist) {
-  auto intersection = intersect_quad(ray, p0, p1, p2, p3);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Check if a point overlaps a position pos withint a maximum distance dist_max.
-[[deprecated]] inline bool overlap_point(
-    vec3f pos, float dist_max, vec3f p, float r, vec2f& uv, float& dist) {
-  auto intersection = overlap_point(pos, dist_max, p, r);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Check if a line overlaps a position pos withint a maximum distance dist_max.
-[[deprecated]] inline bool overlap_line(vec3f pos, float dist_max, vec3f p0,
-    vec3f p1, float r0, float r1, vec2f& uv, float& dist) {
-  auto intersection = overlap_line(pos, dist_max, p0, p1, r0, r1);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Check if a triangle overlaps a position pos withint a maximum distance
-// dist_max.
-[[deprecated]] inline bool overlap_triangle(vec3f pos, float dist_max, vec3f p0,
-    vec3f p1, vec3f p2, float r0, float r1, float r2, vec2f& uv, float& dist) {
-  auto intersection = overlap_triangle(pos, dist_max, p0, p1, p2, r0, r1, r2);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-// Check if a quad overlaps a position pos withint a maximum distance dist_max.
-[[deprecated]] inline bool overlap_quad(vec3f pos, float dist_max, vec3f p0,
-    vec3f p1, vec3f p2, vec3f p3, float r0, float r1, float r2, float r3,
-    vec2f& uv, float& dist) {
-  auto intersection = overlap_quad(
-      pos, dist_max, p0, p1, p2, p3, r0, r1, r2, r3);
-  if (!intersection.hit) return false;
-  uv   = intersection.uv;
-  dist = intersection.distance;
-  return true;
-}
-
-}  // namespace yocto
-
 // -----------------------------------------------------------------------------
 // CONVENIENCE FUNCTIONS
 // -----------------------------------------------------------------------------
@@ -1239,86 +1087,6 @@ inline bool is_volumetric(
 
 }  // namespace yocto
 
-// -----------------------------------------------------------------------------
-// BACKWARD COMPATIBILITY
-// -----------------------------------------------------------------------------
-namespace yocto {
-
-// backward compatibility
-[[deprecated]] inline shape_bvh make_bvh(
-    const shape_data& shape, bool embree = false, bool highquality = false) {
-  return make_shape_bvh(shape, highquality);
-}
-[[deprecated]] inline scene_bvh make_bvh(const scene_data& scene,
-    bool embree = false, bool highquality = false, bool noparallel = false) {
-  return make_scene_bvh(scene, highquality, noparallel);
-}
-
-// backward compatibility
-[[deprecated]] inline void update_bvh(shape_bvh& bvh, const shape_data& shape) {
-  return refit_shape_bvh(bvh, shape);
-}
-[[deprecated]] inline void update_bvh(scene_bvh& bvh, const scene_data& scene,
-    const vector<int>& updated_instances, const vector<int>& updated_shapes) {
-  return refit_scene_bvh(bvh, scene, updated_instances, updated_shapes);
-}
-
-// backward compatibility
-[[deprecated]] inline intersection3f intersect_bvh(const shape_bvh& bvh,
-    const shape_data& shape, const ray3f& ray, bool find_any = false) {
-  return intersect_shape_bvh(bvh, shape, ray, find_any);
-}
-[[deprecated]] inline intersection3f intersect_bvh(const scene_bvh& bvh,
-    const scene_data& scene, const ray3f& ray, bool find_any = false) {
-  return intersect_scene_bvh(bvh, scene, ray, find_any);
-}
-[[deprecated]] inline intersection3f intersect_bvh(const scene_bvh& bvh,
-    const scene_data& scene, int instance, const ray3f& ray,
-    bool find_any = false) {
-  return intersect_instance_bvh(bvh, scene, instance, ray, find_any);
-}
-
-// backward compatibility
-[[deprecated]] inline intersection3f overlap_bvh(const shape_bvh& bvh,
-    const shape_data& shape, vec3f pos, float max_distance,
-    bool find_any = false) {
-  return overlap_shape_bvh(bvh, shape, pos, max_distance, find_any);
-}
-[[deprecated]] inline intersection3f overlap_bvh(const scene_bvh& bvh,
-    const scene_data& scene, vec3f pos, float max_distance,
-    bool find_any = false) {
-  return overlap_scene_bvh(bvh, scene, pos, max_distance, find_any);
-}
-
-// backward compatibility
-[[deprecated]] inline intersection3f intersect_shape(const shape_bvh& bvh,
-    const shape_data& shape, const ray3f& ray, bool find_any = false) {
-  return intersect_shape_bvh(bvh, shape, ray, find_any);
-}
-[[deprecated]] inline intersection3f intersect_scene(const scene_bvh& bvh,
-    const scene_data& scene, const ray3f& ray, bool find_any = false) {
-  return intersect_scene_bvh(bvh, scene, ray, find_any);
-}
-[[deprecated]] inline intersection3f intersect_instance(const scene_bvh& bvh,
-    const scene_data& scene, int instance, const ray3f& ray,
-    bool find_any = false) {
-  return intersect_instance_bvh(bvh, scene, instance, ray, find_any);
-}
-
-// backward compatibility
-[[deprecated]] inline intersection3f overlap_shape(const shape_bvh& bvh,
-    const shape_data& shape, vec3f pos, float max_distance,
-    bool find_any = false) {
-  return overlap_shape_bvh(bvh, shape, pos, max_distance, find_any);
-}
-[[deprecated]] inline intersection3f overlap_scene(const scene_bvh& bvh,
-    const scene_data& scene, vec3f pos, float max_distance,
-    bool find_any = false) {
-  return overlap_scene_bvh(bvh, scene, pos, max_distance, find_any);
-}
-
-}  // namespace yocto
-
 // -----------------------------------------------------------------------------
 // CUDA SUPPORT
 // -----------------------------------------------------------------------------