org.firstinspires.ftc.robotcore.external.navigation

## Class VuforiaBase

- java.lang.Object
- - org.firstinspires.ftc.robotcore.external.navigation.VuforiaBase

- Direct Known Subclasses:
    VuforiaRelicRecovery, VuforiaRoverRuckus

      public abstract class VuforiaBase
      extends java.lang.Object

  An abstract base class that provides simplified access to Vuforia.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `VuforiaBase.TrackingResults`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static float` | `MM_FTC_FIELD_WIDTH`
    `static float` | `MM_PER_INCH`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `VuforiaBase(java.lang.String assetName, java.lang.String[] trackableNames, OpenGLMatrix[] locationsOnField)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` Activates all trackables, so that it is actively seeking their presence.
    `void` | `close()` Deactivates the trackables and cleans up.
    `static VuforiaLocalizer.Parameters` | `createParameters()`
    `void` | `deactivate()` Deactivates all trackables, causing it to no longer see their presence.
    `VuforiaBase.TrackingResults` | `emptyTrackingResults(java.lang.String name)`
    `protected VuforiaTrackableDefaultListener` | `getListener(java.lang.String name)`
    `VuforiaLocalizer` | `getVuforiaLocalizer()`
    `void` | `initialize(java.lang.String vuforiaLicenseKey, CameraName cameraName, java.lang.String webcamCalibrationFilename, boolean useExtendedTracking, boolean enableCameraMonitoring, VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback, float dx, float dy, float dz, float xAngle, float yAngle, float zAngle, boolean useCompetitionFieldTargetLocations)` Initializes Vuforia, with a CameraName.
    `void` | `initialize(java.lang.String vuforiaLicenseKey, VuforiaLocalizer.CameraDirection cameraDirection, boolean useExtendedTracking, boolean enableCameraMonitoring, VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback, float dx, float dy, float dz, float xAngle, float yAngle, float zAngle, boolean useCompetitionFieldTargetLocations)` Initializes Vuforia, with a CameraDirection.
    `java.lang.String` | `printTrackableNames()`
    `VuforiaBase.TrackingResults` | `track(java.lang.String name)` Returns the TrackingResults of the trackable with the given name.
    `VuforiaBase.TrackingResults` | `trackPose(java.lang.String name)` Returns the TrackingResults of the pose of the trackable with the given name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MM_PER_INCH

          public static final float MM_PER_INCH

      See Also:
        Constant Field Values

    - #### MM_FTC_FIELD_WIDTH

          public static final float MM_FTC_FIELD_WIDTH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VuforiaBase

          protected VuforiaBase(java.lang.String assetName,
                                java.lang.String[] trackableNames,
                                OpenGLMatrix[] locationsOnField)

  - ### Method Detail

    - #### initialize

          public void initialize(java.lang.String vuforiaLicenseKey,
                                 VuforiaLocalizer.CameraDirection cameraDirection,
                                 boolean useExtendedTracking,
                                 boolean enableCameraMonitoring,
                                 VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback,
                                 float dx,
                                 float dy,
                                 float dz,
                                 float xAngle,
                                 float yAngle,
                                 float zAngle,
                                 boolean useCompetitionFieldTargetLocations)

      Initializes Vuforia, with a CameraDirection.

    - #### initialize

          public void initialize(java.lang.String vuforiaLicenseKey,
                                 CameraName cameraName,
                                 java.lang.String webcamCalibrationFilename,
                                 boolean useExtendedTracking,
                                 boolean enableCameraMonitoring,
                                 VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback,
                                 float dx,
                                 float dy,
                                 float dz,
                                 float xAngle,
                                 float yAngle,
                                 float zAngle,
                                 boolean useCompetitionFieldTargetLocations)

      Initializes Vuforia, with a CameraName.

    - #### createParameters

          public static VuforiaLocalizer.Parameters createParameters()

    - #### getVuforiaLocalizer

          public VuforiaLocalizer getVuforiaLocalizer()

    - #### activate

          public void activate()

      Activates all trackables, so that it is actively seeking their presence.
      Throws:
        `java.lang.IllegalStateException` - if initialized has not been called yet.

    - #### deactivate

          public void deactivate()

      Deactivates all trackables, causing it to no longer see their presence.
      Throws:
        `java.lang.IllegalStateException` - if initialized has not been called yet.

    - #### track

          public VuforiaBase.TrackingResults track(java.lang.String name)

      Returns the TrackingResults of the trackable with the given name.
      Throws:
        `java.lang.IllegalStateException` - if initialized has not been called yet.
        `java.lang.IllegalArgumentException` - if name is not the name of a trackable.

    - #### trackPose

          public VuforiaBase.TrackingResults trackPose(java.lang.String name)

      Returns the TrackingResults of the pose of the trackable with the given name. The pose is the location of the trackable in the phone's coordinate system.
      Throws:
        `java.lang.IllegalStateException` - if initialized has not been called yet.
        `java.lang.IllegalArgumentException` - if name is not the name of a trackable.

    - #### emptyTrackingResults

          public VuforiaBase.TrackingResults emptyTrackingResults(java.lang.String name)

    - #### getListener

          protected VuforiaTrackableDefaultListener getListener(java.lang.String name)

    - #### close

          public void close()

      Deactivates the trackables and cleans up.

    - #### printTrackableNames

          public java.lang.String printTrackableNames()