BSNS102 Study Guide - Final Guide: Rigid Transformation

68 views4 pages

Document Summary

Chapter 11: transformations in c++ r. m33 = a. m31*b. m13 + a. m32*b. m23 + a. m33*b. m33; // compute the translation portion r. tx = a. tx*b. m11 + a. ty*b. m21 + a. tz*b. m31 + b. tx; r. ty = a. tx*b. m12 + a. ty*b. m22 + a. tz*b. m32 + b. ty; r. tz = a. tx*b. m13 + a. ty*b. m23 + a. tz*b. m33 + b. tz; // is critical, we may need a separate function which places the. Matrix4 3 &operator*=(matrix4 3 &a, const matrix4 3 &b) { a = a * b; return a; // determinant c// compute the determinant of the 3 3 portion of the matrix. // see 9. 1. 1 for more info. float determinant(const matrix4 3 &m) { return m. m11 * (m. m22*m. m33 - m. m23*m. m32) // compute the determinant float det = determinant(m); // if we"re singular, then the determinant is zero and there"s. // compute one over the determinant, so we divide once and. // can *multiply* per element float oneoverdet = 1. 0f / det; // compute the 3 3 portion of the inverse, by.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers