Browse Source

DebugTools: there are no binormals, only bitangents.

There's just one normal, but several tangents, so.
pull/430/head
Vladimír Vondruš 6 years ago
parent
commit
a4020e3dbc
  1. 6
      src/Magnum/DebugTools/Implementation/ForceRendererTransformation.h

6
src/Magnum/DebugTools/Implementation/ForceRendererTransformation.h

@ -57,11 +57,11 @@ template<> Matrix4 forceRendererTransformation<3>(const Vector3& forcePosition,
const Vector3 normal = Math::cross(Vector3::xAxis(), force).normalized();
/* Third base vector, orthogonal to force and normal */
const Vector3 binormal = Math::cross(normal, force/forceLength);
CORRADE_INTERNAL_ASSERT(binormal.isNormalized());
const Vector3 bitangent = Math::cross(normal, force/forceLength);
CORRADE_INTERNAL_ASSERT(bitangent.isNormalized());
/* Transformation matrix from scaled base vectors and translation vector */
return Matrix4::from({force, normal*forceLength, binormal*forceLength}, forcePosition);
return Matrix4::from({force, normal*forceLength, bitangent*forceLength}, forcePosition);
}
}}}

Loading…
Cancel
Save