{"id":25666107,"url":"https://github.com/functionally/opengl-spacenavigator","last_synced_at":"2025-06-13T07:33:43.996Z","repository":{"id":184737782,"uuid":"564174922","full_name":"functionally/opengl-spacenavigator","owner":"functionally","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-10T06:59:35.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T08:18:17.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/functionally.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-11-10T06:31:30.000Z","updated_at":"2022-11-10T17:51:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"a69d3d5a-b284-400d-a968-6f1f6191457d","html_url":"https://github.com/functionally/opengl-spacenavigator","commit_stats":null,"previous_names":["functionally/opengl-spacenavigator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/functionally/opengl-spacenavigator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionally%2Fopengl-spacenavigator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionally%2Fopengl-spacenavigator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionally%2Fopengl-spacenavigator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionally%2Fopengl-spacenavigator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/functionally","download_url":"https://codeload.github.com/functionally/opengl-spacenavigator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functionally%2Fopengl-spacenavigator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259602438,"owners_count":22882988,"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":"2025-02-24T08:18:18.877Z","updated_at":"2025-06-13T07:33:43.953Z","avatar_url":"https://github.com/functionally.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Functions for using SpaceNavigator-compatible 3D Mice with OpenGL\n=================================================================\n\nThis Haskell package contains functions for managing input from a SpaceNavigator \u003c\u003chttp://www.3dconnexion.com/products/spacemouse/spacenavigator.html\u003e\u003e, or a 3D mouse compatible with its protocols.  OpenGL callbacks are provided, along with utilities for quantizing the input from the mouse or tracking its six degrees of freedom.\n\nPlease report issues at \u003c\u003chttps://bwbush.atlassian.net/projects/HOGLSPNV/issues/\u003e\u003e.\n\n\nSkeletal example illustrating the use of a SpaceNavigator with OpenGL\n---------------------------------------------------------------------\n\n```haskell\nmain :: IO ()\nmain = do\n  _ \u003c- getArgsAndInitialize\n  initialDisplayMode $= [WithDepthBuffer, DoubleBuffered]\n  _ \u003c- createWindow \"SpaceNavigator OpenGL Example\"\n  depthFunc $= Just Less \n  -- Create the tracker.\n  tracking \u003c- newIORef $ def {spaceNavigatorPosition = Vector3 0 0 0}\n  -- Register a callback which quantizes and tracks the 3D mouse input.\n  spaceNavigatorCallback $=! Just ( quantizeSpaceNavigator defaultQuantization $ trackSpaceNavigator defaultTracking tracking)\n  -- The display callback needs the tracker.\n  displayCallback $= display tracking\n  idleCallback $= Just (postRedisplay Nothing)\n  mainLoop\n\ndisplay :: IORef SpaceNavigatorTrack -\u003e DisplayCallback\ndisplay tracking =\n  do\n    clear [ColorBuffer, DepthBuffer]\n    loadIdentity\n    -- Get the tracking state.\n    tracking' \u003c- get tracking\n    -- Update the matrix based on the tracking\n    doTracking tracking'\n    -- All of the rendering actions go here.\n    renderPrimitive . . . \n    swapBuffers\n```\n\n\nNotes on hardware and software\n------------------------------\n\nThis code has been validated with the following configuration of hardware and software:\n\n*   SpaceNavigator \u003c\u003chttp://www.3dconnexion.com/products/spacemouse/spacenavigator.html\u003e\u003e\n*   spacenavd \u003c\u003chttp://spacenav.sourceforge.net/\u003e\u003e, 0.5\n*   Ubuntu 15.04, 64-bit\n*   GHC 7.6.3\n*   OpenGL == 2.8.0.0\n*   GLUT == 2.4.0.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctionally%2Fopengl-spacenavigator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunctionally%2Fopengl-spacenavigator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctionally%2Fopengl-spacenavigator/lists"}