Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.ray.physics
Class Environment

    java.lang.Object
      de.grogra.ray.physics.Environment

Direct Known Subclasses:
  ShadingEnvironment

    public class Environment

extends java.lang.Object

This class serves as input to scattering calculations. The fields together constitute the local environment at a surface, light or sensor point, including geometrical and optical properties.

Author:
  Ole Kniemeyer

Field Summary
`BoundingBox` | `bounds` The bounding box of all finite volumes of the scene in which this environment is used.
`Vector3d` | `boundsCenter` The center of `bounds`.
`double` | `boundsRadius` The radius of the bounding sphere whose center is located at `boundsCenter` and which encloses `bounds`.
`Vector3f` | `dpdu` The derivative of the global surface position with respect to the canonical u-coordinate.
`Vector3f` | `dpdv` The derivative of the global surface position with respect to the canonical v-coordinate.
`Matrix4f` | `globalToLocal` The transformation from global to local coordinates.
`float` | `iorRatio` The index-of-refraction ratio at the surface.
`Point3f` | `localPoint` The surface position in local coordinates of the object which defines the surface, light source, or sensor.
`Matrix4f` | `localToGlobal` The transformation from local to global coordinates.
`Vector3f` | `normal` The surface geometric normal unit vector at `point` in global world coordinates.
`static int` | `PATH_TRACER` Constant for `type` indicating a path tracer algorithm.
`Point3f` | `point` The surface position in global world coordinates.
`static int` | `RADIATION_MODEL` Constant for `type` indicating a radiation model algorithm.
`boolean` | `solid` Indicates whether this is an intersection at the surface of a solid object or of an infinitely thin object.
`static int` | `STANDARD_RAY_TRACER` Constant for `type` indicating a standard (unphysical) ray tracer algorithm.
`Matrix3d` | `tmpMatrix30` This matrix may be used freely in implementations of the `Scattering` methods.
`Point3d` | `tmpPoint0` This point may be used freely in implementations of the `Scattering` methods.
`Point3d` | `tmpPoint1` This point may be used freely in implementations of the `Scattering` methods.
`Point2d` | `tmpPoint2d0` This point may be used freely in implementations of the `Scattering` methods.
`Spectrum` | `tmpSpectrum0` This spectrum may be used freely in implementations of the `Scattering` methods.
`Spectrum` | `tmpSpectrum1` This spectrum may be used freely in implementations of the `Scattering` methods.
`Vector3d` | `tmpVector0` This vector may be used freely in implementations of the `Scattering` methods.
`Vector3d` | `tmpVector1` This vector may be used freely in implementations of the `Scattering` methods.
`int` | `type` The type of algorithm for which this environment is used, one of `STANDARD_RAY_TRACER`, `PATH_TRACER`, `RADIATION_MODEL`.
`Matrix3f` | `userMatrix` This matrix may be used freely in implementations of the `Scattering` methods.
`Matrix3f` | `userMatrix2` This matrix may be used freely in implementations of the `Scattering` methods.
`Matrix3f` | `userMatrix3` This matrix may be used freely in implementations of the `Scattering` methods.
`java.lang.Object` | `userObject` This object may be used freely in implementations of the `Scattering` methods in order to cache results between invocations.
`java.lang.Object` | `userObjectOwner` The current owner of `userObject`.
`Vector3f` | `userVector` This vector may be used freely in implementations of the `Scattering` methods.
`Vector3f` | `userVector2` This vector may be used freely in implementations of the `Scattering` methods.
`Vector3f` | `userVector3` This vector may be used freely in implementations of the `Scattering` methods.
`Point2f` | `uv` The canonical uv-coordinates at `point`.

Constructor Summary
`Environment()`
`Environment(BoundingBox bounds, Spectrum factory, int type)` Creates a new instance of `Environment`.

Method Summary
`void` | `set(Intersection desc, int flags, Scene scene)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### bounds

    public final BoundingBox bounds

  The bounding box of all finite volumes of the scene in which this environment is used.

  See Also:
    `boundsCenter`, `boundsRadius`

### boundsCenter

    public final Vector3d boundsCenter

  The center of `bounds`.

### boundsRadius

    public final double boundsRadius

  The radius of the bounding sphere whose center is located at `boundsCenter` and which encloses `bounds`.

### dpdu

    public final Vector3f dpdu

  The derivative of the global surface position with respect to the canonical u-coordinate.

### dpdv

    public final Vector3f dpdv

  The derivative of the global surface position with respect to the canonical v-coordinate.

### globalToLocal

    public Matrix4f globalToLocal

  The transformation from global to local coordinates. This has to be the inverse of `localToGlobal`.

### iorRatio

    public float iorRatio

  The index-of-refraction ratio at the surface. This is the index of refraction of the surface side where the normal vector points into, divided by the index of refraction of the opposite side.

### localPoint

    public final Point3f localPoint

  The surface position in local coordinates of the object which defines the surface, light source, or sensor.

### localToGlobal

    public Matrix4f localToGlobal

  The transformation from local to global coordinates. This is only used for the emitter-specific methods. The local coordinates are those of the object which defines the emitter (light source or sensor).

### normal

    public final Vector3f normal

  The surface geometric normal unit vector at `point` in global world coordinates. This is always the outer normal vector.

  The normal vector is only needed for surface shaders, it is not used for emitters (light sources or sensors).

### PATH_TRACER

    public static final int PATH_TRACER

  Constant for `type` indicating a path tracer algorithm.

  See Also:
    Constant Field Values

### point

    public final Point3f point

  The surface position in global world coordinates.

### RADIATION_MODEL

    public static final int RADIATION_MODEL

  Constant for `type` indicating a radiation model algorithm.

  See Also:
    Constant Field Values

### solid

    public boolean solid

  Indicates whether this is an intersection at the surface of a solid object or of an infinitely thin object.

### STANDARD_RAY_TRACER

    public static final int STANDARD_RAY_TRACER

  Constant for `type` indicating a standard (unphysical) ray tracer algorithm.

  See Also:
    Constant Field Values

### tmpMatrix30

    public final Matrix3d tmpMatrix30

  This matrix may be used freely in implementations of the `Scattering` methods.

### tmpPoint0

    public final Point3d tmpPoint0

  This point may be used freely in implementations of the `Scattering` methods.

### tmpPoint1

    public final Point3d tmpPoint1

  This point may be used freely in implementations of the `Scattering` methods.

### tmpPoint2d0

    public final Point2d tmpPoint2d0

  This point may be used freely in implementations of the `Scattering` methods.

### tmpSpectrum0

    public final Spectrum tmpSpectrum0

  This spectrum may be used freely in implementations of the `Scattering` methods.

### tmpSpectrum1

    public final Spectrum tmpSpectrum1

  This spectrum may be used freely in implementations of the `Scattering` methods.

### tmpVector0

    public final Vector3d tmpVector0

  This vector may be used freely in implementations of the `Scattering` methods.

### tmpVector1

    public final Vector3d tmpVector1

  This vector may be used freely in implementations of the `Scattering` methods.

### type

    public final int type

  The type of algorithm for which this environment is used, one of `STANDARD_RAY_TRACER`, `PATH_TRACER`, `RADIATION_MODEL`.

### userMatrix

    public final Matrix3f userMatrix

  This matrix may be used freely in implementations of the `Scattering` methods.

### userMatrix2

    public final Matrix3f userMatrix2

  This matrix may be used freely in implementations of the `Scattering` methods.

### userMatrix3

    public final Matrix3f userMatrix3

  This matrix may be used freely in implementations of the `Scattering` methods.

### userObject

    public java.lang.Object userObject

  This object may be used freely in implementations of the `Scattering` methods in order to cache results between invocations. Whenever this field is modified, `userObjectOwner` has to be set, too.

### userObjectOwner

    public java.lang.Object userObjectOwner

  The current owner of `userObject`. This should be used to determine the validity of caching information stored in `userObject`.

### userVector

    public final Vector3f userVector

  This vector may be used freely in implementations of the `Scattering` methods.

### userVector2

    public final Vector3f userVector2

  This vector may be used freely in implementations of the `Scattering` methods.

### userVector3

    public final Vector3f userVector3

  This vector may be used freely in implementations of the `Scattering` methods.

### uv

    public final Point2f uv

  The canonical uv-coordinates at `point`. Which coordinates are canonical for a specific surface depends on the surface: E.g., for a sphere, the canonical uv-coordinates would be spherical coordinates.

Constructor Detail

### Environment

    public Environment()

### Environment

    public Environment(BoundingBox bounds,
                       Spectrum factory,
                       int type)

  Creates a new instance of `Environment`. The `factory` is used to obtain new spectra for light transport computations.

  Parameters:
    `bounds` - bounding box of scene in which environment is used
    `factory` - use this to create new spectra
    `type` - value for `type`

Method Detail

### set

    public void set(Intersection desc,
                    int flags,
                    Scene scene)

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD