java.lang.Object
de.grogra.ray.physics.Environment
- Direct Known Subclasses:
ShadingEnvironment
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
Modifier and TypeFieldDescriptionfinal BoundingBox
The bounding box of all finite volumes of the scene in which this environment is used.final Vector3d
The center ofbounds
.final double
The radius of the bounding sphere whose center is located atboundsCenter
and which enclosesbounds
.final Vector3f
The derivative of the global surface position with respect to the canonical u-coordinate.final Vector3f
The derivative of the global surface position with respect to the canonical v-coordinate.The transformation from global to local coordinates.float
The index-of-refraction ratio at the surface.final Point3f
The surface position in local coordinates of the object which defines the surface, light source, or sensor.The transformation from local to global coordinates.final Vector3f
The surface geometric normal unit vector atpoint
in global world coordinates.static final int
Constant fortype
indicating a path tracer algorithm.final Point3f
The surface position in global world coordinates.static final int
Constant fortype
indicating a radiation model algorithm.boolean
Indicates whether this is an intersection at the surface of a solid object or of an infinitely thin object.static final int
Constant fortype
indicating a standard (unphysical) ray tracer algorithm.final Matrix3d
This matrix may be used freely in implementations of theScattering
methods.final Point3d
This point may be used freely in implementations of theScattering
methods.final Point3d
This point may be used freely in implementations of theScattering
methods.final Point2d
This point may be used freely in implementations of theScattering
methods.final Spectrum
This spectrum may be used freely in implementations of theScattering
methods.final Spectrum
This spectrum may be used freely in implementations of theScattering
methods.final Vector3d
This vector may be used freely in implementations of theScattering
methods.final Vector3d
This vector may be used freely in implementations of theScattering
methods.final int
The type of algorithm for which this environment is used, one ofSTANDARD_RAY_TRACER
,PATH_TRACER
,RADIATION_MODEL
.final Matrix3f
This matrix may be used freely in implementations of theScattering
methods.final Matrix3f
This matrix may be used freely in implementations of theScattering
methods.final Matrix3f
This matrix may be used freely in implementations of theScattering
methods.This object may be used freely in implementations of theScattering
methods in order to cache results between invocations.The current owner ofuserObject
.final Vector3f
This vector may be used freely in implementations of theScattering
methods.final Vector3f
This vector may be used freely in implementations of theScattering
methods.final Vector3f
This vector may be used freely in implementations of theScattering
methods.final Vector3f
This vector may be used freely in implementations of theScattering
methods.final Point2f
The canonical uv-coordinates atpoint
. -
Constructor Summary
ConstructorDescriptionEnvironment
(BoundingBox bounds, Spectrum factory, int type) Creates a new instance ofEnvironment
. -
Method Summary
-
Field Details
-
STANDARD_RAY_TRACER
public static final int STANDARD_RAY_TRACERConstant fortype
indicating a standard (unphysical) ray tracer algorithm.- See Also:
-
PATH_TRACER
public static final int PATH_TRACERConstant fortype
indicating a path tracer algorithm.- See Also:
-
RADIATION_MODEL
public static final int RADIATION_MODELConstant fortype
indicating a radiation model algorithm.- See Also:
-
type
public final int typeThe type of algorithm for which this environment is used, one ofSTANDARD_RAY_TRACER
,PATH_TRACER
,RADIATION_MODEL
. -
bounds
The bounding box of all finite volumes of the scene in which this environment is used.- See Also:
-
boundsCenter
The center ofbounds
. -
boundsRadius
public final double boundsRadiusThe radius of the bounding sphere whose center is located atboundsCenter
and which enclosesbounds
. -
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). -
globalToLocal
The transformation from global to local coordinates. This has to be the inverse oflocalToGlobal
. -
localPoint
The surface position in local coordinates of the object which defines the surface, light source, or sensor. -
point
The surface position in global world coordinates. -
normal
The surface geometric normal unit vector atpoint
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).
-
uv
The canonical uv-coordinates atpoint
. 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. -
dpdu
The derivative of the global surface position with respect to the canonical u-coordinate. -
dpdv
The derivative of the global surface position with respect to the canonical v-coordinate. -
solid
public boolean solidIndicates whether this is an intersection at the surface of a solid object or of an infinitely thin object. -
iorRatio
public float iorRatioThe 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. -
userMatrix
This matrix may be used freely in implementations of theScattering
methods. -
userMatrix2
This matrix may be used freely in implementations of theScattering
methods. -
userMatrix3
This matrix may be used freely in implementations of theScattering
methods. -
userVector
This vector may be used freely in implementations of theScattering
methods. -
userVector2
This vector may be used freely in implementations of theScattering
methods. -
userVector3
This vector may be used freely in implementations of theScattering
methods. -
userVector4
This vector may be used freely in implementations of theScattering
methods. -
tmpPoint0
This point may be used freely in implementations of theScattering
methods. -
tmpPoint1
This point may be used freely in implementations of theScattering
methods. -
tmpVector0
This vector may be used freely in implementations of theScattering
methods. -
tmpVector1
This vector may be used freely in implementations of theScattering
methods. -
tmpPoint2d0
This point may be used freely in implementations of theScattering
methods. -
tmpMatrix30
This matrix may be used freely in implementations of theScattering
methods. -
tmpSpectrum0
This spectrum may be used freely in implementations of theScattering
methods. -
tmpSpectrum1
This spectrum may be used freely in implementations of theScattering
methods. -
userObjectOwner
The current owner ofuserObject
. This should be used to determine the validity of caching information stored inuserObject
. -
userObject
This object may be used freely in implementations of theScattering
methods in order to cache results between invocations. Whenever this field is modified,userObjectOwner
has to be set, too.
-
-
Constructor Details
-
Environment
public Environment() -
Environment
Creates a new instance ofEnvironment
. Thefactory
is used to obtain new spectra for light transport computations.- Parameters:
bounds
- bounding box of scene in which environment is usedfactory
- use this to create new spectratype
- value fortype
-
-
Method Details
-
set
-