Spec-Zone.ru › OpenJavaFX 8
javafx.geometry

Class BoundingBox

java.lang.Object
  • javafx.geometry.Bounds
    • javafx.geometry.BoundingBox


public class BoundingBox
extends Bounds
A rectangular bounding box which is used to describe the bounds of a node or other scene graph object.

Since:

JavaFX 2.0

  • Constructor Summary

    Constructors
    Constructor and Description
    BoundingBox(double minX, double minY, double width, double height)
    Creates a new instance of 2D BoundingBox.
    BoundingBox(double minX, double minY, double minZ, double width, double height, double depth)
    Creates a new instance of 3D BoundingBox.
  • Method Summary

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method and Description
    boolean contains(Bounds b)
    Tests if the interior of this Bounds entirely contains the specified Bounds, b.
    boolean contains(double x, double y)
    Tests if the specified (x, y) coordinates are inside the boundary of Bounds.
    boolean contains(double x, double y, double z)
    Tests if the specified (x, y, z) coordinates are inside the boundary of Bounds.
    boolean contains(double x, double y, double w, double h)
    Tests if the interior of this Bounds entirely contains the specified rectangular area.
    boolean contains(double x, double y, double z, double w, double h, double d)
    Tests if the interior of this Bounds entirely contains the specified rectangular area.
    boolean contains(Point2D p)
    Tests if the specified point is inside the boundary of Bounds.
    boolean contains(Point3D p)
    Tests if the specified point is inside the boundary of Bounds.
    boolean equals(Object obj)
    Indicates whether some other object is "equal to" this one.
    int hashCode()
    Returns a hash code value for the object.
    boolean intersects(Bounds b)
    Tests if the interior of this Bounds intersects the interior of a specified Bounds, b.
    boolean intersects(double x, double y, double w, double h)
    Tests if the interior of this Bounds intersects the interior of a specified rectangular area.
    boolean intersects(double x, double y, double z, double w, double h, double d)
    Tests if the interior of this Bounds intersects the interior of a specified rectangular area.
    boolean isEmpty()
    Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.
    String toString()
    Returns a string representation of this BoundingBox.
    • Methods inherited from class javafx.geometry.Bounds

      getDepth, getHeight, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getWidth
    • Methods inherited from class java.lang.Object

      clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Detail

    • BoundingBox

      public BoundingBox(double minX,
                         double minY,
                         double minZ,
                         double width,
                         double height,
                         double depth)
      Creates a new instance of 3D BoundingBox.

      Parameters:

      minX - the X coordinate of the upper-left corner

    • BoundingBox

      public BoundingBox(double minX,
                         double minY,
                         double width,
                         double height)
      Creates a new instance of 2D BoundingBox.

      Parameters:

      minX - the X coordinate of the upper-left corner

  • Method Detail

    • isEmpty

      public boolean isEmpty()
      Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.

      Specified by:

      isEmpty in class Bounds

      Returns:

      true if any of the dimensions(width, height or depth) of this bounds is less than zero.

    • contains

      public boolean contains(Point2D p)
      Tests if the specified point is inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      p - the specified point to be tested

      Returns:

      true if the specified point is inside the boundary of this Bounds; false otherwise.

    • contains

      public boolean contains(Point3D p)
      Tests if the specified point is inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      p - the specified 3D point to be tested

      Returns:

      true if the specified point is inside the boundary of this Bounds; false otherwise.

    • contains

      public boolean contains(double x,
                              double y)
      Tests if the specified (x, y) coordinates are inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      x - the specified x coordinate to be tested

      Returns:

      true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise.

    • contains

      public boolean contains(double x,
                              double y,
                              double z)
      Tests if the specified (x, y, z) coordinates are inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      x - the specified x coordinate to be tested

      Returns:

      true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise.

    • contains

      public boolean contains(Bounds b)
      Tests if the interior of this Bounds entirely contains the specified Bounds, b. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      b - The specified Bounds

      Returns:

      true if the specified Bounds, b, is inside the boundary of this Bounds; false otherwise.

    • contains

      public boolean contains(double x,
                              double y,
                              double w,
                              double h)
      Tests if the interior of this Bounds entirely contains the specified rectangular area. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular area

      Returns:

      true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise.

    • contains

      public boolean contains(double x,
                              double y,
                              double z,
                              double w,
                              double h,
                              double d)
      Tests if the interior of this Bounds entirely contains the specified rectangular area. The points on the boundary are considered to lie inside the BoundingBox.

      Specified by:

      contains in class Bounds

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular volume

      Returns:

      true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise.

    • intersects

      public boolean intersects(Bounds b)
      Tests if the interior of this Bounds intersects the interior of a specified Bounds, b.

      Specified by:

      intersects in class Bounds

      Parameters:

      b - The specified Bounds

      Returns:

      true if the interior of this Bounds and the interior of the specified Bounds, b, intersect.

    • intersects

      public boolean intersects(double x,
                                double y,
                                double w,
                                double h)
      Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

      Specified by:

      intersects in class Bounds

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular area

      Returns:

      true if the interior of this Bounds and the interior of the rectangular area intersect.

    • intersects

      public boolean intersects(double x,
                                double y,
                                double z,
                                double w,
                                double h,
                                double d)
      Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

      Specified by:

      intersects in class Bounds

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular volume

      Returns:

      true if the interior of this Bounds and the interior of the rectangular area intersect.

    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.

      Overrides:

      equals in class Object

      Parameters:

      obj - the reference object with which to compare

      Returns:

      true if this object is the same as the obj argument; false otherwise

    • hashCode

      public int hashCode()
      Returns a hash code value for the object.

      Overrides:

      hashCode in class Object

      Returns:

      a hash code value for the object.

    • toString

      public String toString()
      Returns a string representation of this BoundingBox. This method is intended to be used only for informational purposes. The content and format of the returned string might getMary between implementations. The returned string might be empty but cannot be null.

      Overrides:

      toString in class Object

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API