Photon Fusion 2.1.1

ReadWriteUtils Class Reference

Provides utility methods for reading and writing data. More...

Static Public Member Functions

static float ReadFloat (int *data)
 Reads a float value from the provided memory location.
static Quaternion ReadQuaternion (int *data)
 Reads a Quaternion value from the provided memory location.
static Vector2 ReadVector2 (int *data)
 Reads a Vector2 value from the provided memory location.
static Vector3 ReadVector3 (int *data)
 Reads a Vector3 value from the provided memory location.
static Vector4 ReadVector4 (int *data)
 Reads a Vector4 value from the provided memory location.
static void WriteFloat (int *data, float f)
 Writes a float value to the provided memory location.
static void WriteQuaternion (int *data, Quaternion value)
 Writes a Quaternion value to the provided memory location.
static void WriteVector2 (int *data, Vector2 value)
 Writes a Vector2 value to the provided memory location.
static void WriteVector3 (int *data, Vector3 value)
 Writes a Vector3 value to the provided memory location.
static void WriteVector4 (int *data, Vector4 value)
 Writes a Vector4 value to the provided memory location.

Static Public Attributes

const float ACCURACY = 1 << 10
 Accuracy of floating point values when serialized.

Detailed Description

Provides utility methods for reading and writing data.

Member Function Documentation

◆ ReadFloat()

float ReadFloat ( int * data)
static

Reads a float value from the provided memory location.

Parameters
dataThe memory location to read from.
Returns
The float value read from the memory location.

◆ ReadQuaternion()

Quaternion ReadQuaternion ( int * data)
static

Reads a Quaternion value from the provided memory location.

Parameters
dataThe memory location to read from.
Returns
The Quaternion value read from the memory location.

◆ ReadVector2()

Vector2 ReadVector2 ( int * data)
static

Reads a Vector2 value from the provided memory location.

Parameters
dataThe memory location to read from.
Returns
The Vector2 value read from the memory location.

◆ ReadVector3()

Vector3 ReadVector3 ( int * data)
static

Reads a Vector3 value from the provided memory location.

Parameters
dataThe memory location to read from.
Returns
The Vector3 value read from the memory location.

◆ ReadVector4()

Vector4 ReadVector4 ( int * data)
static

Reads a Vector4 value from the provided memory location.

Parameters
dataThe memory location to read from.
Returns
The Vector4 value read from the memory location.

◆ WriteFloat()

void WriteFloat ( int * data,
float f )
static

Writes a float value to the provided memory location.

Parameters
dataThe memory location to write to.
fThe float value to write.

◆ WriteQuaternion()

void WriteQuaternion ( int * data,
Quaternion value )
static

Writes a Quaternion value to the provided memory location.

Parameters
dataThe memory location to write to.
valueThe Quaternion value to write.

◆ WriteVector2()

void WriteVector2 ( int * data,
Vector2 value )
static

Writes a Vector2 value to the provided memory location.

Parameters
dataThe memory location to write to.
valueThe Vector2 value to write.

◆ WriteVector3()

void WriteVector3 ( int * data,
Vector3 value )
static

Writes a Vector3 value to the provided memory location.

Parameters
dataThe memory location to write to.
valueThe Vector3 value to write.

◆ WriteVector4()

void WriteVector4 ( int * data,
Vector4 value )
static

Writes a Vector4 value to the provided memory location.

Parameters
dataThe memory location to write to.
valueThe Vector4 value to write.