Advertisement Jump to content
Sign in to follow this  
Quat

Plane/Poly Clipping

This topic is 3366 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For Sutherland-Hodgman clipping a polygon against several planes (frustum planes), is it possible to be more memory friendly than the below code: inputPoly = ClipLeftPlane(inputPoly); inputPoly = ClipRightPlane(inputPoly); inputPoly = ClipBottomPlane(inputPoly); ...

Share this post


Link to post
Share on other sites
Advertisement
What language do you have in mind?

Also, what precisely do you mean by memory-friendly? Fewer dynamic allocations? Less overall memory usage? Something else?

If what you're really after here is improved performance by way of less dynamic memory management, I imagine you could set up a couple of static vertex arrays and then switch back and forth between them from plane to plane (this would give you a fixed memory footprint and no dynamic allocations at the expense of a fixed maximum number of polygon vertices).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!