| 582 | } |
| 583 | |
| 584 | void BitStream::readCompressedPoint(Point3F* p,F32 scale) |
| 585 | { |
| 586 | // Same # of bits for all axis |
| 587 | U32 type = readInt(2); |
| 588 | |
| 589 | if(type == 3) |
| 590 | { |
| 591 | read(&p->x); |
| 592 | read(&p->y); |
| 593 | read(&p->z); |
| 594 | } |
| 595 | else |
| 596 | { |
| 597 | type = gBitCounts[type]; |
| 598 | p->x = (F32)readSignedInt(type); |
| 599 | p->y = (F32)readSignedInt(type); |
| 600 | p->z = (F32)readSignedInt(type); |
| 601 | |
| 602 | p->x = mCompressPoint.x + p->x * scale; |
| 603 | p->y = mCompressPoint.y + p->y * scale; |
| 604 | p->z = mCompressPoint.z + p->z * scale; |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | //------------------------------------------------------------------------------ |
| 609 |
no test coverage detected