{"id":13732008,"url":"https://github.com/CedricGuillemet/LibGizmo","last_synced_at":"2025-05-08T06:31:08.795Z","repository":{"id":2182574,"uuid":"3129996","full_name":"CedricGuillemet/LibGizmo","owner":"CedricGuillemet","description":"Gizmo control library for 3D object manipulation (4x4 matrix)","archived":false,"fork":false,"pushed_at":"2012-02-16T09:13:12.000Z","size":26526,"stargazers_count":142,"open_issues_count":6,"forks_count":45,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-10T09:36:40.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://skaven.fr","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CedricGuillemet.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-08T13:45:11.000Z","updated_at":"2024-10-29T22:44:28.000Z","dependencies_parsed_at":"2022-08-31T01:10:18.325Z","dependency_job_id":null,"html_url":"https://github.com/CedricGuillemet/LibGizmo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedricGuillemet%2FLibGizmo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedricGuillemet%2FLibGizmo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedricGuillemet%2FLibGizmo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CedricGuillemet%2FLibGizmo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CedricGuillemet","download_url":"https://codeload.github.com/CedricGuillemet/LibGizmo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224707588,"owners_count":17356361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:43.631Z","updated_at":"2024-11-14T23:30:47.636Z","avatar_url":"https://github.com/CedricGuillemet.png","language":"C++","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":"********************************************************************************************************\n* INTRODUCTION\n \n - LibGizmo is a small, standalone library that adds a 3D matrix (4x4 floats) manipulation control \n   called 'Gizmo'. It consists of 3 different controls: a Move, a Rotate and a Scale. It works the \n   same way as in 3DStudio Max or Maya. It's written using C++ and the current implementation use \n   OpenGL fixed pipeline. Integration should be easy.\n\n********************************************************************************************************\n* LICENSE\n\nCopyright (C) 2012 Cedric Guillemet\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n********************************************************************************************************\n* Contact\n\n - email/GTALK : cedric.guillemet@gmail.com\n - Twitter : @skaven_\n - web : http://www.skaven.fr\n \n********************************************************************************************************\n* USE\n\n - Set include path to inc, library path to lib\n\n - Link with LibGizmoDebug.lib for debug build, LibGizmo.lib for release\n\n - In your code :\n\t#include \"iGizmo.h\"\n\n - create one or more Gizmo with the functions : CreateMoveGizmo(), CreateRotateGizmo(), CreateScaleGizmo()\n\n - set a pointer to the 16 floats composing the matrix you want to edit\n\tgizmo-\u003eSetEditMatrix( objectMatrix );\n\n - Any time the display viewport changes, call SetScreenDimensions\n    \tgizmo-\u003eSetScreenDimension( screenWidth, screenHeight );\n\n - Once a frame, call SetCameraMatrix. The matrices you send\n\n\tfloat viewMat[16];\n\tfloat projMat[16];\n       \n\tglGetFloatv (GL_MODELVIEW_MATRIX, viewMat );  \n\tglGetFloatv (GL_PROJECTION_MATRIX, projMat );  \n\n\tgizmo-\u003eSetCameraMatrix( viewMat, projMat );\n\n\n - Draw the gizmo\n        gizmo-\u003eDraw();\n\n - Change the kind of matrix manipulation (view, local, world). Example for 'WORLD' mode:\n\tgizmo-\u003eSetLocation( IGizmo::LOCATE_WORLD );\n\t\n - When you receive a mouse button down, call\n   if (gizmo-\u003eOnMouseDown( mousex, mousey ))\n        SetCapture( hWnd );\n\tThis methods returns true if you have to capture the mouse. mousex and mousey are display viewport\n\tlocal coordinates. 0,0 is upper left.\n - for mouse move and mouse button up, call:\n\t\tgizmo-\u003eOnMouseMove( mousex, mousey );\n        gizmo-\u003eOnMouseUp( mousex, mousey );\n\n********************************************************************************************************\n* RENDERING\n\n - The rendering code is done by OpenGL Fixed pipeline. The implementation is done in GizmoTransformRender.cpp.\n   6 methodes are called by all the 3 gizmo:\n\nvoid DrawCircle(const tvector3 \u0026orig,float r,float g,float b,const tvector3 \u0026vtx,const tvector3 \u0026vty);\nvoid DrawCircleHalf(const tvector3 \u0026orig,float r,float g,float b,const tvector3 \u0026vtx,const tvector3 \u0026vty,tplane \u0026camPlan);\nvoid DrawAxis(const tvector3 \u0026orig, const tvector3 \u0026axis, const tvector3 \u0026vtx,const tvector3 \u0026vty, float fct,float fct2,const tvector4 \u0026col);\nvoid DrawCamem(const tvector3\u0026 orig,const tvector3\u0026 vtx,const tvector3\u0026 vty,float ng);\nvoid DrawQuad(const tvector3\u0026 orig, float size, bool bSelected, const tvector3\u0026 axisU, const tvector3 \u0026axisV);\nvoid DrawTri(const tvector3\u0026 orig, float size, bool bSelected, const tvector3\u0026 axisU, const tvector3\u0026 axisV);\n\n   You can implement those methods using any API. There aren't any other call to a rendering library anywhere\n   else. There is an old (untested) version using DX9 api.\n\n********************************************************************************************************\n* TODO\n\n - Linux/MacOSX port\n - Code cleanup\n - improve example with local/world/screen space change\n - DX10/11 rendering\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCedricGuillemet%2FLibGizmo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCedricGuillemet%2FLibGizmo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCedricGuillemet%2FLibGizmo/lists"}