Class Intersection3D_F64
- java.lang.Object
-
- georegression.metric.Intersection3D_F64
-
public class Intersection3D_F64 extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Intersection3D_F64()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleancontained(Box3D_F64 boxA, Box3D_F64 boxB)Returns true if boxB is contained inside of or is identical to boxA.static booleancontained(Box3D_F64 box, Point3D_F64 point)Returns true if the point is contained inside the box, with an exclusive upper extent.static booleancontained(BoxLength3D_F64 box, Point3D_F64 point)Returns true if the point is contained inside the box.static booleancontained2(Box3D_F64 box, Point3D_F64 point)Returns true if the point is contained inside the box, with an inclusive upper extent.static booleanintersect(Box3D_F64 boxA, Box3D_F64 boxB)Returns true if the two boxs intersect each other.static booleanintersect(PlaneGeneral3D_F64 plane, LineParametric3D_F64 line, Point3D_F64 intersection)Finds the intersection of a line and a plane.static booleanintersect(PlaneGeneral3D_F64 a, PlaneGeneral3D_F64 b, LineParametric3D_F64 line)Finds the line which is the intersection between the two planes.static booleanintersect(PlaneNormal3D_F64 plane, LineParametric3D_F64 line, Point3D_F64 intersection)Finds the intersection of a line and a plane.static intintersection(Triangle3D_F64 T, LineSegment3D_F64 R, Point3D_F64 output)Finds the intersection between a 3D triangle and a line-segment.static intintersection(Triangle3D_F64 T, LineSegment3D_F64 R, Point3D_F64 output, Vector3D_F64 u, Vector3D_F64 v, Vector3D_F64 n, Vector3D_F64 dir, Vector3D_F64 w0)Finds the intersection between a 3D triangle and a line-segment.
-
-
-
Method Detail
-
intersect
public static boolean intersect(PlaneNormal3D_F64 plane, LineParametric3D_F64 line, Point3D_F64 intersection)
Finds the intersection of a line and a plane. Returns true if they intersect at a unique point or false if there is no intersection or an infinite number of intersections.- Parameters:
plane- (Input) Planeline- (Input) Lineintersection- (Output) Where the intersection is written to- Returns:
- True if the intersection is at a unique point. If false then no intersection or infinite.
-
intersect
public static boolean intersect(PlaneGeneral3D_F64 plane, LineParametric3D_F64 line, Point3D_F64 intersection)
Finds the intersection of a line and a plane. Returns true if they intersect at a unique point or false if there is no intersection or an infinite number of intersections.- Parameters:
plane- (Input) Planeline- (Input) Lineintersection- (Output) Where the intersection is written to- Returns:
- True if the intersection is at a unique point. If false then no intersection or infinite.
-
intersect
public static boolean intersect(PlaneGeneral3D_F64 a, PlaneGeneral3D_F64 b, LineParametric3D_F64 line)
Finds the line which is the intersection between the two planes. For a valid solution to be returned the planes must not be parallel to each other. If the planes are parallel then the slope of the returned line will have a value of zero for each element.- Parameters:
a- (Input) Planeb- (Input) Planeline- (Output) Intersection.- Returns:
- true if they intersect ata line or false if not
-
intersection
public static int intersection(Triangle3D_F64 T, LineSegment3D_F64 R, Point3D_F64 output)
Finds the intersection between a 3D triangle and a line-segment. Code ported from [1].
[1] http://geomalgorithms.com/a06-_intersect-2.html
- Parameters:
T- (Input) Triangle in 3D spaceR- (Input) Line segment in 3D space.output- (Output) Storage for the intersection, if there is one- Returns:
- -1 = triangle is degenerate (a segment or point)
0 = disjoint (no intersect)
1 = intersect in unique point I1
2 = are in the same plane
-
intersection
public static int intersection(Triangle3D_F64 T, LineSegment3D_F64 R, Point3D_F64 output, Vector3D_F64 u, Vector3D_F64 v, Vector3D_F64 n, Vector3D_F64 dir, Vector3D_F64 w0)
Finds the intersection between a 3D triangle and a line-segment. Code ported from [1]. Internal working variables are provided in this interface to reduce memory creation/destruction.
[1] http://geomalgorithms.com/a06-_intersect-2.html
- Parameters:
T- Triangle in 3D spaceR- Line segment in 3D space.output- Storage for the intersection, if there is oneu- (internal use) triangle vectorsv- (internal use) triangle vectorsn- (internal use) triangle vectorsdir- (internal use) ray vectorw0- (internal use) ray vector- Returns:
- -1 = triangle is degenerate (a segment or point) 0 = disjoint (no intersect) 1 = intersect in unique point I1 2 = are in the same plane
-
contained
public static boolean contained(BoxLength3D_F64 box, Point3D_F64 point)
Returns true if the point is contained inside the box. The point is considered to be inside the box if the following test passes for each dimension. box.x ≤ point.x<box.x + box.lengthX- Parameters:
box- Boxpoint- Point which is tested to see if it is inside the box- Returns:
- true for inside and false for not
-
contained
public static boolean contained(Box3D_F64 box, Point3D_F64 point)
Returns true if the point is contained inside the box, with an exclusive upper extent. The point is considered to be inside the box if the following test passes:
box.p0.x ≤ point.x<box.p1.x
box.p0.y ≤ point.y<box.p1.y
box.p0.z ≤ point.z<box.p1.z
- Parameters:
box- Boxpoint- Point which is tested to see if it is inside the box- Returns:
- true for inside and false for not
-
contained2
public static boolean contained2(Box3D_F64 box, Point3D_F64 point)
Returns true if the point is contained inside the box, with an inclusive upper extent. The point is considered to be inside the box if the following test passes:
box.p0.x ≤ point.x ≤ box.p1.x
box.p0.y ≤ point.y ≤ box.p1.y
box.p0.z ≤ point.z ≤ box.p1.z
- Parameters:
box- Boxpoint- Point which is tested to see if it is inside the box- Returns:
- true for inside and false for not
-
contained
public static boolean contained(Box3D_F64 boxA, Box3D_F64 boxB)
Returns true if boxB is contained inside of or is identical to boxA.- Parameters:
boxA- BoxboxB- Box which is being tested to see if it is inside of boxA- Returns:
- true if inside/identical or false if outside
-
intersect
public static boolean intersect(Box3D_F64 boxA, Box3D_F64 boxB)
Returns true if the two boxs intersect each other. p0 is inclusive and p1 is exclusive. So if the p0 edge and p1 edge overlap perfectly there is no intersection.- Parameters:
boxA- BoxboxB- Box- Returns:
- true for intersection and false if no intersection
-
-
DataMelt 3.0 © DataMelt by jWork.ORG