de.grogra.vecmath.geom
public class Line extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
Vector3d |
direction
Specifies the direction of the line.
|
float |
directionDensity
The probability density of direction for this ray.
|
double |
end
The line ends at
origin + end * direction. |
Tuple3d |
origin
Origin of the line.
|
float |
originDensity
The probability density of origin for this ray.
|
boolean |
reflected |
Color3f |
spectrum
The spectrum of the ray.
|
double |
start
The line starts at
origin + start * direction. |
boolean |
valid |
float |
x |
float |
y |
| Constructor and Description |
|---|
Line() |
Line(Tuple3d origin,
Vector3d direction,
double start,
double end) |
| Modifier and Type | Method and Description |
|---|---|
Line |
deepCopy() |
double |
distance(Tuple3d point)
Computes the distance between
point and this line. |
double |
distanceSquared(Tuple3d point)
Computes the square of the distance between
point and this line. |
double |
length()
Returns the length of this line.
|
double |
lengthSquared()
Returns the square of the length of this line.
|
void |
setLineAttributes(double start,
double end) |
java.lang.String |
toString() |
public Vector3d direction
public float directionDensity
Shader.generateRandomRays and
Light.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 be Float.POSITIVE_INFINITY as a result of
Shader.generateRandomRays, namely
for ideal specular reflection or transmission.public double end
origin + end * direction.
The condition start <= end has to be satisfied.public Tuple3d origin
public float originDensity
Light.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.public boolean reflected
public Color3f spectrum
public double start
origin + start * direction.public boolean valid
public float x
public float y
public Line deepCopy()
public double distance(Tuple3d point)
point and this line. The distance
is defined to be the distance between
point and the closest point of this line.point - a pointpointpublic double distanceSquared(Tuple3d point)
point and this line. The distance
is defined to be the distance between
point and the closest point of this line.point - a pointpointpublic double length()
public double lengthSquared()
public void setLineAttributes(double start,
double end)
public java.lang.String toString()
toString in class java.lang.Object