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

Method readAffineTransform

Engine/source/core/stream/bitStream.cpp:470–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470void BitStream::readAffineTransform(MatrixF* matrix)
471{
472 Point3F pos;
473 QuatF q;
474
475 mathRead(*this, &pos);
476 read(&q.x);
477 read(&q.y);
478 read(&q.z);
479 q.w = mSqrt(1.0 - getMin(F32(((q.x * q.x) + (q.y * q.y) + (q.z * q.z))), 1.f));
480 if (readFlag())
481 q.w = -q.w;
482
483 q.setMatrix(matrix);
484 matrix->setColumn(3, pos);
485// AssertFatal(matrix->isAffine() == true,
486// "BitStream::readAffineTransform: Error, transform should be affine after this function!");
487}
488
489void BitStream::writeQuat( const QuatF& quat, U32 bitCount )
490{

Callers 14

unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackDataMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80

Calls 5

mathReadFunction · 0.85
mSqrtFunction · 0.85
setColumnMethod · 0.80
readFunction · 0.50
setMatrixMethod · 0.45

Tested by

no test coverage detected