public class StaticCollisionBox extends Rectangle implements CollisionArea, StaticCollision
CollisionBox implementation.| Modifier and Type | Field and Description |
|---|---|
protected Collisions |
collisions |
disposed, geometry, positionChangeListeners, sizeChangeListeners| Constructor and Description |
|---|
StaticCollisionBox() |
StaticCollisionBox(float x,
float y,
float width,
float height) |
StaticCollisionBox(int id) |
StaticCollisionBox(int id,
Collisions collisions) |
StaticCollisionBox(int id,
float x,
float y,
float width,
float height) |
StaticCollisionBox(int id,
Rectangle rectangle) |
StaticCollisionBox(Rectangle rectangle) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
|
boolean |
equals(java.lang.Object o) |
void |
forceTo(float x,
float y)
Sets the current x and y coordinate to the specified x and y and force updates the
rendering position to match
|
void |
forceTo(float x,
float y,
float width,
float height)
Sets the current x, y, width and height and force updates the
rendering state to match
|
void |
forceToHeight(float height)
Sets the current height to the specified height and force updates the
rendering bounds to match
|
void |
forceToWidth(float width)
Sets the current width to the specified width and force updates the
rendering bounds to match
|
int |
getId()
Returns the unique id of this object
|
float |
getRawRenderHeight()
Returns the raw float value used for the render height coordinate
|
float |
getRawRenderWidth()
Returns the raw float value used for the render width coordinate
|
float |
getRawRenderX()
Returns the raw float value used for the render x coordinate
|
float |
getRawRenderY()
Returns the raw float value used for the render y coordinate
|
RenderCoordMode |
getRenderCoordMode()
Returns the mode used for calculating render coordinates
|
int |
getRenderHeight()
Returns the render height of this object using the set
RenderCoordMode |
int |
getRenderWidth()
Returns the render width of this object using the set
RenderCoordMode |
int |
getRenderX()
Returns the render x coordinate of this object using the set
RenderCoordMode |
int |
getRenderY()
Returns the render y coordinate of this object using the set
RenderCoordMode |
int |
hashCode() |
void |
init(int id,
float x,
float y,
float width,
float height) |
void |
interpolate(float alpha)
Called during interpolate phase each interpolate()
|
void |
preUpdate()
Called at the start of each update() before any changes are made to this object
|
protected void |
release() |
void |
setRenderCoordMode(RenderCoordMode mode)
Sets the mode used for calculating render coordinates
|
CollisionArea |
setTo(float x,
float y,
float width,
float height)
Sets the current x, y, width and height
|
contains, contains, contains, contains, contains, copy, draw, edgeIterator, fill, getCenterX, getCenterY, getDistanceTo, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumberOfSides, getPolygon, getRotation, getVertices, getWidth, getX, getY, intersection, intersects, intersects, intersects, intersects, intersects, intersects, intersectsIgnoringEdges, intersectsLineSegment, intersectsLineSegment, isCircle, lerp, lerp, lerp, rotate, rotateAround, scale, set, set, setCenter, setCenterX, setCenterY, setHeight, setRadius, setRotation, setRotationAround, setSize, setSize, setWidth, setX, setXY, setXY, setY, toString, translateadd, addPostionChangeListener, addSizeChangeListener, clearPositionChangeListeners, clearPositionListeners, clearPositionListeners, clearSizeChangeListeners, clearSizeListeners, clearSizeListeners, getDistanceTo, intersects, moveTowards, moveTowards, notifyPositionChangeListeners, notifyPositionListeners, notifyPositionListeners, notifySizeChangeListeners, notifySizeListeners, notifySizeListeners, removePositionChangeListener, removePositionListener, removePositionListener, removeSizeChangeListener, removeSizeListener, removeSizeListener, setDisposed, setRotationAround, subtractclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddSizeChangeListener, contains, contains, contains, getCenterX, getCenterY, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumberOfSides, getPolygon, getWidth, intersects, intersects, intersectsIgnoringEdges, intersectsLineSegment, intersectsLineSegment, isCircle, removeSizeChangeListener, scale, setCenter, setCenterX, setCenterY, setRadiusaddPostionChangeListener, getDistanceTo, getDistanceTo, getX, getY, moveTowards, moveTowards, removePositionChangeListener, setX, setXY, setYprotected Collisions collisions
public StaticCollisionBox()
public StaticCollisionBox(float x,
float y,
float width,
float height)
public StaticCollisionBox(Rectangle rectangle)
public StaticCollisionBox(int id)
public StaticCollisionBox(int id,
Rectangle rectangle)
public StaticCollisionBox(int id,
float x,
float y,
float width,
float height)
public StaticCollisionBox(int id,
Collisions collisions)
public void init(int id,
float x,
float y,
float width,
float height)
protected void release()
public void dispose()
Shapedispose in interface CollisionObjectdispose in interface org.mini2Dx.gdx.utils.Disposabledispose in class Rectanglepublic void forceTo(float x,
float y,
float width,
float height)
CollisionAreaforceTo in interface CollisionAreax - The x coordinate to sety - The y coordinate to setwidth - The width to setheight - The height to setpublic void forceToWidth(float width)
CollisionAreaforceToWidth in interface CollisionAreawidth - The width to setpublic void forceToHeight(float height)
CollisionAreaforceToHeight in interface CollisionAreaheight - The height to setpublic int getId()
CollisionObjectgetId in interface CollisionObjectpublic void preUpdate()
CollisionObjectpreUpdate in interface CollisionObjectpreUpdate in interface Interpolatablepublic void interpolate(float alpha)
CollisionObjectinterpolate in interface CollisionObjectinterpolate in interface Interpolatablealpha - The alpha value between 0.0 and 1.0public void forceTo(float x,
float y)
CollisionObjectforceTo in interface CollisionObjectx - The x coordinate to sety - The y coordinate to setpublic CollisionArea setTo(float x, float y, float width, float height)
CollisionAreasetTo in interface CollisionAreax - The x coordinate to sety - The y coordinate to setwidth - The width to setheight - The height to setpublic int getRenderX()
CollisionObjectRenderCoordModegetRenderX in interface CollisionObjectpublic int getRenderY()
CollisionObjectRenderCoordModegetRenderY in interface CollisionObjectpublic float getRawRenderX()
CollisionObjectgetRawRenderX in interface CollisionObjectpublic float getRawRenderY()
CollisionObjectgetRawRenderY in interface CollisionObjectpublic int getRenderWidth()
CollisionAreaRenderCoordModegetRenderWidth in interface CollisionAreapublic int getRenderHeight()
CollisionAreaRenderCoordModegetRenderHeight in interface CollisionAreapublic float getRawRenderWidth()
CollisionAreagetRawRenderWidth in interface CollisionAreapublic float getRawRenderHeight()
CollisionAreagetRawRenderHeight in interface CollisionAreapublic RenderCoordMode getRenderCoordMode()
CollisionObjectgetRenderCoordMode in interface CollisionObjectRenderCoordMode.GLOBAL_DEFAULTpublic void setRenderCoordMode(RenderCoordMode mode)
CollisionObjectsetRenderCoordMode in interface CollisionObjectmode - The RenderCoordMode value