Calculator class
Constructors
- Calculator({BcIntegrationMethod method = BcIntegrationMethod.rk4, BcConfig? config})
- Calculator.withEngine(BcEngine engine, {BcIntegrationMethod method = BcIntegrationMethod.rk4, BcConfig? config})
- Wraps an already-open BcEngine instead of opening the native library.
Properties
- config → BcConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- method → BcIntegrationMethod
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
barrelElevationForTarget(
Shot shot, Distance targetDistance) → Angular -
Returns the barrel elevation (relative to look-angle) needed to hit
a target at
targetDistance. -
fire(
{required Shot shot, required Distance trajectoryRange, Distance? trajectoryStep, double timeStep = 0.0, int filterFlags = 8, bool raiseRangeError = true}) → HitResult - Fires a shot and returns the full trajectory as a HitResult.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setWeaponZero(
Shot shot, Distance zeroDistance) → Angular -
Zeros the weapon by storing the required barrel elevation in
Weapon.zeroElevation and resetting
shot.relativeAngleto zero. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited