Compressed direction with magnitude (range 0 to 1) to be used as part of input to optimize bandwidth, encoded as an angle and magnitude using two bytes. More...
Public Member Functions | |
override int | GetHashCode () |
Overrides the hash code generation of this type. More... | |
Static Public Member Functions | |
static implicit | operator FPVector2 (InputDirectionMagnitude inputDirection) |
Casts to FPVector2 with magnitude (range 0 to 1). Defaults to zero-vector. More... | |
static implicit | operator InputDirectionMagnitude (FPVector2 direction) |
Casts from FPVector2 into encoded angle and magnitude (must be in the range 0 to 1). More... | |
static void | Serialize (void *ptr, IDeterministicFrameSerializer serializer) |
Serializes an InputDirectionMagnitude into a FrameSerializer to write or read from a frame snapshot. More... | |
Static Public Attributes | |
const int | SIZE = sizeof(int) |
The size of the component (or struct/type) 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... | |
Compressed direction with magnitude (range 0 to 1) to be used as part of input to optimize bandwidth, encoded as an angle and magnitude using two bytes.
|
inlinestatic |
Casts to FPVector2 with magnitude (range 0 to 1). Defaults to zero-vector.
|
inlinestatic |
Casts from FPVector2 into encoded angle and magnitude (must be in the range 0 to 1).
|
inlinestatic |
Serializes an InputDirectionMagnitude into a FrameSerializer to write or read from a frame snapshot.
ptr | The pointer to the InputDirectionMagnitude. |
serializer | The FrameSerializer instance into which the struct will be serialized. |
|
inline |
Overrides the hash code generation of this type.
|
static |
The size of the component (or struct/type) 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.