|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.jagrlib.MicroFacet
public class MicroFacet
Micro-facet = microscopic piece of solid surface. This data container is used for ray-surface intersections.
Solid,
BSSRDF| Field Summary | |
|---|---|
BSSRDF |
bssrdf
Optical model (BRDF). |
double[] |
color
Surface color. |
double[] |
coord
3D world coordinates of the intersection point. |
boolean |
enter
true if the ray enters solid interior (transition from air to solid material). |
double |
epsilon
Epsilon constant used in geometric-equality tests (local-space coordinates). |
double |
epsilon2
epsilon squared. |
int |
face
Id of intersected face (for Brep intersections). |
boolean |
front
true if the ray enters solid geometry from outside. |
IntersectionAttributes |
geometry
Surface which a ray has intersection with. |
java.lang.Object |
geometryTmp
Temporary data used for additional geometric computation. |
double[] |
locCoord
3D local coordinates of the intersection point. |
double[] |
normal
Normal vector in the point of intersection (points outside the object = to the air). |
double[] |
objCoord
3D object coordinates of the intersection point. |
IntersectionAttributes |
sceneNode
Associated scene node (solid interior). |
double |
t
Parameter of the intersection point (intermediate CSG results are of both signs, definitive results should be positive). |
double[] |
texCoord
2D (texture) coordinates of the intersection point (relative to the surface). |
java.util.List<Texture> |
textures
List of textures which can be applicated sequentially. |
TrMatrix |
toObject
Transformation matrix from local coordinates to object (component) coordinates. |
TrMatrix |
toWorld
Transformation matrix from local coordinates to world coordinates. |
double[] |
tu
Surface tangent vector in direction of U. |
double[] |
tv
Surface tangent vector in direction of V. |
int |
valid
Bit-mask declaring validity of individual data items ( VALID_* constants). |
static int |
VALID_BSSRDF
Is BRDF object ( #brdf) valid? |
static int |
VALID_COLOR
Is surface color ( color) valid? |
static int |
VALID_COORD
Are 3D world coordinates ( coord) valid? |
static int |
VALID_LOC_COORD
Are 3D local coordinates ( locCoord) valid? |
static int |
VALID_NORMAL
Is normal vector ( normal) valid? |
static int |
VALID_OBJ_COORD
Are 3D object coordinates ( objCoord) valid? |
static int |
VALID_TANGENT
Are surface tangent vectors ( tu, tv) valid? |
static int |
VALID_TEX_COORD
Are 2D texture coordinates ( texCoord) valid? |
static int |
VALID_TEXTURES
Is list of textures ( textures) valid? |
static int |
VALID_TO_OBJECT
Is leaf -> object (component) transform ( toObject) valid? |
static int |
VALID_TO_WORLD
Is leaf -> world transform ( toWorld) valid? |
| Constructor Summary | |
|---|---|
MicroFacet()
|
|
| Method Summary | |
|---|---|
int |
assertAttributes(int attributes)
Computes all requested micro-facet's parameters. |
static java.util.List<MicroFacet> |
booleanOp(java.util.List<MicroFacet> a,
java.util.List<MicroFacet> b,
int op)
Merge two lists of MicroFacets using the given set operation. |
int |
compareTo(MicroFacet mf)
Natural ordering: ascending [ t ]. |
boolean |
far(double t0,
double dirLenSquare)
Compares the given t0 against the stored intersection. |
boolean |
far(double t0,
double[] dir)
Compares the given t0 against the stored intersection. |
boolean |
near(double t0,
double dirLenSquare)
Compares the given t0 against the stored intersection. |
boolean |
near(double t0,
double[] dir)
Compares the given t0 against the stored intersection. |
protected void |
normalFromTangent()
Computes normal vector from valid (and world-transformed) tangent vectors. |
void |
setEpsilon(double eps)
Sets local epsilon used for close-priximity tests. |
void |
setEpsilon(double eps,
double epsSquared)
Sets local epsilons used for close-priximity tests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VALID_COORD
coord) valid?
public static final int VALID_LOC_COORD
locCoord) valid?
public static final int VALID_OBJ_COORD
objCoord) valid?
public static final int VALID_TEX_COORD
texCoord) valid?
public static final int VALID_NORMAL
normal) valid?
public static final int VALID_TANGENT
tu, tv) valid?
public static final int VALID_TO_WORLD
toWorld) valid?
public static final int VALID_TO_OBJECT
toObject) valid?
public static final int VALID_COLOR
color) valid?
public static final int VALID_BSSRDF
#brdf) valid?
public static final int VALID_TEXTURES
textures) valid?
public int valid
VALID_* constants).
public double t
public boolean enter
true if the ray enters solid interior (transition from air to solid material).
public boolean front
true if the ray enters solid geometry from outside.
public double[] coord
public double[] locCoord
public double[] objCoord
public double[] texCoord
public double[] normal
public double[] tu
U.
public double[] tv
V.
public int face
Brep intersections).
public TrMatrix toWorld
public TrMatrix toObject
public double[] color
public BSSRDF bssrdf
#materialpublic IntersectionAttributes geometry
public java.lang.Object geometryTmp
public IntersectionAttributes sceneNode
public java.util.List<Texture> textures
public double epsilon
public double epsilon2
epsilon squared.
| Constructor Detail |
|---|
public MicroFacet()
| Method Detail |
|---|
public void setEpsilon(double eps)
public void setEpsilon(double eps,
double epsSquared)
protected void normalFromTangent()
public int assertAttributes(int attributes)
attributes - Bit-mask of the requested attributes (see VALID_* constants).
Solid
public static java.util.List<MicroFacet> booleanOp(java.util.List<MicroFacet> a,
java.util.List<MicroFacet> b,
int op)
MicroFacets using the given set operation.
a - Left operand.b - Right operand.op - Set operation code (BinaryOperation.BIN_*).BinaryOperation
public final boolean near(double t0,
double[] dir)
t0 against the stored intersection.
Uses local-space epsilon tolerance and provided direction vector.
true if this intersection is nearer than t0.
public final boolean near(double t0,
double dirLenSquare)
t0 against the stored intersection.
Uses local-space epsilon tolerance and provided direction vector squared length.
true if this intersection is nearer than t0.
public final boolean far(double t0,
double[] dir)
t0 against the stored intersection.
Uses local-space epsilon tolerance and provided direction vector.
true if this intersection is far than t0.
public final boolean far(double t0,
double dirLenSquare)
t0 against the stored intersection.
Uses local-space epsilon tolerance and provided direction vector squared length.
true if this intersection is far than t0.public int compareTo(MicroFacet mf)
compareTo in interface java.lang.Comparable<MicroFacet>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||