public class SbBox3d extends SbBasic
SoGetBoundingBoxAction
).
See also:
SbXfBox3f
, SbBox2f
, SbBox2s
, SbVec3d
, SbVec2f
, SbVec2s
, SbMatrix
, SoGetBoundingBoxAction
Modifier and Type | Field and Description |
---|---|
double[] |
array |
Constructor and Description |
---|
SbBox3d()
Constructor for a 3D double box.
|
SbBox3d(double[] components) |
SbBox3d(double xmin,
double ymin,
double zmin,
double xmax,
double ymax,
double zmax)
Constructor for a 3D double box.
|
SbBox3d(SbBox3d copyFrom) |
SbBox3d(SbVec3d _min,
SbVec3d _max)
Constructor for a 3D double box.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(SbBox3d bb)
Returns true if the specified box is fully contained inside this box.
|
boolean |
equals(java.lang.Object obj) |
void |
extendBy(SbBox3d bb)
Extends this box (if necessary) to contain the specified box.
|
void |
extendBy(SbVec3d pt)
Extends this box (if necessary) to contain the specified point.
|
double[] |
getBounds()
Gets the corners of the box.
|
SbVec3d |
getCenter()
Returns the center of the box.
|
SbVec3d |
getClosestPoint(SbVec3d point)
Returns the closest point on the box to the given point.
|
SbVec3d |
getMax()
Returns the maximum point of the box.
|
SbVec3d |
getMin()
Returns the minimum point of the box.
|
SbVec3d[] |
getMinMax()
Gets the corners of the box.
|
double[] |
getOrigin()
Gets box origin which is the same as the minimum corner of the box.
|
double[] |
getSize()
Gets box size.
|
double[] |
getSpan(SbVec3d direction)
Finds the span of a box along a specified direction.
|
double[] |
getValue() |
double |
getVolume()
Returns the volume of the box.
|
boolean |
hasVolume()
Returns true if all three dimensions of the box have positive size, and false otherwise.
|
boolean |
intersect(SbBox3d bb)
Returns true if the specified box intersects this box.
|
boolean |
intersect(SbVec3d pt)
Returns true if the specified point intersects this box.
|
SbBox3d |
intersection(SbBox3d box)
Returns the intersection of the specified box with this box.
|
boolean |
isEmpty()
Returns true if the box is empty, and false otherwise.
|
void |
makeEmpty()
Makes an empty box.
|
int |
outside(SbMatrixd MVP)
Returns true if bounding box is completely outside the view-volume defined by the model+view+projection matrix given.
|
void |
setBounds(double xmin,
double ymin,
double zmin,
double xmax,
double ymax,
double zmax)
Sets the corners of the box.
|
void |
setBounds(SbVec3d _min,
SbVec3d _max)
Sets the corners of the box.
|
SbBox3d |
setValue(double[] components) |
SbBox3d |
setValue(double[] components,
int startIndex) |
void |
setValue(SbBox3d copyFrom) |
static SbBox3d[] |
toArray(long nativeArray,
long length) |
void |
transform(SbMatrixd m)
Transforms box by matrix, enlarging box to contain result.
|
public SbBox3d(SbBox3d copyFrom)
public SbBox3d(double[] components)
public SbBox3d()
public SbBox3d(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
public double[] getValue()
public SbBox3d setValue(double[] components, int startIndex)
public SbBox3d setValue(double[] components)
public void setValue(SbBox3d copyFrom)
public double[] getSpan(SbVec3d direction)
public boolean hasVolume()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static SbBox3d[] toArray(long nativeArray, long length)
public void transform(SbMatrixd m)
public double getVolume()
public void setBounds(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
public void extendBy(SbVec3d pt)
public void extendBy(SbBox3d bb)
public SbVec3d getCenter()
public boolean intersect(SbVec3d pt)
public boolean contains(SbBox3d bb)
public SbBox3d intersection(SbBox3d box)
public int outside(SbMatrixd MVP)
SoGLRenderAction
and SoSeparator
will handle this automatically for render culling).public boolean intersect(SbBox3d bb)
public double[] getBounds()
public void makeEmpty()
public double[] getSize()
public boolean isEmpty()
makeEmpty()
method. (This method only returns true if the maximum X value is
less than the minimum X value.)public double[] getOrigin()
public SbVec3d[] getMinMax()
public SbVec3d getMax()
public SbVec3d getClosestPoint(SbVec3d point)
public SbVec3d getMin()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com