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
-Andreas
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
- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
um.. clip the plane to the bounding box.
--
Float like a butterfly, bite like a crocodile.
--
Float like a butterfly, bite like a crocodile.
--Float like a butterfly, bite like a crocodile.
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
You could clip the bounding box to the plane, then you can assemble the polygon from the edges that were clipped.
- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
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.
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.
Regards,Laarz
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement