|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ode4j.ode.DAABB
public class DAABB
Convenience class for operations on AABB (Axis-aligned bounding boxes).
Axes are numbered from 0 to 2.
DAABBC
Constructor Summary | |
---|---|
DAABB()
|
Method Summary | |
---|---|
double |
avg0()
|
double |
avg1()
|
double |
avg2()
|
void |
expand(DAABBC aabb)
Expand this AABB to include the given AABB. |
void |
expand(DVector3C point)
Expand this AABB to include the given point. |
DVector3 |
getCenter()
|
DVector3 |
getLengths()
|
double |
getMax(int i)
Get maximum extension of axis |
double |
getMax0()
get[1]. |
double |
getMax1()
get[3]. |
double |
getMax2()
get[5]. |
double |
getMin(int i)
Get minimum extension of axis |
double |
getMin0()
get[0]. |
double |
getMin1()
get[2]. |
double |
getMin2()
get[4]. |
boolean |
isDisjoint(DAABBC aabb2)
Checks whether the to AABBs are disjoint. |
boolean |
isValid()
|
double |
len0()
|
double |
len1()
|
double |
len2()
|
void |
set(DAABBC aabb)
|
void |
set(double min0,
double max0,
double min1,
double max1,
double min2,
double max2)
|
void |
setMax(DVector3C max)
|
void |
setMax0(double d)
|
void |
setMax1(double d)
|
void |
setMax2(double d)
|
void |
setMin(DVector3C min)
|
void |
setMin0(double d)
|
void |
setMin1(double d)
|
void |
setMin2(double d)
|
void |
setMinMax(double mm0,
double mm1,
double mm2)
Set the minimum and maximum values to -+ the given parameters. |
void |
setMinMax(DVector3C v1,
DVector3C v2)
Determines the AABB from a box defined by the two vectors. |
void |
setToInfinity()
Set the minimum and maximum values to -infinity and infinity. |
void |
setZero()
|
void |
shiftPos(DVector3C pos)
Move this AABB by pos. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DAABB()
Method Detail |
---|
public void setToInfinity()
public void setMinMax(double mm0, double mm1, double mm2)
public void shiftPos(DVector3C pos)
pos
- public double len0()
len0
in interface DAABBC
public double len1()
len1
in interface DAABBC
public double len2()
len2
in interface DAABBC
public double avg0()
public double avg1()
public double avg2()
public boolean isValid()
isValid
in interface DAABBC
public boolean isDisjoint(DAABBC aabb2)
isDisjoint
in interface DAABBC
aabb2
-
public void setMinMax(DVector3C v1, DVector3C v2)
v1
- v2
- public void setMin0(double d)
public void setMin1(double d)
public void setMin2(double d)
public void setMax0(double d)
public void setMax1(double d)
public void setMax2(double d)
public double getMin0()
getMin0
in interface DAABBC
public double getMin1()
getMin1
in interface DAABBC
public double getMin2()
getMin2
in interface DAABBC
public double getMax0()
getMax0
in interface DAABBC
public double getMax1()
getMax1
in interface DAABBC
public double getMax2()
getMax2
in interface DAABBC
public double getMax(int i)
DAABBC
getMax
in interface DAABBC
i
- The axis (0, 1 or 2)public double getMin(int i)
DAABBC
getMin
in interface DAABBC
i
- The axis (0, 1 or 2)public DVector3 getLengths()
getLengths
in interface DAABBC
public DVector3 getCenter()
getCenter
in interface DAABBC
public void set(DAABBC aabb)
public void set(double min0, double max0, double min1, double max1, double min2, double max2)
public void setZero()
public void setMin(DVector3C min)
public void setMax(DVector3C max)
public void expand(DVector3C point)
point
- public void expand(DAABBC aabb)
aabb
- public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |