Powerful and easy to use. This is included as standard with ViewPoint:
DLLand dylib library interface.
.h and .lib files.
Sample source code written in C.
Sample-Code: Simple polling example
This very simple program lists the X and Y positions of gaze calculated by ViewPoint.
#include “vpx.h”
main()
{
for( int ix=0; ix<999 ; ix++ ) {
VPX_RealPoint gp; // a structure with two floats for (x,y) values
VPX_GetGazePoint( &gp ); // pass by reference
println(“ViewPoint gaze point: %g, %g “, gp.x, gp.y );
}
}
Sample Code: Event-Driven Real-Time example
Your application must first register with the VPX_InterApp.dll by doing the following for each window procedure (WinProc) that desires notification:
uniqueMessageId = RegisterWindowMessage( VPX_MESSAGE );
VPX_InsertMessageRequest( hWnd, uniqueMessageId );
After registering, the WinProc should listen for notifications:
LRESULT CALLBACK WndProc ( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam )
{
WORD notificationCode = HIWORD(wParam) ;
if ( message == uniqueMessageId )
switch ( notificationCode )
{
case VPX_DAT_FRESH :
{
VPX_EyeType eye = LOWORD ( wParam );
showFreshData( eye, graphicsWindow );
} break;
Sample Code for SDK / API
- ANSI C VPX_SimpleC_Demo, simple sleep function
- Win32 (C) VPX_Win32_Demo, event handling
- MFC (C,C++) VPX_MFC_Demo, event handling
- BASIC VPX_Basic_Demo, simple timer function
The sample code shows how to: Open/close the ViewPoint application, Open/Close/Pause/Resume data files, insert real-time dataMarkers and real-time stringData, access all data in real-time, complete eye tracker control, merge data in real-time from various sources. |