{"id":29107548,"url":"https://github.com/asthraris/physxine","last_synced_at":"2026-04-24T11:34:35.878Z","repository":{"id":292665661,"uuid":"981571013","full_name":"Asthraris/PhysXine","owner":"Asthraris","description":"PhysXLoop – A C++ 3D Physics Engine with OpenGL 4.6, Eigen \u0026 ImGui Docking Real-time simulation engine supporting AABB \u0026 Sphere collision detection/resolution, event-driven loop control, and modular rendering.","archived":false,"fork":false,"pushed_at":"2025-06-26T12:46:49.000Z","size":2647,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T13:41:02.629Z","etag":null,"topics":["3d-engine","cmake","cpp","final-year-project","imgui-docking","opengl","physics-engine","physics-simulation","project"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Asthraris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-11T12:13:55.000Z","updated_at":"2025-06-26T12:46:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd2587c0-9af1-4989-a84a-20b281a609d4","html_url":"https://github.com/Asthraris/PhysXine","commit_stats":null,"previous_names":["asthraris/physics-engine","asthraris/physxloop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Asthraris/PhysXine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthraris%2FPhysXine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthraris%2FPhysXine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthraris%2FPhysXine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthraris%2FPhysXine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asthraris","download_url":"https://codeload.github.com/Asthraris/PhysXine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asthraris%2FPhysXine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262539073,"owners_count":23325832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-engine","cmake","cpp","final-year-project","imgui-docking","opengl","physics-engine","physics-simulation","project"],"created_at":"2025-06-29T05:04:28.621Z","updated_at":"2026-04-24T11:34:35.793Z","avatar_url":"https://github.com/Asthraris.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧪 PhysXine – C++ Physics Engine on OpenGL 4.6\r\n\r\n**PhysXLoop** is a physics-first simulation engine built from scratch in modern C++ using **OpenGL 4.6** for rendering and **Eigen** for mathematical precision. It’s designed for accurate, real-time physical interaction — with core focus on robust **collision detection/resolution**, a **modular entity model**, and an **event-controlled runtime** that enables seamless switching between simulation and camera control.\r\n\r\n---\r\n\r\n## 🧠 Core Idea\r\n\r\nUnlike traditional render-first engines, PhysXLoop prioritizes **physics determinism and logical accuracy** over GPU performance. While it integrates rendering using OpenGL, its strength lies in a cleanly separated **physics loop** that runs in sync (or optionally detached) from the rendering loop using a lambda-controlled runner.\r\n\r\n---\r\n\r\n## ⚙️ Features\r\n\r\n### ✅ Physics Engine\r\n\r\n* 🧱 **AABB–AABB Collision Detection + Resolution**\r\n* 🟣 **Sphere–Sphere Collision Handling**\r\n* ⚡ **Elastic \u0026 Inelastic Collision Types**\r\n* 🌌 **Accurate Penetration Depth Handling**\r\n* 🔃 **Deterministic Collision Resolution Logic**\r\n* 🔂 **Toggleable Physics Loop (Pause/Resume)** via space key\r\n\r\n### 🎮 Simulation Loop\r\n\r\n* 🎯 **Lambda-based Loop Binding** for physics and rendering sync\r\n* ⏸️ **Event-controlled Simulation State**\r\n* 🖱️ **Arcball-style Camera Control** active when simulation is paused\r\n\r\n### 🖼️ Rendering + UI\r\n\r\n* 📦 **Modular Renderer (Custom-built)**\r\n* 🔢 **ImGui Docking UI Integration**\r\n* 🎲 **Visual Debug Tools** for viewing entities \u0026 bounding volumes\r\n* 🧩 **Custom OOP Entity System** (vs ECS used in prior engine)\r\n\r\n---\r\n\r\n## 🧰 Tech Stack\r\n\r\n| Component      | Stack                      |\r\n| -------------- | -------------------------- |\r\n| Renderer       | OpenGL 4.6                 |\r\n| Math Engine    | Eigen                      |\r\n| GUI            | Dear ImGui (Docking)       |\r\n| Entity System  | Custom OOP-based Model     |\r\n| Loop Control   | Lambda-driven loop binding |\r\n| Input Handling | GLFW                       |\r\n| Build System   | CMake                      |\r\n\r\n---\r\n\r\n## 🔧 Controls\r\n\r\n| Key     | Action                          |\r\n| ------- | ------------------------------- |\r\n| `Space` | Pause / Resume Physics Loop     |\r\n| `Mouse` | Arcball-style camera (on pause) |\r\n| `Esc`   | Exit Simulation                 |\r\n| `Tab`   | Toggle ImGui Dock               |\r\n\r\n---\r\n\r\n## 🧪 Architecture Highlights\r\n\r\n* **PhysicsEngine.run()** is passed as a lambda to the main loop, allowing full detachment if needed.\r\n* Clear separation between `Renderer`, `Entity`, `CollisionSolver`, and `PhysicsEngine` modules.\r\n* Minimal ImGui overlay for controlling simulation state and inspecting runtime data.\r\n\r\n---\r\n\r\n## 📈 Roadmap\r\n\r\n* [ ] Dynamic Object Creation via GUI\r\n* [ ] Particle Systems (Boids, Verlet)\r\n* [ ] Fluid Simulation (SPH-based or grid-based)\r\n* [ ] Rigid Body Dynamics\r\n* [ ] Advanced constraint solver (springs, hinges)\r\n* [ ] Performance profiling \u0026 GPU-acceleration\r\n\r\n---\r\n\r\n## 🧪 Example Simulation\r\n\r\n\u003e **Sphere–Sphere Collision Demo**\r\n\u003e Two spheres collide elastically with position correction and velocity exchange. Penetration is resolved using impulse-based solver.\r\n\r\n\u003e **AABB Stack Stress Test**\r\n\u003e Multiple stacked AABBs fall and resolve collisions, showcasing broad-phase + narrow-phase handling.\r\n\r\n---\r\n\r\n## 🪪 License\r\n\r\nMIT License – open for educational, academic, and commercial experimentation.\r\n\r\n---\r\n\r\n## 👨‍💻 Author\r\n\r\n**Aman Gupta**\r\nDriven by physics. Rendered with code.\r\n*From graphics to gravity — one frame at a time.*\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasthraris%2Fphysxine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasthraris%2Fphysxine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasthraris%2Fphysxine/lists"}