Documentation of 'georegression.metric.Intersection3D_F32' Java class
Intersection3D_F32
georegression.metric

Class Intersection3D_F32



  • public class Intersection3D_F32
    extends java.lang.Object
    • Constructor Detail

      • Intersection3D_F32

        public Intersection3D_F32()
    • Method Detail

      • intersect

        public static boolean intersect(PlaneNormal3D_F32 plane,
                                        LineParametric3D_F32 line,
                                        Point3D_F32 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) Plane
        line - (Input) Line
        intersection - (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_F32 plane,
                                        LineParametric3D_F32 line,
                                        Point3D_F32 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) Plane
        line - (Input) Line
        intersection - (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_F32 a,
                                        PlaneGeneral3D_F32 b,
                                        LineParametric3D_F32 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) Plane
        b - (Input) Plane
        line - (Output) Intersection.
        Returns:
        true if they intersect ata line or false if not
      • intersection

        public static int intersection(Triangle3D_F32 T,
                                       LineSegment3D_F32 R,
                                       Point3D_F32 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 space
        R - (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_F32 T,
                                       LineSegment3D_F32 R,
                                       Point3D_F32 output,
                                       Vector3D_F32 u,
                                       Vector3D_F32 v,
                                       Vector3D_F32 n,
                                       Vector3D_F32 dir,
                                       Vector3D_F32 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 space
        R - Line segment in 3D space.
        output - Storage for the intersection, if there is one
        u - (internal use) triangle vectors
        v - (internal use) triangle vectors
        n - (internal use) triangle vectors
        dir - (internal use) ray vector
        w0 - (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_F32 box,
                                        Point3D_F32 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 - Box
        point - 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_F32 box,
                                        Point3D_F32 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 - Box
        point - 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_F32 box,
                                         Point3D_F32 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 - Box
        point - 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_F32 boxA,
                                        Box3D_F32 boxB)
        Returns true if boxB is contained inside of or is identical to boxA.
        Parameters:
        boxA - Box
        boxB - 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_F32 boxA,
                                        Box3D_F32 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 - Box
        boxB - Box
        Returns:
        true for intersection and false if no intersection

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.