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