コード例 #1
0
 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)
     });
 }
コード例 #2
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)
                });
            }
        }
コード例 #3
0
 public static string ReadStringUnicode(this MvProcess process, long address, uint size)
 {
     return(Encoding.Unicode.GetString(process.ReadByteArray(address, size)));
 }
コード例 #4
0
 public static string ReadStringAscii(this MvProcess process, long address, uint size)
 {
     return(Encoding.ASCII.GetString(process.ReadByteArray(address, size)));
 }
コード例 #5
0
 public static double ReadDouble(this MvProcess process, long address)
 {
     return(BitConverter.ToDouble(process.ReadByteArray(address, sizeof(double)), 0));
 }
コード例 #6
0
 public static float ReadFloat(this MvProcess process, long address)
 {
     return(BitConverter.ToSingle(process.ReadByteArray(address, sizeof(float)), 0));
 }
コード例 #7
0
 public static UInt64 ReadUInt64(this MvProcess process, long address)
 {
     return(BitConverter.ToUInt64(process.ReadByteArray(address, sizeof(Int16)), 0));
 }
コード例 #8
0
 public static Int32 ReadPointer32(this MvProcess process, long address)
 {
     return(BitConverter.ToInt32(process.ReadByteArray(address, sizeof(Int32)), 0));
 }
コード例 #9
0
 public static Int16 ReadInt16(this MvProcess process, long address)
 {
     return(BitConverter.ToInt16(process.ReadByteArray(address, sizeof(Int16)), 0));
 }
コード例 #10
0
 public static bool ReadBool(this MvProcess process, long address)
 {
     return(BitConverter.ToBoolean(process.ReadByteArray(address, sizeof(Int16)), 0));
 }
コード例 #11
0
 public static char ReadChar(this MvProcess process, long address)
 {
     return(BitConverter.ToChar(process.ReadByteArray(address, sizeof(Int16)), 0));
 }