Package com.openinventor.inventor
Class SbBox4i32
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbBox4i32
-
public class SbBox4i32 extends SbBasic
4D box class. 4D box which has planes parallel to the major axes and is specified by two points on a diagonal. Bounds are included in left and included in right, [min, max]. The bbox ((0, 0, 0, 0), (0, 0, 0, 0)) contains the single point (0, 0, 0, 0).
-
-
Field Summary
Fields Modifier and Type Field Description int[]
array
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
void
extendBy(SbVec4i32 pt)
Extends this box (if necessary) to contain the specified point.SbVec4i32
getMax()
Returns the maximum point of the box.SbVec4i32
getMin()
Returns the minimum point of the box.SbVec4i32
getSize()
Gets box size.int[]
getValue()
boolean
intersect(SbVec4i32 pt)
Returns true if the specified point intersects this box.boolean
isEmpty()
Returns true if the box is empty, and false otherwise.void
makeEmpty()
Makes an empty box.SbBox4i32
setValue(int[] components)
SbBox4i32
setValue(int[] components, int startIndex)
void
setValue(SbBox4i32 copyFrom)
static SbBox4i32[]
toArray(long nativeArray, long length)
-
-
-
Constructor Detail
-
SbBox4i32
public SbBox4i32(SbBox4i32 copyFrom)
-
SbBox4i32
public SbBox4i32(int[] components)
-
SbBox4i32
public SbBox4i32(SbVec4i32 _min, SbVec4i32 _max)
Constructor for a 4D integer32 box. m_min and m_max are the corners of the diagonal that define the box.
-
SbBox4i32
public SbBox4i32()
Constructor for a 4D integer32 box. The box is initially empty.
-
-
Method Detail
-
setValue
public SbBox4i32 setValue(int[] components, int startIndex)
-
setValue
public void setValue(SbBox4i32 copyFrom)
-
setValue
public SbBox4i32 setValue(int[] components)
-
getValue
public int[] getValue()
-
extendBy
public void extendBy(SbVec4i32 pt)
Extends this box (if necessary) to contain the specified point.
-
toArray
public static SbBox4i32[] toArray(long nativeArray, long length)
-
intersect
public boolean intersect(SbVec4i32 pt)
Returns true if the specified point intersects this box.
-
getMin
public SbVec4i32 getMin()
Returns the minimum point of the box. The minimum point is the corner of the box with the lowest X, Y, Z and W values.
-
getMax
public SbVec4i32 getMax()
Returns the maximum point of the box. The maximum point is the corner of the box with the highest X, Y, Z and W values.
-
isEmpty
public boolean isEmpty()
Returns true if the box is empty, and false otherwise. Note: Setting the box to all zeros does not make it "empty". Use themakeEmpty()
method. (This method only returns true if the maximum X value is less than the minimum X value.)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getSize
public SbVec4i32 getSize()
Gets box size.
-
makeEmpty
public void makeEmpty()
Makes an empty box.
-
-