| 498 | } |
| 499 | |
| 500 | void BitStream::readAffineTransform(MatrixF* matrix) |
| 501 | { |
| 502 | Point3F pos; |
| 503 | QuatF q; |
| 504 | |
| 505 | mathRead(*this, &pos); |
| 506 | read(&q.x); |
| 507 | read(&q.y); |
| 508 | read(&q.z); |
| 509 | q.w = mSqrt(1.0 - getMin(F32(((q.x * q.x) + (q.y * q.y) + (q.z * q.z))), 1.f)); |
| 510 | if (readFlag()) |
| 511 | q.w = -q.w; |
| 512 | |
| 513 | q.setMatrix(matrix); |
| 514 | matrix->setColumn(3, pos); |
| 515 | // AssertFatal(matrix->isAffine() == true, |
| 516 | // "BitStream::readAffineTransform: Error, transform should be affine after this function!"); |
| 517 | } |
| 518 | |
| 519 | void BitStream::writeQuat( const QuatF& quat, U32 bitCount ) |
| 520 | { |
no test coverage detected