| 639 | } |
| 640 | |
| 641 | void BitStream::readCompressedPoint(Point3F* p,F32 scale) |
| 642 | { |
| 643 | // Same # of bits for all axis |
| 644 | U32 type = readInt(2); |
| 645 | |
| 646 | if(type == 3) |
| 647 | { |
| 648 | read(&p->x); |
| 649 | read(&p->y); |
| 650 | read(&p->z); |
| 651 | } |
| 652 | else |
| 653 | { |
| 654 | type = gBitCounts[type]; |
| 655 | p->x = (F32)readSignedInt(type); |
| 656 | p->y = (F32)readSignedInt(type); |
| 657 | p->z = (F32)readSignedInt(type); |
| 658 | |
| 659 | p->x = mCompressPoint.x + p->x * scale; |
| 660 | p->y = mCompressPoint.y + p->y * scale; |
| 661 | p->z = mCompressPoint.z + p->z * scale; |
| 662 | } |
| 663 | } |
| 664 | |
| 665 | //------------------------------------------------------------------------------ |
| 666 |
no test coverage detected