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

Method readNormalVector

Engine/source/core/stream/bitStream.cpp:420–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420void BitStream::readNormalVector(Point3F *vec, S32 bitCount)
421{
422 F32 phi = readSignedFloat(bitCount+1) * M_PI;
423 F32 theta = readSignedFloat(bitCount) * (M_PI/2.0);
424
425 vec->x = mSin(phi)*mCos(theta);
426 vec->y = mCos(phi)*mCos(theta);
427 vec->z = mSin(theta);
428}
429
430Point3F BitStream::dumbDownNormal(const Point3F& vec, S32 bitCount)
431{

Callers 6

unpackUpdateMethod · 0.80
dumbDownNormalMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80
unpackUpdateMethod · 0.80

Calls 2

mSinFunction · 0.85
mCosFunction · 0.85

Tested by

no test coverage detected