Panda3D has a number of vector, matrix, and quaternion operations built-in. The relevant classes are:
WRITE ME