Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Icarus

Polygons

This topic is 6913 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

Does anyone know how to create a polygon if given a plane and a bounding box. I have one solution, but it doesn''t work in all cases. -Icarus

Share this post


Link to post
Share on other sites
Advertisement
Why not create a foursided polygon in the plane and then enlarge it until the bounding box is completely inside. Then if you need the bounding box to surround the polygon you can clip your foursided polygon to the sides of the box.

- WitchLord

Share this post


Link to post
Share on other sites
Just thought of another way...

You could clip the bounding box to the plane, then you can assemble the polygon from the edges that were clipped.

- WitchLord

Share this post


Link to post
Share on other sites
The simplest way to do this:

1. Create a large polygon (as large as your limits) in the plane
2. Clip the polygon to all sides (planes) of the bounding box

You can check the Quake utils source for a great algorithm, I think it''s called something like CreateBrushFaces in QBSP.

Share this post


Link to post
Share on other sites

  • 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!