lullaby/tools/model_pipeline/import_fbx.cc
// Generates a unit vector (+ handedness) orthogonal to the given normal.
Generates a unit vector (+ handedness) orthogonal to the given normal.
Generates a unit vector ( + handedness ) orthogonal to the given normal .
static mathfu::vec4 GenerateTangentFbx(const mathfu::vec3& normal) {
  const mathfu::vec3 axis =
      (std::fabs(mathfu::dot(normal, mathfu::kAxisX3f)) < 0.99f)
          ? mathfu::kAxisX3f
          : mathfu::kAxisY3f;
  return mathfu::vec4(mathfu::normalize(mathfu::cross(normal, axis)), 1.f);
}
static mathfu :: vec4 GenerateTangentFbx ( const mathfu :: vec3 & normal ) { const mathfu :: vec3 axis = ( std :: fabs ( mathfu :: dot ( normal , mathfu :: kAxisX3f ) ) < 0.99f ) ? mathfu :: kAxisX3f : mathfu :: kAxisY3f ; return mathfu :: vec4 ( mathfu :: normalize ( mathfu :: cross ( normal , axis ) ) , 1.f ) ; }
Generates a unit vector (+ handedness) orthogonal to the given normal.
Generates a unit vector ( + handedness ) orthogonal to the given normal .