Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions QuickLink2DotNet.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31005.135
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLink2DotNet", "QuickLink2DotNet\QuickLink2DotNet\QuickLink2DotNet.csproj", "{95D15B06-7319-4839-850B-C35F63B4FCCF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Debug|x86.ActiveCfg = Debug|x86
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Debug|x86.Build.0 = Debug|x86
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Release|Any CPU.Build.0 = Release|Any CPU
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Release|x86.ActiveCfg = Release|x86
{95D15B06-7319-4839-850B-C35F63B4FCCF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A9CFC78E-65AF-41BE-B80B-1228584CA547}
EndGlobalSection
EndGlobal
76 changes: 40 additions & 36 deletions QuickLink2DotNet/QuickLink2DotNet/QLTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,54 +1165,54 @@ public struct QLRectInt
/// </para>
/// </summary>
/// <seealso cref="QLRectInt"/>
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public struct QLImageData
{
/// <summary>
/// <para>
/// The pixel data of the image. The data is single channel grey-scale with 8-bits per pixel.
/// </para>
/// </summary>
public IntPtr PixelData;
[FieldOffset(0)] public Int32 PixelData;

/// <summary>
/// <para>
/// The width in pixels of the image. This can be different than the sensorWidth of the device
/// if binning is turned on.
/// </para>
/// </summary>
public System.Int32 Width;
[FieldOffset(4)] public System.Int32 Width;

/// <summary>
/// <para>
/// The height in pixels of the image. This can be different than the sensorHeight of the device
/// if binning is turned on.
/// </para>
/// </summary>
public System.Int32 Height;
[FieldOffset(8)] public System.Int32 Height;

/// <summary>
/// <para>
/// The timestamp of the frame. It is the number of milliseconds from when the computer was
/// started.
/// </para>
/// </summary>
public System.Double Timestamp;
[FieldOffset(16)] public System.Double Timestamp;

/// <summary>
/// <para>
/// The gain value of the image.
/// </para>
/// </summary>
public System.Int32 Gain;
[FieldOffset(24)] public System.Int32 Gain;

/// <summary>
/// <para>
/// A number to identify a frame. Checking for non consecutive numbers from frame to frame can
/// determine if a frame was lost.
/// </para>
/// </summary>
public System.Int32 FrameNumber;
[FieldOffset(28)] public System.Int32 FrameNumber;

/// <summary>
/// <para>
Expand All @@ -1222,7 +1222,11 @@ public struct QLImageData
/// </para>
/// </summary>
/// <seealso cref="QLRectInt"/>
public QLRectInt ROI;
[FieldOffset(32)] public QLRectInt ROI;

[FieldOffset(48)] public Int32 ScaleFactor;

[FieldOffset(52)] public Int32 PixelFrameNumber;

#if (ISX64)

Expand All @@ -1245,9 +1249,9 @@ public struct QLImageData
/// Note: Void pointers are 4-bytes on x86, and 8-bytes on x64.
/// </para>
/// </summary>
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 48)]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)]
#endif
public System.String Reserved;
[FieldOffset(56)] public System.String Reserved;
}

/// <summary>
Expand All @@ -1256,7 +1260,7 @@ public struct QLImageData
/// </para>
/// </summary>
/// <seealso cref="QLXYPairFloat"/>
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public struct QLEyeData
{
/// <summary>
Expand All @@ -1266,7 +1270,7 @@ public struct QLEyeData
/// </para>
/// </summary>
[MarshalAs(UnmanagedType.U1)]
public System.Boolean Found;
[FieldOffset(0)] public System.Boolean Found;

/// <summary>
/// <para>
Expand All @@ -1275,7 +1279,7 @@ public struct QLEyeData
/// </para>
/// </summary>
[MarshalAs(UnmanagedType.U1)]
public System.Boolean Calibrated;
[FieldOffset(1)] public System.Boolean Calibrated;

/// <summary>
/// <para>
Expand All @@ -1284,15 +1288,15 @@ public struct QLEyeData
/// determined and it's value should not be used for that frame.
/// </para>
/// </summary>
public System.Single PupilDiameter;
[FieldOffset(4)] public System.Single PupilDiameter;

/// <summary>
/// <para>
/// The position in pixels of the image of the center of the pupil.
/// </para>
/// </summary>
/// <seealso cref="QLXYPairFloat"/>
public QLXYPairFloat Pupil;
[FieldOffset(8)] public QLXYPairFloat Pupil;

/// <summary>
/// <para>
Expand All @@ -1301,7 +1305,7 @@ public struct QLEyeData
/// </para>
/// </summary>
/// <seealso cref="QLXYPairFloat"/>
public QLXYPairFloat Glint0;
[FieldOffset(16)] public QLXYPairFloat Glint0;

/// <summary>
/// <para>
Expand All @@ -1310,7 +1314,7 @@ public struct QLEyeData
/// </para>
/// </summary>
/// <seealso cref="QLXYPairFloat"/>
public QLXYPairFloat Glint1;
[FieldOffset(24)] public QLXYPairFloat Glint1;

/// <summary>
/// <para>
Expand All @@ -1319,7 +1323,7 @@ public struct QLEyeData
/// </para>
/// </summary>
/// <seealso cref="QLXYPairFloat"/>
public QLXYPairFloat GazePoint;
[FieldOffset(32)] public QLXYPairFloat GazePoint;

/// <summary>
/// <para>
Expand All @@ -1334,7 +1338,7 @@ public struct QLEyeData

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
#endif
public System.String Reserved;
[FieldOffset(40)] public System.String Reserved;
}

/// <summary>
Expand All @@ -1343,7 +1347,7 @@ public struct QLEyeData
/// based on which eyes were found and previous data depending on filtering settings.
/// </para>
/// </summary>
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public struct QLWeightedGazePoint
{
/// <summary>
Expand All @@ -1353,35 +1357,35 @@ public struct QLWeightedGazePoint
/// </para>
/// </summary>
[MarshalAs(UnmanagedType.U1)]
public System.Boolean Valid;
[FieldOffset(0)] public System.Boolean Valid;

/// <summary>
/// <para>
/// The x position of the gaze point in percentage of the calibrated area.
/// </para>
/// </summary>
public System.Single x;
[FieldOffset(4)] public System.Single x;

/// <summary>
/// <para>
/// The y position of the gaze point in percentage of the calibrated area.
/// </para>
/// </summary>
public System.Single y;
[FieldOffset(8)] public System.Single y;

/// <summary>
/// <para>
/// The amount the left eye affected the weighted gaze point.
/// </para>
/// </summary>
public System.Single LeftWeight;
[FieldOffset(12)] public System.Single LeftWeight;

/// <summary>
/// <para>
/// The amount the right eye affected the weighted gaze point.
/// </para>
/// </summary>
public System.Single RightWeight;
[FieldOffset(16)] public System.Single RightWeight;

/// <summary>
/// <para>
Expand All @@ -1396,7 +1400,7 @@ public struct QLWeightedGazePoint

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)]
#endif
public System.String Reserved;
[FieldOffset(20)] public System.String Reserved;
}

/// <summary>
Expand All @@ -1408,7 +1412,7 @@ public struct QLWeightedGazePoint
/// <seealso cref="QLImageData"/>
/// <seealso cref="QLWeightedGazePoint"/>
/// <seealso cref="QuickLink2API.QLDevice_GetFrame" />
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public struct QLFrameData
{
/// <summary>
Expand All @@ -1417,23 +1421,23 @@ public struct QLFrameData
/// </para>
/// </summary>
/// <seealso cref="QLImageData"/>
public QLImageData ImageData;
[FieldOffset(0)] public QLImageData ImageData;

/// <summary>
/// <para>
/// Left eye specific data.
/// </para>
/// </summary>
/// <seealso cref="QLEyeData"/>
public QLEyeData LeftEye;
[FieldOffset(96)] public QLEyeData LeftEye;

/// <summary>
/// <para>
/// Right eye specific data.
/// </para>
/// </summary>
/// <seealso cref="QLEyeData"/>
public QLEyeData RightEye;
[FieldOffset(200)] public QLEyeData RightEye;

/// <summary>
/// <para>
Expand All @@ -1442,36 +1446,36 @@ public struct QLFrameData
/// </para>
/// </summary>
/// <seealso cref="QLWeightedGazePoint"/>
public QLWeightedGazePoint WeightedGazePoint;
[FieldOffset(304)] public QLWeightedGazePoint WeightedGazePoint;

/// <summary>
/// <para>
/// The focus measurement of the eyes in the image. Higher values are better. Typical good
/// values range between 15 and 19.
/// </para>
/// </summary>
public System.Single Focus;
[FieldOffset(388)] public System.Single Focus;

/// <summary>
/// <para>
/// The distance from the device to the user in centimeters.
/// </para>
/// </summary>
public System.Single Distance;
[FieldOffset(392)] public System.Single Distance;

/// <summary>
/// <para>
/// The current bandwidth of the device.
/// </para>
/// </summary>
public System.Int32 Bandwidth;
[FieldOffset(396)] public System.Int32 Bandwidth;

/// <summary>
/// <para>
/// The ID of the device that is the source for the current frame.
/// </para>
/// </summary>
public System.Int32 DeviceId;
[FieldOffset(400)] public System.Int32 DeviceId;

/// <summary>
/// <para>
Expand All @@ -1486,7 +1490,7 @@ public struct QLFrameData

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 56)]
#endif
public System.String Reserved;
[FieldOffset(404)] public System.String Reserved;
}

#endregion Structures
Expand Down
Loading