GithubHelp home page GithubHelp logo

xxmeow / clothsimulation Goto Github PK

View Code? Open in Web Editor NEW
60.0 2.0 10.0 7.94 MB

Simple cloth simulation with OpenGL.

Home Page: https://www.bilibili.com/video/BV1s64y1u7BJ

C++ 11.90% C 87.26% GLSL 0.84%
opengl cloth-simulation

clothsimulation's Introduction

Cloth Simulation

DrawMode1DrawMode2DrawMode3

UI

  • Window
    • ESC Exit
  • Draw Mode: Change the rendering mode of cloth
    • Z Node Mode
    • X Spring Mode
    • C Cloth Mode
  • Camera
    • W S A D Move camera up / down / left / right
    • Q E Move camera closer / farther
  • Pause
    • T Pause
    • R Resume
  • Wind Force
    • MOUSE_BUTTON_LEFT Click to apply wind force
    • Apply wind force
  • Pin Point
    • O Free left pin
    • P Free right pin

Environment

  • Xcode 11.1
  • OpenGL 3.3
    • GLAD
    • glfw
    • glew
    • glTools
  • Other
    • glm

Data Structures

  • Vectors.h
    • struct Vec2
    • struct 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 Ground
    • class Sphere
    • struct Ball
  • Program.h -> Shader program built itself from .glsl files
    • class Program
  • 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

xxmeow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.