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
FieldsModifier and TypeFieldDescriptionfinal BoundingBoxThe bounding box of all finite volumes of the scene in which this environment is used.final Vector3dThe center ofbounds.final doubleThe radius of the bounding sphere whose center is located atboundsCenterand which enclosesbounds.final Vector3fThe derivative of the global surface position with respect to the canonical u-coordinate.final Vector3fThe derivative of the global surface position with respect to the canonical v-coordinate.The transformation from global to local coordinates.floatThe index-of-refraction ratio at the surface.final Point3fThe surface position in local coordinates of the object which defines the surface, light source, or sensor.The transformation from local to global coordinates.final Vector3fThe surface geometric normal unit vector atpointin global world coordinates.static final intConstant fortypeindicating a path tracer algorithm.final Point3fThe surface position in global world coordinates.static final intConstant fortypeindicating a radiation model algorithm.booleanIndicates whether this is an intersection at the surface of a solid object or of an infinitely thin object.static final intConstant fortypeindicating a standard (unphysical) ray tracer algorithm.final Matrix3dThis matrix may be used freely in implementations of theScatteringmethods.final Point3dThis point may be used freely in implementations of theScatteringmethods.final Point3dThis point may be used freely in implementations of theScatteringmethods.final Point2dThis point may be used freely in implementations of theScatteringmethods.final SpectrumThis spectrum may be used freely in implementations of theScatteringmethods.final SpectrumThis spectrum may be used freely in implementations of theScatteringmethods.final Vector3dThis vector may be used freely in implementations of theScatteringmethods.final Vector3dThis vector may be used freely in implementations of theScatteringmethods.final intThe type of algorithm for which this environment is used, one ofSTANDARD_RAY_TRACER,PATH_TRACER,RADIATION_MODEL.final Matrix3fThis matrix may be used freely in implementations of theScatteringmethods.final Matrix3fThis matrix may be used freely in implementations of theScatteringmethods.final Matrix3fThis matrix may be used freely in implementations of theScatteringmethods.This object may be used freely in implementations of theScatteringmethods in order to cache results between invocations.The current owner ofuserObject.final Vector3fThis vector may be used freely in implementations of theScatteringmethods.final Vector3fThis vector may be used freely in implementations of theScatteringmethods.final Vector3fThis vector may be used freely in implementations of theScatteringmethods.final Vector3fThis vector may be used freely in implementations of theScatteringmethods.final Point2fThe canonical uv-coordinates atpoint. -
Constructor Summary
ConstructorsConstructorDescriptionEnvironment(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 fortypeindicating a standard (unphysical) ray tracer algorithm.- See Also:
-
PATH_TRACER
public static final int PATH_TRACERConstant fortypeindicating a path tracer algorithm.- See Also:
-
RADIATION_MODEL
public static final int RADIATION_MODELConstant fortypeindicating 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 atboundsCenterand 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 atpointin 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 theScatteringmethods. -
userMatrix2
This matrix may be used freely in implementations of theScatteringmethods. -
userMatrix3
This matrix may be used freely in implementations of theScatteringmethods. -
userVector
This vector may be used freely in implementations of theScatteringmethods. -
userVector2
This vector may be used freely in implementations of theScatteringmethods. -
userVector3
This vector may be used freely in implementations of theScatteringmethods. -
userVector4
This vector may be used freely in implementations of theScatteringmethods. -
tmpPoint0
This point may be used freely in implementations of theScatteringmethods. -
tmpPoint1
This point may be used freely in implementations of theScatteringmethods. -
tmpVector0
This vector may be used freely in implementations of theScatteringmethods. -
tmpVector1
This vector may be used freely in implementations of theScatteringmethods. -
tmpPoint2d0
This point may be used freely in implementations of theScatteringmethods. -
tmpMatrix30
This matrix may be used freely in implementations of theScatteringmethods. -
tmpSpectrum0
This spectrum may be used freely in implementations of theScatteringmethods. -
tmpSpectrum1
This spectrum may be used freely in implementations of theScatteringmethods. -
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 theScatteringmethods in order to cache results between invocations. Whenever this field is modified,userObjectOwnerhas to be set, too.
-
-
Constructor Details
-
Environment
public Environment() -
Environment
Creates a new instance ofEnvironment. Thefactoryis 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
-