| Package | Description | 
|---|---|
| org.cell2d | |
| org.cell2d.space | 
| Modifier and Type | Method and Description | 
|---|---|
| CellVector | CellVector. relativeTo(Hitbox hitbox)Flips this CellVector to reflect the flipped status of the specified
 Hitbox and rotates it to reflect the Hitbox's angle of rotation, as if
 those properties were formerly relative to the Hitbox. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | CircleHitboxA CircleHitbox is a circular Hitbox with its origin at its center. | 
| class  | CompositeHitboxA CompositeHitbox is a Hitbox that is composed of other Hitboxes whose
 positions, flipped statuses, and angles of rotation are all relative to those
 of the CompositeHitbox itself. | 
| class  | LineHitboxA LineHitbox is a Hitbox shaped like a line segment, with one endpoint
 being its position and the other being the sum of its position and a vector
 called its difference. | 
| class  | PointHitboxA PointHitbox is a Hitbox that consists only of the point that is its
 absolute position. | 
| class  | PolygonHitboxA PolygonHitbox is a polygonal Hitbox defined by a List of vertices. | 
| class  | RectangleHitboxA RectangleHitbox is a rectangular Hitbox with sides that remain
 orthogonal regardless of its angle of rotation. | 
| Modifier and Type | Method and Description | 
|---|---|
| Hitbox | MobileObject. getCollisionHitbox()Returns this MobileObject's collision Hitbox, or null if it has none. | 
| Hitbox | CompositeHitbox. getComponent(int id)Returns the component Hitbox that is assigned to this CompositeHitbox
 with the specified ID. | 
| abstract Hitbox | Hitbox. getCopy()Returns a copy of this Hitbox with its relative position at the origin
 that is not flipped or rotated. | 
| Hitbox | SpaceObject. getLocatorHitbox()Returns this SpaceObject's locator Hitbox. | 
| Hitbox | SpaceObject. getOverlapHitbox()Returns this SpaceObject's overlap Hitbox, or null if it has none. | 
| Hitbox | SpaceObject. getSolidHitbox()Returns this SpaceObject's solid Hitbox, or null if it has none. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.Map<java.lang.Integer,Hitbox> | CompositeHitbox. getComponents()Returns an unmodifiable Map to this CompositeHitbox's components from
 their respective IDs. | 
| Modifier and Type | Method and Description | 
|---|---|
| double | Hitbox. angleTo(Hitbox hitbox)Returns the absolute angle from this Hitbox's position to the specified
 Hitbox's position. | 
| <O extends SpaceObject> | SpaceState. boundingBoxesMeet(Hitbox hitbox,
                 java.lang.Class<O> cls)Returns all of this SpaceState's SpaceObjects of the specified class
 whose overlap Hitboxes' rectangular bounding boxes touch or intersect the
 specified Hitbox's rectangular bounding box. | 
| long | Hitbox. distanceTo(Hitbox hitbox)Returns the absolute distance from this Hitbox's position to the
 specified Hitbox's position. | 
| <O extends SpaceObject> | SpaceState. intersectingSolidObject(Hitbox hitbox,
                       java.lang.Class<O> cls)Returns one of this SpaceState's SpaceObjects of the specified class
 whose solid Hitbox overlaps the specified Hitbox, or null if there is
 none. | 
| <O extends SpaceObject> | SpaceState. intersectingSolidObjects(Hitbox hitbox,
                        java.lang.Class<O> cls)Returns all of this SpaceState's SpaceObjects of the specified class
 whose solid Hitboxes overlap the specified Hitbox. | 
| <O extends SpaceObject> | SpaceState. isIntersectingSolidObject(Hitbox hitbox,
                         java.lang.Class<O> cls)Returns whether this SpaceState has any SpaceObjects of the specified
 class whose solid Hitboxes overlap the specified Hitbox. | 
| <O extends SpaceObject> | SpaceState. isOverlappingObject(Hitbox hitbox,
                   java.lang.Class<O> cls)Returns whether this SpaceState has any SpaceObjects of the specified
 class that overlap the specified Hitbox. | 
| <O extends SpaceObject> | SpaceState. nearestIntersectingSolidObject(CellVector point,
                              Hitbox hitbox,
                              java.lang.Class<O> cls)Returns this SpaceState's SpaceObject of the specified class whose solid
 Hitbox overlaps the specified Hitbox whose center is nearest to the
 specified point, or null if there is none. | 
| <O extends SpaceObject> | SpaceState. nearestIntersectingSolidObject(long pointX,
                              long pointY,
                              Hitbox hitbox,
                              java.lang.Class<O> cls)Returns this SpaceState's SpaceObject of the specified class whose solid
 Hitbox overlaps the specified Hitbox whose center is nearest to the
 specified point, or null if there is none. | 
| <O extends SpaceObject> | SpaceState. nearestOverlappingObject(CellVector point,
                        Hitbox hitbox,
                        java.lang.Class<O> cls)Returns this SpaceState's SpaceObject of the specified class that
 overlaps the specified Hitbox whose center is nearest to the specified
 point, or null if there is none. | 
| <O extends SpaceObject> | SpaceObject. nearestOverlappingObject(Hitbox hitbox,
                        java.lang.Class<O> cls)Returns the SpaceObject of the specified class that overlaps the
 specified Hitbox in this SpaceObject's SpaceState that is nearest to it -
 or null if this SpaceObject has no SpaceState, or no SpaceObject of that
 class is overlapping the Hitbox. | 
| <O extends SpaceObject> | SpaceState. nearestOverlappingObject(long pointX,
                        long pointY,
                        Hitbox hitbox,
                        java.lang.Class<O> cls)Returns this SpaceState's SpaceObject of the specified class that
 overlaps the specified Hitbox whose center is nearest to the specified
 point, or null if there is none. | 
| static boolean | Hitbox. overlap(Hitbox hitbox1,
       Hitbox hitbox2)Returns whether the two specified Hitboxes overlap. | 
| <O extends SpaceObject> | SpaceState. overlappingObject(Hitbox hitbox,
                 java.lang.Class<O> cls)Returns one of this SpaceState's SpaceObjects of the specified class that
 overlaps the specified Hitbox, or null if there is none. | 
| <O extends SpaceObject> | SpaceState. overlappingObjects(Hitbox hitbox,
                  java.lang.Class<O> cls)Returns all of this SpaceState's SpaceObjects of the specified class that
 overlap the specified Hitbox. | 
| boolean | Hitbox. overlaps(Hitbox hitbox)Returns whether this Hitbox overlaps the specified Hitbox. | 
| boolean | MobileObject. setCollisionHitbox(Hitbox collisionHitbox)Sets this MobileObject's collision Hitbox to the specified Hitbox. | 
| boolean | CompositeHitbox. setComponent(int id,
            Hitbox hitbox)Sets the component Hitbox that is assigned to this CompositeHitbox with
 the specified ID to the specified Hitbox. | 
| boolean | SpaceObject. setLocatorHitbox(Hitbox locatorHitbox)Sets this SpaceObject's locator Hitbox to the specified Hitbox. | 
| boolean | SpaceObject. setOverlapHitbox(Hitbox overlapHitbox)Sets this SpaceObject's overlap Hitbox to the specified Hitbox. | 
| boolean | SpaceObject. setSolidHitbox(Hitbox solidHitbox)Sets this SpaceObject's solid Hitbox to the specified Hitbox. | 
| <O extends SpaceObject> | SpaceState. solidBoundingBoxesMeet(Hitbox hitbox,
                      java.lang.Class<O> cls)Returns all of this SpaceState's solid SpaceObjects of the specified
 class whose solid Hitboxes' rectangular bounding boxes touch or intersect
 the specified Hitbox's rectangular bounding box. |