GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Crackshell/bayazit.h: Single header file library for performing polygon decomposing using the Bayazit algorithm.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
License.md
License.md
 
 
Readme.md
Readme.md
 
 
bayazit.h
bayazit.h
 
 

Repository files navigation

Bayazit.h

This is a polygon decomposer using the Bayazit algorithm. It is ported from the Farseer Physics C# code base into a single-header file library.

Exmaple usage:

Bayazit::Polygon poly;
poly.push_back(Bayazit::Point(20, -30));
poly.push_back(Bayazit::Point(10, -10));
poly.push_back(Bayazit::Point(30, -20));
poly.push_back(Bayazit::Point(30, 20));
poly.push_back(Bayazit::Point(10, 10));
poly.push_back(Bayazit::Point(20, 30));
poly.push_back(Bayazit::Point(-20, 30));
poly.push_back(Bayazit::Point(-10, 10));
poly.push_back(Bayazit::Point(-30, 20));
poly.push_back(Bayazit::Point(-30, -20));
poly.push_back(Bayazit::Point(-10, -10));
poly.push_back(Bayazit::Point(-20, -30));

Bayazit::Decomposer dec;
auto polys = dec.Decompose(poly);

for (auto p : polys)
{
	printf("poly: (%d points)\n", p.size());
	for (auto v : p)
		printf("  %f %f\n", v.x, v.y);
}

About

Single header file library for performing polygon decomposing using the Bayazit algorithm.

Resources

Readme
License
Activity
Custom properties

Stars

24 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.