|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgame.physics.CStaticShape
public abstract class CStaticShape
Base class, has a fixed position and a bounding box. Can be shown or hidden.
| Field Summary | |
|---|---|
protected CBoundingBox |
m_box
|
protected IGameDisplay |
m_gameDisplay
|
protected boolean |
m_isHidden
|
| Constructor Summary | |
|---|---|
CStaticShape(IGameDisplay gameRect)
|
|
CStaticShape(IGameDisplay gameRect,
CBoundingBox boundingBox)
|
|
| Method Summary | |
|---|---|
void |
animate(float dt)
Does nothing (static shapes don't move). |
void |
cycle()
Does nothing. |
void |
drawBox(java.awt.Graphics g)
|
CVector2D |
getCenter()
Returns the center of the shape's bounding box. |
CVector2D |
getVelocity()
Returns a null vector (static shapes don't move). |
void |
hide()
|
boolean |
intersect(float x,
float y)
Checks for intersection with a 2D point. |
boolean |
isHidden()
|
void |
show()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IGameDisplay m_gameDisplay
protected CBoundingBox m_box
protected boolean m_isHidden
| Constructor Detail |
|---|
public CStaticShape(IGameDisplay gameRect)
public CStaticShape(IGameDisplay gameRect,
CBoundingBox boundingBox)
| Method Detail |
|---|
public final boolean isHidden()
public CVector2D getVelocity()
public void animate(float dt)
dt - public void cycle()
public boolean intersect(float x,
float y)
x - y -
public CVector2D getCenter()
public final void hide()
public final void show()
public void drawBox(java.awt.Graphics g)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||