gram-schmitdt正交化
void gramSchmidtOrthogonalize( nv::vec3f& t, const nv::vec3f& b, const nv::vec3f& n ) { // Gram-Schmidt orthogonalize t = nv::normalize(t - n * nv::dot(n, t)); // Calculate handedness if ( nv::dot(nv::cross(n, t), b) < 0.0f ) t = t * -1.0f; }