GithubHelp home page GithubHelp logo

imcontrol's Introduction

ImControl

ImControl is an immediate mode variable manipulation library for Dear ImGui. It's API mimics the style of Dear ImGui, it's fast like Dear ImGui and it's easy to use, like Dear ImGui. If you use variables to control, position and orient your objects in 1D, 2D or 3D and wish you could edit them by dragging the objects on screen then ImControl is for you. You just state how to position some control points with your variables and let it do the rest.

What ImControl provides:

  • a transformation stack to describe how you manipulate your objects with your variables
  • a simple quadratic solver that feeds mouse-based interaction back to changes to your variables
  • reparametrisation of variables (you may not realise it yet, but you want this...)
  • a bunch of demos which would be a headache to implement without ImControl!
  • example implementations of widgets, 3D gui elements, etc. built on top of ImControl.

What ImControl does not provide:

  • a stable library of widgets, you can easily write your own though!
  • rendering of anything (unless you ask it to), it is expected that you render your own objects, widgets etc.
  • a physics simulation
  • resolution of mathematical singularities, you need to stay the right side of the Inverse Function Theorem

arm demo

Read the source files for documentation. To run the demos start with your chosen Dear ImGui implementation example, add a call to ImControl::NewFrame() after ImGui::NewFrame(), then call ImControl::ShowDemoWindow as you would ImGui's.

If you have any questions about the code then please contact me directly or raise an issue. Furthermore if you have any suggestions for transforms / features you want included then again raise an issue. Contributions to the code are of course welcome.

You may notice some strange behaviour when dragging certain control points around. This may be an unavoidable result of your underlying geometry, the simplest way to mitigate such issues is to restrict the domain of the parameters, see the examples.

Tests and Benchmarks

There are some simple tests I used when developing the transforms, they perform a numerical check of the implemented formal derivatives. They are part of the demo. There are also some benchmarks which compare the performance of the various types of transformations.

imcontrol's People

Contributors

jamesthomasgriffin avatar

Stargazers

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

Watchers

 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.