pointToLocalFrame static method

Vec3 pointToLocalFrame(
  1. Vec3 position,
  2. Quaternion quaternion,
  3. Vec3 worldPoint, [
  4. Vec3? result,
])

Implementation

static Vec3 pointToLocalFrame(Vec3 position,Quaternion quaternion,Vec3 worldPoint, [Vec3? result]) {
  result ??= Vec3();
  worldPoint.vsub(position, result);
  final tmpQuat = Quaternion();
  quaternion.conjugate(tmpQuat);
  tmpQuat.vmult(result, result);
  return result;
}