Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No CSG For 2-D shape modeling #276

Open
louis-langholtz opened this issue Jan 8, 2018 · 4 comments
Open

No CSG For 2-D shape modeling #276

louis-langholtz opened this issue Jan 8, 2018 · 4 comments
Labels
Enhancement For suggestions or changes that enhance any part of the project and isn't a bug. Help Wanted For things that other people are encouraged to help with.

Comments

@louis-langholtz
Copy link
Owner

Expected/Desired Behavior or Experience:

Ability to create complex 2-D shapes by using boolean operators (union, intersection, and difference) to combine simpler shapes. Basically Constructive Solid Geometry (CSG) for 2-D shapes. The resulting shape should be a MultiShapeConf structure (which can take on any convex or concave shape).

Actual Behavior:

Nothing like this is already available as part of the PlayRho library.

Related Issue(s):

@louis-langholtz louis-langholtz added Enhancement For suggestions or changes that enhance any part of the project and isn't a bug. Help Wanted For things that other people are encouraged to help with. labels Jan 8, 2018
@Hexlord
Copy link
Contributor

Hexlord commented Jan 12, 2018

@louis-langholtz do you mind carrying over a dependency like Clipper lib (170kb) ?

@louis-langholtz
Copy link
Owner Author

@Hexlord Is the license compatible? I think so but I'm not certain (so I'm asking).

I guess the answer to this question depends to on how the project would use any dependency. Dependencies for the library seem harder to deal with than dependencies for components (like the Testbed) that depend on the library.

Note that originally I'd been thinking users would just pull in clipping libraries or whatever they used for their applications and then use the clipped results to construct their PlayRho shapes with. Would that be a better starting objective?

When I opened this issue, I was at the point though of implementing identified/chosen clipping algorithms directly within the PlayRho library framework. I.e. so that it was all done, the operations would be available from the playrho namespace (or playrho::d2 namespace). On thinking about this more since then, I suspect some of the Shape design will need to be modified so that at least the vertex radius property is per child (not per shape).

Note that I'm about to push some related changes to the Shape code. Would it be worthwhile to wait till I get that pull request submitted?

@Hexlord
Copy link
Contributor

Hexlord commented Jan 13, 2018

I would prefer it to be PlayRho extension dependent on 3rdparty library for TestBed usage (wrapped by PlayRho namespace for usage). But it would probably be more easy to use directly within playrho source, yet I don't like the idea of replicating excisting alghorithms when the original lirary is opensource copyrighted and very small, seems pointless.

@louis-langholtz
Copy link
Owner Author

louis-langholtz commented Jan 14, 2018

Thanks Hexlord. Sounds like we have a similar perspective of the pros and cons. I'm excited to see what you come up with. Sorry that I haven't gotten the changes I've had in mind for the Shape class done yet (these are done now). If you can get free functions working to interface with the code you use and the existing shape code that would give us a starting point. If there's way to make small steps in this towards the end goal that may useful to do that way. I am open to some changes to the Shape code to help this if needed.

This was referenced Jan 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For suggestions or changes that enhance any part of the project and isn't a bug. Help Wanted For things that other people are encouraged to help with.
Projects
None yet
Development

No branches or pull requests

2 participants