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

Method readVector

Engine/source/core/stream/bitStream.cpp:462–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void BitStream::readVector( Point3F *outVec, F32 maxMag, S32 magBits, S32 normalBits )
463{
464 // Nothing more to do if we got a zero length vector.
465 if ( !readFlag() )
466 {
467 outVec->set(0,0,0);
468 return;
469 }
470
471 // Read the compressed or uncompressed magnitude.
472 F32 mag;
473 if ( readFlag() )
474 mag = readFloat( magBits ) * maxMag;
475 else
476 read( &mag );
477
478 // Finally read the normal and reconstruct the vector.
479 readNormalVector( outVec, normalBits );
480 *outVec *= mag;
481}
482
483void BitStream::writeAffineTransform(const MatrixF& matrix)
484{

Callers 1

unpackUpdateMethod · 0.80

Calls 2

readFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected