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

Method readCompressedPoint

Engine/source/core/stream/bitStream.cpp:584–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584void 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

Callers 9

readPacketDataMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 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