{"id":19715731,"url":"https://github.com/red1c3/mesh-loader","last_synced_at":"2025-02-27T16:45:06.688Z","repository":{"id":131675112,"uuid":"549244292","full_name":"Red1C3/mesh-loader","owner":"Red1C3","description":"A GLM data mesh loader","archived":false,"fork":false,"pushed_at":"2022-10-13T22:28:00.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T15:18:18.889Z","etag":null,"topics":["glm","graphics","mesh"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Red1C3.png","metadata":{"files":{"readme":"Readme.md","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,"governance":null}},"created_at":"2022-10-10T22:39:44.000Z","updated_at":"2022-12-23T16:37:10.000Z","dependencies_parsed_at":"2023-05-04T14:31:21.400Z","dependency_job_id":null,"html_url":"https://github.com/Red1C3/mesh-loader","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"2bca2d03e6d695277d4bcbd18bab0113857dc23d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red1C3%2Fmesh-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red1C3%2Fmesh-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red1C3%2Fmesh-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Red1C3%2Fmesh-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Red1C3","download_url":"https://codeload.github.com/Red1C3/mesh-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241036343,"owners_count":19898146,"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":["glm","graphics","mesh"],"created_at":"2024-11-11T22:39:15.247Z","updated_at":"2025-02-27T16:45:06.670Z","avatar_url":"https://github.com/Red1C3.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mesh-loader\n\nA GLM data mesh loader\n\n## Support\nAll Assimp supported formats are supported, so far, the library extracts position, normals, uv0 and indices data.\n\n## Requirements\nGLM and Assimp must be installed on the system.\n\n## Usage\nThe library uses the decorator pattern to load mesh data so it only loads what you need, if you request a data that wasn't loaded, an empty vector will be returned.\n\nThe library takes advantage of GLM's datatypes which are widely used in graphics applications.\n\nUsage example:\n```\nunique_ptr\u003cMeshIndices\u003e mesh = make_unique\u003cMeshIndices\u003e(\n        make_unique\u003cMeshUV0\u003e(\n            make_unique\u003cMeshNorm\u003e(\n                make_unique\u003cMeshPos\u003e(\n                    make_unique\u003cMeshBase\u003e(nullptr)))));\n\nmesh-\u003eload(\"./data/cube.glb\", 0);\n\nvector\u003cvec3\u003e pos = mesh-\u003egetPositions();\ncout \u003c\u003c pos.size() \u003c\u003c endl;\nfor (vec3 v : pos)\n{\n    cout \u003c\u003c v.x \u003c\u003c \" \" \u003c\u003c v.y \u003c\u003c \" \" \u003c\u003c v.z \u003c\u003c endl;\n}\n\nvector\u003cvec3\u003e norms = mesh-\u003egetNormals();\ncout \u003c\u003c norms.size() \u003c\u003c endl;\nfor (vec3 v : norms)\n{\n    cout \u003c\u003c v.x \u003c\u003c \" \" \u003c\u003c v.y \u003c\u003c \" \" \u003c\u003c v.z \u003c\u003c endl;\n}\n\nvector\u003cvec2\u003e uv0 = mesh-\u003egetUvCoords0();\ncout \u003c\u003c uv0.size() \u003c\u003c endl;\nfor (vec2 v : uv0)\n{\n    cout \u003c\u003c v.x \u003c\u003c \" \" \u003c\u003c v.y \u003c\u003c endl;\n}\n\nvector\u003cunsigned\u003e indices =mesh-\u003egetIndices();\ncout \u003c\u003c indices.size() \u003c\u003c endl;\nfor (unsigned i : indices)\n{\n    cout \u003c\u003c i \u003c\u003c endl;\n}\n```\n\n## Installtion\nOn Unix-based systems, it's easier to use Meson for installation, Windows users will have to compile and move the compiled files to a suitable location.\n\n## Motivation\nI've written mesh loading code many times and just decided to create a loader instead !","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred1c3%2Fmesh-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fred1c3%2Fmesh-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fred1c3%2Fmesh-loader/lists"}