Non-member conversion functions; Casting different types, e.g. DirectX vector to OpenGL vector
问题 I am currently working on a game "engine" that needs to move values between a 3D engine, a physics engine and a scripting language. Since I need to apply vectors from the physics engine to 3D objects very often and want to be able to control both the 3D, as well as the physics objects through the scripting system, I need a mechanism to convert a vector of one type (e.g. vector3d<float> ) to a vector of the other type (e.g. btVector3 ). Unfortunately I can make no assumptions on how the