Package com.openinventor.inventor
Class SbBox2i32
java.lang.Object
com.openinventor.inventor.SbBasic
com.openinventor.inventor.SbBox2i32
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
Extends this box (if necessary) to contain the specified box.void
Extends this box (if necessary) to contain the specified point.float
Returns aspect ratio (ratio of width to height) of box.int[]
Gets the corners of the box.getMax()
Returns the maximum point of the box.getMin()
Returns the minimum point of the box.Gets the corners of the box.int[]
Returns origin (minimum point) of box.int[]
getSize()
Returns box size.int[]
getValue()
boolean
Returns true if the specified box intersects this box.boolean
Returns true if the specified point intersects this box.intersection
(SbBox2i32 box) Returns the intersection of the specified box with this box.void
Makes an empty box.void
setBounds
(int xmin, int ymin, int xmax, int ymax) Sets the corners of the box.void
Sets the corners of the box.setValue
(int[] components) setValue
(int[] components, int startIndex) void
static SbBox2i32[]
toArray
(long nativeArray, long length)
-
Field Details
-
array
public final int[] array
-
-
Constructor Details
-
SbBox2i32
-
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
Constructor for a 2D integer box. m_min and m_max are the corners of the diagonal that defines the box.
-
-
Method Details
-
getValue
public int[] getValue() -
setValue
-
setValue
-
setValue
-
getAspectRatio
public float getAspectRatio()Returns aspect ratio (ratio of width to height) of box. -
intersection
Returns the intersection of the specified box with this box. Returned box is empty if there is no intersection. -
toArray
-
equals
-
makeEmpty
public void makeEmpty()Makes an empty box. -
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
Returns the minimum point of the box. -
extendBy
Extends this box (if necessary) to contain the specified point. -
intersect
Returns true if the specified point intersects this box. -
intersect
Returns true if the specified box intersects this box. -
extendBy
Extends this box (if necessary) to contain the specified box. -
setBounds
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
Gets the corners of the box.
-