Giter Site home page Giter Site logo

imguizmo's Introduction

ImGuizmo

ImGizmo is a small (.h and .cpp) library built ontop of Dear ImGui that allow you to manipulate(Rotate & translate at the moment) 4x4 float matrices. No other dependancies. Coded with Immediate Mode (IM) philosophy in mind.

Image of Rotation Image of Translation

// call BeginFrame right after ImGui_XXXX_NewFrame();

void BeginFrame();

// return true if mouse cursor is over any gizmo control (axis, plan or screen component)

bool IsOver();

// return true if mouse IsOver or if the gizmo is in moving state

bool IsUsing();

// enable/disable the gizmo. Stay in the state until next call to Enable. // gizmo is rendered with gray half transparent color when disabled

void Enable(bool enable);

// call it when you want a gizmo // Needs view and projection matrices. // matrix parameter is the source matrix (where will be gizmo be drawn) and might be transformed by the function. Return deltaMatrix is optional // translation is applied in world space // rotation is applied in local space // Note: all matrices are 4x4 float matrix. OpenGL style.

enum MODE { TRANSLATE, ROTATE };

**void Mogwai(const float *view, const float *projection, MODE mode, float matrix, float deltaMatrix = 0);

License

ImGuizmo is licensed under the MIT License, see LICENSE for more information.

imguizmo's People

Contributors

cedricguillemet 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.