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

Method writeNormalVector

Engine/source/core/stream/bitStream.cpp:381–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381void BitStream::writeNormalVector(const Point3F& vec, S32 bitCount)
382{
383 F32 phi = mAtan2(vec.x, vec.y) / M_PI;
384 F32 theta = mAtan2(vec.z, mSqrt(vec.x*vec.x + vec.y*vec.y)) / (M_PI/2.0);
385
386 writeSignedFloat(phi, bitCount+1);
387 writeSignedFloat(theta, bitCount);
388}
389
390void BitStream::readNormalVector(Point3F *vec, S32 bitCount)
391{

Callers 5

dumbDownNormalMethod · 0.80
packUpdateMethod · 0.80
packUpdateMethod · 0.80
packUpdateMethod · 0.80
packUpdateMethod · 0.80

Calls 2

mAtan2Function · 0.85
mSqrtFunction · 0.85

Tested by

no test coverage detected