Jump to content
  • Advertisement
Sign in to follow this  
Quat

Plane/Poly Clipping

This topic is 3274 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!