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... | |
override int | GetHashCode () |
Computes the hash code of the FPBounds2 instance. More... | |
bool | Intersects (FPBounds2 bounds) |
Returns true if there is an intersection between bounds. More... | |
void | SetMinMax (FPVector2 min, FPVector2 max) |
Set the bounds to the given min and max points. More... | |
Static Public Member Functions | |
static unsafe void | Serialize (void *ptr, IDeterministicFrameSerializer serializer) |
Serializes the FPBounds2 struct by serializing its FPVector2 fields. More... | |
Public Attributes | |
FPVector2 | Center |
Center of the bounding box. More... | |
FPVector2 | Extents |
Extents of the bounding box (half of the size). More... | |
Static Public Attributes | |
const int | SIZE = FPVector2.SIZE * 2 |
The size of the struct in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed. 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... | |
Represents an 2D axis aligned bounding box (AABB).
Create a new Bounds with the given center and extents.
center | Center point. |
extents | Extents (half the size). |
|
inline |
Expand bounds by 0.5 * amount in both directions.
amount |
|
inline |
Expand bounds by 0.5 * amount in both directions.
amount |
Set the bounds to the given min and max points.
min | Minimum position. |
max | Maximum position. |
|
inline |
Expand bounds to contain point (if needed).
point |
|
inline |
Expand bounds to contain bounds (if needed).
bounds |
|
inline |
Returns true
if there is an intersection between bounds.
bounds |
|
inlinestatic |
Serializes the FPBounds2 struct by serializing its FPVector2 fields.
ptr | A pointer to the FPBounds2 struct to be serialized. |
serializer | The serializer object used to serialize the components. |
|
inline |
Computes the hash code of the FPBounds2 instance.
|
static |
The size of the struct in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed.
FPVector2 Photon.Deterministic.FPBounds2.Center |
Center of the bounding box.
FPVector2 Photon.Deterministic.FPBounds2.Extents |
Extents of the bounding box (half of the size).
|
getset |