com.io7m.r2.core

## Class R2Matrices

- java.lang.Object
- - com.io7m.r2.core.R2Matrices

- All Implemented Interfaces:
    R2MatricesType, R2MatricesValuesType

      public final class R2Matrices
      extends Object
      implements R2MatricesType

  Default implementation of the `R2MatricesType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static R2MatricesType` | `newMatrices()`
    `R2TransformContextType` | `transformContext()`
    `<A,B> B` | `withObserver(com.io7m.jtensors.parameterized.PMatrixReadable4x4FType<R2SpaceWorldType,R2SpaceEyeType> view, R2ProjectionReadableType projection, A x, BiFunction<R2MatricesObserverType,A,B> f)` Evaluate matrices for the given observer.

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

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

- - ### Method Detail

    - #### newMatrices

          public static R2MatricesType newMatrices()

      Returns:
        New matrices

    - #### withObserver

          public <A,B> B withObserver(com.io7m.jtensors.parameterized.PMatrixReadable4x4FType<R2SpaceWorldType,R2SpaceEyeType> view,
                                      R2ProjectionReadableType projection,
                                      A x,
                                      BiFunction<R2MatricesObserverType,A,B> f)

      Description copied from interface: `R2MatricesType`
      Evaluate matrices for the given observer.
      Specified by:
        `withObserver` in interface `R2MatricesType`
      Type Parameters:
        `A` - The type of consumed values
        `B` - The type of returned values
      Parameters:
        `view` - The observer's view matrix
        `projection` - The observer's projection
        `x` - A context value passed to `f`
        `f` - The function that will receive the evaluated matrices
      Returns:
        A value of `B`

    - #### transformContext

          public R2TransformContextType transformContext()

      Specified by:
        `transformContext` in interface `R2MatricesValuesType`
      Returns:
        The transform context for the matrices

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