Hello everybody.
I used BulletSharp which has really nice feature - it can be compiled with OpenTK math classes instead of using its own. It allows for really good integration because it makes unnecessary casting and explict converstions just disappear.
However, I haven't found similar option in BEPU physics, as it seems to use its own math classes from BEPUutilities. Those classes differ a bit from that which OpenTK use, so replacing won't work here.
My question is: Is it possible, or maybe someone managed to do it, to compile BEPU against OpenTK so it can share math classes?
Thank you, best regards.
Using BEPU with OpenTK
Re: Using BEPU with OpenTK
There's no automatic way to do it, unfortunately. I used to maintain some forks for different math libraries, but it becomes an enormous hassle when there isn't a perfect mapping.
One of the easier approaches to ease the transition is to use implicit conversions, like the OpenTK fork does. You could do something similar, but based on the more recent development version.
You still end up paying the small performance tax for doing the conversion, but it can get rid of a lot of the developmental annoyances.
Notably, there's a good chance BEPUphysics will eventually move to the SIMD types once they get solidified. My guess is a lot of other libraries will do the same, so this issue will be mitigated somewhat.
One of the easier approaches to ease the transition is to use implicit conversions, like the OpenTK fork does. You could do something similar, but based on the more recent development version.
You still end up paying the small performance tax for doing the conversion, but it can get rid of a lot of the developmental annoyances.
Notably, there's a good chance BEPUphysics will eventually move to the SIMD types once they get solidified. My guess is a lot of other libraries will do the same, so this issue will be mitigated somewhat.
-
- Posts: 4
- Joined: Thu Jan 29, 2015 7:04 pm
Re: Using BEPU with OpenTK
I actually switched from BulletSharp to BEPU original in less than 2 hours today and it works great! I added some implict conversion operators for Vectors, Quaternion and Matrix and this library is great.Norbo wrote:There's no automatic way to do it, unfortunately. I used to maintain some forks for different math libraries, but it becomes an enormous hassle when there isn't a perfect mapping.
One of the easier approaches to ease the transition is to use implicit conversions, like the OpenTK fork does. You could do something similar, but based on the more recent development version.
You still end up paying the small performance tax for doing the conversion, but it can get rid of a lot of the developmental annoyances.
Notably, there's a good chance BEPUphysics will eventually move to the SIMD types once they get solidified. My guess is a lot of other libraries will do the same, so this issue will be mitigated somewhat.
It's far more straightforward to use than bullet too
Re: Using BEPU with OpenTK
Glad it's working for you!