Quantum 3 3.0.3

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Quantum.InputPitchYaw Struct Reference

Compressed pitch + yaw angles (ranges -89 to 89 and -+ 180)) to be used as part of input to optimize bandwidth, encoded as two shorts. More...

Public Member Functions

override int GetHashCode ()
 Overrides the hash code generation of this type. More...
 

Static Public Member Functions

static void Serialize (void *ptr, IDeterministicFrameSerializer serializer)
 Serializes an InputPitchYaw into a FrameSerializer to write or read from a frame snapshot. More...
 

Public Attributes

FPQuaternion LookRotation => FPQuaternion.Euler(Pitch, Yaw, FP._0)
 Generates an FPQuaternion using Pitch and Yaw as Euler X and Y respectively. More...
 

Static Public Attributes

const int SIZE = sizeof(int) * 2
 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...
 

Properties

FP Pitch [get, set]
 Mouse-look pitch (Euler X, clamped to -90, 90). More...
 
FP Yaw [get, set]
 Mouse-look Yaw (Euler Y, clamped to -90, 90). More...
 

Detailed Description

Compressed pitch + yaw angles (ranges -89 to 89 and -+ 180)) to be used as part of input to optimize bandwidth, encoded as two shorts.

Member Function Documentation

◆ Serialize()

static void Quantum.InputPitchYaw.Serialize ( void *  ptr,
IDeterministicFrameSerializer  serializer 
)
inlinestatic

Serializes an InputPitchYaw into a FrameSerializer to write or read from a frame snapshot.

Parameters
ptrThe pointer to the InputPitchYaw.
serializerThe FrameSerializer instance into which the struct will be serialized.

◆ GetHashCode()

override int Quantum.InputPitchYaw.GetHashCode ( )
inline

Overrides the hash code generation of this type.

Returns
A hash code of the current state of this instance.

Member Data Documentation

◆ SIZE

const int Quantum.InputPitchYaw.SIZE = sizeof(int) * 2
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.

◆ LookRotation

FPQuaternion Quantum.InputPitchYaw.LookRotation => FPQuaternion.Euler(Pitch, Yaw, FP._0)

Generates an FPQuaternion using Pitch and Yaw as Euler X and Y respectively.

Property Documentation

◆ Pitch

FP Quantum.InputPitchYaw.Pitch
getset

Mouse-look pitch (Euler X, clamped to -90, 90).

◆ Yaw

FP Quantum.InputPitchYaw.Yaw
getset

Mouse-look Yaw (Euler Y, clamped to -90, 90).