Skip to content

v2.0.0 - Standalone Library Rebrand

Latest

Choose a tag to compare

@queelius queelius released this 12 Nov 03:20
· 8 commits to main since this release

Release v2.0.0: Standalone Library Rebrand

This major release transitions from a Boost-oriented project to a standalone, widely-accessible C++ library.

🎉 What's New

Simplified API

  • Namespace: spatial:: (was boost::spatial::)
  • Include path: <spatial/sparse_spatial_hash.hpp>
  • CMake target: sparse_spatial_hash::sparse_spatial_hash

Easy Installation

CMake FetchContent (Recommended)

```cmake
include(FetchContent)
FetchContent_Declare(
sparse_spatial_hash
GIT_REPOSITORY https://github.com/queelius/boost_sparse_spatial_hash.git
GIT_TAG v2.0.0
)
FetchContent_MakeAvailable(sparse_spatial_hash)
target_link_libraries(your_target PRIVATE sparse_spatial_hash::sparse_spatial_hash)
```

Quick Start

```cpp
#include <spatial/sparse_spatial_hash.hpp>

using namespace spatial;

grid_config<3> cfg{
.cell_size = {10.0f, 10.0f, 10.0f},
.world_size = {1000.0f, 1000.0f, 1000.0f},
.topology_type = topology::toroidal
};

sparse_spatial_hash<Particle, 3> grid(cfg);
grid.rebuild(particles);
auto neighbors = grid.query_radius(50.0f, x, y, z);
```

Package Manager Support

  • ✅ CMake FetchContent ready
  • ✅ vcpkg.json included (submit to vcpkg registry coming soon)
  • ✅ Manual installation supported

⚠️ Breaking Changes

This is a major version bump due to breaking API changes:

Old (v1.x) New (v2.0.0)
boost::spatial:: spatial::
<boost/spatial/sparse_spatial_hash.hpp> <spatial/sparse_spatial_hash.hpp>
boost_sparse_spatial_hash::boost_sparse_spatial_hash sparse_spatial_hash::sparse_spatial_hash

Migration Guide

Update includes:
```cpp
// Old
#include <boost/spatial/sparse_spatial_hash.hpp>
using namespace boost::spatial;

// New
#include <spatial/sparse_spatial_hash.hpp>
using namespace spatial;
```

Update position accessors:
```cpp
// Old
template<>
struct boost::spatial::position_accessor<MyType, 3> { ... };

// New
template<>
struct spatial::position_accessor<MyType, 3> { ... };
```

Update CMake:
```cmake

Old

target_link_libraries(your_target boost_sparse_spatial_hash::boost_sparse_spatial_hash)

New

target_link_libraries(your_target sparse_spatial_hash::sparse_spatial_hash)
```

📊 Validation

  • ✅ All 54 tests passing (326 assertions)
  • ✅ Performance unchanged from v1.2.0
  • ✅ Zero external dependencies (header-only, stdlib-only)
  • ✅ C++20 required (GCC 10+, Clang 12+, MSVC 2019+)

📚 Documentation

  • README - Updated with new namespace and FetchContent instructions
  • Examples - All updated to use new API
  • CLAUDE.md - Development guide updated

🚀 Next Steps

  1. Try it out with CMake FetchContent
  2. Report issues on GitHub
  3. Submit to vcpkg registry (contributions welcome!)

Full changelog: v1.2.0...v2.0.0