Vector3Refract method

  1. @override
Vector3D Vector3Refract(
  1. Vector3D v,
  2. Vector3D n,
  3. double r
)
override

Compute the direction of a refracted ray v: normalized direction of the incoming ray n: normalized normal vector of the interface of two optical media r: ratio of the refractive index of the medium from where the ray comes to the refractive index of the medium on the other side of the surface

Implementation

@override
Vector3D Vector3Refract(
  Vector3D v,
  Vector3D n,
  double r,
) => $.Vector3$.Extract3(
  (p) => _ffi.Vector3Refract(
    $.Vector3$.Ref1(v).asNativePointer<Vector3C>().ref,
    $.Vector3$.Ref2(n).asNativePointer<Vector3C>().ref,
    r,
  ).toDart(p.asNativePointer()),
);