|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectde.grogra.vecmath.geom.Variables
de.grogra.vecmath.geom.IntersectionList
public final class IntersectionList
This class contains a list of intersection points of a line with the
surface of a Volume. The list is
piecewise sorted in ascending order of distance, i.e., of
Intersection.parameter. The congiguous
pieces are computed by
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection).
| Field Summary | |
|---|---|
Intersection[] |
elements
Contains the list of intersections. |
int |
size
Specifies the number of valid intersections in elements. |
| Fields inherited from class de.grogra.vecmath.geom.Variables |
|---|
cache, istack, tmpLine, tmpMatrix3, tmpPoint0, tmpPoint1, tmpPoint2, tmpPoint3, tmpVector0, tmpVector1, tmpVector2, tmpVector3 |
| Constructor Summary | |
|---|---|
IntersectionList()
|
|
| Method Summary | |
|---|---|
Intersection |
add(Volume v,
Line l,
double p,
int type)
Appends an intersection element to this list and returns the appended instance. |
Intersection |
add(Volume v,
Line l,
double p,
int type,
int face)
Appends an intersection element to this list and returns the appended instance. |
void |
addSwap(int index)
Appends a new intersection element to this list and swaps it with the existing element at index. |
void |
clear()
Clears this list so that the size is 0. |
int |
findClosestIntersection(double p,
double maxDiff,
int start,
int end)
Returns the index of the intersection whose parameter is closest to p. |
void |
remove(int start,
int end)
Removes the elements with indices from start to
end - 1. |
void |
setSize(int size)
Sets the size of this list to the specified
value. |
java.lang.String |
toString()
|
| Methods inherited from class de.grogra.vecmath.geom.Variables |
|---|
getISize, ienter, ipop, ipush, setISize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Intersection[] elements
size - 1 are valid.
public int size
elements.
| Constructor Detail |
|---|
public IntersectionList()
| Method Detail |
|---|
public Intersection add(Volume v,
Line l,
double p,
int type)
v - volume of intersectionl - line of intersectionp - line parameter of intersectiontype - type of intersection (see Intersection.type)
public Intersection add(Volume v,
Line l,
double p,
int type,
int face)
v - volume of intersectionl - line of intersectionp - line parameter of intersectiontype - type of intersection (see Intersection.type)face - face value of intersection
public void addSwap(int index)
index.
index - index of the element to be swapped with the new elementpublic void clear()
public int findClosestIntersection(double p,
double maxDiff,
int start,
int end)
p. Only intersection elements with
indices from start to end - 1
and with a parameter value whose difference to p
is less than maxDistance are considered.
p - a line parametermaxDiff - maximum difference between p and intersectionsstart - index to start (inclusive)end - index to end (exclusive)
public void remove(int start,
int end)
start to
end - 1.
start - index to start (inclusive)end - index to end (exclusive)public void setSize(int size)
size of this list to the specified
value. The first size elements
will contain valid instances when this method returns.
size - new size of this listpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||