java.lang.Object
de.grogra.ray.util.Ray
This class represents a light ray.
- Author:
- Ole Kniemeyer
-
Field Summary
Modifier and TypeFieldDescriptionboolean
final Spectrum3f
The ray color.final Vector3f
The ray direction.float
The probability density of direction for this ray.float
final Point3f
The ray origin in global coordinates.float
The probability density of origin for this ray.boolean
final Spectrum
The spectrum of the ray.boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getColor()
float
int
hashCode()
void
setImportance
(float value) void
toString()
void
void
-
Field Details
-
origin
The ray origin in global coordinates. This field is only used in the context ofInterior.attenuate(Interior.Input, Color3f)
and the methods ofLight
and its subinterfaces. -
direction
The ray direction. This direction unit vector is defined as the direction pointing away from a surface position in global coordinates. I.e., for an outgoing ray, it equals its direction, whereas for an incident ray, the direction is its negated direction. -
color
The ray color. Depending on context, this may represent BRDF-related values for the color components R, G, B, rather than simply an RGB color. -
spectrum
The spectrum of the ray. Depending on context, this may represent the ray's spectral radiant power or other properties. -
m_importance
public float m_importance -
directionDensity
public float directionDensityThe probability density of direction for this ray. This field is set byShader.generateRandomRays
andLight.generateRandomRays
. If pω+ is the probability density that has been used for generating the random ray direction (measured with respect to projected solid angle ω+, i.e., dω+ = cos θ dω), then this field is set to pω+(direction
). It is not defined for rays emanating from a directional light source. It may beFloat.POSITIVE_INFINITY
as a result ofShader.generateRandomRays
, namely for ideal specular reflection or transmission. -
originDensity
public float originDensityThe probability density of origin for this ray. This field is set byLight.generateRandomRays
. If px is the probability density that has been used for generating the random ray origin, then this field is set to px(origin
). It is not defined for rays emanating from a point light source. -
reflected
public boolean reflected -
ambient
public boolean ambient -
valid
public boolean valid
-
-
Constructor Details
-
Ray
-
Ray
public Ray() -
Ray
-
Ray
-
Ray
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getOrigin
-
getDirection
-
getColor
-
getImportance
public float getImportance() -
setImportance
public void setImportance(float value) -
setRay
-
transform
-
transform
-
toString
-
convert2Line
-