Metadata-Version: 2.4
Name: tibvh
Version: 0.1.4
Summary: A high-performance Taichi-based Linear BVH implementation for 3D geometry processing
Project-URL: Homepage, https://github.com/TATP-233/tibvh
Project-URL: Repository, https://github.com/TATP-233/tibvh
Project-URL: Issues, https://github.com/TATP-233/tibvh/issues
Author-email: Yufei Jia <jyf23@mails.tsinghua.edu.cn>
Maintainer-email: Yufei Jia <jyf23@mails.tsinghua.edu.cn>
License: MIT License
        
        Copyright (c) 2025 Yufei Jia
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: 3d,bvh,collision-detection,computer-graphics,geometry,ray-tracing,spatial-data-structures,taichi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Topic :: Multimedia :: Graphics :: 3D Rendering
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.14,>=3.10
Requires-Dist: numpy<3,>=1.26
Requires-Dist: taichi==1.7.4
Requires-Dist: torch==2.7.0
Description-Content-Type: text/markdown

# TIBVH - Taichi-based Linear BVH

A high-performance Python package for 3D spatial data structures and geometry processing using Taichi for GPU acceleration.

## Installation

### Requirements

- Python 3.10 - 3.13
- Taichi 1.7.4
- NumPy 1.26+
- PyTorch 2.7.0

### Install from Source

```bash
git clone https://github.com/TATP-233/tibvh.git
cd tibvh
uv sync
```

`pyproject.toml` pins `torch==2.7.0` and keeps NumPy in a bounded range. The
checked-in `uv.lock` includes wheels for macOS and Linux, including the Linux
NVIDIA runtime packages required by PyTorch on x86_64.

For development tools:

```bash
uv sync --group dev
```

## Development

This project uses a `src/tibvh` package layout and keeps the local virtual
environment in `.venv` through uv.

```bash
uv run --only-group dev ruff format .
uv run --only-group dev ruff check .
uv build
```

### Supported Geometry Types

- **PLANE (0)**: Infinite planes with optional bounds
- **SPHERE (2)**: Spheres defined by center and radius
- **CAPSULE (3)**: Capsules (cylinders with hemispherical caps)
- **ELLIPSOID (4)**: Ellipsoids with three different radii
- **CYLINDER (5)**: Finite cylinders with caps
- **BOX (6)**: Oriented bounding boxes
- **TRIANGLES**: Individual triangles for mesh processing

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.


## Acknowledgments

- Based on the Linear BVH construction algorithm by Tero Karras (NVIDIA Research)
- Powered by the [Taichi](https://github.com/taichi-dev/taichi) programming language
- Inspired by modern GPU-accelerated spatial data structures

## References

- Karras, T. (2012). "Maximizing Parallelism in the Construction of BVHs, Octrees, and k-d Trees". NVIDIA Research.
- Lauterbach, C. et al. (2009). "Fast BVH Construction on GPUs". Computer Graphics Forum.
