Package com.tenio.engine.physic.common
Class InvertedAABBox2D
- java.lang.Object
-
- com.tenio.engine.physic.common.InvertedAABBox2D
-
- All Implemented Interfaces:
IRender
public class InvertedAABBox2D extends java.lang.Object implements IRender
AABB stands for Axis-aligned Bounding Box. It is a fairly computationally- and memory-efficient way of representing a volume, typically used to see if two objects might be touching.- Author:
- kong
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getBottom()
float
getLeft()
float
getRight()
float
getTop()
boolean
isOverlappedWith(InvertedAABBox2D other)
static InvertedAABBox2D
newInstance()
void
render(Paint paint)
To render objects to screenvoid
setBottom(float bottom)
void
setLeft(float left)
void
setRight(float right)
void
setTop(float top)
static InvertedAABBox2D
valueOf(float left, float top, float right, float bottom)
-
-
-
Method Detail
-
newInstance
public static InvertedAABBox2D newInstance()
-
valueOf
public static InvertedAABBox2D valueOf(float left, float top, float right, float bottom)
-
isOverlappedWith
public boolean isOverlappedWith(InvertedAABBox2D other)
- Parameters:
other
- the other BBox, seeInvertedAABBox2D
- Returns:
- true if the BBox described by other intersects with this one
-
getTop
public float getTop()
-
setTop
public void setTop(float top)
-
getLeft
public float getLeft()
-
setLeft
public void setLeft(float left)
-
getBottom
public float getBottom()
-
setBottom
public void setBottom(float bottom)
-
getRight
public float getRight()
-
setRight
public void setRight(float right)
-
-