How do I use the Bepuphysicsdrawer .dll

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Dart
Posts: 5
Joined: Sun Apr 24, 2011 5:40 pm

How do I use the Bepuphysicsdrawer .dll

Post by Dart »

I found it in the demo on the site. But I can't find any example of how to use it.

How do I set it up?

Any help would be great. (Also, Bepu has been an awesome engine so far. So glad I found it.)
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: How do I use the Bepuphysicsdrawer .dll

Post by Norbo »

The BEPUphysicsDemos source (in the main source code http://bepuphysics.codeplex.com/SourceC ... changesets) shows an example of how the drawer is intregrated.

Basically, you create a ModelDrawer (ModelDrawer itself is abstract, you'll have to create either an InstancedModelDrawer or a BruteModelDrawer depending on the capabilities of the platform). Then, add the objects that you want drawn (and that can be drawn by the model drawer) to the ModelDrawer. Update the ModelDrawer in your update method, and Draw it in the draw method.
Dart
Posts: 5
Joined: Sun Apr 24, 2011 5:40 pm

Re: How do I use the Bepuphysicsdrawer .dll

Post by Dart »

Thank you so much! Works better/easier than I thought.
Post Reply