Class KaijuPacker
Handle packing and unpacking data.
Inheritance
Namespace: KaijuSolutions.MultiplayerEngine.Synchronization
Syntax
public static class KaijuPacker
Methods
Pack<T>(T, ref Byte[], Int32)
Packs any unmanaged generic data type into a byte array.
Declaration
public static int Pack<T>(T data, ref byte[] buffer, int index = 0)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| T | data | The struct or value to pack. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written so you can advance your offset. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to pack. |
PackBounded(float2, float2, float2, ref Byte[], Int32)
Packs a float2 using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<float2>, UInt32, UInt32, float2, float2, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(float2 value, float2 min, float2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | value | The value to compress. |
| float2 | min | The lowest possible value. |
| float2 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackBounded(float3, float3, float3, ref Byte[], Int32)
Packs a float3 using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<float3>, UInt32, UInt32, float3, float3, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(float3 value, float3 min, float3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | value | The value to compress. |
| float3 | min | The lowest possible value. |
| float3 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 6 so you can advance your offset. |
PackBounded(float4, float4, float4, ref Byte[], Int32)
Packs a float4 using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<float4>, UInt32, UInt32, float4, float4, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(float4 value, float4 min, float4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | value | The value to compress. |
| float4 | min | The lowest possible value. |
| float4 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBounded(quaternion, quaternion, quaternion, ref Byte[], Int32)
Packs a quaternion using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<quaternion>, UInt32, UInt32, quaternion, quaternion, ref Byte[], Int32) when reading this later. Unless you have a special use case, if you are compressing rotations, you should look into using PackQuaternionCompressed(quaternion, ref Byte[], Int32) or PackQuaternionAggressive(quaternion, ref Byte[], Int32) instead.
Declaration
public static int PackBounded(quaternion value, quaternion min, quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | value | The value to compress. |
| quaternion | min | The lowest possible value. |
| quaternion | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBounded(Quaternion, Quaternion, Quaternion, ref Byte[], Int32)
Packs a Quaternion using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Quaternion>, UInt32, UInt32, Quaternion, Quaternion, ref Byte[], Int32) when reading this later. Unless you have a special use case, if you are compressing rotations, you should look into using PackQuaternionCompressed(Quaternion, ref Byte[], Int32) or PackQuaternionAggressive(Quaternion, ref Byte[], Int32) instead.
Declaration
public static int PackBounded(Quaternion value, Quaternion min, Quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | value | The value to compress. |
| Quaternion | min | The lowest possible value. |
| Quaternion | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBounded(Double, Double, Double, ref Byte[], Int32)
Packs a double using bounded quantization. You must use UnpackBounded(out Double, Double, Double, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Double>, UInt32, UInt32, Double, Double, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(double value, double min, double max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | value | The value to compress. |
| System.Double | min | The lowest possible value. |
| System.Double | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 2 so you can advance your offset. |
PackBounded(Single, Single, Single, ref Byte[], Int32)
Packs a float using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Single>, UInt32, UInt32, Single, Single, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(float value, float min, float max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | The value to compress. |
| System.Single | min | The lowest possible value. |
| System.Single | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 2 so you can advance your offset. |
PackBounded(Vector2, Vector2, Vector2, ref Byte[], Int32)
Packs a Vector2 using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Vector2>, UInt32, UInt32, Vector2, Vector2, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(Vector2 value, Vector2 min, Vector2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The value to compress. |
| Vector2 | min | The lowest possible value. |
| Vector2 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackBounded(Vector3, Vector3, Vector3, ref Byte[], Int32)
Packs a Vector3 using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Vector3>, UInt32, UInt32, Vector3, Vector3, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(Vector3 value, Vector3 min, Vector3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The value to compress. |
| Vector3 | min | The lowest possible value. |
| Vector3 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 6 so you can advance your offset. |
PackBounded(Vector4, Vector4, Vector4, ref Byte[], Int32)
Packs a Vector4 using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Vector4>, UInt32, UInt32, Vector4, Vector4, ref Byte[], Int32) when reading this later.
Declaration
public static int PackBounded(Vector4 value, Vector4 min, Vector4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector4 | value | The value to compress. |
| Vector4 | min | The lowest possible value. |
| Vector4 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBoundedUnsafe(float2, float2, float2, ref Byte[], Int32)
Packs a float2 using bounded quantization. You must use UnpackBounded(out float2, float2, float2, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<float2>, UInt32, UInt32, float2, float2, ref Byte[], Int32) when reading this later. Compared to PackBounded(float2, float2, float2, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(float2 value, float2 min, float2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | value | The value to compress. |
| float2 | min | The lowest possible value. |
| float2 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackBoundedUnsafe(float3, float3, float3, ref Byte[], Int32)
Packs a float3 using bounded quantization. You must use UnpackBounded(out float3, float3, float3, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<float3>, UInt32, UInt32, float3, float3, ref Byte[], Int32) when reading this later. Compared to PackBounded(float3, float3, float3, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(float3 value, float3 min, float3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | value | The value to compress. |
| float3 | min | The lowest possible value. |
| float3 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 6 so you can advance your offset. |
PackBoundedUnsafe(float4, float4, float4, ref Byte[], Int32)
Packs a float4 using bounded quantization. You must use UnpackBounded(out float4, float4, float4, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<float4>, UInt32, UInt32, float4, float4, ref Byte[], Int32) when reading this later. Compared to PackBounded(float4, float4, float4, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(float4 value, float4 min, float4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | value | The value to compress. |
| float4 | min | The lowest possible value. |
| float4 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBoundedUnsafe(quaternion, quaternion, quaternion, ref Byte[], Int32)
Packs a quaternion using bounded quantization. You must use UnpackBounded(out quaternion, quaternion, quaternion, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<quaternion>, UInt32, UInt32, quaternion, quaternion, ref Byte[], Int32) when reading this later. Compared to PackBounded(quaternion, quaternion, quaternion, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance. Unless you have a special use case, if you are compressing rotations, you should look into using PackQuaternionCompressed(quaternion, ref Byte[], Int32) or PackQuaternionAggressive(quaternion, ref Byte[], Int32) instead.
Declaration
public static int PackBoundedUnsafe(quaternion value, quaternion min, quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | value | The value to compress. |
| quaternion | min | The lowest possible value. |
| quaternion | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBoundedUnsafe(Quaternion, Quaternion, Quaternion, ref Byte[], Int32)
Packs a Quaternion using bounded quantization. You must use UnpackBounded(out Quaternion, Quaternion, Quaternion, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Quaternion>, UInt32, UInt32, Quaternion, Quaternion, ref Byte[], Int32) when reading this later. Compared to PackBounded(Quaternion, Quaternion, Quaternion, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance. Unless you have a special use case, if you are compressing rotations, you should look into using PackQuaternionCompressed(Quaternion, ref Byte[], Int32) or PackQuaternionAggressive(Quaternion, ref Byte[], Int32) instead.
Declaration
public static int PackBoundedUnsafe(Quaternion value, Quaternion min, Quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | value | The value to compress. |
| Quaternion | min | The lowest possible value. |
| Quaternion | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackBoundedUnsafe(Double, Double, Double, ref Byte[], Int32)
Packs a double using bounded quantization. You must use UnpackBounded(out Double, Double, Double, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Double>, UInt32, UInt32, Double, Double, ref Byte[], Int32) when reading this later. Compared to PackBounded(Double, Double, Double, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(double value, double min, double max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | value | The value to compress. |
| System.Double | min | The lowest possible value. |
| System.Double | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 2 so you can advance your offset. |
PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32)
Packs a float using bounded quantization. You must use UnpackBounded(out Single, Single, Single, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Single>, UInt32, UInt32, Single, Single, ref Byte[], Int32) when reading this later. Compared to PackBounded(Single, Single, Single, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(float value, float min, float max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | The value to compress. |
| System.Single | min | The lowest possible value. |
| System.Single | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 2 so you can advance your offset. |
PackBoundedUnsafe(Vector2, Vector2, Vector2, ref Byte[], Int32)
Packs a Vector2 using bounded quantization. You must use UnpackBounded(out Vector2, Vector2, Vector2, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Vector2>, UInt32, UInt32, Vector2, Vector2, ref Byte[], Int32) when reading this later. Compared to PackBounded(Vector2, Vector2, Vector2, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(Vector2 value, Vector2 min, Vector2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The value to compress. |
| Vector2 | min | The lowest possible value. |
| Vector2 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackBoundedUnsafe(Vector3, Vector3, Vector3, ref Byte[], Int32)
Packs a Vector3 using bounded quantization. You must use UnpackBounded(out Vector3, Vector3, Vector3, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Vector3>, UInt32, UInt32, Vector3, Vector3, ref Byte[], Int32) when reading this later. Compared to PackBounded(Vector3, Vector3, Vector3, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(Vector3 value, Vector3 min, Vector3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The value to compress. |
| Vector3 | min | The lowest possible value. |
| Vector3 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 6 so you can advance your offset. |
PackBoundedUnsafe(Vector4, Vector4, Vector4, ref Byte[], Int32)
Packs a Vector4 using bounded quantization. You must use UnpackBounded(out Vector4, Vector4, Vector4, ref Byte[], Int32) or UnpackBounded(KaijuInterpolator<Vector4>, UInt32, UInt32, Vector4, Vector4, ref Byte[], Int32) when reading this later. Compared to PackBounded(Vector4, Vector4, Vector4, ref Byte[], Int32), this method does not perform checks to clamp values out of range of the min and max values, which offers marginally better performance.
Declaration
public static int PackBoundedUnsafe(Vector4 value, Vector4 min, Vector4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector4 | value | The value to compress. |
| Vector4 | min | The lowest possible value. |
| Vector4 | max | The highest possible value. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackHalf(float2, ref Byte[], Int32)
Pack a float2 down to a half-precision, compressing it from 8 bytes to 4. You must use UnpackHalf(out float2, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<float2>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(float2 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | value | The float2 to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackHalf(float3, ref Byte[], Int32)
Pack a float3 down to a half-precision, compressing it from 12 bytes to 6. You must use UnpackHalf(out float3, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<float3>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(float3 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | value | The float3 to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 6 so you can advance your offset. |
PackHalf(float4, ref Byte[], Int32)
Pack a float3 down to a half-precision, compressing it from 16 bytes to 8. You must use UnpackHalf(out float4, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<float4>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(float4 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | value | The float4 to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackHalf(quaternion, ref Byte[], Int32)
Pack a quaternion down to a half-precision, compressing it from 16 bytes to 8. You must use UnpackHalf(out quaternion, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<quaternion>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this. Unless you have a special use case, if you are compressing rotations, you should look into using PackQuaternionCompressed(Quaternion, ref Byte[], Int32) or PackQuaternionAggressive(Quaternion, ref Byte[], Int32) instead.
Declaration
public static int PackHalf(quaternion value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | value | The quaternion to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackHalf(Quaternion, ref Byte[], Int32)
Pack a Quaternion down to a half-precision, compressing it from 16 bytes to 8. You must use UnpackHalf(out Quaternion, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this. Unless you have a special use case, if you are compressing rotations, you should look into using PackQuaternionCompressed(Quaternion, ref Byte[], Int32) or PackQuaternionAggressive(Quaternion, ref Byte[], Int32) instead.
Declaration
public static int PackHalf(Quaternion value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | value | The Quaternion to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackHalf(Double, ref Byte[], Int32)
Pack a double down to a half-precision, compressing it from 8 bytes to 2. You must use UnpackHalf(out Double, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<Double>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(double value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | value | The double to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 2 so you can advance your offset. |
PackHalf(Single, ref Byte[], Int32)
Pack a float down to a half-precision, compressing it from 4 bytes to 2. You must use UnpackHalf(out Single, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<Single>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(float value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | The float to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 2 so you can advance your offset. |
PackHalf(Vector2, ref Byte[], Int32)
Pack a Vector2 down to a half-precision, compressing it from 8 bytes to 4. You must use UnpackHalf(out Vector2, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<Vector2>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(Vector2 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The Vector2 to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackHalf(Vector3, ref Byte[], Int32)
Pack a Vector3 down to a half-precision, compressing it from 12 bytes to 6. You must use UnpackHalf(out Vector3, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<Vector3>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(Vector3 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The Vector3 to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 6 so you can advance your offset. |
PackHalf(Vector4, ref Byte[], Int32)
Pack a Vector3 down to a half-precision, compressing it from 16 bytes to 8. You must use UnpackHalf(out Vector4, ref Byte[], Int32) or UnpackHalf(KaijuInterpolator<Vector4>, UInt32, UInt32, ref Byte[], Int32) to reconstruct this.
Declaration
public static int PackHalf(Vector4 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector4 | value | The Vector4 to pack. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 8 so you can advance your offset. |
PackQuaternionAggressive(quaternion, ref Byte[], Int32)
Pack a quaternion aggressively into exactly 4 bytes. You must use UnpackQuaternionAggressive(out Quaternion, ref Byte[], Int32) or UnpackQuaternionAggressive(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32) when reading this later.
Declaration
public static int PackQuaternionAggressive(quaternion quat, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | quat | The quaternion to compress. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackQuaternionAggressive(Quaternion, ref Byte[], Int32)
Pack a Quaternion aggressively into exactly 4 bytes. You must use UnpackQuaternionAggressive(out Quaternion, ref Byte[], Int32) or UnpackQuaternionAggressive(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32) when reading this later.
Declaration
public static int PackQuaternionAggressive(Quaternion quaternion, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | quaternion | The Quaternion to compress. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 4 so you can advance your offset. |
PackQuaternionCompressed(quaternion, ref Byte[], Int32)
Pack a quaternion efficiently over the network, compressing it to 12 bytes instead of 16. You must use UnpackQuaternionCompressed(out Quaternion, ref Byte[], Int32) or UnpackQuaternionCompressed(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32) when reading this later.
Declaration
public static int PackQuaternionCompressed(quaternion quat, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | quat | The quaternion to compress. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 12 so you can advance your offset. |
PackQuaternionCompressed(Quaternion, ref Byte[], Int32)
Pack a Quaternion efficiently over the network, compressing it to 12 bytes instead of 16. You must use UnpackQuaternionCompressed(out Quaternion, ref Byte[], Int32) or UnpackQuaternionCompressed(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32) when reading this later.
Declaration
public static int PackQuaternionCompressed(Quaternion quaternion, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | quaternion | The Quaternion to compress. |
| System.Byte[] | buffer | The byte array to write to. |
| System.Int32 | index | The current byte offset in the array. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes written which will be 12 so you can advance your offset. |
Unpack<T>(out T, ref Byte[], Int32)
Unpacks data from a byte array back into your specific generic type.
Declaration
public static int Unpack<T>(out T data, ref byte[] buffer, int index = 0)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| T | data | The unpacked data. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read so you can advance your offset. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to unpack. |
Unpack<T>(KaijuInterpolator<T>, UInt32, UInt32, ref Byte[], Int32)
Unpack a value directly into an KaijuInterpolator<T>.
Declaration
public static int Unpack<T>(KaijuInterpolator<T> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<T> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read so you can advance your offset. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of data to unpack. |
UnpackBounded(out float2, float2, float2, ref Byte[], Int32)
Unpacks a float2 that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out float2 value, float2 min, float2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | value | The uncompressed value. |
| float2 | min | The lowest possible value used when packing. |
| float2 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackBounded(out float3, float3, float3, ref Byte[], Int32)
Unpacks a float3 that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out float3 value, float3 min, float3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | value | The uncompressed value. |
| float3 | min | The lowest possible value used when packing. |
| float3 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackBounded(out float4, float4, float4, ref Byte[], Int32)
Unpacks a float4 that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out float4 value, float4 min, float4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | value | The uncompressed value. |
| float4 | min | The lowest possible value used when packing. |
| float4 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<float2>, UInt32, UInt32, float2, float2, ref Byte[], Int32)
Unpacks a float2 that was compressed with PackBounded(float2, float2, float2, ref Byte[], Int32) or PackBoundedUnsafe(float2, float2, float2, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<float2> interpolator, uint tick, uint localTick, float2 min, float2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<float2> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| float2 | min | The lowest possible value used when packing. |
| float2 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<float3>, UInt32, UInt32, float3, float3, ref Byte[], Int32)
Unpacks a float3 that was compressed with PackBounded(float3, float3, float3, ref Byte[], Int32) or PackBoundedUnsafe(float3, float3, float3, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<float3> interpolator, uint tick, uint localTick, float3 min, float3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<float3> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| float3 | min | The lowest possible value used when packing. |
| float3 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<float4>, UInt32, UInt32, float4, float4, ref Byte[], Int32)
Unpacks a float4 that was compressed with PackBounded(float4, float4, float4, ref Byte[], Int32) or PackBoundedUnsafe(float4, float4, float4, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<float4> interpolator, uint tick, uint localTick, float4 min, float4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<float4> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| float4 | min | The lowest possible value used when packing. |
| float4 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<quaternion>, UInt32, UInt32, quaternion, quaternion, ref Byte[], Int32)
Unpacks a quaternion that was compressed with PackBounded(quaternion, quaternion, quaternion, ref Byte[], Int32) or PackBoundedUnsafe(quaternion, quaternion, quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<quaternion> interpolator, uint tick, uint localTick, quaternion min, quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| quaternion | min | The lowest possible value used when packing. |
| quaternion | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<Quaternion>, UInt32, UInt32, Quaternion, Quaternion, ref Byte[], Int32)
Unpacks a Quaternion that was compressed with PackBounded(Quaternion, Quaternion, Quaternion, ref Byte[], Int32) or PackBoundedUnsafe(Quaternion, Quaternion, Quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<Quaternion> interpolator, uint tick, uint localTick, Quaternion min, Quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| Quaternion | min | The lowest possible value used when packing. |
| Quaternion | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<Double>, UInt32, UInt32, Double, Double, ref Byte[], Int32)
Unpacks a double that was compressed with PackBounded(Double, Double, Double, ref Byte[], Int32) or PackBoundedUnsafe(Double, Double, Double, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<double> interpolator, uint tick, uint localTick, double min, double max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<System.Double> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Double | min | The lowest possible value used when packing. |
| System.Double | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<Single>, UInt32, UInt32, Single, Single, ref Byte[], Int32)
Unpacks a float that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<float> interpolator, uint tick, uint localTick, float min, float max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<System.Single> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Single | min | The lowest possible value used when packing. |
| System.Single | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<Vector2>, UInt32, UInt32, Vector2, Vector2, ref Byte[], Int32)
Unpacks a Vector2 that was compressed with PackBounded(Vector2, Vector2, Vector2, ref Byte[], Int32) or PackBoundedUnsafe(Vector2, Vector2, Vector2, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<Vector2> interpolator, uint tick, uint localTick, Vector2 min, Vector2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Vector2> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| Vector2 | min | The lowest possible value used when packing. |
| Vector2 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<Vector3>, UInt32, UInt32, Vector3, Vector3, ref Byte[], Int32)
Unpacks a Vector3 that was compressed with PackBounded(Vector3, Vector3, Vector3, ref Byte[], Int32) or PackBoundedUnsafe(Vector3, Vector3, Vector3, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<Vector3> interpolator, uint tick, uint localTick, Vector3 min, Vector3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Vector3> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| Vector3 | min | The lowest possible value used when packing. |
| Vector3 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackBounded(KaijuInterpolator<Vector4>, UInt32, UInt32, Vector4, Vector4, ref Byte[], Int32)
Unpacks a Vector4 that was compressed with PackBounded(Vector4, Vector4, Vector4, ref Byte[], Int32) or PackBoundedUnsafe(Vector4, Vector4, Vector4, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackBounded(KaijuInterpolator<Vector4> interpolator, uint tick, uint localTick, Vector4 min, Vector4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Vector4> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| Vector4 | min | The lowest possible value used when packing. |
| Vector4 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(out quaternion, quaternion, quaternion, ref Byte[], Int32)
Unpacks a quaternion that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out quaternion value, quaternion min, quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | value | The uncompressed value. |
| quaternion | min | The lowest possible value used when packing. |
| quaternion | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(out Quaternion, Quaternion, Quaternion, ref Byte[], Int32)
Unpacks a Quaternion that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out Quaternion value, Quaternion min, Quaternion max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | value | The uncompressed value. |
| Quaternion | min | The lowest possible value used when packing. |
| Quaternion | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackBounded(out Double, Double, Double, ref Byte[], Int32)
Unpacks a double that was compressed with PackBounded(Double, Double, Double, ref Byte[], Int32) or PackBoundedUnsafe(Double, Double, Double, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out double value, double min, double max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | value | The uncompressed value. |
| System.Double | min | The lowest possible value used when packing. |
| System.Double | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackBounded(out Single, Single, Single, ref Byte[], Int32)
Unpacks a float that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out float value, float min, float max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | The uncompressed value. |
| System.Single | min | The lowest possible value used when packing. |
| System.Single | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackBounded(out Vector2, Vector2, Vector2, ref Byte[], Int32)
Unpacks a Vector2 that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out Vector2 value, Vector2 min, Vector2 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The uncompressed value. |
| Vector2 | min | The lowest possible value used when packing. |
| Vector2 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackBounded(out Vector3, Vector3, Vector3, ref Byte[], Int32)
Unpacks a Vector3 that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out Vector3 value, Vector3 min, Vector3 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The uncompressed value. |
| Vector3 | min | The lowest possible value used when packing. |
| Vector3 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackBounded(out Vector4, Vector4, Vector4, ref Byte[], Int32)
Unpacks a Vector4 that was compressed with PackBounded(Single, Single, Single, ref Byte[], Int32) or PackBoundedUnsafe(Single, Single, Single, ref Byte[], Int32).
Declaration
public static int UnpackBounded(out Vector4 value, Vector4 min, Vector4 max, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector4 | value | The uncompressed value. |
| Vector4 | min | The lowest possible value used when packing. |
| Vector4 | max | The highest possible value used when packing. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(out float2, ref Byte[], Int32)
Unpack a float2 which was compressed down to half-precision by PackHalf(float2, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out float2 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | value | The unpacked float2. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackHalf(out float3, ref Byte[], Int32)
Unpack a float3 which was compressed down to half-precision by PackHalf(float3, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out float3 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | value | The unpacked float3. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackHalf(out float4, ref Byte[], Int32)
Unpack a float4 which was compressed down to half-precision by PackHalf(float4, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out float4 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | value | The unpacked float4. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<float2>, UInt32, UInt32, ref Byte[], Int32)
Unpack a float2 which was compressed with PackHalf(float2, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<float2> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<float2> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<float3>, UInt32, UInt32, ref Byte[], Int32)
Unpack a float3 which was compressed with PackHalf(float3, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<float3> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<float3> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<float4>, UInt32, UInt32, ref Byte[], Int32)
Unpack a float4 which was compressed with PackHalf(float4, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<float4> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<float4> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<quaternion>, UInt32, UInt32, ref Byte[], Int32)
Unpack a quaternion which was compressed with PackHalf(quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<quaternion> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32)
Unpack a Quaternion which was compressed with PackHalf(Quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<Quaternion> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<Double>, UInt32, UInt32, ref Byte[], Int32)
Unpack a double which was compressed with PackHalf(Double, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<double> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<System.Double> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<Single>, UInt32, UInt32, ref Byte[], Int32)
Unpack a float which was compressed with PackHalf(Single, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<float> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<System.Single> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<Vector2>, UInt32, UInt32, ref Byte[], Int32)
Unpack a Vector2 which was compressed with PackHalf(Vector2, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<Vector2> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Vector2> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<Vector3>, UInt32, UInt32, ref Byte[], Int32)
Unpack a Vector3 which was compressed with PackHalf(Vector3, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<Vector3> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Vector3> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackHalf(KaijuInterpolator<Vector4>, UInt32, UInt32, ref Byte[], Int32)
Unpack a Vector4 which was compressed with PackHalf(Vector4, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackHalf(KaijuInterpolator<Vector4> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Vector4> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(out quaternion, ref Byte[], Int32)
Unpack a quaternion which was compressed down to half-precision by PackHalf(quaternion, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out quaternion value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | value | The unpacked quaternion. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(out Quaternion, ref Byte[], Int32)
Unpack a Quaternion which was compressed down to half-precision by PackHalf(Quaternion, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out Quaternion value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | value | The unpacked Quaternion. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackHalf(out Double, ref Byte[], Int32)
Unpack a double which was compressed down to half-precision by PackHalf(Double, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out double value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | value | The unpacked double. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackHalf(out Single, ref Byte[], Int32)
Unpack a float which was compressed down to half-precision by PackHalf(Single, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out float value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | value | The unpacked float. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 2 so you can advance your offset. |
UnpackHalf(out Vector2, ref Byte[], Int32)
Unpack a Vector2 which was compressed down to half-precision by PackHalf(Vector2, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out Vector2 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | value | The unpacked Vector2. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackHalf(out Vector3, ref Byte[], Int32)
Unpack a Vector3 which was compressed down to half-precision by PackHalf(Vector3, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out Vector3 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | value | The unpacked Vector3. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 6 so you can advance your offset. |
UnpackHalf(out Vector4, ref Byte[], Int32)
Unpack a Vector4 which was compressed down to half-precision by PackHalf(Vector4, ref Byte[], Int32).
Declaration
public static int UnpackHalf(out Vector4 value, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector4 | value | The unpacked Vector4. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 8 so you can advance your offset. |
UnpackQuaternionAggressive(KaijuInterpolator<quaternion>, UInt32, UInt32, ref Byte[], Int32)
Unpack a quaternion which was compressed with PackQuaternionAggressive(quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackQuaternionAggressive(KaijuInterpolator<quaternion> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackQuaternionAggressive(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32)
Unpack a Quaternion which was compressed with PackQuaternionAggressive(Quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackQuaternionAggressive(KaijuInterpolator<Quaternion> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackQuaternionAggressive(out quaternion, ref Byte[], Int32)
Unpacks a quaternion that was compressed with PackQuaternionAggressive(quaternion, ref Byte[], Int32).
Declaration
public static int UnpackQuaternionAggressive(out quaternion quat, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | quat | The uncompressed quaternion. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackQuaternionAggressive(out Quaternion, ref Byte[], Int32)
Unpacks a Quaternion that was compressed with PackQuaternionAggressive(Quaternion, ref Byte[], Int32).
Declaration
public static int UnpackQuaternionAggressive(out Quaternion quaternion, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | quaternion | The uncompressed Quaternion. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 4 so you can advance your offset. |
UnpackQuaternionCompressed(KaijuInterpolator<quaternion>, UInt32, UInt32, ref Byte[], Int32)
Unpack a quaternion which was compressed with PackQuaternionCompressed(quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackQuaternionCompressed(KaijuInterpolator<quaternion> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 12 so you can advance your offset. |
UnpackQuaternionCompressed(KaijuInterpolator<Quaternion>, UInt32, UInt32, ref Byte[], Int32)
Unpack a Quaternion which was compressed with PackQuaternionCompressed(Quaternion, ref Byte[], Int32) directly into an KaijuInterpolator<T>.
Declaration
public static int UnpackQuaternionCompressed(KaijuInterpolator<Quaternion> interpolator, uint tick, uint localTick, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| KaijuInterpolator<Quaternion> | interpolator | The KaijuInterpolator<T> to unpack into. |
| System.UInt32 | tick | The tick the packet was sent at by the remote player. |
| System.UInt32 | localTick | The local tick the packet was received at. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 12 so you can advance your offset. |
UnpackQuaternionCompressed(out quaternion, ref Byte[], Int32)
Unpack a quaternion which was compressed with PackQuaternionCompressed(quaternion, ref Byte[], Int32).
Declaration
public static int UnpackQuaternionCompressed(out quaternion quat, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| quaternion | quat | The quaternion which was uncompressed. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 12 so you can advance your offset. |
UnpackQuaternionCompressed(out Quaternion, ref Byte[], Int32)
Unpack a Quaternion which was compressed with PackQuaternionCompressed(Quaternion, ref Byte[], Int32).
Declaration
public static int UnpackQuaternionCompressed(out Quaternion quaternion, ref byte[] buffer, int index = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Quaternion | quaternion | The Quaternion which was uncompressed. |
| System.Byte[] | buffer | The byte array containing the network data. |
| System.Int32 | index | The byte offset to start reading from. |
Returns
| Type | Description |
|---|---|
| System.Int32 | The number of bytes read which will be 12 so you can advance your offset. |