com.io7m.r2.core

## Class R2LightProjectiveWithShadowVariance

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

- All Implemented Interfaces:
    R2LightProjectiveReadableType, R2LightProjectiveType, R2LightProjectiveUsableType, R2LightProjectiveWithShadowReadableType, R2LightProjectiveWithShadowType, R2LightProjectiveWithShadowVarianceType, R2LightProjectiveWithShadowWritableType, R2LightProjectiveWritableType, R2LightReadableType, R2LightSingleReadableType, R2LightSingleType, R2LightSingleWritableType, R2LightVolumeSingleReadableType, R2LightVolumeSingleType, R2LightVolumeSingleWritableType, R2LightWithShadowSingleType, R2LightWritableType

      public final class R2LightProjectiveWithShadowVariance
      extends Object
      implements R2LightProjectiveWithShadowVarianceType

  Parameters for simple projective lights that operate by rendering frustum meshes and that have variance shadows.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.io7m.jcanephora.core.JCGLArrayObjectUsableType` | `arrayObject()`
    `com.io7m.jtensors.parameterized.PVector3FType<R2SpaceRGBType>` | `color()`
    `com.io7m.jtensors.parameterized.PVector3FType<R2SpaceRGBType>` | `colorWritable()`
    `float` | `falloff()`
    `R2Texture2DUsableType` | `image()`
    `float` | `intensity()`
    `long` | `lightID()`
    `<A,B,E extends Throwable> B` | `matchLightWithShadow(A context, com.io7m.jfunctional.PartialBiFunctionType<A,R2LightProjectiveWithShadowType,B,E> on_project)` Match on the type of light.
    `static R2LightProjectiveWithShadowVarianceType` | `newLight(R2ProjectionMeshReadableType in_mesh, R2Texture2DUsableType in_image, R2ShadowDepthVarianceType in_shadow, R2IDPoolType in_pool)` Construct a new light.
    `com.io7m.jtensors.parameterized.PVectorReadable3FType<R2SpaceWorldType>` | `position()`
    `R2ProjectionReadableType` | `projection()`
    `float` | `radius()`
    `void` | `setFalloff(float f)` Set the light falloff exponent
    `void` | `setIntensity(float i)` Set the current light intensity
    `void` | `setRadius(float r)` Set the light radius in world-space units.
    `R2ShadowDepthVarianceType` | `shadow()`
    `R2TransformOTReadableType` | `transform()`
    `R2TransformOTType` | `transformWritable()`

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

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

    - ### Methods inherited from interface com.io7m.r2.core.R2LightProjectiveReadableType

      `matchLightVolumeSingleReadable, matchProjectiveReadable`

    - ### Methods inherited from interface com.io7m.r2.core.R2LightVolumeSingleType

      `matchLightSingle`

    - ### Methods inherited from interface com.io7m.r2.core.R2LightProjectiveWithShadowReadableType

      `matchProjectiveReadable`

- - ### Method Detail

    - #### newLight

          public static R2LightProjectiveWithShadowVarianceType newLight(R2ProjectionMeshReadableType in_mesh,
                                                                         R2Texture2DUsableType in_image,
                                                                         R2ShadowDepthVarianceType in_shadow,
                                                                         R2IDPoolType in_pool)

      Construct a new light.
      Parameters:
        `in_mesh` - The light projection mesh
        `in_image` - The image that will be projected by the light
        `in_shadow` - The shadow
        `in_pool` - The ID pool
      Returns:
        A new light

    - #### radius

          public float radius()

      Specified by:
        `radius` in interface `R2LightProjectiveReadableType`
      Returns:
        The light radius

    - #### setRadius

          public void setRadius(float r)

      Description copied from interface: `R2LightProjectiveWritableType`
      Set the light radius in world-space units.
      Specified by:
        `setRadius` in interface `R2LightProjectiveWritableType`
      Parameters:
        `r` - The light radius

    - #### transformWritable

          public R2TransformOTType transformWritable()

      Specified by:
        `transformWritable` in interface `R2LightProjectiveWritableType`
      Returns:
        The writable transform for the light origin

    - #### falloff

          public float falloff()

      Specified by:
        `falloff` in interface `R2LightProjectiveReadableType`
      Returns:
        The light falloff exponent

    - #### setFalloff

          public void setFalloff(float f)

      Description copied from interface: `R2LightProjectiveWritableType`
      Set the light falloff exponent
      Specified by:
        `setFalloff` in interface `R2LightProjectiveWritableType`
      Parameters:
        `f` - The light falloff

    - #### color

          public com.io7m.jtensors.parameterized.PVector3FType<R2SpaceRGBType> color()

      Specified by:
        `color` in interface `R2LightReadableType`
      Returns:
        The readable light color

    - #### intensity

          public float intensity()

      Specified by:
        `intensity` in interface `R2LightReadableType`
      Returns:
        The current light intensity

    - #### setIntensity

          public void setIntensity(float i)

      Description copied from interface: `R2LightWritableType`
      Set the current light intensity
      Specified by:
        `setIntensity` in interface `R2LightWritableType`
      Parameters:
        `i` - The intensity (typically `[0.0 .. 1.0]`)

    - #### colorWritable

          public com.io7m.jtensors.parameterized.PVector3FType<R2SpaceRGBType> colorWritable()

      Specified by:
        `colorWritable` in interface `R2LightWritableType`
      Returns:
        The readable/writable light color

    - #### arrayObject

          public com.io7m.jcanephora.core.JCGLArrayObjectUsableType arrayObject()

      Specified by:
        `arrayObject` in interface `R2LightSingleReadableType`
      Returns:
        The array object that will be used to render the light geometry

    - #### transform

          public R2TransformOTReadableType transform()

      Specified by:
        `transform` in interface `R2LightProjectiveReadableType`
      Specified by:
        `transform` in interface `R2LightSingleReadableType`
      Returns:
        The transform for the light origin

    - #### position

          public com.io7m.jtensors.parameterized.PVectorReadable3FType<R2SpaceWorldType> position()

      Specified by:
        `position` in interface `R2LightProjectiveReadableType`
      Returns:
        The position of the origin of the light in world-space

    - #### lightID

          public long lightID()

      Specified by:
        `lightID` in interface `R2LightReadableType`
      Returns:
        The unique light ID

    - #### projection

          public R2ProjectionReadableType projection()

      Specified by:
        `projection` in interface `R2LightProjectiveReadableType`
      Returns:
        The light's projection

    - #### image

          public R2Texture2DUsableType image()

      Specified by:
        `image` in interface `R2LightProjectiveReadableType`
      Returns:
        The image that will be projected from the light

    - #### shadow

          public R2ShadowDepthVarianceType shadow()

      Specified by:
        `shadow` in interface `R2LightProjectiveWithShadowVarianceType`
      Specified by:
        `shadow` in interface `R2LightWithShadowSingleType`
      Returns:
        The shadow for the light

    - #### matchLightWithShadow

          public <A,B,E extends Throwable> B matchLightWithShadow(A context,
                                                                  com.io7m.jfunctional.PartialBiFunctionType<A,R2LightProjectiveWithShadowType,B,E> on_project)
                                                           throws E extends Throwable

      Description copied from interface: `R2LightWithShadowSingleType`
      Match on the type of light.
      Specified by:
        `matchLightWithShadow` in interface `R2LightWithShadowSingleType`
      Type Parameters:
        `A` - The type of context values
        `B` - The type of returned values
        `E` - The type of raised exceptions
      Parameters:
        `context` - A context value
        `on_project` - Evaluated for projective lights
      Returns:
        A value of type `B`
      Throws:
        `E` - If any of the given functions raise `E`
        `E extends Throwable`

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