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

Method readNormalVector

Engine/source/core/stream/bitStream.cpp:390–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void BitStream::readNormalVector(Point3F *vec, S32 bitCount)
391{
392 F32 phi = readSignedFloat(bitCount+1) * M_PI;
393 F32 theta = readSignedFloat(bitCount) * (M_PI/2.0);
394
395 vec->x = mSin(phi)*mCos(theta);
396 vec->y = mCos(phi)*mCos(theta);
397 vec->z = mSin(theta);
398}
399
400Point3F BitStream::dumbDownNormal(const Point3F& vec, S32 bitCount)
401{

Callers 5

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