public class SbXfBox3d extends SbBox3d
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 SbXfBox3d
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
, SbVec3d
, SbVec2f
, SbVec2s
, SbMatrix
, SoGetBoundingBoxAction
Constructor and Description |
---|
SbXfBox3d()
Constructor.
|
SbXfBox3d(double[] components) |
SbXfBox3d(SbBox3d box)
Constructor.
|
SbXfBox3d(SbVec3d _min,
SbVec3d _max)
Constructor.
|
SbXfBox3d(SbXfBox3d copyFrom) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
void |
extendBy(SbBox3d bb)
Extends the box (if necessary) to contain the given box.
|
void |
extendBy(SbVec3d pt)
Extends the box (if necessary) to contain the given 3D point.
|
void |
extendBy(SbXfBox3d bb)
Extends the box (if necessary) to contain the given box.
|
double[] |
getBounds()
Gets the bounds of the box.
|
SbVec3d |
getCenter()
Returns the center of the box.
|
SbMatrixd |
getInverse()
Gets the inverse of the transformation on the box.
|
SbVec3d[] |
getMinMax()
Gets the bounds of the box.
|
double[] |
getOrigin()
Returns origin (minimum point) of the box.
|
double[] |
getSize()
Returns size of the box.
|
double[] |
getSpan(SbVec3d direction)
Finds the extent of the box along a particular direction.
|
SbMatrixd |
getTransform()
Gets the transformation on the box.
|
double[] |
getValue() |
double |
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(SbBox3d bb)
Returns true if intersection of this XfBox3d and the given Box3d is not empty.
|
boolean |
intersect(SbVec3d 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.
|
SbBox3d |
project()
|
void |
setBounds(double xmin,
double ymin,
double zmin,
double xmax,
double ymax,
double zmax)
Sets the bounds of the box.
|
void |
setBounds(SbVec3d _min,
SbVec3d _max)
Sets the bounds of the box.
|
void |
setTransform(SbMatrixd m)
Sets the transformation on the box.
|
SbXfBox3d |
setValue(double[] components) |
SbXfBox3d |
setValue(double[] components,
int startIndex) |
void |
setValue(SbXfBox3d copyFrom) |
SbXfBox3d |
setValue(SbXfBox3f xfbox3f)
Sets value of the box from a single precision box.
|
static SbXfBox3d[] |
toArray(long nativeArray,
long length) |
void |
transform(SbMatrixd m)
Transforms the box by the given matrix.
|
contains, getClosestPoint, getMax, getMin, intersection, outside, setValue
public SbXfBox3d(SbXfBox3d copyFrom)
public SbXfBox3d(double[] components)
public SbXfBox3d(SbBox3d box)
public SbXfBox3d()
public SbXfBox3d setValue(double[] components, int startIndex)
public void setValue(SbXfBox3d copyFrom)
public void setTransform(SbMatrixd m)
public void transform(SbMatrixd m)
public SbMatrixd getInverse()
public SbBox3d project()
public SbMatrixd getTransform()
public static SbXfBox3d[] toArray(long nativeArray, long length)
public SbXfBox3d setValue(SbXfBox3f xfbox3f)
public double getVolume()
public boolean intersect(SbBox3d bb)
public SbVec3d[] getMinMax()
public double[] getBounds()
public double[] getOrigin()
public void setBounds(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
public boolean intersect(SbVec3d pt)
public void extendBy(SbVec3d 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.SbXfBox3d 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 boolean hasVolume()
public SbVec3d getCenter()
public double[] getSpan(SbVec3d direction)
public void extendBy(SbXfBox3d bb)
public void makeEmpty()
public void extendBy(SbBox3d bb)
public boolean isEmpty()
makeEmpty()
method. (This method only returns true if the maximum X value is
less than the minimum X value.)Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com