integrateAtShot method

  1. @override
BcInterception integrateAtShot(
  1. BcShot shot,
  2. BcBaseTrajInterpKey key,
  3. double targetValue
)
override

Implementation

@override
BcInterception integrateAtShot(
  BcShot shot,
  BcBaseTrajInterpKey key,
  double targetValue,
) => using((arena) {
  final p = arena<BCLIBCFFI_Shot>();
  final out = arena<BCLIBCFFI_Interception>();
  final err = arena<BCLIBCFFI_Error>();
  shot._fill(p.ref, arena);
  final st = _b.BCLIBCFFI_integrate_at_shot(
    p,
    key.value,
    targetValue,
    out,
    err,
  );
  if (st != 0) _throwFromError(err.ref);
  return BcInterception(
    _baseTrajFromNative(out.ref.raw_data),
    _trajDataFromNative(out.ref.full_data),
  );
});