An open API service indexing awesome lists of open source software.

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.

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
```