This project has moved and is read-only. For the latest updates, please go here.

Beginner's guide

Jan 25, 2009 at 8:54 PM
I am sorry if I am barking up the wrong discussion forum or something but I am new to farseer so I read the documentation of it but I could not find any code or information about how you actually draw the geometry onto the screen. I can do XNA or Silverlight and any help would be much apreciated.
Jan 25, 2009 at 10:11 PM
We are happy to answer any questions our users might have.

Farseer Physics does no drawing at all. It's all up to the user to draw the geometries the way he think is the best.
We have some samples you can download that demonstrates how to draw geometries in both Silverlight and XNA.

Drawing a geometry is simply creating a texture that has the same shape as the vertices you supply to Farseer and then draw the texture at the same location (and with the same rotation) as the geometries. In short: Farseer supply you with the position and rotation of geometries and you draw a texture to replicate it to the screen.

If you have a look at our samples (XNA for example) we have created some helpers to help you create rectangle, circle and ellipse shape textures. The samples shows you how to use them too.