phrack / ShootOFF-legacy

An open source framework to enhance laser dry fire training.
BSD 4-Clause "Original" or "Old" License
30 stars 17 forks source link

The training protocols API needs a method to return the centroid of a named target. #51

Closed phrack closed 10 years ago

phrack commented 10 years ago

Training protocol passes in a target name and gets back the coords of the target's centroid.

Use case talked about here: https://github.com/phrack/ShootOFF/pull/46#issuecomment-29207016

This should offer two modes:

  1. LARGEST_REGION = calculate the centroid of the target based on the largest region. This is useful for targets with stacked regions like a bullseye.
  2. BOUNDING_BOX = calculate the centroid of the target based on the bounding box for all regions. This is useful for targets where regions are not stacked, such as the 5 small bullseyes target.

LARGEST_REGION should be the default.