Making the transition from XNA to dependency free

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Spankenstein
Posts: 249
Joined: Wed Nov 17, 2010 1:49 pm

Making the transition from XNA to dependency free

Post by Spankenstein »

I've encountered a couple of issues in the transition from XNA to dependency free BEPU.

- TriangleMesh.GetVerticesAndIndicesFromModel(Model model, out Vector3[] vertices, out int[] indices) no longer exists.
- Assembly generation -- Referenced assembly 'BEPUphysics.dll' targets a different processor

What is the current method for the first issue and why am I encountering the second issue?

I'm using the latest dependency free version found here: http://bepuphysics.codeplex.com/SourceC ... changesets

EDIT:

There are also some missing methods for Vector3 such as Transform and TransformNormal.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Making the transition from XNA to dependency free

Post by Norbo »

- TriangleMesh.GetVerticesAndIndicesFromModel(Model model, out Vector3[] vertices, out int[] indices) no longer exists.
It's now in the BEPUphysicsDemos in the ModelDataExtractor static class since the main library can't use XNA.
- Assembly generation -- Referenced assembly 'BEPUphysics.dll' targets a different processor
BEPUphysics should be compiled in a way compatible with the application. That is, if your application is x86, then BEPUphysics should be compiled with x86 or Any CPU, as opposed to x64.
There are also some missing methods for Vector3 such as Transform and TransformNormal.
Those functions now belong to the transforms. Instead of Vector3.Transform with lots of overloads, there's Quaternion.Transform, Matrix3x3.Transform, and Matrix.Transform. The new organization has one-way dependency, making it consistent with the blender-BEPUik C++ port.
Spankenstein
Posts: 249
Joined: Wed Nov 17, 2010 1:49 pm

Re: Making the transition from XNA to dependency free

Post by Spankenstein »

Excellent stuff, thank you Norbo. It all works perfectly now :)

Asides from the abundance of MathConverter.Convert methods it was a relatively painless transition!
Post Reply