Interface Extent

    • Method Detail

      • getCenter

        Vec4 getCenter()
        Returns the extent's center point.
        Returns:
        the extent's center point.
      • getDiameter

        double getDiameter()
        Returns the extent's diameter. The computation of the diameter depends on the implementing class. See the documentation for the individual classes to determine how they compute a diameter.
        Returns:
        the extent's diameter.
      • getRadius

        double getRadius()
        Returns the extent's radius. The computation of the radius depends on the implementing class. See the documentation for the individual classes to determine how they compute a radius.
        Returns:
        the extent's radius.
      • intersects

        boolean intersects​(Frustum frustum)
        Determines whether or not this Extent intersects frustum. Returns true if any part of these two objects intersect, including the case where either object wholly contains the other, false otherwise.
        Parameters:
        frustum - the Frustum with which to test for intersection.
        Returns:
        true if there is an intersection, false otherwise.
      • intersect

        Intersection[] intersect​(Line line)
        Computes the intersections of this extent with line. The returned array may be either null or of zero length if no intersections are discovered. It does not contain null elements. Tangential intersections are marked as such. line is considered to have infinite length in both directions.
        Parameters:
        line - the Line with which to intersect this Extent.
        Returns:
        an array of intersections representing all the points where line enters or leave this Extent.
      • intersects

        boolean intersects​(Line line)
        Determines whether or not line intersects this Extent. This method may be faster than checking the size of the array returned by intersect(Line). Implementing methods must ensure that this method returns true if and only if intersect(Line) returns a non-null array containing at least one element.
        Parameters:
        line - the Line with which to test for intersection.
        Returns:
        true if an intersection is found, false otherwise.
      • intersects

        boolean intersects​(Plane plane)
        Calculate whether or not this Extent is intersected by plane.
        Parameters:
        plane - the Plane with which to test for intersection.
        Returns:
        true if plane is found to intersect this Extent.
      • getEffectiveRadius

        double getEffectiveRadius​(Plane plane)
        Computes the effective radius of the extent relative to a specified plane.
        Parameters:
        plane - the plane.
        Returns:
        the effective radius, or 0 if the plane is null.
      • getProjectedArea

        double getProjectedArea​(View view)
        Computes the area in square pixels of this Extent after it is projected into the specified view's viewport. The returned value is the screen area that this Extent covers in the infinite plane defined by the view's viewport. This area is not limited to the size of the view's viewport, and portions of this Extent are not clipped by the view's frustum.

        This returns Double.POSITIVE_INFINITY if the view's eye point is inside this Extent, or if any portion of this Extent is behind the eye point. In either case, this Extent has no finite projection on the view.

        Parameters:
        view - the View for which to compute a projected screen area.
        Returns:
        the projected screen area of this Extent in square pixels, or Double.POSITIVE_INFINITY if the view's eye point is inside this Extent or part of this Extent is behind the view's eye point.
        Throws:
        java.lang.IllegalArgumentException - if the view is null.