public class HitCalculations
extends java.lang.Object
TargetRestrictions, ShootingRestrictions
Constructor and Description |
---|
HitCalculations() |
Modifier and Type | Method and Description |
---|---|
ShootingRestrictions |
getShootingRestrictions() |
TargetRestrictions |
getTargetRestrictions() |
boolean |
hitTheDestination(double srcAzimuth,
Device srcDevice,
Device dstDevice)
Verify if the srcDevice hit the dstDevice by attributes default defined in
ShootingRestrictions and TargetRestrictions |
boolean |
hitTheDestination(double srcAzimuth,
Device srcDevice,
Device dstDevice,
Device virtualTarget)
Verify if the srcDevice hit the dstDevice by opening angle of shoot defined in
ShootingRestrictions |
boolean |
hitTheDestinationByOpeningAngleOfShoot(double srcAzimuth,
Device srcDevice,
Device dstDevice)
Verify if the srcDevice hit the dstDevice by opening angle of shoot defined in
ShootingRestrictions |
boolean |
hitTheDestinationByOpeningAngleOfShoot(double srcAzimuth,
Device srcDevice,
Device dstDevice,
double openingAngleShoot)
Verify if the srcDevice hit the dstDevice by opening angle of shoot
|
boolean |
hitTheDestinationByRadiusRange(double srcAzimuth,
Device srcDevice,
Device dstDevice)
Verify if the srcDevice hit the dstDevice with a radius defined by default
|
boolean |
hitTheDestinationByRadiusRange(double srcAzimuth,
Device srcDevice,
Device dstDevice,
Device virtualTarget)
Verify if the srcDevice hit the dstDevice with a radius defined by default
|
boolean |
hitTheDestinationByRadiusRange(double srcAzimuth,
Device srcDevice,
Device dstDevice,
Device virtualTarget,
double radiusRange)
Verify if the srcDevice hit the dstDevice with a radius range
|
boolean |
isValidTheDistanceBetweenDevices(Device srcDevice,
Device dstDevice)
Verify if the distance between srcDevice and dstDevice is less then the maximum distance defined in
ShootingRestrictions |
boolean |
isValidTheDistanceBetweenDevices(Device srcDevice,
Device dstDevice,
double maximumDistanceSrcToDst)
Verify if the distance between srcDevice and dstDevice is less then the maximumDistanceSrcToDst
|
void |
setShootingRestrictions(ShootingRestrictions shootingRestrictions) |
void |
setTargetRestrictions(TargetRestrictions targetRestrictions) |
public TargetRestrictions getTargetRestrictions()
public void setTargetRestrictions(TargetRestrictions targetRestrictions)
public ShootingRestrictions getShootingRestrictions()
public void setShootingRestrictions(ShootingRestrictions shootingRestrictions)
public boolean isValidTheDistanceBetweenDevices(Device srcDevice, Device dstDevice, double maximumDistanceSrcToDst)
srcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullmaximumDistanceSrcToDst
- maximum distance from source to destination in meterspublic boolean isValidTheDistanceBetweenDevices(Device srcDevice, Device dstDevice)
ShootingRestrictions
srcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullShootingRestrictions
public boolean hitTheDestinationByRadiusRange(double srcAzimuth, Device srcDevice, Device dstDevice, Device virtualTarget, double radiusRange)
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullvirtualTarget
- Destination Device
returnedradiusRange
- meterspublic boolean hitTheDestinationByRadiusRange(double srcAzimuth, Device srcDevice, Device dstDevice, Device virtualTarget)
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullvirtualTarget
- Destination Device
returnedpublic boolean hitTheDestinationByRadiusRange(double srcAzimuth, Device srcDevice, Device dstDevice)
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullvirtualTarget
- Destination Device
returnedpublic boolean hitTheDestinationByOpeningAngleOfShoot(double srcAzimuth, Device srcDevice, Device dstDevice, double openingAngleShoot)
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullopeningAngleShoot
- degreepublic boolean hitTheDestinationByOpeningAngleOfShoot(double srcAzimuth, Device srcDevice, Device dstDevice)
ShootingRestrictions
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullShootingRestrictions
public boolean hitTheDestination(double srcAzimuth, Device srcDevice, Device dstDevice, Device virtualTarget)
ShootingRestrictions
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullvirtualTarget
- Destination Device
returnedShootingRestrictions
public boolean hitTheDestination(double srcAzimuth, Device srcDevice, Device dstDevice)
ShootingRestrictions
and TargetRestrictions
srcAzimuth
- degree by end range of shootsrcDevice
- Device
with DeviceLocation
not nulldstDevice
- Device
with DeviceLocation
not nullShootingRestrictions
and TargetRestrictions