Photon Fusion 2.0.3

Static Public Member Functions | Static Public Attributes | List of all members
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. More...
 
static Quaternion ReadQuaternion (int *data)
 Reads a Quaternion value from the provided memory location. More...
 
static Vector2 ReadVector2 (int *data)
 Reads a Vector2 value from the provided memory location. More...
 
static Vector3 ReadVector3 (int *data)
 Reads a Vector3 value from the provided memory location. More...
 
static Vector4 ReadVector4 (int *data)
 Reads a Vector4 value from the provided memory location. More...
 
static void WriteFloat (int *data, float f)
 Writes a float value to the provided memory location. More...
 
static void WriteQuaternion (int *data, Quaternion value)
 Writes a Quaternion value to the provided memory location. More...
 
static void WriteVector2 (int *data, Vector2 value)
 Writes a Vector2 value to the provided memory location. More...
 
static void WriteVector3 (int *data, Vector3 value)
 Writes a Vector3 value to the provided memory location. More...
 
static void WriteVector4 (int *data, Vector4 value)
 Writes a Vector4 value to the provided memory location. More...
 

Static Public Attributes

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

Detailed Description

Provides utility methods for reading and writing data.

Member Function Documentation

◆ ReadFloat()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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()

static 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.

Member Data Documentation

◆ ACCURACY

const float ACCURACY = 1 << 10
static

Accuracy of floating point values when serialized.