game.geom
Class CBoundingBox
java.lang.Object
game.geom.CBoundingBox
public class CBoundingBox
- extends java.lang.Object
A moving bounding box. For now it can translate, but its width and height can't vary (easier updates).
- Author:
- sroccaserra
Field Summary |
private float |
m_h
|
private float |
m_h_2
|
private float |
m_w
|
private float |
m_w_2
|
float |
x
|
float |
y
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
public float x
y
public float y
m_w
private float m_w
m_h
private float m_h
m_w_2
private float m_w_2
m_h_2
private float m_h_2
CBoundingBox
public CBoundingBox()
CBoundingBox
public CBoundingBox(float xValue,
float yValue,
float w,
float h)
CBoundingBox
public CBoundingBox(CBoundingBox rhs)
getW
public final float getW()
getW_2
public final float getW_2()
getH
public final float getH()
getRightX
public final float getRightX()
getLowY
public final float getLowY()
getCenterX
public final float getCenterX()
getCenterY
public final float getCenterY()
getCenter
public final CVector2D getCenter()
getXi
public final int getXi()
getYi
public final int getYi()
getWi
public final int getWi()
getHi
public final int getHi()
setW
public final void setW(float w)
setH
public final void setH(float h)
translateX
public final void translateX(float dx)
translateY
public final void translateY(float dy)
translate
public final void translate(float dx,
float dy)
intersect
public final boolean intersect(float xValue,
float yValue)
draw
public final void draw(java.awt.Graphics g)