// Adds a bounding box game object into the AR world private GameObject GetNewBoundingBoxForClassification(ObjectClassification classification, Vector3 position, float distancePerPixel) { var boundingBox = Instantiate(placedPrefab, position, cameraManager.transform.rotation); boundingBox.cameraManager = cameraManager; boundingBox.SetWidth(classification.box.Size().x *distancePerPixel / LabeledBoundingBoxScale / RectangleScale); boundingBox.SetHeight(classification.box.Size().y *distancePerPixel / LabeledBoundingBoxScale / RectangleScale); boundingBox.SetColor(BoxColors.ColorForItemLabel(classification.label) ?? Color.black); boundingBox.SetLabel(classification.label); boundingBox.SetPredictionScore(classification.score); boundingBox.UpdatesRemaining = TransientBoxUpdateCount; return(boundingBox.gameObject); }
public Configuration(BoxColors boxColor) : this() { BoxColor = boxColor; }