| 460 | } |
| 461 | |
| 462 | void BitStream::readVector( Point3F *outVec, F32 maxMag, S32 magBits, S32 normalBits ) |
| 463 | { |
| 464 | // Nothing more to do if we got a zero length vector. |
| 465 | if ( !readFlag() ) |
| 466 | { |
| 467 | outVec->set(0,0,0); |
| 468 | return; |
| 469 | } |
| 470 | |
| 471 | // Read the compressed or uncompressed magnitude. |
| 472 | F32 mag; |
| 473 | if ( readFlag() ) |
| 474 | mag = readFloat( magBits ) * maxMag; |
| 475 | else |
| 476 | read( &mag ); |
| 477 | |
| 478 | // Finally read the normal and reconstruct the vector. |
| 479 | readNormalVector( outVec, normalBits ); |
| 480 | *outVec *= mag; |
| 481 | } |
| 482 | |
| 483 | void BitStream::writeAffineTransform(const MatrixF& matrix) |
| 484 | { |
no test coverage detected