| 409 | } |
| 410 | |
| 411 | void BitStream::writeNormalVector(const Point3F& vec, S32 bitCount) |
| 412 | { |
| 413 | F32 phi = mAtan2(vec.x, vec.y) / M_PI; |
| 414 | F32 theta = mAtan2(vec.z, mSqrt(vec.x*vec.x + vec.y*vec.y)) / (M_PI/2.0); |
| 415 | |
| 416 | writeSignedFloat(phi, bitCount+1); |
| 417 | writeSignedFloat(theta, bitCount); |
| 418 | } |
| 419 | |
| 420 | void BitStream::readNormalVector(Point3F *vec, S32 bitCount) |
| 421 | { |
no test coverage detected