public static Vector3 ReadVector2(this MvProcess process, long address) { return(new Vector2 { x = BitConverter.ToSingle(process.ReadByteArray(address, sizeof(float)), 0), y = BitConverter.ToSingle(process.ReadByteArray(address + 4, sizeof(float)), 0) }); }
public static Vector3 ReadVector3(this MvProcess process, long address, Vector3StorageType storageType) { switch (storageType) { case Vector3StorageType.Xyz: return(new Vector3 { x = BitConverter.ToSingle(process.ReadByteArray(address, sizeof(float)), 0), y = BitConverter.ToSingle(process.ReadByteArray(address + 4, sizeof(float)), 0), z = BitConverter.ToSingle(process.ReadByteArray(address + 8, sizeof(float)), 0) }); default: return(new Vector3 { x = BitConverter.ToSingle(process.ReadByteArray(address, sizeof(float)), 0), y = BitConverter.ToSingle(process.ReadByteArray(address + 8, sizeof(float)), 0), z = BitConverter.ToSingle(process.ReadByteArray(address + 4, sizeof(float)), 0) }); } }
public static string ReadStringUnicode(this MvProcess process, long address, uint size) { return(Encoding.Unicode.GetString(process.ReadByteArray(address, size))); }
public static string ReadStringAscii(this MvProcess process, long address, uint size) { return(Encoding.ASCII.GetString(process.ReadByteArray(address, size))); }
public static double ReadDouble(this MvProcess process, long address) { return(BitConverter.ToDouble(process.ReadByteArray(address, sizeof(double)), 0)); }
public static float ReadFloat(this MvProcess process, long address) { return(BitConverter.ToSingle(process.ReadByteArray(address, sizeof(float)), 0)); }
public static UInt64 ReadUInt64(this MvProcess process, long address) { return(BitConverter.ToUInt64(process.ReadByteArray(address, sizeof(Int16)), 0)); }
public static Int32 ReadPointer32(this MvProcess process, long address) { return(BitConverter.ToInt32(process.ReadByteArray(address, sizeof(Int32)), 0)); }
public static Int16 ReadInt16(this MvProcess process, long address) { return(BitConverter.ToInt16(process.ReadByteArray(address, sizeof(Int16)), 0)); }
public static bool ReadBool(this MvProcess process, long address) { return(BitConverter.ToBoolean(process.ReadByteArray(address, sizeof(Int16)), 0)); }
public static char ReadChar(this MvProcess process, long address) { return(BitConverter.ToChar(process.ReadByteArray(address, sizeof(Int16)), 0)); }