| 379 | } |
| 380 | |
| 381 | void 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 | |
| 390 | void BitStream::readNormalVector(Point3F *vec, S32 bitCount) |
| 391 | { |
no test coverage detected