Skip to content

Feature: Fully integrate sphere primitive #4

@ZigaSajovic

Description

@ZigaSajovic

tf::sphere_like and tf::sphere exist in core/sphere_like.hpp and core/sphere.hpp, with some tf::distance overloads already in core/distance.hpp. But spheres are missing the collection types and most query algorithm dispatch needed to use them like other primitives.

1. Collection Types

Add sphere_view.hpp (with view policy, like point_view.hpp), spheres.hpp, spheres_buffer.hpp, and make_spheres factory, following the pattern of point_view.hpp / points.hpp / points_buffer.hpp.

2. AABB Integration

Add tf::aabb_from for sphere_like in core/aabb_from.hpp so spheres work with spatial trees.

3. Query Algorithm Dispatch

Some distance overloads exist (sphere with point, ray, line, segment). Missing:

core/distance.hpp

  • sphere_like / sphere_like
  • sphere_like / polygon_like
  • sphere_like / aabb_like
  • sphere_like / plane_like

core/intersects.hpp

  • All sphere_like combinations

core/closest_metric_point.hpp and core/closest_metric_point_pair.hpp

  • All sphere_like combinations

core/ray_cast.hpp and core/ray_hit.hpp

  • ray -> sphere_like

4. Spatial Tree Dispatch

Add sphere support to tree queries in spatial/:

  • distance.hpp
  • intersects.hpp
  • ray_cast.hpp
  • ray_hit.hpp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions