| 430 | } |
| 431 | |
| 432 | void BitStream::readVector( Point3F *outVec, F32 maxMag, S32 magBits, S32 normalBits ) |
| 433 | { |
| 434 | // Nothing more to do if we got a zero length vector. |
| 435 | if ( !readFlag() ) |
| 436 | { |
| 437 | outVec->set(0,0,0); |
| 438 | return; |
| 439 | } |
| 440 | |
| 441 | // Read the compressed or uncompressed magnitude. |
| 442 | F32 mag; |
| 443 | if ( readFlag() ) |
| 444 | mag = readFloat( magBits ) * maxMag; |
| 445 | else |
| 446 | read( &mag ); |
| 447 | |
| 448 | // Finally read the normal and reconstruct the vector. |
| 449 | readNormalVector( outVec, normalBits ); |
| 450 | *outVec *= mag; |
| 451 | } |
| 452 | |
| 453 | void BitStream::writeAffineTransform(const MatrixF& matrix) |
| 454 | { |
no test coverage detected