inline uint32_t EncodeMorton3( const SFVEC3F &v )
{
    wxASSERT( v.x >= 0 && v.x <= (1 << 10) );
    wxASSERT( v.y >= 0 && v.y <= (1 << 10) );
    wxASSERT( v.z >= 0 && v.z <= (1 << 10) );

    return (LeftShift3(v.z) << 2) | (LeftShift3(v.y) << 1) | LeftShift3(v.x);
}
Beispiel #2
0
inline uint32_t EncodeMorton3(const Vector3f &v) {
    Assert(v.x >= 0 && v.x <= (1 << 10));
    Assert(v.y >= 0 && v.y <= (1 << 10));
    Assert(v.z >= 0 && v.z <= (1 << 10));
    return (LeftShift3(v.z) << 2) | (LeftShift3(v.y) << 1) | LeftShift3(v.x);
}