Advertisement
Guest User

Untitled

a guest
May 4th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. 00455 ofVec3f ofQuaternion::operator*(const ofVec3f& v) const {
  2. 00456 // nVidia SDK implementation
  3. 00457 ofVec3f uv, uuv;
  4. 00458 ofVec3f qvec(_v.x, _v.y, _v.z);
  5. 00459 uv = qvec.getCrossed(v); //uv = qvec ^ v;
  6. 00460 uuv = qvec.getCrossed(uv); //uuv = qvec ^ uv;
  7. 00461 uv *= (2.0f * _v.w);
  8. 00462 uuv *= 2.0f;
  9. 00463 return v + uv + uuv;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement