public class StaticCollisionPolygon extends Polygon implements CollisionArea
CollisionPolygon
implementation.disposed, geometry, positionChangeListeners, sizeChangeListeners
Constructor and Description |
---|
StaticCollisionPolygon(float[] vertices) |
StaticCollisionPolygon(int id,
Collisions collisions,
float[] vertices) |
StaticCollisionPolygon(int id,
Collisions collisions,
org.mini2Dx.gdx.math.Vector2[] points) |
StaticCollisionPolygon(int id,
float[] vertices) |
StaticCollisionPolygon(int id,
org.mini2Dx.gdx.math.Vector2[] points) |
StaticCollisionPolygon(org.mini2Dx.gdx.math.Vector2[] points) |
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[] vertices) |
void |
init(int id,
org.mini2Dx.gdx.math.Vector2[] points) |
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
|
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
|
addPoint, addPoint, contains, contains, contains, contains, copy, draw, edgeIterator, fill, getCenterX, getCenterY, getDistanceTo, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumberOfSides, getPolygon, getRotation, getTriangles, getVertices, getWidth, getX, getX, getY, getY, intersects, intersects, intersects, intersects, intersects, intersects, intersectsLineSegment, intersectsLineSegment, isCircle, isEquilateral, isEquilateral, isRectangle, isSameAs, lerp, lerp, lerp, removePoint, removePoint, rotate, rotateAround, scale, set, setCenter, setCenterX, setCenterY, setRadius, setRotation, setRotationAround, setVertices, setVertices, setX, setXY, setY, sign, toString, translate, triangleContains
add, addPostionChangeListener, addSizeChangeListener, clearPositionChangeListeners, clearPositionListeners, clearPositionListeners, clearSizeChangeListeners, clearSizeListeners, clearSizeListeners, getDistanceTo, moveTowards, moveTowards, notifyPositionChangeListeners, notifyPositionListeners, notifyPositionListeners, notifySizeChangeListeners, notifySizeListeners, notifySizeListeners, removePositionChangeListener, removePositionListener, removePositionListener, removeSizeChangeListener, removeSizeListener, removeSizeListener, setDisposed, setRotationAround, subtract
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addSizeChangeListener, contains, contains, contains, getCenterX, getCenterY, getHeight, getMaxX, getMaxY, getMinX, getMinY, getNumberOfSides, getPolygon, getWidth, intersects, intersects, intersectsLineSegment, intersectsLineSegment, isCircle, removeSizeChangeListener, scale, setCenter, setCenterX, setCenterY, setRadius
addPostionChangeListener, getDistanceTo, getDistanceTo, getX, getY, moveTowards, moveTowards, removePositionChangeListener, setX, setXY, setY
public StaticCollisionPolygon(float[] vertices)
public StaticCollisionPolygon(org.mini2Dx.gdx.math.Vector2[] points)
public StaticCollisionPolygon(int id, float[] vertices)
public StaticCollisionPolygon(int id, org.mini2Dx.gdx.math.Vector2[] points)
public StaticCollisionPolygon(int id, Collisions collisions, float[] vertices)
public StaticCollisionPolygon(int id, Collisions collisions, org.mini2Dx.gdx.math.Vector2[] points)
public void init(int id, float[] vertices)
public void init(int id, org.mini2Dx.gdx.math.Vector2[] points)
public void dispose()
Shape
dispose
in interface CollisionObject
dispose
in interface org.mini2Dx.gdx.utils.Disposable
dispose
in class Polygon
public CollisionArea setTo(float x, float y, float width, float height)
CollisionArea
setTo
in interface CollisionArea
x
- The x coordinate to sety
- The y coordinate to setwidth
- The width to setheight
- The height to setpublic void forceTo(float x, float y, float width, float height)
CollisionArea
forceTo
in interface CollisionArea
x
- The x coordinate to sety
- The y coordinate to setwidth
- The width to setheight
- The height to setpublic void forceToWidth(float width)
CollisionArea
forceToWidth
in interface CollisionArea
width
- The width to setpublic void forceToHeight(float height)
CollisionArea
forceToHeight
in interface CollisionArea
height
- The height to setpublic int getId()
CollisionObject
getId
in interface CollisionObject
public void preUpdate()
CollisionObject
preUpdate
in interface CollisionObject
preUpdate
in interface Interpolatable
public void interpolate(float alpha)
CollisionObject
interpolate
in interface CollisionObject
interpolate
in interface Interpolatable
alpha
- The alpha value between 0.0 and 1.0public void forceTo(float x, float y)
CollisionObject
forceTo
in interface CollisionObject
x
- The x coordinate to sety
- The y coordinate to setpublic int getRenderX()
CollisionObject
RenderCoordMode
getRenderX
in interface CollisionObject
public int getRenderY()
CollisionObject
RenderCoordMode
getRenderY
in interface CollisionObject
public float getRawRenderX()
CollisionObject
getRawRenderX
in interface CollisionObject
public float getRawRenderY()
CollisionObject
getRawRenderY
in interface CollisionObject
public int getRenderWidth()
CollisionArea
RenderCoordMode
getRenderWidth
in interface CollisionArea
public int getRenderHeight()
CollisionArea
RenderCoordMode
getRenderHeight
in interface CollisionArea
public float getRawRenderWidth()
CollisionArea
getRawRenderWidth
in interface CollisionArea
public float getRawRenderHeight()
CollisionArea
getRawRenderHeight
in interface CollisionArea
public RenderCoordMode getRenderCoordMode()
CollisionObject
getRenderCoordMode
in interface CollisionObject
RenderCoordMode.GLOBAL_DEFAULT
public void setRenderCoordMode(RenderCoordMode mode)
CollisionObject
setRenderCoordMode
in interface CollisionObject
mode
- The RenderCoordMode
value