public class SbBox3f extends SbBasic
SoGetBoundingBoxAction
).
See also:
SbXfBox3f
, SbBox2f
, SbBox2s
, SbVec3f
, SbVec2f
, SbVec2s
, SbMatrix
, SoGetBoundingBoxAction
Modifier and Type | Field and Description |
---|---|
float[] |
array |
Constructor and Description |
---|
SbBox3f()
Constructor for a 3D float box.
|
SbBox3f(float[] components) |
SbBox3f(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)
Constructor for a 3D float box.
|
SbBox3f(SbBox3f copyFrom) |
SbBox3f(SbVec3f _min,
SbVec3f _max)
Constructor for a 3D float box.
|
Modifier and Type | Method and Description |
---|---|
float |
computeMaxDistance2(SbVec3f p)
Returns the squared maximum distance between a point and the 8 bounding box's vertices.
|
boolean |
contains(SbBox3f bb)
Returns true if the specified box is fully contained inside this box.
|
boolean |
equals(java.lang.Object obj) |
void |
extendBy(SbBox3f bb)
Extends this box (if necessary) to contain the specified box.
|
void |
extendBy(SbVec3f pt)
Extends this box (if necessary) to contain the specified point.
|
float[] |
getBounds()
Gets the corners of the box.
|
SbVec3f |
getCenter()
Returns the center of the box.
|
SbVec3f |
getClosestPoint(SbVec3f point)
Returns the closest point on the box to the given point.
|
SbVec3f |
getMax()
Returns the maximum point of the box.
|
SbVec3f |
getMin()
Returns the minimum point of the box.
|
SbVec3f[] |
getMinMax()
Gets the corners of the box.
|
float[] |
getOrigin()
Gets box origin which is the same as the minimum corner of the box.
|
SbVec3f |
getSize()
Gets box size.
|
float[] |
getSpan(SbVec3f direction)
Finds the span of a box along a specified direction.
|
float[] |
getValue() |
float |
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(SbBox3f bb)
Returns true if the specified box intersects this box.
|
boolean |
intersect(SbVec3f pt)
Returns true if the specified point intersects this box.
|
SbBox3f |
intersection(SbBox3f 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(SbMatrix MVP)
Returns true if bounding box is completely outside the view-volume defined by the model+view+projection matrix given.
|
void |
setBounds(float xmin,
float ymin,
float zmin,
float xmax,
float ymax,
float zmax)
Sets the corners of the box.
|
void |
setBounds(SbVec3f _min,
SbVec3f _max)
Sets the corners of the box.
|
SbBox3f |
setValue(float[] components) |
SbBox3f |
setValue(float[] components,
int startIndex) |
void |
setValue(SbBox3f copyFrom) |
static SbBox3f[] |
toArray(long nativeArray,
long length) |
void |
transform(SbMatrix m)
Transforms box by matrix, enlarging box to contain result.
|
boolean |
triangleBoxOverlap(SbVec3f u0,
SbVec3f u1,
SbVec3f u2)
Return true if the given triangle intersects the bounding box.
|
public SbBox3f(SbBox3f copyFrom)
public SbBox3f(float[] components)
public SbBox3f(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
public SbBox3f()
public SbBox3f setValue(float[] components, int startIndex)
public SbBox3f setValue(float[] components)
public float[] getValue()
public void setValue(SbBox3f copyFrom)
public float computeMaxDistance2(SbVec3f p)
public void transform(SbMatrix m)
public void extendBy(SbBox3f bb)
public float getVolume()
public boolean triangleBoxOverlap(SbVec3f u0, SbVec3f u1, SbVec3f u2)
public static SbBox3f[] toArray(long nativeArray, long length)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public float[] getSpan(SbVec3f direction)
public int outside(SbMatrix MVP)
SoGLRenderAction
and SoSeparator
will handle this automatically for render culling).public SbVec3f getMax()
public void setBounds(float xmin, float ymin, float zmin, float xmax, float ymax, float zmax)
public SbVec3f getMin()
public boolean contains(SbBox3f bb)
public boolean intersect(SbVec3f pt)
public void extendBy(SbVec3f pt)
public boolean intersect(SbBox3f bb)
public SbBox3f intersection(SbBox3f box)
public SbVec3f getCenter()
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 SbVec3f getSize()
public SbVec3f[] getMinMax()
public float[] getBounds()
public SbVec3f getClosestPoint(SbVec3f point)
public float[] getOrigin()
Generated on August 20, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com