Metadata-Version: 2.1
Name: livision
Version: 0.3.8
Summary: Lightweight C++ 3D visualizer for rapid prototyping, with Python bindings
Author-Email: Taku Hamazaki <hamataku07130713@gmail.com>
License: MIT License
         
         Copyright (c) 2026 Taku Hamazaki
         
         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.
         
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C++
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Scientific/Engineering :: Visualization
Project-URL: Homepage, https://github.com/hamataku/LiVision
Project-URL: Documentation, https://hamataku.github.io/LiVision/
Requires-Python: >=3.8
Requires-Dist: numpy
Description-Content-Type: text/markdown

![LiVision](docs/assets/livision_logo.png)

LiVision is a lightweight C++ 3D visualizer for rapid prototyping with ImGui and ImPlot.

[![PPA liblivision-dev](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.launchpad.net%2F1.0%2F~hamatakuzaq%2F%2Barchive%2Fubuntu%2Flivision%3Fws.op%3DgetPublishedBinaries%26status%3DPublished%26binary_name%3Dliblivision-dev%26exact_match%3Dtrue%26order_by_date%3Dtrue&query=entries.0.binary_package_version&label=ppa%3Aliblivision-dev)](https://launchpad.net/~hamatakuzaq/+archive/ubuntu/livision)
[![build](https://github.com/hamataku/LiVision/actions/workflows/build.yml/badge.svg)](https://github.com/hamataku/LiVision/actions/workflows/build.yml)
[![PyPI](https://img.shields.io/pypi/v/livision?label=pypi)](https://pypi.org/project/livision/)

* 📘 [Documentation (EN)](https://hamataku.github.io/LiVision/)
* 📙 [ドキュメント(日本語)](https://hamataku.github.io/LiVision/ja/)
* 🧩 [API Reference](https://hamataku.github.io/LiVision/api/)

## ✨ Features
- 🧪 **Rapid Prototyping**: Fast setup for visual experiments and ideas.
- 🔷 **Primitive-Rich Drawing**: Plane, box, sphere, cylinder, cone, and more.
- 🗂️ **Container-Based Group Control**: Move/transform multiple objects together.
- 🌐 **3D Object Coverage**: Meshes, models, and **SDF-based** objects.
- 📊 **ImGui + ImPlot UI**: Quick interactive tools and plotting dashboards.
- 📸 **Capture**: Save PNG screenshots and record MP4/GIF, with or without a window.

## 🚀 Quick Start
### 📦 Installation
#### Install from PPA
```bash
sudo add-apt-repository ppa:hamatakuzaq/livision
sudo apt update
sudo apt install -y liblivision-dev
```

#### Install from source
```bash
sudo apt update
sudo apt install -y \
  build-essential \
  cmake \
  pkg-config \
  git \
  libsdl2-dev \
  libeigen3-dev \
  libsdformat14-dev \
  libassimp-dev \
  libcurl4-openssl-dev

git clone https://github.com/hamataku/LiVision.git --recursive
mkdir -p LiVision/build && cd LiVision/build
cmake ..
make -j"$(nproc)"
sudo make install
```

### 🛠️ CMake Example
```cmake
# Find package
find_package(livision REQUIRED)

# Add include dirs and link libraries
add_executable(your_program
  src/your_program.cpp
)
target_link_libraries(your_program
  livision::livision
)
```

### 💻 Example Program
```cpp
#include "livision/Viewer.hpp"
#include "livision/marker/Grid.hpp"
#include "livision/object/primitives.hpp"

int main() {
  auto viewer = livision::Viewer::Instance({
      .width = 1280,
      .height = 720,
  });

  // UI callback
  float theta = 0;
  viewer->RegisterUICallback([&]() {
    ImGui::SliderFloat("theta", &theta, 0, M_PI * 2.0F);
    if (ImGui::Button("Close")) {
      viewer->Close();
    }
  });

  // Grid
  auto grid = livision::Grid::Instance({.scale = {15.0, 15.0, 0.0}});
  grid->SetResolution(1.0)->SetColor(livision::color::dark_gray);
  viewer->AddObject(grid);

  // Sphere
  auto sphere =
      livision::Sphere::Instance({.pos = {0.0, 0.0, 0.0},
                                  .scale = {2.0, 2.0, 2.0},
                                  .color = livision::color::rainbow_z,
                                  .wire_color = livision::color::black});
  viewer->AddObject(sphere);

  while (viewer->SpinOnce()) {
    sphere->SetRadRotation({0, 0, theta});
  }
  return 0;
}
```

## 🐍 Python
The same API is available from Python (pybind11).
```bash
pip install livision
```
```python
import livision as lv

viewer = lv.Viewer()
viewer.add_object(lv.Grid(scale=[15.0, 15.0, 0.0]))
viewer.add_object(lv.Sphere(scale=2.0, color=lv.color.rainbow_z, wire_color=lv.color.black))
while viewer.spin_once():
    pass
```
See the [Python guide](https://hamataku.github.io/LiVision/python/) for the full mapping from C++.

## 📄 License
MIT. See `LICENSE`. Third-party notices are listed in `NOTICE`.

🙏 Special thanks to koide3/iridescene, which greatly inspired this project.
