de.grogra.vecmath.geom
public class Intersection extends java.lang.Object
Intersection specify the properties
of an intersection point of a
Line
with the surface of a Volume.
They are part of an
IntersectionList.| Modifier and Type | Field and Description |
|---|---|
static int |
ALL
Parameter for
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection) indicating
that all intersections have to be found. |
static int |
ANY
Parameter for
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection) indicating
that some arbitrary intersection of the set of all
intersections has to be found. |
static int |
CLOSEST
Parameter for
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection) indicating
that only the closest intersection (minimal value of
parameter) has to be found. |
static int |
ENTERING
Value for
type indicating that the line is entering
the solid volume at this intersection poing. |
int |
face
This field can be used by the
volume to store
additional information, e.g., a face index. |
static int |
LEAVING
Value for
type indicating that the line is leaving
the solid volume at this intersection point. |
Line |
line
Defines the line which was used for this intersection point.
|
int |
multiplicity
This field is usually 1, but when the intersection is within a cloner,
this is the number of occurrences of the intersected volume within the cloner.
|
double |
parameter
The intersection point is located at
line.origin + parameter * line.direction. |
static int |
PASSING
Value for
type indicating that the line is passing
the non-solid (infinitely thin) "volume" (in this case it is
not a true volume, rather a surface) at this intersection point. |
Volume |
solid
Defines the solid volume on whose surface this intersection point
lies.
|
Point3d |
tmpPoint0
This point may be used freely in methods which perform
computations based on this intersection.
|
Vector3d |
tmpVector0
This vector may be used freely in methods which perform
computations based on this intersection.
|
int |
type
|
Volume |
volume
Defines the volume which computed this intersection point.
|
java.lang.Object |
volumeData
This field can be used by the
volume to store
additional information. |
Vector3d |
volumeVector
This field can be used by the
volume to store
additional information. |
| Constructor and Description |
|---|
Intersection(IntersectionList list) |
| Modifier and Type | Method and Description |
|---|---|
Intersection |
deepCopy() |
Point3d |
getLocalPoint()
Returns the intersection point in local coordinates of the volume.
|
Vector3d |
getNormal()
Returns the surface geometric normal unit vector in global
coordinates.
|
Point3d |
getPoint()
Returns the intersection point in global coordinates.
|
Vector3d |
getUTangent()
Returns the surface geometric normal unit vector in global
coordinates.
|
Vector2d |
getUV()
Returns the uv coordinates of this intersection point.
|
Vector3d |
getVTangent() |
void |
negateNormal()
This method can be invoked by CSG operations to indicate
that the true normal vector is the negation of the vector which
would be computed otherwise.
|
java.lang.String |
toString() |
public static final int ALL
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection) indicating
that all intersections have to be found.public static final int ANY
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection) indicating
that some arbitrary intersection of the set of all
intersections has to be found.public static final int CLOSEST
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection) indicating
that only the closest intersection (minimal value of
parameter) has to be found.public static final int ENTERING
type indicating that the line is entering
the solid volume at this intersection poing.public int face
volume to store
additional information, e.g., a face index.public static final int LEAVING
type indicating that the line is leaving
the solid volume at this intersection point.public Line line
public int multiplicity
public double parameter
line.origin + parameter * line.direction. Within an
IntersectionList, intersections are sorted in ascending
order of parameter.public static final int PASSING
type indicating that the line is passing
the non-solid (infinitely thin) "volume" (in this case it is
not a true volume, rather a surface) at this intersection point.public Volume solid
volume, but for CSG operations,
it is set to the resulting CSG volume.public Point3d tmpPoint0
public Vector3d tmpVector0
public int type
public Volume volume
public java.lang.Object volumeData
volume to store
additional information.public Intersection(IntersectionList list)
public Intersection deepCopy()
public Point3d getLocalPoint()
public Vector3d getNormal()
Volume.computeNormal(Intersection, Vector3d).
The returned value may not be modified.public Point3d getPoint()
public Vector3d getUTangent()
Volume.computeNormal(Intersection, Vector3d).
The returned value may not be modified.public Vector2d getUV()
Volume.computeUV(Intersection, Vector2d).
The returned value may not be modified.public Vector3d getVTangent()
public void negateNormal()
public java.lang.String toString()
toString in class java.lang.Object