I'm currently writing a library that abstracts 3D rendering and uses SharpDX and OpenTK as graphics libraries. The problem is that OpenTK and SharpDX have their own implementations of Vector2, Matrix, Quaternion and so on.
I came up with 3 possible ways to deal with this.
My API has to have function overloads for both math types. If I want to extend the basic rendering code with more higher level features (like a Transform class that handles position, rotation and scale) I need to either favor one over the other or provide code for both math types which is not optimal.
Roll my own math type that allows conversions between the SharpDX and OpenTK types. Not optimal either since the math code was already written twice I shouldn't invent the wheel again.
Flat out use only one on the API level and convert only if needed. With this approach I would bind myself to one library which means if I only ever want to use the OpenTK renderer but the API is using the SharpDX math types I still need to have the SharpDX library around without ever using the "graphics" part of it.
I feel like option 2. would result in the nicest usage code but is the most work required. I'm looking for possible solutions to this problem other then the 3 options I have mentioned above.