com.io7m.jcamera

## Class JCameraSphericalMouseRegion

- java.lang.Object
- - com.io7m.jcamera.JCameraSphericalMouseRegion

-     @EqualityReference
      public final class JCameraSphericalMouseRegion
      extends Object

  An immutable rectangular region that maps mouse positions to movements.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `getCenterX()`
    `float` | `getCenterY()`
    `float` | `getHeight()`
    `JCameraScreenOrigin` | `getOrigin()`
    `void` | `getPosition(float x, float y, com.io7m.jtensors.VectorWritable2FType out)` Get the normalized coordinates for the given screen coordinates `(x, y)`.
    `float` | `getWidth()`
    `static JCameraSphericalMouseRegion` | `newRegion(JCameraScreenOrigin in_origin, float in_width, float in_height)` Construct a new mouse region.

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

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

- - ### Method Detail

    - #### newRegion

          public static JCameraSphericalMouseRegion newRegion(JCameraScreenOrigin in_origin,
                                                              float in_width,
                                                              float in_height)

      Construct a new mouse region.
      Parameters:
        `in_origin` - The screen origin.
        `in_width` - The region width.
        `in_height` - The region height.
      Returns:
        A new mouse region.

    - #### getCenterX

          public float getCenterX()

      Returns:
        The X coordinate of the center of the region

    - #### getCenterY

          public float getCenterY()

      Returns:
        The Y coordinate of the center of the region

    - #### getPosition

          public void getPosition(float x,
                                  float y,
                                  com.io7m.jtensors.VectorWritable2FType out)

      Get the normalized coordinates for the given screen coordinates `(x, y)`.
      Parameters:
        `x` - The x coordinate
        `y` - The y coordinate
        `out` - The output vector

    - #### getHeight

          public float getHeight()

      Returns:
        The height of the region

    - #### getOrigin

          public JCameraScreenOrigin getOrigin()

      Returns:
        The current screen origin

    - #### getWidth

          public float getWidth()

      Returns:
        The width of the region

Copyright © 2016 <code@io7m.com> http://io7m.com