{"id":30715890,"url":"https://github.com/realtrippr/svtl","last_synced_at":"2026-07-03T02:31:07.888Z","repository":{"id":312791252,"uuid":"1039264668","full_name":"RealTrippR/svtl","owner":"RealTrippR","description":"C89 2D Vertex Transformation Library","archived":false,"fork":false,"pushed_at":"2025-09-02T03:02:19.000Z","size":192,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-02T03:32:59.964Z","etag":null,"topics":["c","c89","vertex","vertex-2d"],"latest_commit_sha":null,"homepage":"","language":"C","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/RealTrippR.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-16T20:43:13.000Z","updated_at":"2025-09-02T03:02:23.000Z","dependencies_parsed_at":"2025-09-02T03:43:05.931Z","dependency_job_id":null,"html_url":"https://github.com/RealTrippR/svtl","commit_stats":null,"previous_names":["realtrippr/svtl"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/RealTrippR/svtl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTrippR%2Fsvtl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTrippR%2Fsvtl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTrippR%2Fsvtl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTrippR%2Fsvtl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RealTrippR","download_url":"https://codeload.github.com/RealTrippR/svtl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RealTrippR%2Fsvtl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273403945,"owners_count":25099300,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c","c89","vertex","vertex-2d"],"created_at":"2025-09-03T07:04:25.353Z","updated_at":"2025-10-29T20:42:14.153Z","avatar_url":"https://github.com/RealTrippR.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Simple Vertex Transformation Library ##\n\u003cins\u003e Brief \u003c/ins\u003e\n\nSVTL is a basic vertex transformation library written in C89. It provides a handful of functions to perform simple geometric transformations on vertices.\n\n\u003cins\u003e **Functions** \u003c/ins\u003e\n\n```SVTL_register``` - registers a usage of SVTL \u003c/br\u003e\n```SVTL_unregister``` - unregisters a usage of SVTL \u003c/br\u003e\n```SVTL_translate2D``` - translates by a given displacement \u003c/br\u003e\n```SVTL_rotate2D``` - rotates around the origin \u003c/br\u003e\n```SVTL_scale2D``` - scales relative to the origin \u003c/br\u003e\n```SVTL_skew2D``` - skews relative to the origin \u003c/br\u003e\n```SVTL_mirror2D``` - mirrors around a given line \u003c/br\u003e\n```SVTL_unindexedToIndexed2D``` - converts a list of unindexed vertices to indexed vertices \u003c/br\u003e\n```SVTL_findSignedArea``` - returns the signed area of a simple closed polygon \u003c/br\u003e\n```SVTL_findCentroid2D``` - returns the centroid of a simple closed polygon \u003c/br\u003e\n```SVTL_extractVertexPositions2D``` - writes vertex positions to a buffer \u003c/br\u003e\n```SVTL_extractVertexPositions2D_s``` - writes vertex positions to a bounds checked buffer \u003c/br\u003e\n\n\u003cins\u003e **Example** \u003c/ins\u003e\n```\n#include \u003csvtl.h\u003e\n\nstruct Vertex2D {\n\tfloat x;\n\tfloat y;\n\n\tfloat r;\n\tfloat g;\n\tfloat b;\n};\n\nint main()\n{\n\tSVTL_register();\n\n\tstruct Vertex2D vertices[4] = { {0,0}, {1,0}, {1,1}, {0,1} };\n\n\tstruct SVTL_VertexInfo vi;\n\tvi.count = sizeof(vertices)/sizeof(vertices[0]);\n\tvi.stride = sizeof(struct Vertex2D);\n\tvi.positionOffset = 0u;\n\tvi.positionType = SVTL_POS_TYPE_VEC2_F32;\n\tvi.vertices = vertices;\n\tvi.indices=NULL;\n\n\tstruct SVTL_F64Vec2 v = { 0, 1 };\n\tstruct SVTL_F64Vec2 v2 = { 0, 1 };\n\n\tSVTL_translate2D(\u0026vi, v);\n\n\tv.x = 0.f;\n\tv.y = 0.f;\n\tv2.x = 2.f;\n\tv2.y = 2.f;\n\tSVTL_scale2D(\u0026vi, v2, v);\n\n\tv.x = 0;\n\tv.y = 0;\n\n\tSVTL_rotate2D(\u0026vi, 3.141592653589, v);\n\tSVTL_rotate2D(\u0026vi, -3.141592653589, v);\n\n\n\n\tv.x = 1.f;\n\tv.y = 0.f;\n\tv2.x = 1.f;\n\tv2.y = 3.f;\n\tSVTL_skew2D(\u0026vi, v, v2);\n\t\n\tSVTL_unregister();\n}\n```\n\n\u003cins\u003e **Naming Conventions** \u003c/ins\u003e\n- Preprocessor Macros: UPPER_SNAKE_CASE\n- Function Names: CamelCase\n- Variable names: pascalCase\n- Enum Types: CamelCase\n- Enum Values: UPPER_SNAKE_CASE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtrippr%2Fsvtl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtrippr%2Fsvtl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtrippr%2Fsvtl/lists"}