Class BinaryReaderExtensions
Extension functions for reading Evergine data types with a BinaryReader.
Inherited Members
Namespace: Evergine.Common
Assembly: Evergine.Common.dll
Syntax
public static class BinaryReaderExtensions
Methods
ReadBoundingBox(BinaryReader)
Reads a BoundingBox from the Binary Reader.
Declaration
public static BoundingBox ReadBoundingBox(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The Binary Reader. |
Returns
Type | Description |
---|---|
BoundingBox | A BoundingBox object. |
ReadByte4(BinaryReader)
Reads the byte4.
Declaration
public static Byte4 ReadByte4(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Byte4 | The result. |
ReadMatrix4x4(BinaryReader)
Reads the matrix.
Declaration
public static Matrix4x4 ReadMatrix4x4(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Matrix4x4 | The result. |
ReadMatrix4x4(BinaryReader, out Matrix4x4)
Reads the matrix.
Declaration
public static void ReadMatrix4x4(this BinaryReader reader, out Matrix4x4 m)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Matrix4x4 | m | The m. |
ReadMatrix4x4(BinaryReader, byte[], int, out Matrix4x4)
Reads the matrix.
Declaration
public static void ReadMatrix4x4(this BinaryReader reader, byte[] data, int startIndex, out Matrix4x4 m)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
byte[] | data | The data. |
int | startIndex | The start index. |
Matrix4x4 | m | The m. |
ReadNullableBoundingBox(BinaryReader)
Reads a nullable bounding box from a binary reader.
Declaration
public static BoundingBox? ReadNullableBoundingBox(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
BoundingBox? | The read nullable bounding box. |
ReadPoint(BinaryReader)
Reads the Point.
Declaration
public static Point ReadPoint(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Point | The result. |
ReadQuaternion(BinaryReader)
Reads the quaternion.
Declaration
public static Quaternion ReadQuaternion(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Quaternion | The result. |
ReadQuaternion(BinaryReader, out Quaternion)
Reads the quaternion.
Declaration
public static void ReadQuaternion(this BinaryReader reader, out Quaternion q)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Quaternion | q | The output quaternion. |
ReadRectangle(BinaryReader)
Reads the rectangle.
Declaration
public static Rectangle ReadRectangle(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Rectangle | The result. |
ReadRectangleF(BinaryReader)
Reads the rectangle.
Declaration
public static RectangleF ReadRectangleF(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
RectangleF | The result. |
ReadVector2(BinaryReader)
Reads the vector2.
Declaration
public static Vector2 ReadVector2(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Vector2 | The result. |
ReadVector2(BinaryReader, out Vector2)
Reads the quaternion.
Declaration
public static void ReadVector2(this BinaryReader reader, out Vector2 v)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Vector2 | v | The output quaternion. |
ReadVector3(BinaryReader)
Reads the vector3.
Declaration
public static Vector3 ReadVector3(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Vector3 | The result. |
ReadVector3(BinaryReader, out Vector3)
Reads the quaternion.
Declaration
public static void ReadVector3(this BinaryReader reader, out Vector3 v)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Vector3 | v | The output quaternion. |
ReadVector4(BinaryReader)
Reads the vector4.
Declaration
public static Vector4 ReadVector4(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Returns
Type | Description |
---|---|
Vector4 | The result. |
ReadVector4(BinaryReader, out Vector4)
Reads the quaternion.
Declaration
public static void ReadVector4(this BinaryReader reader, out Vector4 v)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The reader. |
Vector4 | v | The output quaternion. |
ReadVertexAttributes(BinaryReader)
Reads the vertex attributes of a binary reader stream.
Declaration
public static Dictionary<string, int> ReadVertexAttributes(this BinaryReader reader)
Parameters
Type | Name | Description |
---|---|---|
BinaryReader | reader | The binary reader. |
Returns
Type | Description |
---|---|
Dictionary<string, int> | The vertex attribute dictionary. |