com.io7m.r2.core

## Class R2DepthInstances

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

- All Implemented Interfaces:
    R2DepthInstancesType

      public final class R2DepthInstances
      extends Object
      implements R2DepthInstancesType

  Default implementation of the `R2DepthInstancesType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<M> void` | `depthsAddBatchedInstance(R2InstanceBatchedType i, R2MaterialDepthBatchedType<M> m)` Add a batched instance to the scene using the given material, in group `1`.
    `<M> void` | `depthsAddSingleInstance(R2InstanceSingleType i, R2MaterialDepthSingleType<M> m)` Add a single instance to the scene using the given material, in group `1`.
    `long` | `depthsCount()`
    `void` | `depthsExecute(R2DepthInstancesConsumerType c)` Batch the instances and pass them to the given consumer for rendering.
    `com.io7m.jcanephora.core.JCGLFaceSelection` | `depthsGetFaceCulling()`
    `void` | `depthsReset()` Remove all instances from the scene.
    `void` | `depthsSetFaceCulling(com.io7m.jcanephora.core.JCGLFaceSelection f)` Set which faces will be culled for the rendered instances.
    `static R2DepthInstancesType` | `newDepthInstances()`

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

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

- - ### Method Detail

    - #### newDepthInstances

          public static R2DepthInstancesType newDepthInstances()

      Returns:
        A new empty set of depth instances

    - #### depthsSetFaceCulling

          public void depthsSetFaceCulling(com.io7m.jcanephora.core.JCGLFaceSelection f)

      Description copied from interface: `R2DepthInstancesType`
      Set which faces will be culled for the rendered instances. The default if none are specified is `JCGLFaceSelection.FACE_BACK`.
      Specified by:
        `depthsSetFaceCulling` in interface `R2DepthInstancesType`
      Parameters:
        `f` - The faces to be culled

    - #### depthsGetFaceCulling

          public com.io7m.jcanephora.core.JCGLFaceSelection depthsGetFaceCulling()

      Specified by:
        `depthsGetFaceCulling` in interface `R2DepthInstancesType`
      Returns:
        The faces to be culled during rendering
      See Also:
        `R2DepthInstancesType.depthsSetFaceCulling(JCGLFaceSelection)`

    - #### depthsReset

          public void depthsReset()

      Description copied from interface: `R2DepthInstancesType`
      Remove all instances from the scene.
      Specified by:
        `depthsReset` in interface `R2DepthInstancesType`

    - #### depthsAddSingleInstance

          public <M> void depthsAddSingleInstance(R2InstanceSingleType i,
                                                  R2MaterialDepthSingleType<M> m)

      Description copied from interface: `R2DepthInstancesType`
      Add a single instance to the scene using the given material, in group `1`.
      Specified by:
        `depthsAddSingleInstance` in interface `R2DepthInstancesType`
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `i` - The instance
        `m` - The material

    - #### depthsAddBatchedInstance

          public <M> void depthsAddBatchedInstance(R2InstanceBatchedType i,
                                                   R2MaterialDepthBatchedType<M> m)

      Description copied from interface: `R2DepthInstancesType`
      Add a batched instance to the scene using the given material, in group `1`.
      Specified by:
        `depthsAddBatchedInstance` in interface `R2DepthInstancesType`
      Type Parameters:
        `M` - The type of shader parameters
      Parameters:
        `i` - The instance
        `m` - The material

    - #### depthsExecute

          public void depthsExecute(R2DepthInstancesConsumerType c)

      Description copied from interface: `R2DepthInstancesType`
      Batch the instances and pass them to the given consumer for rendering.
      Specified by:
        `depthsExecute` in interface `R2DepthInstancesType`
      Parameters:
        `c` - The consumer

    - #### depthsCount

          public long depthsCount()

      Specified by:
        `depthsCount` in interface `R2DepthInstancesType`
      Returns:
        The number of instances in the scene

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