com.io7m.r2.core

## Class R2Stencils

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

-     public final class R2Stencils
      extends Object

  Stencil values.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ALLOW_BIT` Only pixels with a corresponding stencil value that contains the `ALLOW_BIT` are touched by rendering operations.
    `static int` | `GROUP_BITS` The bits used to store group values.
    `static int` | `GROUP_LEFT_SHIFT` The left shift used to store group values;
    `static int` | `LIGHT_MASK_BIT` The stencil bit used to mask the contributions of lights.
    `static int` | `MAXIMUM_GROUPS` The maximum number of groups in a scene.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `checkValidGroup(int x)` Check that `x` is a valid group number.
    `static boolean` | `isValidGroup(int x)`

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

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

- - ### Field Detail

    - #### ALLOW_BIT

          public static final int ALLOW_BIT

      Only pixels with a corresponding stencil value that contains the `ALLOW_BIT` are touched by rendering operations.
      See Also:
        Constant Field Values

    - #### LIGHT_MASK_BIT

          public static final int LIGHT_MASK_BIT

      The stencil bit used to mask the contributions of lights.
      See Also:
        Constant Field Values

    - #### GROUP_BITS

          public static final int GROUP_BITS

      The bits used to store group values.
      See Also:
        Constant Field Values

    - #### GROUP_LEFT_SHIFT

          public static final int GROUP_LEFT_SHIFT

      The left shift used to store group values;
      See Also:
        Constant Field Values

    - #### MAXIMUM_GROUPS

          public static final int MAXIMUM_GROUPS

      The maximum number of groups in a scene.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### isValidGroup

          public static boolean isValidGroup(int x)

      Parameters:
        `x` - The group value
      Returns:
        `true` iff the given value is a valid stencil group value

    - #### checkValidGroup

          public static int checkValidGroup(int x)
                                     throws R2ExceptionInvalidGroup

      Check that `x` is a valid group number.
      Parameters:
        `x` - The group number
      Returns:
        `x`
      Throws:
        `R2ExceptionInvalidGroup` - Iff `x` is not valid

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