ClothSimulation
Simple cloth simulation with OpenGL.
Install / Use
/learn @xxMeow/ClothSimulationREADME
Cloth Simulation
<div class="center"> <img src="Images/DrawMode1.png" alt="DrawMode1" width="30%"/><img src="Images/DrawMode2.png" alt="DrawMode2" width="30%"/><img src="Images/DrawMode3.png" alt="DrawMode3" width="30%"/> </div>UI
-
Window
ESCExit
-
Draw Mode: Change the rendering mode of cloth
ZNode ModeXSpring ModeCCloth Mode
-
Camera
WSADMove camera up / down / left / rightQEMove camera closer / farther
-
Pause
TPauseRResume
-
Wind Force
MOUSE_BUTTON_LEFTClick to apply wind force↑↓←→Apply wind force
-
Pin Point
OFree left pinPFree right pin
Environment
-
Xcode 11.1
-
OpenGL 3.3
- GLAD
- glfw
- glew
- glTools
-
Other
- glm
Data Structures
-
Vectors.h
struct Vec2struct Vec3
-
Points.h
struct Vertex- A simple type of points with only position and normal data
- Used in rigid body (without texture or anything else)
class Node- Point with physical properties.
- Used in cloth.
- Execute collision detection actively.
-
Spring.h
class Spring
-
Cloth.h
class Cloth
-
Rigid.h -> Any rigid body without texture mapping
struct Groundclass Spherestruct Ball
-
Program.h -> Shader program built itself from .glsl files
class Program
-
Display.h -> Global camera, light & Renderers for cloth and rigid bodies
struct Camerastruct Lightstruct ClothRenderstruct SpringRenderstruct ClothSpringRenderstruct RigidRenderstruct GroundRenderstruct BallRender
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
