https://github.com/harryfoster1812/cloth-simulation
Real-time C++ cloth simulation with OpenGL, GLFW, and Dear ImGui. Features configurable physics, collisions, fly camera, and wireframe mode.
https://github.com/harryfoster1812/cloth-simulation
cloth-simulation cpp opengl
Last synced: 3 months ago
JSON representation
Real-time C++ cloth simulation with OpenGL, GLFW, and Dear ImGui. Features configurable physics, collisions, fly camera, and wireframe mode.
- Host: GitHub
- URL: https://github.com/harryfoster1812/cloth-simulation
- Owner: HarryFoster1812
- Created: 2025-08-18T17:08:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-18T18:52:12.000Z (11 months ago)
- Last Synced: 2025-08-26T23:15:47.129Z (11 months ago)
- Topics: cloth-simulation, cpp, opengl
- Language: C++
- Homepage:
- Size: 23 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cloth Simulation Project
A real-time cloth simulation implemented in **C++** using **OpenGL**, **GLFW**, **Glad**, and **Dear ImGui**. This project simulates cloth dynamics with interactive controls and physics-based behavior.
## Features
- **Configurable Cloth Properties**
- Adjustable particle mass, spring constants, and pinning.
- Real-time updates for simulation parameters.
- **Simulation Controls**
- Pause/resume simulation.
- Toggle **wireframe mode** for debugging.
- **Collision Handling**
- Cloth interacts with **cubes** and **planes** in the scene.
- **Camera**
- Fly camera for free exploration of the scene.
## Dependencies
- [GLFW](https://www.glfw.org/) – windowing and input
- [Glad](https://glad.dav1d.de/) – OpenGL loader
- [Dear ImGui](https://github.com/ocornut/imgui) – GUI for simulation controls
- OpenGL 3.3+
## Build Instructions
1. Clone the repository:
```bash
git clone
cd cloth-sim
cmake .. -DMAIN_PATH:STRING=../main.cpp -DCMAKE_BUILD_TYPE=Debug
make
./main
```