|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.piratis.j2me.core.BBox2D
BBox2D: surrounding box with basic square features used by sprite, canvas and so on.
| Field Summary | |
int |
height
|
int |
width
|
int |
x
BBox data. |
int |
y
|
| Constructor Summary | |
BBox2D()
Void constructor |
|
BBox2D(BBox2D other)
Create a BBox based on another's size |
|
BBox2D(int x,
int y,
int width,
int height)
Main constructor |
|
| Method Summary | |
boolean |
collide(BBox2D other)
Check if the current BBox collides with another one. |
boolean |
collide(int oX,
int oY,
int oW,
int oH)
Check if this BBox collides with given area |
int |
getArea()
|
int |
getCenterX()
Gets the center on the X axis |
int |
getCenterY()
Gets the center on the Y axis |
boolean |
isVoid()
Checks if the bounding box is not null 0x0 |
BBox2D |
merge(BBox2D other)
Merges the current bbox with another, returning the minimal bbox containing both (overwritting current one) |
void |
nullify()
Voids the current BBox2D |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int x
public int y
public int width
public int height
| Constructor Detail |
public BBox2D()
public BBox2D(BBox2D other)
other - the basis BBox
public BBox2D(int x,
int y,
int width,
int height)
x - top left corner Xy - top left corner Ywidth - of the boxheight - of the box| Method Detail |
public int getCenterX()
public int getCenterY()
public boolean collide(BBox2D other)
other -
public boolean collide(int oX,
int oY,
int oW,
int oH)
oX - top-left x-coordinate area corneroY - top-left y-coordinate area corneroW - area widthoH - area height
public BBox2D merge(BBox2D other)
other - the merged bbox
public boolean isVoid()
public int getArea()
public void nullify()
|
Copyright(c) 2003-2004 Jordi Martin | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||