CPSC310A
Video Game Development

Activity 17

Spherical Linear Interpolation

Details

Add the following methods to the Quaternion class:

  1. Quaternion operator+(Quaternion q)

  2. Quaternion operator-(Quaternion q)

  3. Quaternion operator*(float f)

  4. float Quaternion::dot()

  5. void normalize()

  6. Quaternion Quaternion::slerp(Quaternion q1, Quaternion q2, double t)

Submission

Please show your source code and run your program for the instructor.