public class SbXfBox3f extends SbBox3f
SbBox3f
is used for this purpose it will expand each time it is transformed in order to keep itself axis-aligned. Transformations can be accumulated on an SbXfBox3f
without expanding the box, and after all transformations have been done, the box can be expanded to an axis-aligned box if necessary.
See also:
SbBox3f
, SbBox2f
, SbBox2s
, SbVec3f
, SbVec2f
, SbVec2s
, SbMatrix
, SoGetBoundingBoxAction
Constructor and Description |
---|
SbXfBox3f()
Constructor.
|
SbXfBox3f(float[] components) |
SbXfBox3f(SbBox3f box)
Constructor.
|
SbXfBox3f(SbVec3f _min,
SbVec3f _max)
Constructor.
|
SbXfBox3f(SbXfBox3f copyFrom) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
void |
extendBy(SbBox3f bb)
Extends the box (if necessary) to contain the given box.
|
void |
extendBy(SbVec3f pt)
Extends the box (if necessary) to contain the given 3D point.
|
void |
extendBy(SbXfBox3f bb)
Extends the box (if necessary) to contain the given box.
|
float[] |
getBounds()
Gets the bounds of the box.
|
SbVec3f |
getCenter()
Returns the center of the box.
|
SbMatrix |
getInverse()
Gets the inverse of the transformation on the box.
|
SbVec3f[] |
getMinMax()
Gets the bounds of the box.
|
float[] |
getOrigin()
Returns origin (minimum point) of the box.
|
float[] |
getSpan(SbVec3f direction)
Finds the extent of the box along a particular direction.
|
SbMatrix |
getTransform()
Gets the transformation on the box.
|
float[] |
getValue() |
float |
getVolume()
Gives the volume of the box (0 for an empty box).
|
boolean |
hasVolume()
Checks if the box has volume; i.e., all three dimensions have positive size.
|
boolean |
intersect(SbBox3f bb)
Returns true if intersection of given box and this box is not empty.
|
boolean |
intersect(SbVec3f pt)
Returns true if intersection of given point and this box is not empty.
|
boolean |
isEmpty()
Returns true if the box is empty, and false otherwise.
|
void |
makeEmpty()
Sets the box to contain nothing.
|
SbBox3f |
project()
|
void |
setBounds(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)
Sets the bounds of the box.
|
void |
setBounds(SbVec3f _min,
SbVec3f _max)
Sets the bounds of the box.
|
void |
setTransform(SbMatrix m)
Sets the transformation on the box.
|
SbXfBox3f |
setValue(float[] components) |
SbXfBox3f |
setValue(float[] components,
int startIndex) |
SbXfBox3f |
setValue(SbXfBox3d xfbox3d)
Sets value of the box from a double precision box.
|
void |
setValue(SbXfBox3f copyFrom) |
static SbXfBox3f[] |
toArray(long nativeArray,
long length) |
void |
transform(SbMatrix m)
Transforms the box by the given matrix.
|
computeMaxDistance2, contains, getClosestPoint, getMax, getMin, getSize, intersection, outside, setValue, triangleBoxOverlap
public SbXfBox3f(float[] components)
public SbXfBox3f(SbXfBox3f copyFrom)
public SbXfBox3f()
public SbXfBox3f(SbBox3f box)
public SbXfBox3f setValue(float[] components, int startIndex)
public void setValue(SbXfBox3f copyFrom)
public float[] getSpan(SbVec3f direction)
public static SbXfBox3f[] toArray(long nativeArray, long length)
public void transform(SbMatrix m)
public SbBox3f project()
public void extendBy(SbVec3f pt)
setTransform()
method, the point is assumed to be in the transformed space. For example, the following code sequence: will result in a bounding box extending from (-1,-1,-1) to (0,0,0) in the bbox's local (untransformed) space.SbXfBox3f bbox = new SbXfBox3f(); bbox.extendBy(new SbVec3f(0, 0, 0)); SbMatrix trans = new SbMatrix(); trans.setTranslate(new SbVec3f(1, 1, 1)); bbox.setTransform(trans); bbox.extendBy(new SbVec3f(0, 0, 0));
public SbXfBox3f setValue(SbXfBox3d xfbox3d)
public SbMatrix getInverse()
public void setBounds(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
public SbMatrix getTransform()
public void extendBy(SbXfBox3f bb)
public void extendBy(SbBox3f bb)
setTransform()
method, the given SbBox3f
is assumed to be in the transformed space.public SbVec3f getCenter()
public boolean intersect(SbBox3f bb)
public boolean intersect(SbVec3f pt)
public void makeEmpty()
public boolean isEmpty()
makeEmpty()
method. (This method only returns true if the maximum X value is
less than the minimum X value.)public boolean hasVolume()
public void setTransform(SbMatrix m)
public float[] getBounds()
public SbVec3f[] getMinMax()
public float getVolume()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com