Update: Here is the sample updated to XNA 4.0. Thanks UberGeekGames.
After I’ve seen some people asking how to do this on the forums, I decided to make a small class that allows us to draw Pies in 2D in XNA.
To use it, just create a new Pie2D object. The constructor receives parameters for the radius, angle and tessellation. These can also be modified at runtime, and the shape will be altered appropriately.
I made a sample that shows how to use this class. You can download it here: Pie 2D sample
A pie could be useful in 2D games for various effects, like enemy visibility area, flashlights, shields, radars, time indicators, etc.
Pingback: Catalin Zima - XNA and HLSL blog » Welcome!
Pingback: 12 Months, 12 Samples » 12 months, not quite 12 samples
Pingback: 2D Pie Drawing updated to 4.0
Pingback: Even more interesting stuff (for XNA & MonoGame) ← Int6 Studios