java.lang.Object
de.grogra.vecmath.geom.Intersection
Instances of
Intersection specify the properties
of an intersection point of a
Line
with the surface of a Volume.
They are part of an
IntersectionList.- Author:
- Ole Kniemeyer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intParameter forVolume.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 final intParameter forVolume.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 final intParameter forVolume.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 ofparameter) has to be found.static final intValue fortypeindicating that the line is entering the solid volume at this intersection poing.intThis field can be used by thevolumeto store additional information, e.g., a face index.static final intValue fortypeindicating that the line is leaving the solid volume at this intersection point.Defines the line which was used for this intersection point.intThis 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.doubleThe intersection point is located atline.origin + parameter * line.direction.static final intValue fortypeindicating 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.Defines the solid volume on whose surface this intersection point lies.This point may be used freely in methods which perform computations based on this intersection.This vector may be used freely in methods which perform computations based on this intersection.intDefines the volume which computed this intersection point.This field can be used by thevolumeto store additional information.final Vector3dThis field can be used by thevolumeto store additional information. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()Returns the intersection point in local coordinates of the volume.Returns the surface geometric normal unit vector in global coordinates.getPoint()Returns the intersection point in global coordinates.Returns the surface geometric normal unit vector in global coordinates.getUV()Returns the uv coordinates of this intersection point.voidThis 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.toString()
-
Field Details
-
LEAVING
public static final int LEAVINGValue fortypeindicating that the line is leaving the solid volume at this intersection point.- See Also:
-
ENTERING
public static final int ENTERINGValue fortypeindicating that the line is entering the solid volume at this intersection poing.- See Also:
-
PASSING
public static final int PASSINGValue fortypeindicating 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.- See Also:
-
ALL
public static final int ALLParameter forVolume.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.- See Also:
-
CLOSEST
public static final int CLOSESTParameter forVolume.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 ofparameter) has to be found.- See Also:
-
ANY
public static final int ANYParameter forVolume.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.- See Also:
-
volume
Defines the volume which computed this intersection point. -
solid
Defines the solid volume on whose surface this intersection point lies. Normally, it equalsvolume, but for CSG operations, it is set to the resulting CSG volume. -
line
Defines the line which was used for this intersection point. -
parameter
public double parameterThe intersection point is located atline.origin + parameter * line.direction. Within anIntersectionList, intersections are sorted in ascending order ofparameter. -
type
public int type -
face
public int faceThis field can be used by thevolumeto store additional information, e.g., a face index. -
multiplicity
public int multiplicityThis 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. -
volumeVector
This field can be used by thevolumeto store additional information. -
volumeData
This field can be used by thevolumeto store additional information. -
tmpPoint0
This point may be used freely in methods which perform computations based on this intersection. -
tmpVector0
This vector may be used freely in methods which perform computations based on this intersection.
-
-
Constructor Details
-
Intersection
-
-
Method Details
-
negateNormal
public 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. -
getPoint
Returns the intersection point in global coordinates. The returned value may not be modified.- Returns:
- intersection point
-
getLocalPoint
Returns the intersection point in local coordinates of the volume. Normally local and global coordinates coincide, but e.g. for a GridClonerUnion the local coordinate system corresponds to the original object. The returned value may not be modified.- Returns:
- intersection point
-
getNormal
Returns the surface geometric normal unit vector in global coordinates. It is the outer normal vector, pointing from the surface outwards. The vector is computed once byVolume.computeNormal(Intersection, Vector3d). The returned value may not be modified.- Returns:
- outer unit normal vector
-
getUV
Returns the uv coordinates of this intersection point. It is computed once byVolume.computeUV(Intersection, Vector2d). The returned value may not be modified.- Returns:
- uv coordinates
-
getUTangent
Returns the surface geometric normal unit vector in global coordinates. It is the outer normal vector, pointing from the surface outwards. The vector is computed once byVolume.computeNormal(Intersection, Vector3d). The returned value may not be modified.- Returns:
- outer unit normal vector
-
getVTangent
-
deepCopy
-
toString
-