View Code? Open in Web Editor
NEW
This project forked from xxmeow/clothsimulation
Simple cloth simulation with OpenGL.
Home Page: https://www.bilibili.com/video/BV1s64y1u7BJ
C++ 11.90%
C 87.26%
GLSL 0.84%
clothsimulation's Introduction
-
-
Draw Mode: Change the rendering mode of cloth
Z
Node Mode
X
Spring Mode
C
Cloth Mode
-
W
S
A
D
Move camera up / down / left / right
Q
E
Move camera closer / farther
-
-
MOUSE_BUTTON_LEFT
Click to apply wind force
↑
↓
←
→
Apply wind force
-
O
Free left pin
P
Free right pin
-
-
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.
-
-
-
Rigid.h -> Any rigid body without texture mapping
struct Ground
class Sphere
struct Ball
-
Program.h -> Shader program built itself from .glsl files
-
Display.h -> Global camera, light & Renderers for cloth and rigid bodies
struct Camera
struct Light
struct ClothRender
struct SpringRender
struct ClothSpringRender
struct RigidRender
struct GroundRender
struct BallRender
clothsimulation's People
Contributors