# PhysicsAABB

> Represents a 2D axis-aligned bounding-box.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public struct PhysicsAABB
```

## Constructors

| Constructor                                                                                                                                                  | Description                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
| [PhysicsAABB(UnityEngine.Vector2)](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/ctor.md#physicsaabb\(vector2\))                             | Create an axis-aligned bounding-box that encapsulates the specified point. |
| [PhysicsAABB(UnityEngine.Vector2,UnityEngine.Vector2)](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/ctor.md#physicsaabb\(vector2-vector2\)) | Create an axis-aligned bounding-box with the specified bounds.             |

## Properties

| Property                                                                                  | Description                                                                                                                                                                                                                                                            |
| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [center](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/center.md)         | Get the center of the AABB.                                                                                                                                                                                                                                            |
| [extents](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/extents.md)       | Get the extents (half size) of the AABB.                                                                                                                                                                                                                               |
| [isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/isvalid.md)       | Check if the AABB is valid. To be valid, [\_upperBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/upperbound.md) should be equal to or above [\_lowerBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/lowerbound.md).          |
| [lowerBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/lowerbound.md) | The lower-left bounding vertex. This should be equal to or lower than [\_upperBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/upperbound.md).                                                                                                     |
| [normalized](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/normalized.md) | Get a new normalized copy of the AABB ensuring that [\_lowerBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/lowerbound.md) is lower than or equal to [\_upperBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/upperbound.md). |
| [perimeter](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/perimeter.md)   | Get the surface area (perimeter length) of the AABB.                                                                                                                                                                                                                   |
| [upperBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/upperbound.md) | The upper-right bounding vertex. This should be equal to or above [\_lowerBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/lowerbound.md).                                                                                                         |

## Methods

| Method                                                                                        | Description                                                                                                                                                                                                                                                |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CastRay](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/castray.md)           | Perform a raycast against this AABB. Nothing will be detected if the ray starts inside the AABB. To check if the ray starts inside the AABB use [PhysicsAABB.OverlapPoint](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/overlappoint.md). |
| [Contains](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/contains.md)         | Checks if the AABB contains (completely encapsulates) the specified AABB.                                                                                                                                                                                  |
| [Normalize](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/normalize.md)       | Normalize the AABB ensuring that [\_lowerBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/lowerbound.md) is lower than or equal to [\_upperBound](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/upperbound.md).        |
| [Overlap](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/overlap.md)           | Check if the specified AABB overlaps this AABB.                                                                                                                                                                                                            |
| [OverlapPoint](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/overlappoint.md) | Check if the specified point overlaps this AABB.                                                                                                                                                                                                           |
| [Translate](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/translate.md)       | Create an AABB as a translated version of the current AABB.                                                                                                                                                                                                |
| [Union](/engine/6000.5/script-reference/unity/u2d/physics/physicsaabb/union.md)               | Create a union of the specified AABB and this AABB where resulting AABB completely encapsulates both AABB.                                                                                                                                                 |
