MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / readCompressedPoint

Method readCompressedPoint

Engine/source/core/stream/bitStream.cpp:641–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639}
640
641void 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

Callers 8

unpackUpdateMethod · 0.80
readPacketDataMethod · 0.80
readPacketDataMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80

Calls 1

readFunction · 0.50

Tested by

no test coverage detected