https://github.com/aakrishtsp/reynolds-steering-behaviours
Implementation of Reynold's Steering Algorithm using OpenGL
https://github.com/aakrishtsp/reynolds-steering-behaviours
2d-graphics cmake glad glfw glm imgui opengl simulation
Last synced: 6 months ago
JSON representation
Implementation of Reynold's Steering Algorithm using OpenGL
- Host: GitHub
- URL: https://github.com/aakrishtsp/reynolds-steering-behaviours
- Owner: AakrishtSP
- Created: 2025-02-01T18:53:22.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-02-19T20:26:17.000Z (8 months ago)
- Last Synced: 2025-03-25T19:39:12.550Z (6 months ago)
- Topics: 2d-graphics, cmake, glad, glfw, glm, imgui, opengl, simulation
- Language: C++
- Homepage:
- Size: 519 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reynolds Steering Behaviors
This project implements Reynolds' Steering Behaviors using OpenGL.
## Cloning the Repository
To ensure all submodules are cloned properly, use the following command:
```sh
git clone --recursive https://github.com/AakrishtSP/Reynolds-Steering-Behaviours.git
```If you forgot to clone recursively, you can initialize and update submodules manually:
```sh
git submodule update --init --recursive
```## Building with CMake
### Requirements
- CMake (>=3.30 recommended)
- A C++ compiler with C++17 support
- OpenGL (typically provided by your system or graphics drivers)
- GLFW, GLM, DearImGui, glad (included as submodules)### Steps to Build
Prerequisite:
Install dependencies
Ubuntu:
```sh
sudo apt install build-essential wayland-protocols libwayland-dev libxkbcommon-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev cmake
```ArchLinux:
```sh
sudo pacman -S base-devel libxrandr libxinerama libxcursor libxi mesa cmake
```1. Navigate to the project directory:
```sh
cd Reynolds-Steering-Behaviours
```2. Create a build directory:
```sh
mkdir build && cd build
```3. Run CMake to configure the project:
```sh
cmake ..
```4. Compile the project:
```sh
cmake --build . --config Release
```
Or on Unix-based systems:
```sh
make -j$(nproc)
```5. Run the executable:
```sh
./build/bin/ReynoldsSteering
```### Summary
Ensure you have CMake and a compatible compiler installed. Then, follow these steps:
```sh
mkdir build
cd build
cmake ..
make -j$(nproc)
```#### On Windows
```sh
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022"
```
Then, open the generated `.sln` file in Visual Studio and build the project.Alternatively, use:
```sh
cmake --build . --config Release
```Run the executable:
```sh
./build/bin/ReynoldsSteering.exe
```## Troubleshooting
### Submodule Issues
If you run into issues with submodules, try:
```sh
git submodule update --init --recursive
```### CMake Errors
- If CMake fails to find OpenGL, ensure `GLFW` and other dependencies are correctly set up.
- If using `make`, try running `cmake --build . --config Release` instead.