public class SbBox2f extends SbBasic
See also:
SbBox3f
, SbXfBox3f
, SbBox2s
, SbVec3f
, SbVec2f
, SbVec2s
, SbMatrix
Modifier and Type | Field and Description |
---|---|
float[] |
array |
Constructor and Description |
---|
SbBox2f()
Constructor for a 2D float box.
|
SbBox2f(float[] components) |
SbBox2f(float xmin,
float ymin,
float xmax,
float ymax)
Constructor for a 2D float box.
|
SbBox2f(SbBox2f copyFrom) |
SbBox2f(SbVec2f _min,
SbVec2f _max)
Constructor for a 2D float box.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
void |
extendBy(SbBox2f r)
Extends this box (if necessary) to contain the specified box.
|
void |
extendBy(SbVec2f pt)
Extends this box (if necessary) to contain the specified point.
|
float |
getAspectRatio()
Gets box aspect ratio.
|
float[] |
getBounds()
Gets the corners of the box.
|
SbVec2f |
getCenter()
Returns the center of the box.
|
SbVec2f |
getClosestPoint(SbVec2f point)
Returns the closest point on the box to the given point.
|
SbVec2f |
getMax()
Returns the maximum point of the box.
|
SbVec2f |
getMin()
Returns the minimum point of the box.
|
SbVec2f[] |
getMinMax()
Gets the corners of the box.
|
float[] |
getOrigin()
Gets box origin.
|
float[] |
getSize()
Gets box size.
|
float[] |
getValue() |
boolean |
hasArea()
Returns true if both dimensions of the box have positive size, and false otherwise.
|
boolean |
intersect(SbBox2f bb)
Returns true if the specified box intersects this box.
|
boolean |
intersect(SbVec2f pt)
Returns true if the specified point intersects this box.
|
SbBox2f |
intersection(SbBox2f 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.
|
void |
setBounds(float xmin,
float ymin,
float xmax,
float ymax)
Sets the corners of the box.
|
void |
setBounds(SbVec2f _min,
SbVec2f _max)
Sets the corners of the box.
|
SbBox2f |
setValue(float[] components) |
SbBox2f |
setValue(float[] components,
int startIndex) |
void |
setValue(SbBox2f copyFrom) |
static SbBox2f[] |
toArray(long nativeArray,
long length) |
public SbBox2f(SbBox2f copyFrom)
public SbBox2f(float[] components)
public SbBox2f()
public SbBox2f(float xmin, float ymin, float xmax, float ymax)
public float[] getValue()
public SbBox2f setValue(float[] components)
public SbBox2f setValue(float[] components, int startIndex)
public void setValue(SbBox2f copyFrom)
public boolean isEmpty()
makeEmpty()
method. (This method only returns true if the maximum X value is
less than the minimum X value.)public void makeEmpty()
public void setBounds(float xmin, float ymin, float xmax, float ymax)
public static SbBox2f[] toArray(long nativeArray, long length)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean hasArea()
public SbVec2f getCenter()
public SbVec2f getMax()
public float[] getBounds()
public boolean intersect(SbVec2f pt)
public SbBox2f intersection(SbBox2f box)
public void extendBy(SbVec2f pt)
public void extendBy(SbBox2f r)
public SbVec2f[] getMinMax()
public float[] getSize()
public float getAspectRatio()
public boolean intersect(SbBox2f bb)
public SbVec2f getClosestPoint(SbVec2f point)
public SbVec2f getMin()
public float[] getOrigin()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com