Class SbBox2i32


  • public class SbBox2i32
    extends SbBasic
    2D box class. 2D box which has planes parallel to the major axes and is specified by two points (specified with 32 bits integers) on a diagonal. This class is part of the standard Open Inventor datatype classes and is used as input and output to geometry operations.

    See Also:
    SbBox3f, SbXfBox3f, SbBox2f, SbBox2s, SbVec3f, SbVec2f, SbVec2i32, SbMatrix
    • Field Detail

      • array

        public final int[] array
    • Constructor Detail

      • SbBox2i32

        public SbBox2i32​(SbBox2i32 copyFrom)
      • SbBox2i32

        public SbBox2i32​(int[] components)
      • SbBox2i32

        public SbBox2i32()
        Constructor for a 2D integer box. The box is initially empty.
      • SbBox2i32

        public SbBox2i32​(int xmin,
                         int ymin,
                         int xmax,
                         int ymax)
        Constructor for a 2D integer box. xmin , ymin , xmax , and ymax are the bounds of the box.
      • SbBox2i32

        public SbBox2i32​(SbVec2i32 _min,
                         SbVec2i32 _max)
        Constructor for a 2D integer box. m_min and m_max are the corners of the diagonal that defines the box.
    • Method Detail

      • getValue

        public int[] getValue()
      • setValue

        public SbBox2i32 setValue​(int[] components)
      • setValue

        public SbBox2i32 setValue​(int[] components,
                                  int startIndex)
      • setValue

        public void setValue​(SbBox2i32 copyFrom)
      • getAspectRatio

        public float getAspectRatio()
        Returns aspect ratio (ratio of width to height) of box.
      • intersection

        public SbBox2i32 intersection​(SbBox2i32 box)
        Returns the intersection of the specified box with this box. Returned box is empty if there is no intersection.
      • toArray

        public static SbBox2i32[] toArray​(long nativeArray,
                                          long length)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • makeEmpty

        public void makeEmpty()
        Makes an empty box.
      • getMax

        public SbVec2i32 getMax()
        Returns the maximum point of the box.
      • setBounds

        public void setBounds​(int xmin,
                              int ymin,
                              int xmax,
                              int ymax)
        Sets the corners of the box.
      • getMin

        public SbVec2i32 getMin()
        Returns the minimum point of the box.
      • extendBy

        public void extendBy​(SbVec2i32 pt)
        Extends this box (if necessary) to contain the specified point.
      • intersect

        public boolean intersect​(SbVec2i32 pt)
        Returns true if the specified point intersects this box.
      • intersect

        public boolean intersect​(SbBox2i32 bb)
        Returns true if the specified box intersects this box.
      • extendBy

        public void extendBy​(SbBox2i32 r)
        Extends this box (if necessary) to contain the specified box.
      • setBounds

        public void setBounds​(SbVec2i32 _min,
                              SbVec2i32 _max)
        Sets the corners of the box.
      • getOrigin

        public int[] getOrigin()
        Returns origin (minimum point) of box.
      • getSize

        public int[] getSize()
        Returns box size.
      • getBounds

        public int[] getBounds()
        Gets the corners of the box.
      • getMinMax

        public SbVec2i32[] getMinMax()
        Gets the corners of the box.