Photon Quantum 2.1.9

Public Member Functions | Public Attributes | Properties | List of all members
Photon.Deterministic.FPBounds2 Struct Reference

Represents an 2D axis aligned bounding box (AABB). More...

Public Member Functions

 FPBounds2 (FPVector2 center, FPVector2 extents)
 Create a new Bounds with the given center and extents. More...
 
void Encapsulate (FPBounds2 bounds)
 Expand bounds to contain bounds (if needed). More...
 
void Encapsulate (FPVector2 point)
 Expand bounds to contain point (if needed). More...
 
void Expand (FP amount)
 Expand bounds by 0.5 * amount in both directions. More...
 
void Expand (FPVector2 amount)
 Expand bounds by 0.5 * amount in both directions. More...
 
bool Intersects (FPBounds2 bounds)
 Returns true if there is an intersection between bounds. More...
 

Public Attributes

FPVector2 Center
 Center of the bounding box. More...
 
FPVector2 Extents
 Extents of the bounding box (half of the size). More...
 

Properties

FPVector2 Max [get, set]
 Gets or sets the maximal point of the box. This is always equal to Center + Extents. Setting this property will not affect Min. More...
 
FPVector2 Min [get, set]
 Gets or sets the minimal point of the box. This is always equal to Center - Extents. Setting this property will not affect Max. More...
 

Detailed Description

Represents an 2D axis aligned bounding box (AABB).

Constructor & Destructor Documentation

◆ FPBounds2()

Photon.Deterministic.FPBounds2.FPBounds2 ( FPVector2  center,
FPVector2  extents 
)
inline

Create a new Bounds with the given center and extents.

Parameters
centerCenter point.
extentsExtents (half the size).

Member Function Documentation

◆ Expand() [1/2]

void Photon.Deterministic.FPBounds2.Expand ( FP  amount)
inline

Expand bounds by 0.5 * amount in both directions.

Parameters
amount

◆ Expand() [2/2]

void Photon.Deterministic.FPBounds2.Expand ( FPVector2  amount)
inline

Expand bounds by 0.5 * amount in both directions.

Parameters
amount

◆ Encapsulate() [1/2]

void Photon.Deterministic.FPBounds2.Encapsulate ( FPVector2  point)
inline

Expand bounds to contain point (if needed).

Parameters
point

◆ Encapsulate() [2/2]

void Photon.Deterministic.FPBounds2.Encapsulate ( FPBounds2  bounds)
inline

Expand bounds to contain bounds (if needed).

Parameters
bounds

◆ Intersects()

bool Photon.Deterministic.FPBounds2.Intersects ( FPBounds2  bounds)
inline

Returns true if there is an intersection between bounds.

Parameters
bounds
Returns

Member Data Documentation

◆ Center

FPVector2 Photon.Deterministic.FPBounds2.Center

Center of the bounding box.

◆ Extents

FPVector2 Photon.Deterministic.FPBounds2.Extents

Extents of the bounding box (half of the size).

Property Documentation

◆ Max

FPVector2 Photon.Deterministic.FPBounds2.Max
getset

Gets or sets the maximal point of the box. This is always equal to Center + Extents. Setting this property will not affect Min.

◆ Min

FPVector2 Photon.Deterministic.FPBounds2.Min
getset

Gets or sets the minimal point of the box. This is always equal to Center - Extents. Setting this property will not affect Max.