Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 00455 ofVec3f ofQuaternion::operator*(const ofVec3f& v) const {
- 00456 // nVidia SDK implementation
- 00457 ofVec3f uv, uuv;
- 00458 ofVec3f qvec(_v.x, _v.y, _v.z);
- 00459 uv = qvec.getCrossed(v); //uv = qvec ^ v;
- 00460 uuv = qvec.getCrossed(uv); //uuv = qvec ^ uv;
- 00461 uv *= (2.0f * _v.w);
- 00462 uuv *= 2.0f;
- 00463 return v + uv + uuv;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement