Commit 9a970560 by liulongfei

3D 鼠标接入

parent 0c4ca99f
using System;
using SharpDX.Mathematics.Interop;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -29,6 +30,23 @@ namespace VIZ.Framework.Common
}
/// <summary>
/// 更新裁切框边框颜色额
/// </summary>
/// <param name="videoControl">视频控件</param>
/// <param name="color">裁切框边框颜色</param>
public static void UpdateClipBoxBorderColor(this VideoControl videoControl, RawColor4 color)
{
if (videoControl.videoRender == null)
return;
ClipBoxPlugin plugin = videoControl.GetPlugin<ClipBoxPlugin>(VideoControlPluginNames.ClipBox);
if (plugin == null)
return;
plugin.UpdateBorderColor(color);
}
/// <summary>
/// 清理跟踪框
/// </summary>
/// <param name="videoControl">视频控件</param>
......
......@@ -7,6 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using log4net;
namespace VIZ.Framework.Common
{
......@@ -16,6 +17,11 @@ namespace VIZ.Framework.Common
public class ClipBoxPlugin : VideoPluginBase
{
/// <summary>
/// 日志
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(ClipBoxPlugin));
/// <summary>
/// 裁剪框插件
/// </summary>
/// <param name="videoControl">视频控件</param>
......@@ -44,6 +50,19 @@ namespace VIZ.Framework.Common
}
/// <summary>
/// 更新颜色
/// </summary>
/// <param name="color">更新边框颜色</param>
public void UpdateBorderColor(RawColor4 color)
{
ClipBoxInfo info = this.clipBoxInfo;
if (info == null)
return;
info.DrawingBorderColor = color;
}
/// <summary>
/// 渲染
/// </summary>
/// <param name="context">渲染上下文</param>
......@@ -113,6 +132,14 @@ namespace VIZ.Framework.Common
SolidColorBrush brush = new SolidColorBrush(context.Target, info.DrawingBorderColor);
context.Target.DrawRectangle(drawRect, brush, info.DrawingBorderWidth);
#if DEBUG
//StringBuilder sb = new StringBuilder();
//sb.AppendLine($"【渲染裁切框】 {info.TimeCode}");
//sb.Append($"========================= END =========================");
//log.Debug(sb.ToString());
#endif
}
}
}
......@@ -31,5 +31,10 @@ namespace VIZ.Framework.Common
/// 遮罩颜色
/// </summary>
public RawColor4 MaskColor { get; set; }
/// <summary>
/// 时码
/// </summary>
public long TimeCode { get; set; }
}
}
......@@ -33,5 +33,9 @@ namespace VIZ.Framework.Common
/// </summary>
public float DrawingBorderWidth { get; set; }
/// <summary>
/// 时间码
/// </summary>
public long TimeCode { get; set; }
}
}
......@@ -15,6 +15,7 @@ using System.Windows.Input;
using VIZ.Framework.Core;
using VIZ.Framework.Domain;
using VIZ.Framework.Storage;
using log4net;
namespace VIZ.Framework.Common
{
......@@ -28,6 +29,11 @@ namespace VIZ.Framework.Common
/// </summary>
public class VideoCustomRender : D2dControl
{
/// <summary>
/// 日志
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(VideoCustomRender));
// ========================================================================================================
// === Property ===
// ========================================================================================================
......@@ -130,6 +136,14 @@ namespace VIZ.Framework.Common
if (renderInfo == null)
return;
#if DEBUG
//StringBuilder sb = new StringBuilder();
//sb.AppendLine($"========================= BEGIN =========================");
//sb.Append($"【渲染视频】 {renderInfo.Frame.TimeStamp}");
//log.Debug(sb.ToString());
#endif
context.VideoRenderInfo = renderInfo;
// 绘制视频
......
//
// UDUI.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
// #error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
// feb-2014:
// When doing a 3DxWinCore release, it is only necessary to update the 3DXWINCORE_VERSION numbers
// The other derived files only need to be updated if they actually changed. The MICRO build number
// used by MSI is now the revision number so we don't have to worry about incrementing it manually.
//
// Don't forget to update the Version.h and readme files.
//
// The installers' Version properties are also updated automatically.
// Current version
#define _3DXWINCORE_VERSION_MAJOR 17
#define _3DXWINCORE_VERSION_MINOR 5
#define _3DXWINCORE_VERSION_MICRO 5
#define _3DXWINCORE_VERSION_BUILD_NUMBER 18050
#define _3DXWINCORE_SVN_WCREV 14759
#define HIDDEV_VERSION_MAJOR 10
#define HIDDEV_VERSION_MINOR 7
#define S80TRANS_VERSION_MAJOR 3
#define S80TRANS_VERSION_MINOR 10
#define _3DXNLSERVERTRANS_VERSION_MAJOR 1
#define _3DXNLSERVERTRANS_VERSION_MINOR 0
#define MWMTRANS_VERSION_MAJOR 2
#define MWMTRANS_VERSION_MINOR 8
#define KMJTRANS_VERSION_MAJOR 3
#define KMJTRANS_VERSION_MINOR 1
#define SIFOCUSHOOK_VERSION_MAJOR 1
#define SIFOCUSHOOK_VERSION_MINOR 1
#define JET_VERSION_MAJOR 1
#define JET_VERSION_MINOR 1
#define CUBE3D_VERSION_MAJOR 1
#define CUBE3D_VERSION_MINOR 1
#define CHICKEN_VERSION_MAJOR 1
#define CHICKEN_VERSION_MINOR 1
#define BICYCLEDI_VERSION_MAJOR 10
#define BICYCLEDI_VERSION_MINOR 1
#define PUZZLE_VERSION_MAJOR 2
#define PUZZLE_VERSION_MINOR 0
#define _3DXTEST_VERSION_MAJOR 1
#define _3DXTEST_VERSION_MINOR 0
#define MWMTEST_VERSION_MAJOR 1
#define MWMTEST_VERSION_MINOR 0
#define _3DXTSTMFC_VERSION_MAJOR 1
#define _3DXTSTMFC_VERSION_MINOR 1
#define CITYFLY_VERSION_MAJOR 1
#define CITYFLY_VERSION_MINOR 0
#define WIDGET_VERSION_MAJOR 1
#define WIDGET_VERSION_MINOR 0
#define LAUNCH3DXVIEWER_VERSION_MAJOR 1
#define LAUNCH3DXVIEWER_VERSION_MINOR 1
#define SIAPP_VERSION_MAJOR 4
#define SIAPP_VERSION_MINOR 3
#define SPWINI_VERSION_MAJOR 11
#define SPWINI_VERSION_MINOR 2
#define CATIADLL_VERSION_MAJOR 2
#define CATIADLL_VERSION_MINOR 0
#define MSOFFICEDLL_VERSION_MAJOR 1
#define MSOFFICEDLL_VERSION_MINOR 0
#define WIN32UTILSDLL_VERSION_MAJOR 1
#define WIN32UTILSDLL_VERSION_MINOR 0
#define MGL3DCTLRRPCSERVICE_VERSION_MAJOR 2
#define MGL3DCTLRRPCSERVICE_VERSION_MINOR 0
#define STRINGIZER(arg) #arg
#define MACROSTRINGIZER(arg) STRINGIZER(arg)
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
#define IDR_LEGALCOPYRIGHT_ENUS "Copyright 1998-2018 3Dconnexion. All rights reserved."
#define IDR_LEGALCOPYRIGHT_DEDE "Copyright 1998-2018 3Dconnexion. Alle Rechte vorbehalten."
#define IDR_LEGALCOPYRIGHT_FRFR "Copyright 1998-2018 3Dconnexion"
#define IDR_LEGALCOPYRIGHT_JPJP "Copyright 1998-2018 3Dconnexion"
#define IDR_LEGALCOPYRIGHT_CHCH "Copyright 1998-2018 3Dconnexion"
#define IDR_3DXWINCORE_PRODUCTVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_MICRO._3DXWINCORE_SVN_WCREV)
#define IDR_3DXWINCORE_PRODUCTVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_MICRO,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_ENUS_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_ENUS_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_DEDE_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_DEDE_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_FRFR_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_FRFR_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_JPJP_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_JPJP_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_CHCH_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_CHCH_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
// Used by SetAssemblyVersion.exe, which changes AssemblyInfo.cs.
// Note that this uses .'s not ,'s
///// ** not used now. Using autoincrementing. Don't care that much about the actual value; just that it gets incremented.
//#define IDR_3DXHOME_FILEVERSION_STR 1.0.4.0
// Used by SetAssemblyInfo.exe. Which changes AssemblyInfo.cs.
///// ** not used now. Using autoincrementing. Don't care that much about the actual value; just that it gets incremented.
//#define IDR_3DXCONFIG_FILEVERSION_STR 1.0.20.0
#define IDR_HIDDEV_FILEVERSION_STR MACROSTRINGIZER(HIDDEV_VERSION_MAJOR.HIDDEV_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_HIDDEV_FILEVERSION_NUM HIDDEV_VERSION_MAJOR,HIDDEV_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_S80TRANS_FILEVERSION_STR MACROSTRINGIZER(S80TRANS_VERSION_MAJOR.S80TRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_S80TRANS_FILEVERSION_NUM S80TRANS_VERSION_MAJOR,S80TRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXNLSERVERTRANS_FILEVERSION_STR MACROSTRINGIZER(_3DXNLSERVERTRANS_VERSION_MAJOR._3DXNLSERVERTRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXNLSERVERTRANS_FILEVERSION_NUM _3DXNLSERVERTRANS_VERSION_MAJOR,_3DXNLSERVERTRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MWMTRANS_FILEVERSION_STR MACROSTRINGIZER(MWMTRANS_VERSION_MAJOR.MWMTRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MWMTRANS_FILEVERSION_NUM MWMTRANS_VERSION_MAJOR,MWMTRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_KMJTRANS_FILEVERSION_STR MACROSTRINGIZER(KMJTRANS_VERSION_MAJOR.KMJTRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_KMJTRANS_FILEVERSION_NUM KMJTRANS_VERSION_MAJOR,KMJTRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_SIFOCUSHOOK_FILEVERSION_STR MACROSTRINGIZER(SIFOCUSHOOK_VERSION_MAJOR.SIFOCUSHOOK_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_SIFOCUSHOOK_FILEVERSION_NUM SIFOCUSHOOK_VERSION_MAJOR,SIFOCUSHOOK_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_JET_FILEVERSION_STR MACROSTRINGIZER(JET_VERSION_MAJOR.JET_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_JET_FILEVERSION_NUM JET_VERSION_MAJOR,JET_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CUBE3D_FILEVERSION_STR MACROSTRINGIZER(CUBE3D_VERSION_MAJOR.CUBE3D_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CUBE3D_FILEVERSION_NUM CUBE3D_VERSION_MAJOR,CUBE3D_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CHICKEN_FILEVERSION_STR MACROSTRINGIZER(CHICKEN_VERSION_MAJOR.CHICKEN_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CHICKEN_FILEVERSION_NUM CHICKEN_VERSION_MAJOR,CHICKEN_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_BICYCLEDI_FILEVERSION_STR MACROSTRINGIZER(BICYCLEDI_VERSION_MAJOR.BICYCLEDI_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_BICYCLEDI_FILEVERSION_NUM BICYCLEDI_VERSION_MAJOR,BICYCLEDI_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_PUZZLE_FILEVERSION_STR MACROSTRINGIZER(PUZZLE_VERSION_MAJOR.PUZZLE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_PUZZLE_FILEVERSION_NUM PUZZLE_VERSION_MAJOR,PUZZLE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXTEST_FILEVERSION_STR MACROSTRINGIZER(_3DXTEST_VERSION_MAJOR._3DXTEST_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXTEST_FILEVERSION_NUM _3DXTEST_VERSION_MAJOR,_3DXTEST_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MWMTEST_FILEVERSION_STR MACROSTRINGIZER(MWMTEST_VERSION_MAJOR.MWMTEST_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MWMTEST_FILEVERSION_NUM MWMTEST_VERSION_MAJOR,MWMTEST_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXTSTMFC_FILEVERSION_STR MACROSTRINGIZER(_3DXTSTMFC_VERSION_MAJOR._3DXTSTMFC_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXTSTMFC_FILEVERSION_NUM _3DXTSTMFC_VERSION_MAJOR,_3DXTSTMFC_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CITYFLY_FILEVERSION_STR MACROSTRINGIZER(CITYFLY_VERSION_MAJOR.CITYFLY_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CITYFLY_FILEVERSION_NUM CITYFLY_VERSION_MAJOR,CITYFLY_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_WIDGET_FILEVERSION_STR MACROSTRINGIZER(WIDGET_VERSION_MAJOR.WIDGET_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_WIDGET_FILEVERSION_NUM WIDGET_VERSION_MAJOR,WIDGET_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_LAUNCH3DXVIEWER_FILEVERSION_STR MACROSTRINGIZER(LAUNCH3DXVIEWER_VERSION_MAJOR.LAUNCH3DXVIEWER_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_LAUNCH3DXVIEWER_FILEVERSION_NUM LAUNCH3DXVIEWER_VERSION_MAJOR,LAUNCH3DXVIEWER_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_SIAPP_FILEVERSION_STR MACROSTRINGIZER(SIAPP_VERSION_MAJOR.SIAPP_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_SIAPP_FILEVERSION_NUM SIAPP_VERSION_MAJOR,SIAPP_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_SPWINI_FILEVERSION_STR MACROSTRINGIZER(SPWINI_VERSION_MAJOR.SPWINI_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_SPWINI_FILEVERSION_NUM SPWINI_VERSION_MAJOR,SPWINI_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CATIADLL_FILEVERSION_STR MACROSTRINGIZER(CATIADLL_VERSION_MAJOR.CATIADLL_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CATIADLL_FILEVERSION_NUM CATIADLL_VERSION_MAJOR,CATIADLL_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MSOFFICEDLL_FILEVERSION_STR MACROSTRINGIZER(MSOFFICEDLL_VERSION_MAJOR.MSOFFICEDLL_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MSOFFICEDLL_FILEVERSION_NUM MSOFFICEDLL_VERSION_MAJOR,MSOFFICEDLL_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_WIN32UTILSDLL_FILEVERSION_STR MACROSTRINGIZER(WIN32UTILSDLL_VERSION_MAJOR.WIN32UTILSDLL_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_WIN32UTILSDLL_FILEVERSION_NUM WIN32UTILSDLL_VERSION_MAJOR,WIN32UTILSDLL_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MGL3DCTLRRPCSERVICE_FILEVERSION_STR MACROSTRINGIZER(MGL3DCTLRRPCSERVICE_VERSION_MAJOR.MGL3DCTLRRPCSERVICE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MGL3DCTLRRPCSERVICE_FILEVERSION_NUM MGL3DCTLRRPCSERVICE_VERSION_MAJOR,MGL3DCTLRRPCSERVICE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
/////////////////////////////////////////////////////////////////////////////
/* SiCfg.h -- Configuration Saving Functions Header File
*
* These functions are used to save and retrieve application configuration info
* in the registry.
*
* Strings are TCHARs. The defaut library is built with WCHARs. Src code is provided
* to rebuild it with ANSI chars if your application uses chars.
*
* Anything can be saved because everything is a string.
*
* We suggest that the following conventions be used:
*
* appName is the name of the application (e.g., "GUISync_SDK")
* modeName is the name of the application mode (e.g., "Sketch")
* configName is the name the user gives to the specific configuration, or a default,
* (e.g., "Electrical",
* "Mechanical 1",
* "Steve 1",
* "Small Assembly Work")
* settingName can optionally indicate the 3Dconnexion device # and the parameter name:
* (e.g., "29_Button 4" is SpacePilot button number 4,
* "Button 4" is a device independent button 4)
* settingValue should indicate the command source and a value that is assigned to this button (or whatever):
* (e.g., "D_23" means Driver function 23,
* "D_-3" means Driver macro 3,
* A_1005 means Application function 1005
* )
*/
SpwReturnValue SiCfgSaveSetting( const TCHAR *appName, const TCHAR *modeName, const TCHAR *configName, const TCHAR *settingName, const TCHAR *settingValue );
SpwReturnValue SiCfgGetSetting( const TCHAR *appName, const TCHAR *modeName, const TCHAR *configName, const TCHAR *settingName, TCHAR *settingValue, SPWuint32 *pmaxValueLen );
SpwReturnValue SiCfgGetModes( const TCHAR *appName, TCHAR *modeName, SPWuint32 *pmaxNameLen );
SpwReturnValue SiCfgGetModesNext( const TCHAR *appName, TCHAR *modeName, SPWuint32 *pmaxNameLen );
SpwReturnValue SiCfgGetNames( const TCHAR *appName, const TCHAR *modeName, TCHAR *configName, SPWuint32 *pmaxNameLen );
SpwReturnValue SiCfgGetNamesNext( const TCHAR *appName, const TCHAR *modeName, TCHAR *configName, SPWuint32 *pmaxNameLen );
/*----------------------------------------------------------------------
* V3DCMD.h -- Virtual 3D Commands
*
* enums for all current V3DCMDs
* These are functions that all applications should respond to if they are
* at all applicable. These cmds are generated from any number of places
* including hard and soft buttons. They don't necessarily represent a
* hardware button
*
* Written: January 2013
* Original author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright (c) 2013-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _V3DCMD_H_
#define _V3DCMD_H_
static char v3DCMDCvsId[]="(C) 2013-2015 3Dconnexion: $Id: V3DCMD.h 11750 2015-09-08 13:58:59Z jwick $";
/*
* Constants
*/
/*
* Virtual 3D Commands
*
* These function numbers will never change, but the list will be amended as more
* V3DCMDs are created.
* For use with SI_CMD_EVENT.
* Most of these don't have a separate press and release of these events.
* Some keys do have press and release (Esc, Shift, Ctrl) as expected of keyboard keys.
*/
typedef enum
{
V3DCMD_NOOP = 0,
V3DCMD_MENU_OPTIONS = 1,
V3DCMD_VIEW_FIT = 2,
V3DCMD_VIEW_TOP = 3,
V3DCMD_VIEW_LEFT = 4,
V3DCMD_VIEW_RIGHT = 5,
V3DCMD_VIEW_FRONT = 6,
V3DCMD_VIEW_BOTTOM = 7,
V3DCMD_VIEW_BACK = 8,
V3DCMD_VIEW_ROLLCW = 9,
V3DCMD_VIEW_ROLLCCW = 10,
V3DCMD_VIEW_ISO1 = 11,
V3DCMD_VIEW_ISO2 = 12,
V3DCMD_KEY_F1 = 13,
V3DCMD_KEY_F2 = 14,
V3DCMD_KEY_F3 = 15,
V3DCMD_KEY_F4 = 16,
V3DCMD_KEY_F5 = 17,
V3DCMD_KEY_F6 = 18,
V3DCMD_KEY_F7 = 19,
V3DCMD_KEY_F8 = 20,
V3DCMD_KEY_F9 = 21,
V3DCMD_KEY_F10 = 22,
V3DCMD_KEY_F11 = 23,
V3DCMD_KEY_F12 = 24,
V3DCMD_KEY_ESC = 25,
V3DCMD_KEY_ALT = 26,
V3DCMD_KEY_SHIFT = 27,
V3DCMD_KEY_CTRL = 28,
V3DCMD_FILTER_ROTATE = 29,
V3DCMD_FILTER_PANZOOM= 30,
V3DCMD_FILTER_DOMINANT=31,
V3DCMD_SCALE_PLUS = 32,
V3DCMD_SCALE_MINUS = 33,
V3DCMD_VIEW_SPINCW = 34,
V3DCMD_VIEW_SPINCCW = 35,
V3DCMD_VIEW_TILTCW = 36,
V3DCMD_VIEW_TILTCCW = 37,
V3DCMD_MENU_POPUP = 38,
V3DCMD_MENU_BUTTONMAPPINGEDITOR = 39,
V3DCMD_MENU_ADVANCEDSETTINGSEDITOR = 40,
V3DCMD_MOTIONMACRO_ZOOM = 41,
V3DCMD_MOTIONMACRO_ZOOMOUT_CURSORTOCENTER = 42,
V3DCMD_MOTIONMACRO_ZOOMIN_CURSORTOCENTER = 43,
V3DCMD_MOTIONMACRO_ZOOMOUT_CENTERTOCENTER = 44,
V3DCMD_MOTIONMACRO_ZOOMIN_CENTERTOCENTER = 45,
V3DCMD_MOTIONMACRO_ZOOMOUT_CURSORTOCURSOR = 46,
V3DCMD_MOTIONMACRO_ZOOMIN_CURSORTOCURSOR = 47,
V3DCMD_VIEW_QZ_IN = 48,
V3DCMD_VIEW_QZ_OUT = 49,
V3DCMD_KEY_ENTER = 50,
V3DCMD_KEY_DELETE = 51,
V3DCMD_KEY_F13 = 52,
V3DCMD_KEY_F14 = 53,
V3DCMD_KEY_F15 = 54,
V3DCMD_KEY_F16 = 55,
V3DCMD_KEY_F17 = 56,
V3DCMD_KEY_F18 = 57,
V3DCMD_KEY_F19 = 58,
V3DCMD_KEY_F20 = 59,
V3DCMD_KEY_F21 = 60,
V3DCMD_KEY_F22 = 61,
V3DCMD_KEY_F23 = 62,
V3DCMD_KEY_F24 = 63,
V3DCMD_KEY_F25 = 64,
V3DCMD_KEY_F26 = 65,
V3DCMD_KEY_F27 = 66,
V3DCMD_KEY_F28 = 67,
V3DCMD_KEY_F29 = 68,
V3DCMD_KEY_F30 = 69,
V3DCMD_KEY_F31 = 70,
V3DCMD_KEY_F32 = 71,
V3DCMD_KEY_F33 = 72,
V3DCMD_KEY_F34 = 73,
V3DCMD_KEY_F35 = 74,
V3DCMD_KEY_F36 = 75,
V3DCMD_VIEW_1 = 76,
V3DCMD_VIEW_2 = 77,
V3DCMD_VIEW_3 = 78,
V3DCMD_VIEW_4 = 79,
V3DCMD_VIEW_5 = 80,
V3DCMD_VIEW_6 = 81,
V3DCMD_VIEW_7 = 82,
V3DCMD_VIEW_8 = 83,
V3DCMD_VIEW_9 = 84,
V3DCMD_VIEW_10 = 85,
V3DCMD_VIEW_11 = 86,
V3DCMD_VIEW_12 = 87,
V3DCMD_VIEW_13 = 88,
V3DCMD_VIEW_14 = 89,
V3DCMD_VIEW_15 = 90,
V3DCMD_VIEW_16 = 91,
V3DCMD_VIEW_17 = 92,
V3DCMD_VIEW_18 = 93,
V3DCMD_VIEW_19 = 94,
V3DCMD_VIEW_20 = 95,
V3DCMD_VIEW_21 = 96,
V3DCMD_VIEW_22 = 97,
V3DCMD_VIEW_23 = 98,
V3DCMD_VIEW_24 = 99,
V3DCMD_VIEW_25 = 100,
V3DCMD_VIEW_26 = 101,
V3DCMD_VIEW_27 = 102,
V3DCMD_VIEW_28 = 103,
V3DCMD_VIEW_29 = 104,
V3DCMD_VIEW_30 = 105,
V3DCMD_VIEW_31 = 106,
V3DCMD_VIEW_32 = 107,
V3DCMD_VIEW_33 = 108,
V3DCMD_VIEW_34 = 109,
V3DCMD_VIEW_35 = 110,
V3DCMD_VIEW_36 = 111,
V3DCMD_SAVE_VIEW_1 = 112,
V3DCMD_SAVE_VIEW_2 = 113,
V3DCMD_SAVE_VIEW_3 = 114,
V3DCMD_SAVE_VIEW_4 = 115,
V3DCMD_SAVE_VIEW_5 = 116,
V3DCMD_SAVE_VIEW_6 = 117,
V3DCMD_SAVE_VIEW_7 = 118,
V3DCMD_SAVE_VIEW_8 = 119,
V3DCMD_SAVE_VIEW_9 = 120,
V3DCMD_SAVE_VIEW_10 = 121,
V3DCMD_SAVE_VIEW_11 = 122,
V3DCMD_SAVE_VIEW_12 = 123,
V3DCMD_SAVE_VIEW_13 = 124,
V3DCMD_SAVE_VIEW_14 = 125,
V3DCMD_SAVE_VIEW_15 = 126,
V3DCMD_SAVE_VIEW_16 = 127,
V3DCMD_SAVE_VIEW_17 = 128,
V3DCMD_SAVE_VIEW_18 = 129,
V3DCMD_SAVE_VIEW_19 = 130,
V3DCMD_SAVE_VIEW_20 = 131,
V3DCMD_SAVE_VIEW_21 = 132,
V3DCMD_SAVE_VIEW_22 = 133,
V3DCMD_SAVE_VIEW_23 = 134,
V3DCMD_SAVE_VIEW_24 = 135,
V3DCMD_SAVE_VIEW_25 = 136,
V3DCMD_SAVE_VIEW_26 = 137,
V3DCMD_SAVE_VIEW_27 = 138,
V3DCMD_SAVE_VIEW_28 = 139,
V3DCMD_SAVE_VIEW_29 = 140,
V3DCMD_SAVE_VIEW_30 = 141,
V3DCMD_SAVE_VIEW_31 = 142,
V3DCMD_SAVE_VIEW_32 = 143,
V3DCMD_SAVE_VIEW_33 = 144,
V3DCMD_SAVE_VIEW_34 = 145,
V3DCMD_SAVE_VIEW_35 = 146,
V3DCMD_SAVE_VIEW_36 = 147,
V3DCMD_KEY_TAB = 148,
V3DCMD_KEY_SPACE = 149,
V3DCMD_MENU_1 = 150,
V3DCMD_MENU_2 = 151,
V3DCMD_MENU_3 = 152,
V3DCMD_MENU_4 = 153,
V3DCMD_MENU_5 = 154,
V3DCMD_MENU_6 = 155,
V3DCMD_MENU_7 = 156,
V3DCMD_MENU_8 = 157,
V3DCMD_MENU_9 = 158,
V3DCMD_MENU_10 = 159,
V3DCMD_MENU_11 = 160,
V3DCMD_MENU_12 = 161,
V3DCMD_MENU_13 = 162,
V3DCMD_MENU_14 = 163,
V3DCMD_MENU_15 = 164,
V3DCMD_MENU_16 = 165,
/* Add here as needed. Don't change any values that may be in use */
} V3DCMD;
#endif /* _V3DCMD_H_ */
/*----------------------------------------------------------------------
* V3DKey.h -- Virtual 3D Keys
*
* enums for all current V3DKeys
*
* Written: January 2013
* Original author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 2013-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _V3DKey_H_
#define _V3DKey_H_
static char v3DKeyCvsId[]="(C) 2013-2015 3Dconnexion: $Id: V3DKey.h 11750 2015-09-08 13:58:59Z jwick $";
/*
* Virtual 3D Keys
*
* Functions that refer to hardware keys use these constants to identify the keys.
* These represent hardware buttons on devices that have them.
* If a hardware device doesn't have a key, it won't produce the event.
* Not all hardware devices have all keys but any key that does exist is
* in this enum. If new hardware keys are added in the future, a new constant will
* be created for it.
*
* SI_BUTTON_PRESS_EVENT and SI_BUTTON_RELEASE_EVENT events identify the hardware
* keys that generated the events through V3DKeys (Virtual 3D Mouse Keys).
* These will represent the actual hardware key pressed unless the user did
* something clever in his xml file.
*/
/* This enum is replicated in virtualkeys.hpp. Reflect any changest there. */
typedef enum
{
V3DK_INVALID = 0,
V3DK_MENU = 1,
V3DK_FIT = 2,
V3DK_TOP = 3,
V3DK_LEFT = 4,
V3DK_RIGHT = 5,
V3DK_FRONT = 6,
V3DK_BOTTOM = 7,
V3DK_BACK = 8,
V3DK_ROLL_CW = 9,
V3DK_ROLL_CCW = 10,
V3DK_ISO1 = 11,
V3DK_ISO2 = 12,
V3DK_1 = 13,
V3DK_2 = 14,
V3DK_3 = 15,
V3DK_4 = 16,
V3DK_5 = 17,
V3DK_6 = 18,
V3DK_7 = 19,
V3DK_8 = 20,
V3DK_9 = 21,
V3DK_10 = 22,
V3DK_ESC = 23,
V3DK_ALT = 24,
V3DK_SHIFT = 25,
V3DK_CTRL = 26,
V3DK_ROTATE = 27,
V3DK_PANZOOM = 28,
V3DK_DOMINANT = 29,
V3DK_PLUS = 30,
V3DK_MINUS = 31,
V3DK_SPIN_CW = 32,
V3DK_SPIN_CCW = 33,
V3DK_TILT_CW = 34,
V3DK_TILT_CCW = 35,
V3DK_ENTER = 36,
V3DK_DELETE = 37,
V3DK_RESERVED0 = 38,
V3DK_RESERVED1 = 39,
V3DK_RESERVED2 = 40,
V3DK_F1 = 41,
V3DK_F2 = 42,
V3DK_F3 = 43,
V3DK_F4 = 44,
V3DK_F5 = 45,
V3DK_F6 = 46,
V3DK_F7 = 47,
V3DK_F8 = 48,
V3DK_F9 = 49,
V3DK_F10 = 50,
V3DK_F11 = 51,
V3DK_F12 = 52,
V3DK_F13 = 53,
V3DK_F14 = 54,
V3DK_F15 = 55,
V3DK_F16 = 56,
V3DK_F17 = 57,
V3DK_F18 = 58,
V3DK_F19 = 59,
V3DK_F20 = 60,
V3DK_F21 = 61,
V3DK_F22 = 62,
V3DK_F23 = 63,
V3DK_F24 = 64,
V3DK_F25 = 65,
V3DK_F26 = 66,
V3DK_F27 = 67,
V3DK_F28 = 68,
V3DK_F29 = 69,
V3DK_F30 = 70,
V3DK_F31 = 71,
V3DK_F32 = 72,
V3DK_F33 = 73,
V3DK_F34 = 74,
V3DK_F35 = 75,
V3DK_F36 = 76,
V3DK_11 = 77,
V3DK_12 = 78,
V3DK_13 = 79,
V3DK_14 = 80,
V3DK_15 = 81,
V3DK_16 = 82,
V3DK_17 = 83,
V3DK_18 = 84,
V3DK_19 = 85,
V3DK_20 = 86,
V3DK_21 = 87,
V3DK_22 = 88,
V3DK_23 = 89,
V3DK_24 = 90,
V3DK_25 = 91,
V3DK_26 = 92,
V3DK_27 = 93,
V3DK_28 = 94,
V3DK_29 = 95,
V3DK_30 = 96,
V3DK_31 = 97,
V3DK_32 = 98,
V3DK_33 = 99,
V3DK_34 = 100,
V3DK_35 = 101,
V3DK_36 = 102,
V3DK_VIEW_1 = 103,
V3DK_VIEW_2 = 104,
V3DK_VIEW_3 = 105,
V3DK_VIEW_4 = 106,
V3DK_VIEW_5 = 107,
V3DK_VIEW_6 = 108,
V3DK_VIEW_7 = 109,
V3DK_VIEW_8 = 110,
V3DK_VIEW_9 = 111,
V3DK_VIEW_10 = 112,
V3DK_VIEW_11 = 113,
V3DK_VIEW_12 = 114,
V3DK_VIEW_13 = 115,
V3DK_VIEW_14 = 116,
V3DK_VIEW_15 = 117,
V3DK_VIEW_16 = 118,
V3DK_VIEW_17 = 119,
V3DK_VIEW_18 = 120,
V3DK_VIEW_19 = 121,
V3DK_VIEW_20 = 122,
V3DK_VIEW_21 = 123,
V3DK_VIEW_22 = 124,
V3DK_VIEW_23 = 125,
V3DK_VIEW_24 = 126,
V3DK_VIEW_25 = 127,
V3DK_VIEW_26 = 128,
V3DK_VIEW_27 = 129,
V3DK_VIEW_28 = 130,
V3DK_VIEW_29 = 131,
V3DK_VIEW_30 = 132,
V3DK_VIEW_31 = 133,
V3DK_VIEW_32 = 134,
V3DK_VIEW_33 = 135,
V3DK_VIEW_34 = 136,
V3DK_VIEW_35 = 137,
V3DK_VIEW_36 = 138,
V3DK_SAVE_VIEW_1 = 139,
V3DK_SAVE_VIEW_2 = 140,
V3DK_SAVE_VIEW_3 = 141,
V3DK_SAVE_VIEW_4 = 142,
V3DK_SAVE_VIEW_5 = 143,
V3DK_SAVE_VIEW_6 = 144,
V3DK_SAVE_VIEW_7 = 145,
V3DK_SAVE_VIEW_8 = 146,
V3DK_SAVE_VIEW_9 = 147,
V3DK_SAVE_VIEW_10= 148,
V3DK_SAVE_VIEW_11= 149,
V3DK_SAVE_VIEW_12= 150,
V3DK_SAVE_VIEW_13= 151,
V3DK_SAVE_VIEW_14= 152,
V3DK_SAVE_VIEW_15= 153,
V3DK_SAVE_VIEW_16= 154,
V3DK_SAVE_VIEW_17= 155,
V3DK_SAVE_VIEW_18= 156,
V3DK_SAVE_VIEW_19= 157,
V3DK_SAVE_VIEW_20= 158,
V3DK_SAVE_VIEW_21= 159,
V3DK_SAVE_VIEW_22= 160,
V3DK_SAVE_VIEW_23= 161,
V3DK_SAVE_VIEW_24= 162,
V3DK_SAVE_VIEW_25= 163,
V3DK_SAVE_VIEW_26= 164,
V3DK_SAVE_VIEW_27= 165,
V3DK_SAVE_VIEW_28= 166,
V3DK_SAVE_VIEW_29= 167,
V3DK_SAVE_VIEW_30= 168,
V3DK_SAVE_VIEW_31= 169,
V3DK_SAVE_VIEW_32= 170,
V3DK_SAVE_VIEW_33= 171,
V3DK_SAVE_VIEW_34= 172,
V3DK_SAVE_VIEW_35= 173,
V3DK_SAVE_VIEW_36= 174,
V3DK_TAB = 175,
V3DK_SPACE = 176,
V3DK_MENU_1 = 177,
V3DK_MENU_2 = 178,
V3DK_MENU_3 = 179,
V3DK_MENU_4 = 180,
V3DK_MENU_5 = 181,
V3DK_MENU_6 = 182,
V3DK_MENU_7 = 183,
V3DK_MENU_8 = 184,
V3DK_MENU_9 = 185,
V3DK_MENU_10 = 186,
V3DK_MENU_11 = 187,
V3DK_MENU_12 = 188,
V3DK_MENU_13 = 189,
V3DK_MENU_14 = 190,
V3DK_MENU_15 = 191,
V3DK_MENU_16 = 192,
/* add more here as needed - don't change value of anything that may already be used */
V3DK_USER = 0x10000
} V3DKey;
#endif /* _V3DKey_H_ */
/*----------------------------------------------------------------------
* si.h -- 3DxWare input library header
*
* 3DxWare Input Library
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1996-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
* 10/27/15 MSB Removed naming for keyData struct for non-ms compiler
* error "types cannot be declared in an anonymous union".
*/
#ifndef _SI_H_
#define _SI_H_
static char incFileNameCvsId[] = "(C) 1996-2018 3Dconnexion: $Id: si.h 14646 2018-01-04 15:08:23Z jwick $";
#ifndef __cplusplus
#ifdef _WIN32
#include <windows.h>
#endif
#endif
// This fixes up structure packing differences between x64 and x86
#pragma pack(push, 4)
#include "siDefines.h"
#include "spwmacro.h"
#include "spwdata.h"
#include "V3DKey.h"
#include "V3DCMD.h"
#include "spwerror.h"
/*
* An SiAppCmdID (arbitrary ID of some application function) is used in SI_APP_EVENTs.
* It is just passed back and forth from/to apps.
* We have no idea what it is. Only the app knows.
*/
typedef struct
{
char appCmdID[SI_MAXAPPCMDID]; /* The AppCmdID from the AppCommand button action */
} SiAppCmdID;
#include "siSync.h"
#define UR_TABLE_SIZE 5
typedef int SiDevID; /* Device ID */
typedef void *SiHdl; /* 3DxWare handle */
typedef void *SiTransCtl; /* 3DxWare transport control handle */
typedef struct /* Open data. Drive use only. */
{
HWND hWnd; /* Window handle for 3DxWare messages. */
SiTransCtl transCtl; /* 3DxWare transport control handle. Reserved */
/* for the s80 transport mechanism. */
DWORD processID; /* The process ID for this application. */
char exeFile[MAX_PATH]; /* The executable name of the process. */
SPWint32 libFlag; /* Library version flag. */
} SiOpenData;
/*
* Hints are an API extension mechanism.
* Generally used to help the driver know something special about the ISVs implementation.
* For example, the application can tell the driver what sort of button events it is expecting.
*/
typedef struct SiHint
{
SPWint32 version; /* 0 for now */
SPWint32 hintSize; /* size in bytes of malloc'ed buffer phints points to */
SPWint32 *phints; /* malloced buffer (of 32-bit values) */
} SiHints;
typedef struct /* Open data. Drive use only. */
{
HWND hWnd; /* Window handle for 3DxWare messages. */
SiTransCtl transCtl; /* 3DxWare transport control handle. Reserved */
/* for the s80 transport mechanism. */
DWORD processID; /* The process ID for this application. */
WCHAR exeFile[MAX_PATH]; /* The executable name of the process. */
SPWint32 libFlag; /* Library version flag. */
SiHints hints; /* Hints used by driver */
} SiOpenDataEx;
typedef struct /* Get event Data. Drive use only. */
{
UINT msg;
WPARAM wParam;
LPARAM lParam;
} SiGetEventData;
typedef struct /* Device type mask */
{
unsigned char mask[8];
} SiTypeMask;
typedef struct /* Device port information */
{
SiDevID devID; /* Device ID */
int devType; /* Device type */
int devClass; /* Device class */
char devName[SI_STRSIZE]; /* Device name */
char portName[SI_MAXPORTNAME]; /* Port name */
} SiDevPort;
typedef struct /* Device information */
{
char firmware[SI_STRSIZE]; /* Firmware version */
int devType; /* Device type */
int numButtons; /* Number of buttons */
int numDegrees; /* Number of degrees of freedom */
SPWbool canBeep; /* Device beeps */
int majorVersion; /* Major version number */
int minorVersion; /* Minor version number */
} SiDevInfo;
typedef struct /* Button information */
{
char name[SI_STRSIZE]; /* Contains the name of a button for display in an app's GUI */
} SiButtonName;
typedef struct /* Button information */
{
char name[SI_STRSIZE]; /* Contains the name of a device for display in an app's GUI */
} SiDeviceName;
typedef struct /* Port information */
{
char name[SI_MAXPATH]; /* The name of a port the device is located on */
} SiPortName;
typedef struct /* Version information */
{
int major; /* Major version number */
int minor; /* Minor version number */
int build; /* Build number */
char version[SI_STRSIZE]; /* Version string */
char date[SI_STRSIZE]; /* Date string */
} SiVerInfo;
typedef struct /* Sensitivity parameters */
{
char dummy;
} SiSensitivity;
typedef struct /* Tuning parameters */
{
char dummy;
} SiTuning;
// Turn off "nonstandard extension used : nameless struct/union" warning
#pragma warning ( disable : 4201 )
typedef struct
{
SPWuint8 code; /* Out of band message code */
union {
SPWuint8 message[SI_MAXBUF - 1]; /* The actual message */
SPWint32 messageAsLongs[SI_MAXBUF / 4]; /* Access for longs/DWORDs */
void *pvoid[SI_MAXBUF / 8]; /* void ptrs. Enough room for 64bit ptrs */
};
} SiSpwOOB;
typedef struct
{
union {
SPWuint8 string[SI_KEY_MAXBUF]; /* No longer used, but it establishes the total size of SiSpwEvent, so keep it around in case anyone cares about the old size. */
struct {
SiKeyboardEventType type;
union {
struct { int VirtualKeyCode; int ScanCode; } keyData; // Data for KeyPress and KeyRelease SiKeyboardEventType
};
} keyboardEvent;
};
} SiKeyboardData;
// Turn warning back on
#pragma warning ( default : 4201 )
typedef struct /* Bitmasks of button states */
{
SPWuint32 last; /* Buttons pressed as of last event */
SPWuint32 current; /* Buttons pressed as of this event */
SPWuint32 pressed; /* Buttons pressed this event */
SPWuint32 released; /* Buttons released this event */
} SiButtonData;
/*
* SI_BUTTON_PRESS_EVENT & SI_BUTTON_RELEASE_EVENT are hardware button
* events. Meaning that they are meant to be sent when a specific hardware
* button is pressed. The correlation between the actual hardware button
* and the resulting button number could be broken by careful editing of
* a config file, but it is intended that the correlation be intact.
* This is basically the same as SI_BUTTON_EVENT, but allows
* more than 29 buttons because it isn't limited to a 32-bit mask.
* For buttons <= 31, both SI_BUTTON_EVENTs and SI_BUTTON_PRESS/RELEASE_EVENTs are sent.
* In the future there may be a way to switch off one or the other.
* This event was introduced in 3DxWare driver v. 5.2, but not implemented
* until 3DxWare 10 (3DxWinCore 17 r8207).
*/
typedef struct /* Data for SI_BUTTON_PRESS/RELEASE_EVENT */
{
V3DKey buttonNumber; /* The V3DKey that went down/up in a *
* SI_BUTTON_PRESS/RELEASE_EVENT event */
} SiHWButtonData;
typedef struct /* Data for SI_APP_EVENT */
{
SPWbool pressed; /* SPW_TRUE if the invoking button pressed, SPW_FALSE otherwise */
SiAppCmdID id; /* The Application-specific function identifier *
* invoked by the user in a SI_APP_EVENT.
* The id is last so we can optimize the use of transport memory. */
} SiAppCommandData;
typedef struct /* Data for SI_CMD_EVENT */
{
SPWbool pressed; /* SPW_TRUE if the invoking button pressed, SPW_FALSE otherwise */
SPWuint32 functionNumber; /* The V3DCMD_ function number invoked by the *
* user in a SI_CMD_EVENT (see V3DCMD.h) */
SPWint32 iArgs[16]; /* Optional arguments on a V3DCMD_ basis */
SPWfloat32 fArgs[16];
} SiCmdEventData;
typedef struct /* Data for SI_DEVICE_CHANGE_EVENT */
{
SiDeviceChangeType type; /* The type of event that happened */
SiDevID devID; /* The device ID effected */
SiPortName portName; /* The device path that changed */
} SiDeviceChangeEventData;
typedef struct /* 3DxWare data */
{
SiButtonData bData; /* Button data */
long mData[6]; /* Motion data (index via SI_TX, etc) */
long period; /* Period (milliseconds) */
} SiSpwData;
typedef struct /* 3DxWare event */
{
int type; /* Event type */
union
{
SiSpwData spwData; /* Button, motion, or combo data */
SiSpwOOB spwOOB; /* Out of band message */
SiOrientation spwOrientation; /* Which hand orientation is the device */
char exData[SI_MAXBUF]; /* Exception data. Driver use only */
SiKeyboardData spwKeyData; /* String for keyboard data */
SiSyncPacket siSyncPacket; /* GUI SyncPacket sent to applications */
SiHWButtonData hwButtonEvent; /* V3DKey that goes with *
* SI_BUTTON_PRESS/RELEASE_EVENT */
SiAppCommandData appCommandData; /* Application command event function data that *
* goes with an SI_APP_EVENT event */
SiDeviceChangeEventData deviceChangeEventData; /* Data for connecting/disconnecting devices */
SiCmdEventData cmdEventData; /* V3DCMD_* function data that *
* goes with an SI_CMD_EVENT event */
} u;
} SiSpwEvent;
typedef struct /* Event handler (for SiDispatch) */
{
int(*func) (SiOpenData *, SiGetEventData *, SiSpwEvent *, void *);
void *data;
} SiEventHandler;
typedef struct /* 3DxWare event handlers */
{
SiEventHandler button; /* Button event handler */
SiEventHandler motion; /* Motion event handler */
SiEventHandler combo; /* Combo event handler */
SiEventHandler zero; /* Zero event handler */
SiEventHandler exception; /* Exception event handler */
} SiSpwHandlers;
// Reset packing to default so don't effect including file
#pragma pack(pop)
#endif /* _SI_H_ */
/*----------------------------------------------------------------------
* siDefines.h -- 3DxWare input library defines and enums
*
* 3DxWare iInput library constants, no data structures
*
*----------------------------------------------------------------------
*
* Copyright (c) 2012-2018 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SIDEFINES_H_
#define _SIDEFINES_H_
static char siDefinesCvsId[] = "(C) 2012-2018 3Dconnexion: $Id: siDefines.h 14752 2018-02-19 11:17:27Z jwick $";
/*
* UI modes
*/
#define SI_UI_ALL_CONTROLS 0xffffffffL
#define SI_UI_NO_CONTROLS 0x00000000L
/*
* Device types and classes
*/
typedef enum
{
SI_ALL_TYPES = -1,
SI_UNKNOWN_DEVICE = 0,
SI_SPACEBALL_2003 = 1,
SI_SPACEBALL_3003 = 2,
SI_SPACE_CONTROLLER = 3,
SI_SPACEEXPLORER = 4,
SI_SPACENAVIGATOR_FOR_NOTEBOOKS = 5,
SI_SPACENAVIGATOR = 6,
SI_SPACEBALL_2003A = 7,
SI_SPACEBALL_2003B = 8,
SI_SPACEBALL_2003C = 9,
SI_SPACEBALL_3003A = 10,
SI_SPACEBALL_3003B = 11,
SI_SPACEBALL_3003C = 12,
SI_SPACEBALL_4000 = 13,
SI_SPACEMOUSE_CLASSIC = 14,
SI_SPACEMOUSE_PLUS = 15,
SI_SPACEMOUSE_XT = 16,
SI_CYBERMAN = 17,
SI_CADMAN = 18,
SI_SPACEMOUSE_CLASSIC_PROMO = 19,
SI_SERIAL_CADMAN = 20,
SI_SPACEBALL_5000 = 21,
SI_TEST_NO_DEVICE = 22,
SI_3DX_KEYBOARD_BLACK = 23,
SI_3DX_KEYBOARD_WHITE = 24,
SI_TRAVELER = 25,
SI_TRAVELER1 = 26,
SI_SPACEBALL_5000A = 27,
SI_SPACEDRAGON = 28,
SI_SPACEPILOT = 29,
SI_MB = 30,
SI_SPACEPILOT_PRO = 0xc629,
SI_SPACEMOUSE_PRO = 0xc62b,
SI_SPACEMOUSE_TOUCH = 0xc62c,
SI_SPACEMOUSE_WIRELESS = 0xc62e,
SI_SPACEMOUSE_WIRELESS_NR = 0xc62f,
SI_SPACEMOUSE_PRO_WIRELESS = 0xc631,
SI_SPACEMOUSE_PRO_WIRELESS_NR = 0xc632,
SI_SPACEMOUSE_ENTERPRISE = 0xc633,
SI_SPACEMOUSE_COMPACT = 0xc635,
SI_SPACEMOUSE_MODULE = 0xc636,
SI_CADMOUSE = 0xc650,
SI_CADMOUSE_WIRELESS = 0xc651,
SI_UNIVERSAL_RECEIVER = 0xc652,
SI_UNIVERSAL_RECEIVER_SLOT = 0xf652,
SI_SCOUT = 0xc660
} SiDevType;
typedef enum
{
SI_CLASS_UNKNOWN = 0,
SI_CLASS_3DMOUSE = 1,
SI_CLASS_2DMOUSE = 2,
SI_CLASS_WIRELESS_RECEIVER = 3,
SI_CLASS_UNIVERSAL_WIRELESS_RECEIVER = 4,
SI_CLASS_KEYBOARD = 5,
SI_CLASS_JOYSTICK = 6,
SI_CLASS_VRGLASSES = 7,
SI_CLASS_MONITOR = 8,
SI_CLASS_TRACKER = 9,
SI_CLASS_EYETRACKER = 10,
} SiDevClass;
typedef enum
{
SI_CONNECTION_UNKNOWN = 0,
SI_CONNECTION_USB = 1, // USB cable
SI_CONNECTION_BT = 2, // BlueTooth
SI_CONNECTION_UR = 3, // Multi-device UniversalReceiver
SI_CONNECTION_NR = 4, // Dedicated single device NanoReceiver
SI_CONNECTION_WIRELESS = 5 // Generic wireless connection, e.g., WLAN
} SiDevConnection;
typedef enum
{
SI_ACTIVESTATE_UNKNOWN = 0,
SI_ACTIVESTATE_PAIREDANDSEENDATA = 1,
SI_ACTIVESTATE_PAIREDBUTNODATA = 2,
SI_ACTIVESTATE_USBCONNECTED = 3,
SI_ACTIVESTATE_USBDISCONNECTED = 4,
} SiDevActiveState;
typedef enum
{
SI_HINT_UNKNOWN = 0,
SI_HINT_SDKVERSION = 1,
SI_HINT_DRIVERVERSION = 2,
SI_HINT_USESV3DCMDS = 3,
SI_HINT_TEST_BOOL = 4, // These are just for testing
SI_HINT_TEST_INT = 5,
SI_HINT_TEST_FLOAT = 6,
SI_HINT_TEST_STRING = 7,
SI_HINT_USES3DXINPUT = 8,
SI_HINT_USESNAVLIB = 9,
SI_HINT_USESFILESYNC = 10,
} SiHintEnum;
/*
* Data retrieval mode, SI_POLL is not currently supported.
*/
#define SI_EVENT 0x0001
#define SI_POLL 0x0002
#define SI_NEUTERED 0x0004 // A connection that doesn't get events
#define SI_FOCUSTAIL 0x0008 // Last to get chosen for events
/*
* Get event flags
*/
#define SI_AVERAGE_EVENTS 0x0001
/*
* This is an INTERNAL flag used by the polling mechanism, user applications
* should NOT send this flag.
*/
#define SI_POLLED_REQUEST 0x0100
/*
* 3DxWare event types
*/
typedef enum
{
SI_BUTTON_EVENT = 1,
SI_MOTION_EVENT,
SI_COMBO_EVENT, /* Not implemented */
SI_ZERO_EVENT,
SI_EXCEPTION_EVENT, /* Driver use only */
SI_OUT_OF_BAND, /* Driver use only */
SI_ORIENTATION_EVENT, /* Driver use only */
SI_KEYBOARD_EVENT, /* Driver use only */
SI_LPFK_EVENT, /* Driver use only */
SI_APP_EVENT, /* Application functions */
SI_SYNC_EVENT, /* GUI synchronization events */
SI_BUTTON_PRESS_EVENT, /* Single button events (replace SI_BUTTON_EVENT) */
SI_BUTTON_RELEASE_EVENT, /* Single button events (replace SI_BUTTON_EVENT) */
SI_DEVICE_CHANGE_EVENT, /* Connect or disconnect device events */
SI_MOUSE_EVENT, /* Driver use only */
SI_JOYSTICK_EVENT, /* Driver use only */
SI_CMD_EVENT, /* V3DCMD_ events */
SI_MOTION_HID_EVENT, /* Motion event in HID nomenclature order */
SI_SETTING_CHANGED_EVENT,/* One or more smart ui settings have changed */
SI_RECONNECT_EVENT /* Occurs if the driver reconnects to the application */
} SiEventType;
/*
* SI_DEVICE_CHANGE_EVENT type
*/
typedef enum
{
SI_DEVICE_CHANGE_CONNECT,
SI_DEVICE_CHANGE_DISCONNECT
} SiDeviceChangeType;
/*
* SI_KEYBOARD_EVENT type
*/
typedef enum
{
SI_KEYBOARD_EVENT_KEYPRESS,
SI_KEYBOARD_EVENT_KEYRELEASE
} SiKeyboardEventType;
/*
* Motion data offsets
*/
#define SI_TX 0 /* Translation X value */
#define SI_TY 1 /* Translation Y value */
#define SI_TZ 2 /* Translation Z value */
#define SI_RX 3 /* Rotation X value */
#define SI_RY 4 /* Rotation Y value */
#define SI_RZ 5 /* Rotation Z value */
/*
* Reserved buttons
*/
#define SI_RESET_DEVICE_BIT 0x00000001L
#define SI_APP_FIT_BIT 0x80000000L
#define SI_APP_DIALOG_BIT 0x40000000L
#define SI_RESET_DEVICE_BUTTON 0
#define SI_APP_FIT_BUTTON 31
#define SI_APP_DIALOG_BUTTON 30
#define SI_APP_POPUPMENU_BUTTON 29
/*
* Miscellaneous
*/
#define SI_END_ARGS 0
#define SI_NO_HANDLE ((SiHdl) NULL)
#define SI_ALL_HANDLES ((SiHdl) NULL)
#define SI_ANY_HANDLE ((SiHdl) NULL)
#define SI_NO_TRANSCTL ((SiTransCtl) NULL)
#define SI_NO_MASK ((SiTypeMask *) NULL)
#define SI_ANY_DEVICE -1
#define SI_NOTIFICATION_DEVICE 0
#define SI_NO_DEVICE -1
#define SI_NO_TYPE -1
#define SI_NO_LIST -1
#define SI_NO_BUTTON -1
#define SI_STRSIZE 128
#define SI_MAXBUF 128
#define SI_MAXPORTNAME 260
#define SI_MAXPATH 512
#define SI_MAXAPPCMDID 500
#define SI_KEY_MAXBUF 5120
typedef enum
{
SI_LEFT = 0,
SI_RIGHT
} SiOrientation;
/*
SiMessageBox styles and behavior
*/
#define SI_MB_VIEW_SAVED 0x0001
#define SI_MB_HOLD_TO_SAVE 0x0002
#endif /* _SIDEFINES_H_ */
/*----------------------------------------------------------------------
* siSync.h -- 3DxWare GUI Synchronization header
*
* Written: September 2004
* Author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1998-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SISYNC_H_
#define _SISYNC_H_
#include "siSyncDefines.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
int state; /* VURZYX (Tx = LSB (& 1<<0) */
} SiSyncAxesState;
/*
* Private / implementation structures
*
* We suggest you leave these hidden and use the accessor functions rather than
* directly accessing the structures.
*/
#include "siSyncPriv.h"
/*
* Accessor Function headers
*/
SPWuint32 SiSyncGetSize(SiSyncPacket p);
void SiSyncSetSize(SiSyncPacket *p, SPWuint32 size);
SPWuint32 SiSyncGetHashCode(SiSyncPacket p);
void SiSyncSetHashCode(SiSyncPacket *p, SPWuint32 hashCode);
SiSyncOpCode SiSyncGetOpCode(SiSyncPacket p);
void SiSyncSetOpCode(SiSyncPacket *p, SPWuint32 opCode);
SiSyncItemCode SiSyncGetItemCode(SiSyncPacket p);
void SiSyncSetItemCode(SiSyncPacket *p, SPWuint32 itemCode);
#ifdef __cplusplus
}
#endif
#endif /* _SI_SYNC_H_ */
/*----------------------------------------------------------------------
* siSyncDefines.h -- 3DxWare GUI Synchronization defines and enums
*
* Just defines and enums for SiSync functions
*
* Written: September 2004
* Author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1998-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SISYNCDEFINES_H_
#define _SISYNCDEFINES_H_
static char siSyncDefinesCvsId[] = "(C) 2012-2018 3Dconnexion: $Id: siSyncDefines.h 14646 2018-01-04 15:08:23Z jwick $";
/*
* Constants
*/
#define SI_SYNC_PACKET_ID 27711
#define SI_SYNC_VERSION_MAJOR 2
#define SI_SYNC_VERSION_MINOR 0
/*
* Absolute Internal Function Numbers
* These are function numbers that will never change.
* For use with Set BUTTON_ASSIGNMENT_ABSOLUTE packets, and some INVOKE items.
* Some functions (keys) can not be INVOKED because there is a separate
* press and release and that difference is not exposed.
*/
typedef enum
{
SI_SYNC_FUNCTION_MENU_TOGGLE = 12,
SI_SYNC_FUNCTION_TRANS_TOGGLE = 13,
SI_SYNC_FUNCTION_ROT_TOGGLE = 14,
SI_SYNC_FUNCTION_HPV_TOGGLE = 15,
SI_SYNC_FUNCTION_DEC_SENS = 16,
SI_SYNC_FUNCTION_INC_SENS = 17,
SI_SYNC_FUNCTION_RESTORE_DEF = 18,
SI_SYNC_FUNCTION_PAN = 19,
SI_SYNC_FUNCTION_ZOOM = 20,
SI_SYNC_FUNCTION_TX = 21,
SI_SYNC_FUNCTION_TY = 22,
SI_SYNC_FUNCTION_TZ = 23,
SI_SYNC_FUNCTION_RX = 24,
SI_SYNC_FUNCTION_RY = 25,
SI_SYNC_FUNCTION_RZ = 26,
SI_SYNC_FUNCTION_REZERO_DEVICE = 27,
SI_SYNC_FUNCTION_SAVE = 33,
SI_SYNC_FUNCTION_RELOAD = 57,
SI_SYNC_FUNCTION_SHIFT_KEY = 60,
SI_SYNC_FUNCTION_CTRL_KEY = 61,
SI_SYNC_FUNCTION_ALT_KEY = 62,
SI_SYNC_FUNCTION_RESTORE_SENS = 63,
SI_SYNC_FUNCTION_SPACE_KEY = 64,
SI_SYNC_FUNCTION_CTRL_SHIFT_KEY = 65,
SI_SYNC_FUNCTION_CTRL_ALT_KEY = 66,
SI_SYNC_FUNCTION_SHIFT_ALT_KEY = 67,
SI_SYNC_FUNCTION_TAB_KEY = 68,
SI_SYNC_FUNCTION_RETURN_KEY = 69,
SI_SYNC_FUNCTION_DEC_TRANS_SENS = 70,
SI_SYNC_FUNCTION_INC_TRANS_SENS = 71,
SI_SYNC_FUNCTION_DEC_ROT_SENS = 72,
SI_SYNC_FUNCTION_INC_ROT_SENS = 73,
SI_SYNC_FUNCTION_DEC_PAN_SENS = 74,
SI_SYNC_FUNCTION_INC_PAN_SENS = 75,
SI_SYNC_FUNCTION_DEC_ZOOM_SENS = 76,
SI_SYNC_FUNCTION_INC_ZOOM_SENS = 77,
SI_SYNC_FUNCTION_ESC_KEY = 78,
SI_SYNC_FUNCTION_3DX_HELP = 94,
SI_SYNC_FUNCTION_APP_HELP = 95,
SI_SYNC_FUNCTION_DIALOG_TOGGLE_FN = 96,
SI_SYNC_FUNCTION_FIT_FN = 97,
SI_SYNC_FUNCTION_TOGGLE_3DXLCD_FN = 198,
SI_SYNC_FUNCTION_TOGGLE_3DXNUMPAD_FN = 199,
SI_SYNC_FUNCTION_LAUNCH_3DXPIE_LEFT_FN = 200,
SI_SYNC_FUNCTION_LAUNCH_3DXPIE_RIGHT_FN = 201,
SI_SYNC_FUNCTION_SPPDEF_MENU_FN = 202,
SI_SYNC_FUNCTION_SPPDEF_FIT_FN = 203,
SI_SYNC_FUNCTION_APP_SHOW_BUTTONMAPPINGEDITOR_FN = 204,
SI_SYNC_FUNCTION_APP_SHOW_ADVANCEDSETTINGSEDITOR_FN = 205,
SI_SYNC_FUNCTION_SENTINEL = 206, // Sentinel for indicating the last valid function. Keep it up-to-date.
} SiSyncAbsFunctionNumber;
#ifndef _3DXSERVICE
WCHAR* SiSyncAbsFunctionNumber_ToString(SiSyncAbsFunctionNumber functionNumber);
#else
static WCHAR* SiSyncAbsFunctionNumber_ToString(SiSyncAbsFunctionNumber functionNumber)
{
switch (functionNumber)
{
case SI_SYNC_FUNCTION_MENU_TOGGLE: return L"SI_SYNC_FUNCTION_MENU_TOGGLE";
case SI_SYNC_FUNCTION_TRANS_TOGGLE: return L"SI_SYNC_FUNCTION_TRANS_TOGGLE";
case SI_SYNC_FUNCTION_ROT_TOGGLE: return L"SI_SYNC_FUNCTION_ROT_TOGGLE";
case SI_SYNC_FUNCTION_HPV_TOGGLE: return L"SI_SYNC_FUNCTION_HPV_TOGGLE";
case SI_SYNC_FUNCTION_DEC_SENS: return L"SI_SYNC_FUNCTION_DEC_SENS";
case SI_SYNC_FUNCTION_INC_SENS: return L"SI_SYNC_FUNCTION_INC_SENS";
case SI_SYNC_FUNCTION_RESTORE_DEF: return L"SI_SYNC_FUNCTION_RESTORE_DEF";
case SI_SYNC_FUNCTION_PAN: return L"SI_SYNC_FUNCTION_PAN";
case SI_SYNC_FUNCTION_ZOOM: return L"SI_SYNC_FUNCTION_ZOOM";
case SI_SYNC_FUNCTION_TX: return L"SI_SYNC_FUNCTION_TX";
case SI_SYNC_FUNCTION_TY: return L"SI_SYNC_FUNCTION_TY";
case SI_SYNC_FUNCTION_TZ: return L"SI_SYNC_FUNCTION_TZ";
case SI_SYNC_FUNCTION_RX: return L"SI_SYNC_FUNCTION_RX";
case SI_SYNC_FUNCTION_RY: return L"SI_SYNC_FUNCTION_RY";
case SI_SYNC_FUNCTION_RZ: return L"SI_SYNC_FUNCTION_RZ";
case SI_SYNC_FUNCTION_REZERO_DEVICE: return L"SI_SYNC_FUNCTION_REZERO_DEVICE";
case SI_SYNC_FUNCTION_SAVE: return L"SI_SYNC_FUNCTION_SAVE";
case SI_SYNC_FUNCTION_RELOAD: return L"SI_SYNC_FUNCTION_RELOAD";
case SI_SYNC_FUNCTION_SHIFT_KEY: return L"SI_SYNC_FUNCTION_SHIFT_KEY";
case SI_SYNC_FUNCTION_CTRL_KEY: return L"SI_SYNC_FUNCTION_CTRL_KEY";
case SI_SYNC_FUNCTION_ALT_KEY: return L"SI_SYNC_FUNCTION_ALT_KEY";
case SI_SYNC_FUNCTION_RESTORE_SENS: return L"SI_SYNC_FUNCTION_RESTORE_SENS";
case SI_SYNC_FUNCTION_SPACE_KEY: return L"SI_SYNC_FUNCTION_SPACE_KEY";
case SI_SYNC_FUNCTION_CTRL_SHIFT_KEY: return L"SI_SYNC_FUNCTION_CTRL_SHIFT_KEY";
case SI_SYNC_FUNCTION_CTRL_ALT_KEY: return L"SI_SYNC_FUNCTION_CTRL_ALT_KEY";
case SI_SYNC_FUNCTION_SHIFT_ALT_KEY: return L"SI_SYNC_FUNCTION_SHIFT_ALT_KEY";
case SI_SYNC_FUNCTION_TAB_KEY: return L"SI_SYNC_FUNCTION_TAB_KEY";
case SI_SYNC_FUNCTION_RETURN_KEY: return L"SI_SYNC_FUNCTION_RETURN_KEY";
case SI_SYNC_FUNCTION_DEC_TRANS_SENS: return L"SI_SYNC_FUNCTION_DEC_TRANS_SENS";
case SI_SYNC_FUNCTION_INC_TRANS_SENS: return L"SI_SYNC_FUNCTION_INC_TRANS_SENS";
case SI_SYNC_FUNCTION_DEC_ROT_SENS: return L"SI_SYNC_FUNCTION_DEC_ROT_SENS";
case SI_SYNC_FUNCTION_INC_ROT_SENS: return L"SI_SYNC_FUNCTION_INC_ROT_SENS";
case SI_SYNC_FUNCTION_DEC_PAN_SENS: return L"SI_SYNC_FUNCTION_DEC_PAN_SENS";
case SI_SYNC_FUNCTION_INC_PAN_SENS: return L"SI_SYNC_FUNCTION_INC_PAN_SENS";
case SI_SYNC_FUNCTION_DEC_ZOOM_SENS: return L"SI_SYNC_FUNCTION_DEC_ZOOM_SENS";
case SI_SYNC_FUNCTION_INC_ZOOM_SENS: return L"SI_SYNC_FUNCTION_INC_ZOOM_SENS";
case SI_SYNC_FUNCTION_ESC_KEY: return L"SI_SYNC_FUNCTION_ESC_KEY";
case SI_SYNC_FUNCTION_3DX_HELP: return L"SI_SYNC_FUNCTION_3DX_HELP";
case SI_SYNC_FUNCTION_APP_HELP: return L"SI_SYNC_FUNCTION_APP_HELP";
case SI_SYNC_FUNCTION_DIALOG_TOGGLE_FN: return L"SI_SYNC_FUNCTION_DIALOG_TOGGLE_FN";
case SI_SYNC_FUNCTION_FIT_FN: return L"SI_SYNC_FUNCTION_FIT_FN";
case SI_SYNC_FUNCTION_TOGGLE_3DXLCD_FN: return L"SI_SYNC_FUNCTION_TOGGLE_3DXLCD_FN";
case SI_SYNC_FUNCTION_TOGGLE_3DXNUMPAD_FN: return L"SI_SYNC_FUNCTION_TOGGLE_3DXNUMPAD_FN";
case SI_SYNC_FUNCTION_LAUNCH_3DXPIE_LEFT_FN: return L"SI_SYNC_FUNCTION_LAUNCH_3DXPIE_LEFT_FN";
case SI_SYNC_FUNCTION_LAUNCH_3DXPIE_RIGHT_FN: return L"SI_SYNC_FUNCTION_LAUNCH_3DXPIE_RIGHT_FN";
case SI_SYNC_FUNCTION_SPPDEF_MENU_FN: return L"SI_SYNC_FUNCTION_SPPDEF_MENU_FN";
case SI_SYNC_FUNCTION_SPPDEF_FIT_FN: return L"SI_SYNC_FUNCTION_SPPDEF_FIT_FN";
case SI_SYNC_FUNCTION_APP_SHOW_BUTTONMAPPINGEDITOR_FN: return L"SI_SYNC_FUNCTION_APP_SHOW_BUTTONMAPPINGEDITOR_FN";
case SI_SYNC_FUNCTION_APP_SHOW_ADVANCEDSETTINGSEDITOR_FN: return L"SI_SYNC_FUNCTION_APP_SHOW_ADVANCEDSETTINGSEDITOR_FN";
default: return L"invalid";
}
};
#endif
/*
* Sync Op Codes
*/
typedef enum
{
SI_SYNC_OP_COMMAND = 1,
SI_SYNC_OP_GET = 2,
SI_SYNC_OP_SET = 3
} SiSyncOpCode;
#ifndef _3DXSERVICE
WCHAR* SiSyncOpCode_ToString(SiSyncOpCode code);
#else
static WCHAR* SiSyncOpCode_ToString(SiSyncOpCode code)
{
switch (code)
{
case SI_SYNC_OP_COMMAND: return L"SI_SYNC_OP_COMMAND";
case SI_SYNC_OP_GET: return L"SI_SYNC_OP_GET";
case SI_SYNC_OP_SET: return L"SI_SYNC_OP_SET";
default: return L"invalid";
}
};
#endif
/*
* Sync Item Codes
*/
typedef enum
{
SI_SYNC_ITEM_VERSION = 1,
SI_SYNC_ITEM_QUERY = 2,
SI_SYNC_ITEM_SAVE_CONFIG = 3,
SI_SYNC_ITEM_NUMBER_OF_FUNCTIONS = 4,
SI_SYNC_ITEM_FUNCTION = 5,
SI_SYNC_ITEM_BUTTON_ASSIGNMENT = 6,
SI_SYNC_ITEM_BUTTON_ASSIGNMENT_ABSOLUTE = 7,
SI_SYNC_ITEM_BUTTON_NAME = 8,
SI_SYNC_ITEM_AXIS_LABEL = 9,
SI_SYNC_ITEM_ORIENTATION = 10,
SI_SYNC_ITEM_FILTER = 11,
SI_SYNC_ITEM_AXES_STATE = 12,
SI_SYNC_ITEM_INFO_LINE = 13,
SI_SYNC_ITEM_SCALE_OVERALL = 14,
SI_SYNC_ITEM_SCALE_TX = 15,
SI_SYNC_ITEM_SCALE_TY = 16,
SI_SYNC_ITEM_SCALE_TZ = 17,
SI_SYNC_ITEM_SCALE_RX = 18,
SI_SYNC_ITEM_SCALE_RY = 19,
SI_SYNC_ITEM_SCALE_RZ = 20,
SI_SYNC_ITEM_INVOKE_ABSOLUTE_FUNCTION = 21,
SI_SYNC_ITEM_BUTTON_STATE = 22,
SI_SYNC_ITEM_INJECT_BUTTON_EVENT = 23,
SI_SYNC_ITEM_SUSPEND_FILE_WRITING = 24,
SI_SYNC_ITEM_INVOKE_ACTIONID = 25,
SI_SYNC_ITEM_CREATE_BUTTONBANK = 26,
SI_SYNC_ITEM_DELETE_BUTTONBANK = 27,
SI_SYNC_ITEM_CURRENTBUTTONBANK = 28,
SI_SYNC_ITEM_PREVIOUSBUTTONBANK = 29,
SI_SYNC_ITEM_NEXTBUTTONBANK = 30,
SI_SYNC_ITEM_GRAB_SYNCID = 31,
SI_SYNC_ITEM_SYNCID = 32,
SI_SYNC_ITEM_CREATE_AXISBANK = 33,
SI_SYNC_ITEM_DELETE_AXISBANK = 34,
SI_SYNC_ITEM_CURRENTAXISBANK = 35,
SI_SYNC_ITEM_PREVIOUSAXISBANK = 36,
SI_SYNC_ITEM_NEXTAXISBANK = 37,
SI_SYNC_ITEM_CREATE_APPLICATIONBANK = 38,
SI_SYNC_ITEM_DELETE_APPLICATIONBANK = 39,
SI_SYNC_ITEM_CURRENTAPPLICATIONBANK = 40,
SI_SYNC_ITEM_PREVIOUSAPPLICATIONBANK = 41,
SI_SYNC_ITEM_NEXTAPPLICATIONBANK = 42,
SI_SYNC_ITEM_BUTTON_ASSIGNMENT_V3DKEY = 43,
} SiSyncItemCode;
#ifndef _3DXSERVICE
WCHAR* SiSyncItemCode_ToString(SiSyncItemCode code);
#else
static WCHAR* SiSyncItemCode_ToString(SiSyncItemCode code)
{
switch (code)
{
case SI_SYNC_ITEM_VERSION: return L"SI_SYNC_ITEM_VERSION";
case SI_SYNC_ITEM_QUERY: return L"SI_SYNC_ITEM_QUERY";
case SI_SYNC_ITEM_SAVE_CONFIG: return L"SI_SYNC_ITEM_SAVE_CONFIG";
case SI_SYNC_ITEM_NUMBER_OF_FUNCTIONS: return L"SI_SYNC_ITEM_NUMBER_OF_FUNCTIONS";
case SI_SYNC_ITEM_FUNCTION: return L"SI_SYNC_ITEM_FUNCTION";
case SI_SYNC_ITEM_BUTTON_ASSIGNMENT: return L"SI_SYNC_ITEM_BUTTON_ASSIGNMENT";
case SI_SYNC_ITEM_BUTTON_ASSIGNMENT_ABSOLUTE: return L"SI_SYNC_ITEM_BUTTON_ASSIGNMENT_ABSOLUTE";
case SI_SYNC_ITEM_BUTTON_NAME: return L"SI_SYNC_ITEM_BUTTON_NAME";
case SI_SYNC_ITEM_AXIS_LABEL: return L"SI_SYNC_ITEM_AXIS_LABEL";
case SI_SYNC_ITEM_ORIENTATION: return L"SI_SYNC_ITEM_ORIENTATION";
case SI_SYNC_ITEM_FILTER: return L"SI_SYNC_ITEM_FILTER";
case SI_SYNC_ITEM_AXES_STATE: return L"SI_SYNC_ITEM_AXES_STATE";
case SI_SYNC_ITEM_INFO_LINE: return L"SI_SYNC_ITEM_INFO_LINE";
case SI_SYNC_ITEM_SCALE_OVERALL: return L"SI_SYNC_ITEM_SCALE_OVERALL";
case SI_SYNC_ITEM_SCALE_TX: return L"SI_SYNC_ITEM_SCALE_TX";
case SI_SYNC_ITEM_SCALE_TY: return L"SI_SYNC_ITEM_SCALE_TY";
case SI_SYNC_ITEM_SCALE_TZ: return L"SI_SYNC_ITEM_SCALE_TZ";
case SI_SYNC_ITEM_SCALE_RX: return L"SI_SYNC_ITEM_SCALE_RX";
case SI_SYNC_ITEM_SCALE_RY: return L"SI_SYNC_ITEM_SCALE_RY";
case SI_SYNC_ITEM_SCALE_RZ: return L"SI_SYNC_ITEM_SCALE_RZ";
case SI_SYNC_ITEM_INVOKE_ABSOLUTE_FUNCTION: return L"SI_SYNC_ITEM_INVOKE_ABSOLUTE_FUNCTION";
case SI_SYNC_ITEM_BUTTON_STATE: return L"SI_SYNC_ITEM_BUTTON_STATE";
case SI_SYNC_ITEM_INJECT_BUTTON_EVENT: return L"SI_SYNC_ITEM_INJECT_BUTTON_EVENT";
case SI_SYNC_ITEM_SUSPEND_FILE_WRITING: return L"SI_SYNC_ITEM_SUSPEND_FILE_WRITING";
case SI_SYNC_ITEM_INVOKE_ACTIONID: return L"SI_SYNC_ITEM_INVOKE_ACTIONID";
case SI_SYNC_ITEM_CREATE_BUTTONBANK: return L"SI_SYNC_ITEM_CREATE_BUTTONBANK";
case SI_SYNC_ITEM_DELETE_BUTTONBANK: return L"SI_SYNC_ITEM_DELETE_BUTTONBANK";
case SI_SYNC_ITEM_CURRENTBUTTONBANK: return L"SI_SYNC_ITEM_CURRENTBUTTONBANK";
case SI_SYNC_ITEM_PREVIOUSBUTTONBANK: return L"SI_SYNC_ITEM_PREVIOUSBUTTONBANK";
case SI_SYNC_ITEM_NEXTBUTTONBANK: return L"SI_SYNC_ITEM_NEXTBUTTONBANK";
case SI_SYNC_ITEM_GRAB_SYNCID: return L"SI_SYNC_ITEM_GRAB_SYNCID";
case SI_SYNC_ITEM_SYNCID: return L"SI_SYNC_ITEM_SYNCID";
default: return L"invalid";
}
};
#endif
/*
* Filters
*/
typedef enum
{
SI_SYNC_FILTER_TRANSLATIONS = 1,
SI_SYNC_FILTER_ROTATIONS = 2,
SI_SYNC_FILTER_DOMINANT = 3
} SiSyncFilter;
#ifndef _3DXSERVICE
WCHAR* SiSyncFilter_ToString(SiSyncFilter filter);
#else
static WCHAR* SiSyncFilter_ToString(SiSyncFilter filter)
{
switch (filter)
{
case SI_SYNC_FILTER_TRANSLATIONS: return L"SI_SYNC_FILTER_TRANSLATIONS";
case SI_SYNC_FILTER_ROTATIONS: return L"SI_SYNC_FILTER_ROTATIONS";
case SI_SYNC_FILTER_DOMINANT: return L"SI_SYNC_FILTER_DOMINANT";
default: return L"invalid";
}
}
#endif
typedef enum
{
SI_SYNC_FILTER_OFF = 0,
SI_SYNC_FILTER_ON = 1,
SI_SYNC_FILTER_IN_BETWEEN = 2
} SiSyncFilterValue;
#ifndef _3DXSERVICE
WCHAR* SiSyncFilterValue_ToString(SiSyncFilterValue filterValue);
#else
static WCHAR* SiSyncFilterValue_ToString(SiSyncFilterValue filterValue)
{
switch (filterValue)
{
case SI_SYNC_FILTER_OFF: return L"SI_SYNC_FILTER_OFF";
case SI_SYNC_FILTER_ON: return L"SI_SYNC_FILTER_ON";
case SI_SYNC_FILTER_IN_BETWEEN: return L"SI_SYNC_FILTER_IN_BETWEEN";
default: return L"invalid";
}
};
#endif
/*
* Axes State
*/
typedef enum
{
SI_SYNC_AXES_STATE_TX = (1 << 0),
SI_SYNC_AXES_STATE_TY = (1 << 1),
SI_SYNC_AXES_STATE_TZ = (1 << 2),
SI_SYNC_AXES_STATE_RX = (1 << 3),
SI_SYNC_AXES_STATE_RY = (1 << 4),
SI_SYNC_AXES_STATE_RZ = (1 << 5)
} SiSyncAxesStateBits;
/*
* Button State
* For indicating the state of whatever the button sets (in the LCD at this point).
* E.g., to show that Translations are currently OFF for the Translations Toggle button.
* OFF: reverse video, flag is not set
* ON: normal video, flag is set
* DISABLED: (greyed), status of flag is invalid at this time
*/
typedef enum
{
SI_SYNC_BUTTON_STATE_OFF = 0,
SI_SYNC_BUTTON_STATE_ON = 1,
SI_SYNC_BUTTON_STATE_DISABLED = 2,
} SiSyncButtonState;
#endif /* _SI_SYNC_H_ */
/*----------------------------------------------------------------------
* siSyncPriv.h -- 3DxWare GUI Synchronization Private header
*
* Written: June 2005-2013
* Author: Jim Wick
*
*----------------------------------------------------------------------
*
* (c) Copyright 1998-2015 3Dconnexion. All rights reserved.
* Permission to use, copy, modify, and distribute this software for all
* purposes and without fees is hereby granted provided that this copyright
* notice appears in all copies. Permission to modify this software is granted
* and 3Dconnexion will support such modifications only is said modifications are
* approved by 3Dconnexion.
*
*/
#ifndef _SISYNCPRIV_H_
#define _SISYNCPRIV_H_
/*
* All packets start with the same fields.
* Many packets have data following the itemCode.
*/
typedef struct /* Sync Packet */
{
SPWuint32 size; /* total packet size */
SPWuint32 hashCode; /* Hash code that syncs a question with an answer */
SiSyncOpCode opCode; /* OpCode */
SiSyncItemCode itemCode; /* itemCode */
/* There will, generally, be more data starting here.
* There will not be any pointers, the data will be in here.
*/
} SiSyncPacketHeader;
/*
* I've enumerated all the possible packets here, not because they are all different,
* but mostly just for documentation. So the developer knows what parameters are
* expected with which packet type.
*/
typedef struct { SiSyncPacketHeader h; } SiSyncGetVersionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 major; SPWint32 minor; } SiSyncSetVersionPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncCommandQueryPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncCommandSaveConfigPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetNumberOfFunctionsPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 n; } SiSyncSetNumberOfFunctionsPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; } SiSyncGetFunctionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWint32 n; WCHAR name[1];} SiSyncSetFunctionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; } SiSyncGetButtonAssignmentPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWint32 n; } SiSyncSetButtonAssignmentPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWint32 n; } SiSyncSetButtonAssignmentAbsolutePacket;
typedef struct { SiSyncPacketHeader h; V3DKey v; SiAppCmdID a; } SiSyncSetButtonAssignmentV3DKeyPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; WCHAR name[1]; } SiSyncSetButtonNamePacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; } SiSyncGetAxisLabelPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; WCHAR name[1]; } SiSyncSetAxisLabelPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetOrientationPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 a[6]; } SiSyncSetOrientationPacket;
typedef struct { SiSyncPacketHeader h; SiSyncFilter i; } SiSyncGetFilterPacket;
typedef struct { SiSyncPacketHeader h; SiSyncFilter i; SiSyncFilterValue v; } SiSyncSetFilterPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetAxesStatePacket;
typedef struct { SiSyncPacketHeader h; SiSyncAxesState a; } SiSyncSetAxesStatePacket;
typedef struct { SiSyncPacketHeader h; SPWint32 duration; WCHAR s[1]; } SiSyncSetInfoLinePacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleOverallPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleOverallPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleTxPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleTxPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleTyPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleTyPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleTzPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleTzPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleRxPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleRxPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleRyPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleRyPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleRzPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleRzPacket;
typedef struct { SiSyncPacketHeader h; SiSyncAbsFunctionNumber i; } SiSyncAbsFunctionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWbool state; } SiSyncSetButtonStatePacket;
typedef struct { SiSyncPacketHeader h; SPWbool bSuspendOrResume; } SiSyncSuspendFileWritingPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 buttonNumber; SPWbool press; } SiSyncInjectButtonEventPacket;
typedef struct { SiSyncPacketHeader h; SPWbool press; WCHAR actionID[1]; } SiSyncInvokeActionIDPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncCreateButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncDeleteButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncSetCurrentButtonBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncPreviousButtonBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncNextButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; SPWuint32 maxNameLen; } SiSyncGetCurrentButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncCreateAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncDeleteAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncSetCurrentAxisBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncPreviousAxisBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncNextAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; SPWuint32 maxNameLen; } SiSyncGetCurrentAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncCreateApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncDeleteApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncSetCurrentApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncPreviousApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncNextApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; SPWuint32 maxNameLen; } SiSyncGetCurrentApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; SPWuint32 syncID; } SiSyncSetGrabSyncIDPacket;
typedef struct { SiSyncPacketHeader h; SPWuint32 syncID; } SiSyncSetSyncIDPacket;
// Turn off "nonstandard extension used : nameless struct/union" warning
#pragma warning ( disable : 4201 )
typedef struct
{
union
{
SiSyncPacketHeader h;
SiSyncGetVersionPacket gv;
SiSyncSetVersionPacket sv;
SiSyncCommandQueryPacket cq;
SiSyncCommandSaveConfigPacket cs;
SiSyncGetNumberOfFunctionsPacket gnf;
SiSyncSetNumberOfFunctionsPacket snf;
SiSyncGetFunctionPacket gf;
SiSyncSetFunctionPacket sf;
SiSyncGetButtonAssignmentPacket gba;
SiSyncSetButtonAssignmentPacket sba;
SiSyncSetButtonAssignmentAbsolutePacket sbaa;
SiSyncSetButtonAssignmentV3DKeyPacket sbav;
SiSyncSetButtonNamePacket sbn;
SiSyncGetAxisLabelPacket ga;
SiSyncSetAxisLabelPacket sa;
SiSyncGetOrientationPacket go;
SiSyncSetOrientationPacket so;
SiSyncGetFilterPacket gfi;
SiSyncSetFilterPacket sfi;
SiSyncGetAxesStatePacket gas;
SiSyncSetAxesStatePacket sas;
SiSyncSetInfoLinePacket si;
SiSyncGetScaleOverallPacket gso;
SiSyncSetScaleOverallPacket sso;
SiSyncGetScaleTxPacket gtx;
SiSyncSetScaleTxPacket stx;
SiSyncGetScaleTyPacket gty;
SiSyncSetScaleTyPacket sty;
SiSyncGetScaleTzPacket gtz;
SiSyncSetScaleTzPacket stz;
SiSyncGetScaleRxPacket grx;
SiSyncSetScaleRxPacket srx;
SiSyncGetScaleRyPacket gry;
SiSyncSetScaleRyPacket sry;
SiSyncGetScaleRzPacket grz;
SiSyncSetScaleRzPacket srz;
SiSyncAbsFunctionPacket absf;
SiSyncSetButtonStatePacket sbs;
SiSyncSuspendFileWritingPacket sfw;
SiSyncInjectButtonEventPacket ibe;
SiSyncInvokeActionIDPacket ia;
SiSyncCreateButtonBankPacket cbb;
SiSyncDeleteButtonBankPacket dbb;
SiSyncSetCurrentButtonBankPacket scbb;
SiSyncPreviousButtonBankPacket pbb;
SiSyncNextButtonBankPacket nbb;
SiSyncGetCurrentButtonBankPacket gcbb;
SiSyncCreateAxisBankPacket cab;
SiSyncDeleteAxisBankPacket dab;
SiSyncSetCurrentAxisBankPacket scab;
SiSyncPreviousAxisBankPacket pab;
SiSyncNextAxisBankPacket nab;
SiSyncGetCurrentAxisBankPacket gcab;
SiSyncCreateApplicationBankPacket cappb;
SiSyncDeleteApplicationBankPacket dappb;
SiSyncSetCurrentApplicationBankPacket scappb;
SiSyncPreviousApplicationBankPacket pappb;
SiSyncNextApplicationBankPacket nappb;
SiSyncGetCurrentApplicationBankPacket gcappb;
SiSyncSetGrabSyncIDPacket sgsid;
SiSyncSetSyncIDPacket ssid;
};
} SiSyncPacket;
// Turn warning back on
#pragma warning ( default : 4201 )
#endif /* _SI_SYNCPRIV_H_ */
/*-----------------------------------------------------------------------------
*
* siapp.h -- Si static library interface header file
*
* Contains function headers and type definitions for siapp.c.
*
*-----------------------------------------------------------------------------
*
* Copyright (c) 2013-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef SIAPP_H
#define SIAPP_H
static char SiAppCvsId[] = "(C) 1998-2018 3Dconnexion: $Id: siapp.h 14646 2018-01-04 15:08:23Z jwick $";
#ifdef __cplusplus
extern "C" {
#endif
/* externally used functions */
enum SpwRetVal SiInitialize(void);
SPWbool SiIsInitialized(void);
void SiTerminate(void);
int SiGetNumDevices(void);
SiDevID SiDeviceIndex(int idx);
int SiDispatch(SiHdl hdl, const SiGetEventData *pData, const SiSpwEvent *pEvent, const SiSpwHandlers *pDHandlers);
void SiOpenWinInit(SiOpenData *pData, HWND hWnd);
SiHdl SiOpen(const char *pAppName, SiDevID devID, const SiTypeMask *pTMask, int mode, const SiOpenData *pData);
SiHdl SiOpenPort(const char *pAppName, const SiDevPort *pPort, int mode, const SiOpenData *pData);
enum SpwRetVal SiClose(SiHdl hdl);
void SiGetEventWinInit(SiGetEventData *pData, UINT msg, WPARAM wParam, LPARAM lParam);
enum SpwRetVal SiGetEvent(SiHdl hdl, int flags, const SiGetEventData *pData, SiSpwEvent *pEvent);
enum SpwRetVal SiPeekEvent(SiHdl hdl, int flags, const SiGetEventData *pData, SiSpwEvent *pEvent);
enum SpwRetVal SiBeep(SiHdl hdl, const char *string);
enum SpwRetVal SiSetLEDs(SiHdl hdl, SPWuint32 mask);
enum SpwRetVal SiRezero(SiHdl hdl);
enum SpwRetVal SiGrabDevice(SiHdl hdl, SPWbool exclusive);
enum SpwRetVal SiReleaseDevice(SiHdl hdl);
int SiButtonPressed(const SiSpwEvent *pEvent);
int SiButtonReleased(const SiSpwEvent *pEvent);
enum SpwRetVal SiSetUiMode(SiHdl hdl, SPWuint32 mode);
enum SpwRetVal SiSetTypeMask(SiTypeMask *pTMask, int type1, ...);
enum SpwRetVal SiGetDevicePort(SiHdl hdl, SiDevPort *pPort);
enum SpwRetVal SiGetDriverInfo(SiVerInfo *pInfo);
void SiGetLibraryInfo(SiVerInfo *pInfo);
enum SpwRetVal SiGetDeviceInfo(SiHdl hdl, SiDevInfo *pInfo);
char * SpwErrorString(enum SpwRetVal val);
enum SpwRetVal SiSyncSendQuery(SiHdl hdl);
enum SpwRetVal SiSyncGetVersion(SiHdl hdl, SPWuint32 *pmajor, SPWuint32 *pminor);
enum SpwRetVal SiSyncGetNumberOfFunctions(SiHdl hdl, SPWuint32 *pnumberOfFunctions);
enum SpwRetVal SiSyncGetFunction(SiHdl hdl, SPWuint32 index, SPWint32 *pabsoluteFunctionNumber, WCHAR name[], SPWuint32 *pmaxNameLen);
enum SpwRetVal SiSyncGetButtonAssignment(SiHdl hdl, SPWuint32 buttonNumber, SPWint32 *passignedFunctionIndex);
enum SpwRetVal SiSyncSetButtonAssignment(SiHdl hdl, SPWuint32 buttonNumber, SPWint32 functionIndex);
enum SpwRetVal SiSyncSetButtonAssignmentAbsolute(SiHdl hdl, SPWuint32 buttonNumber, SPWint32 absoluteFunctionNumber);
enum SpwRetVal SiSyncSetButtonAssignmentV3DKey(SiHdl hdl, V3DKey v3dkey, SiAppCmdID appCmdId);
enum SpwRetVal SiSyncSetButtonName(SiHdl hdl, SPWuint32 buttonNumber, const WCHAR name[]);
enum SpwRetVal SiSyncGetAxisLabel(SiHdl hdl, SPWuint32 axisNumber, WCHAR name[], SPWuint32 *pmaxNameLen);
enum SpwRetVal SiSyncSetAxisLabel(SiHdl hdl, SPWuint32 axisNumber, const WCHAR name[]);
enum SpwRetVal SiSyncGetOrientation(SiHdl hdl, SPWint32 axes[6]);
enum SpwRetVal SiSyncSetOrientation(SiHdl hdl, const SPWint32 axes[6]);
enum SpwRetVal SiSyncGetFilter(SiHdl hdl, SiSyncFilter i, SiSyncFilterValue *pv);
enum SpwRetVal SiSyncSetFilter(SiHdl hdl, SiSyncFilter i, SiSyncFilterValue v);
enum SpwRetVal SiSyncGetAxesState(SiHdl hdl, SiSyncAxesState *pa);
enum SpwRetVal SiSyncSetAxesState(SiHdl hdl, SiSyncAxesState a);
enum SpwRetVal SiSyncSetInfoLine(SiHdl hdl, SPWint32 duration, const WCHAR text[]);
enum SpwRetVal SiSyncGetScaleOverall(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleOverall(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleTx(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleTx(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleTy(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleTy(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleTz(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleTz(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleRx(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleRx(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleRy(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleRy(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleRz(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleRz(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncInvokeAbsoluteFunction(SiHdl hdl, SiSyncAbsFunctionNumber i);
enum SpwRetVal SiSyncSetButtonState(SiHdl hdl, SPWuint32 buttonNumber, SiSyncButtonState state);
enum SpwRetVal SiGetButtonName(SiHdl hdl, SPWuint32 buttonNumber, SiButtonName *pname);
enum SpwRetVal SiGetButtonV3DK(SiHdl hdl, SPWuint32 buttonNumber, SPWuint32 *pV3DK);
enum SpwRetVal SiGetButtonNameV3DK(SiHdl hdl, SPWuint32 V3DK, SiButtonName *pname);
enum SpwRetVal SiGetDeviceName(SiHdl hdl, SiDeviceName *pname);
enum SpwRetVal SiGetDeviceImageFileName(SiHdl hdl, char name[], SPWuint32 *pmaxNameLen);
HICON SiGetCompanyIcon(void);
enum SpwRetVal SiGetCompanyLogoFileName(char name[], SPWuint32 *pmaxNameLen);
enum SpwRetVal SiSyncSuspendFileWriting(SiHdl hdl);
enum SpwRetVal SiSyncResumeFileWriting(SiHdl hdl);
void *SiGetConnectionID(SiHdl hdl);
enum SpwRetVal SiSyncInvokeActionID(SPWuint32 hashCode, SPWbool press, const WCHAR actionID[]);
enum SpwRetVal SiSyncCreateButtonBank(SiHdl hdl, const WCHAR bankName[]);
enum SpwRetVal SiSyncDeleteButtonBank(SiHdl hdl, const WCHAR bankName[]);
enum SpwRetVal SiSyncSetCurrentButtonBank(SiHdl hdl, const WCHAR bankName[]);
enum SpwRetVal SiSyncPreviousButtonBank(SiHdl hdl);
enum SpwRetVal SiSyncNextButtonBank(SiHdl hdl);
enum SpwRetVal SiSyncGetCurrentButtonBank(SiHdl hdl, WCHAR bankName[], SPWuint32 *pmaxBankNameLen);
enum SpwRetVal SiSyncSetGrabSyncID(SiHdl hdl, SPWuint32 syncID);
enum SpwRetVal SiSyncSetSyncID(SiHdl hdl, SPWuint32 syncID);
SPWint32 SiMessageBox(HWND hwnd, const WCHAR message[], const WCHAR caption[], SPWuint32 message_type);
void SiOpenWinInitEx(SiOpenDataEx *pData, HWND hWnd);
void SiOpenWinAddHintBoolEnum(SiOpenDataEx *pData, SiHintEnum hint, SPWbool value);
void SiOpenWinAddHintIntEnum(SiOpenDataEx *pData, SiHintEnum hint, SPWint32 value);
void SiOpenWinAddHintFloatEnum(SiOpenDataEx *pData, SiHintEnum hint, SPWfloat32 value);
void SiOpenWinAddHintStringEnum(SiOpenDataEx *pData, SiHintEnum hint, WCHAR *value);
void SiOpenWinAddHintBool(SiOpenDataEx *pData, WCHAR *hint, SPWbool value);
void SiOpenWinAddHintInt(SiOpenDataEx *pData, WCHAR *hint, SPWint32 value);
void SiOpenWinAddHintFloat(SiOpenDataEx *pData, WCHAR *hint, SPWfloat32 value);
void SiOpenWinAddHintString(SiOpenDataEx *pData, WCHAR *hint, WCHAR *value);
SiHdl SiOpenEx(const WCHAR *pAppName, SiDevID devID, const SiTypeMask *pTMask, int mode, const SiOpenDataEx *pData);
SiHdl SiOpenPortEx(const WCHAR *pAppName, const SiDevPort *pPort, int mode, const SiOpenDataEx *pData);
#ifdef __cplusplus
}
#endif
#endif /* #ifndef SIAPP_H */
#ifndef siappcmd_H_INCLUDED_
#define siappcmd_H_INCLUDED_
/* siappcmd.h */
/*
* Copyright notice:
* (c) 2013-2016 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit and this file is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
/************************************************************************************
* File History
*
* $Id: siappcmd.h 13306 2016-08-18 19:00:54Z ngomes $
*
*/
/************************************************************************************
* File Description:
This 3Dconnexion application extension is a set of methods that allows users to
press buttons on a 3dconnexion device to invoke arbitrary actions.
A 3dconnexion utility is responsible for supporting user customization of 3D Input
device buttons. The application is responsible for passing application action
information to the 3dconnexion library, and for invoking actions identified by the
3dconnexion application extension.
The application invokes the following library functions.
SiAppCmdWriteActionSet
The application calls this function to write a context sensitive set of actions
to the 3dconnexion library. The action set is passed as a tree consisting of
categories and actions. An application may have either only one set of actions
through the whole life time of the application, or may change the set of actions
depending on the current working environment or context.
SiAppCmdActivateActionSet
The application calls this function immediately after enabling an action set,
passing the id for an action tree previously written to the 3dconnexion library.
If the application enables a new action set, it will also need to write the whole
action tree (using SiAppCmdWriteActions) to the 3dconnexion library.
Data structures are described in siappcmd_types.h
The functions are described in detail below.
***********************************************************************************************/
#include <si.h>
#include <siappcmd_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/*------------------------------------+---------------------------------------
SiAppCmdWriteActionSet
SiAppCmdWriteActionSet is invoked by the application to communicate a set of actions
(application commands) to the 3Dconnexion library. The library caches the action information
to support user customization of action-button mappings.
The application must pass the entire action tree on each invocation of SiAppCmdWriteActionSet
for a particular environment or context.
Parameters:
Sihdl - active 3dware connection
SiActionNode_t* - action_tree (memory owned by the function caller)
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
--------------------------------------+-------------------------------------*/
#pragma warning (push)
#pragma warning (disable : 4995)
enum SpwRetVal SiAppCmdWriteActionSet(SiHdl hdl, const SiActionNode_t *action_tree);
#pragma warning (pop)
#pragma deprecated(SiAppCmdWriteActionSet)
/*------------------------------------+---------------------------------------
SiAppCmdWriteActions
SiAppCmdWriteActions is invoked by the application to communicate a set of actions
(application commands) to the 3Dconnexion library. The library caches the action information
to support user customization of action-button mappings.
The application must pass the entire action tree on each invocation of SiAppCmdWriteActionSet
for a particular environment or context.
Parameters:
Sihdl - active 3dware connection
SiActionNodeEx_t* - action_tree (memory owned by the function caller)
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
--------------------------------------+-------------------------------------*/
enum SpwRetVal SiAppCmdWriteActions(SiHdl hdl, const SiActionNodeEx_t *action_tree);
/*------------------------------------+---------------------------------------
SiAppCmdWriteActionImages
SiAppCmdWriteActionImages is invoked by the application to communicate the images
associated with application commands to the 3Dconnexion library. The library caches
the image information to support user customization of action-button mappings.
Parameters:
Sihdl - active 3dware connection
SiImage_t[] - array of images
SPWuint32 - the number of elements in the image array
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
--------------------------------------+-------------------------------------*/
enum SpwRetVal SiAppCmdWriteActionImages(SiHdl hdl, const SiImage_t images[], SPWuint32 image_count);
/*------------------------------------+---------------------------------------
SiAppCmdActivateActionSet
SiAppCmdActivateActionSet is invoked by the application after enabling an action set.
The action tree passed in consists of a single action set node identifying the
the action set.
The function activates the action set named in the id.
Parameters:
Sihdl - active 3dware connection
char* - action set id (memory owned by the function caller)
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
SI_BAD_VALUE
--------------------------------------+-------------------------------------*/
enum SpwRetVal SiAppCmdActivateActionSet(SiHdl hdl, const char *action_set_id);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* siappcmd_H_INCLUDED_ */
#ifndef siappcmd_types_H_INCLUDED_
#define siappcmd_types_H_INCLUDED_
/* siappcmd_types.h */
/*
* Copyright notice:
* (c) 2013-2016 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit and this file is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
/************************************************************************************
* File History
*
* $Id: siappcmd_types.h 14470 2017-09-26 06:37:48Z mbonk $
*
* 11/05/15 MSB Added size and description fields to SiActionNode_t.
* This will break the compilation as the size field needs setting and the
* type field has moved.
*/
/************************************************************************************
* File Description:
This header file describes the variable types used in the 3dconnexion interface
that allows a user to assign an arbitrary action to a 3dconnexion device button.
Data structures are described in detail below.
***********************************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER) && (_MSC_VER<1600)
typedef unsigned __int32 uint32_t;
typedef unsigned __int8 uint8_t;
#if _WIN64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#else
#include <stdint.h>
#endif
typedef enum siActionNodeType_e
{
SI_ACTIONSET_NODE = 0
, SI_CATEGORY_NODE
, SI_ACTION_NODE
} SiActionNodeType_t;
/*------------------------------------+---------------------------------------
SiActionNodeEx_t
The application passes a pointer to a structure of type SiActionNodeEx_t to
the function SiAppCmdWriteActionSet
A set of actions is composed of a linked list of SiActionNodeEx_t structures.
Sibling nodes are linked by the next field of the structure and child nodes
by the children field. The root node of the tree represents the name of the
action set while the leaf nodes of the tree represent the actions that can be
assigned to buttons and invoked by the user. The intermediate nodes represent
categories and sub-categories for the actions. An example of this would be the
menu item structure in a menu bar. The menus in the menu bar would be
represented by the SiActionNodeEx_t structures with type SI_CATEGORY_NODE pointed
to by each successively linked next field and the first menu item of each menu
represented by the structure pointed to by their child fields (the rest of the
menu items in each menu would again be linked by the next fields).
size
The size field must always be the byte size of siActionNodeEx_s
type
The type field specifies one of the following values.
SI_ACTIONSET_NODE
SI_CATEGORY_NODE
SI_ACTION_NODE
The root node (and only the root node) of the tree always has type
SI_ACTIONSET_NODE. Only the leaf nodes of the tree have type SI_ACTION_NODE.
All intermediate nodes have type SI_CATEGORY_NODE.
id
The id field specifies a UTF8 string identifier for the action set,
category, or action represented by the node. The field is always non-NULL.
This string needs to remain constant across application sessions and more
or less constant across application releases. The id is used by the
application to identify an action.
label
The label field specifies a UTF8 localized/internationalized name
for the action set, category, or action represented by the node. The label
field can be NULL for the root and intermediate category nodes that are not
explicitly presented to users. All leaf (action) and intermediate nodes
containing leaf nodes have non-NULL labels. If the application only has a
single action tree set, then the label of the root (context) node can also
be NULL.
description
The description field specifies a UTF8 localized/internationalized tooltip
for the action set, category, or action represented by the node. The description
field can be NULL for the root and intermediate category nodes that are not
explicitly presented to users. Leaf (action) nodes should have non-NULL descriptions.
--------------------------------------+-------------------------------------*/
#if __clang__
__attribute__((deprecated))
#elif _MSC_VER
#pragma deprecated(SiActionNode_t)
#endif
typedef struct siActionNode_s
{
struct siActionNode_s *next;
struct siActionNode_s *children;
const char *id;
const char *label;
SiActionNodeType_t type;
} SiActionNode_t;
typedef struct siActionNodeEx_s
{
uint32_t size;
SiActionNodeType_t type;
struct siActionNodeEx_s *next;
struct siActionNodeEx_s *children;
const char *id;
const char *label;
const char *description;
} SiActionNodeEx_t;
/*------------------------------------+---------------------------------------
SiImage_t
The application passes a pointer to an array of type SiImage_t to
the function SiAppCmdWriteActionImages
size
The size field specifies the size of the SiImage_t type in bytes.
id
The id field specifies a UTF8 string identifier for the image. The field
is always non-NULL. This string needs to remain constant across application
sessions and more or less constant across application releases.
The id is used by the application to identify the image. To associate an
image with a command the id needs to be identical to the value of the
SiActionNodeEx_t::id of the action.
siImageData_s::size
The siImageData_s::size field specifies the size of the data pointed to
by the siImageData_s::data field in bytes.
siImageData_s::data
The image field contains a pointer to the image. The image may be in coded
in any recognizable format.
--------------------------------------+-------------------------------------*/
typedef enum eSiImageType {
e_none = 0
, e_image_file
, e_resource_file
, e_image
} SiImageType_t;
struct siResource_s {
const char *file_name;
const char *id;
const char *type;
uint32_t index;
};
struct siImageFile_s {
const char *file_name;
uint32_t index;
};
struct siImageData_s {
const uint8_t *data;
uintptr_t size;
uint32_t index;
};
typedef struct siImage_s
{
uint32_t size;
SiImageType_t type;
const char *id;
union {
struct siResource_s resource;
struct siImageFile_s file;
struct siImageData_s image;
};
} SiImage_t;
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* siappcmd_types_H_INCLUDED_ */
\ No newline at end of file
/*----------------------------------------------------------------------
* spwdata.h -- datatypes
*
*
* This contains the only acceptable type definitions for 3Dconnexion
* products. Needs more work.
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1996-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*----------------------------------------------------------------------
*
* 10/27/15 Added 64bit definitions for non ms-compilers
*/
#ifndef SPWDATA_H
#define SPWDATA_H
static char spwdataCvsId[] = "(C) 1996-2015 3Dconnexion: $Id: spwdata.h 11976 2015-10-27 10:51:11Z mbonk $";
#if defined (_MSC_VER)
typedef __int64 SPWint64;
#else
typedef int64_t SPWint64;
#endif
typedef long SPWint32;
typedef short SPWint16;
typedef char SPWint8;
typedef long SPWbool;
#if defined (_MSC_VER)
typedef unsigned __int64 SPWuint64;
#else
typedef uint64_t SPWuint64;
#endif
typedef unsigned long SPWuint32;
typedef unsigned short SPWuint16;
typedef unsigned char SPWuint8;
typedef float SPWfloat32;
typedef double SPWfloat64;
#endif /* SPWDATA_H */
/*----------------------------------------------------------------------
* spwerror.h -- 3DxWare function return values
*
* This file contains all the 3Dconnexion standard error return
* return values for functions
*
*----------------------------------------------------------------------
*
* Copyright (c) 1996-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SPWERROR_H_
#define _SPWERROR_H_
static char spwerrorCvsId[]="(C) 1996-2015 3Dconnexion: $Id: spwerror.h 11571 2015-07-15 08:19:31Z jwick $";
enum SpwRetVal /* Error return values. */
{
SPW_NO_ERROR, /* No error. */
SPW_ERROR, /* Error -- function failed. */
SI_BAD_HANDLE, /* Invalid 3DxWare handle. */
SI_BAD_ID, /* Invalid device ID. */
SI_BAD_VALUE, /* Invalid argument value. */
SI_IS_EVENT, /* Event is a 3DxWare event. */
SI_SKIP_EVENT, /* Skip this 3DxWare event. */
SI_NOT_EVENT, /* Event is not a 3DxWare event. */
SI_NO_DRIVER, /* 3DxWare driver is not running. */
SI_NO_RESPONSE, /* 3DxWare driver is not responding. */
SI_UNSUPPORTED, /* The function is unsupported by this version. */
SI_UNINITIALIZED, /* 3DxWare input library is uninitialized. */
SI_WRONG_DRIVER, /* Driver is incorrect for this 3DxWare version. */
SI_INTERNAL_ERROR, /* Internal 3DxWare error. */
SI_BAD_PROTOCOL, /* The transport protocol is unknown. */
SI_OUT_OF_MEMORY, /* Unable to malloc space required. */
SPW_DLL_LOAD_ERROR, /* Could not load siapp dlls */
SI_NOT_OPEN, /* 3D mouse device not open */
SI_ITEM_NOT_FOUND, /* Item not found */
SI_UNSUPPORTED_DEVICE, /* The device is not supported */
SI_NOT_ENOUGH_MEMORY, /* Not enough memory (but not a malloc problem) */
SI_SYNC_WRONG_HASHCODE, /* Wrong hash code sent to a Sync function */
SI_INCOMPATIBLE_PROTOCOL_MIX, /* Attempt to mix MWM and S80 protocol in invalid way */
SI_DISABLED /* Functionality is currently disabled */
};
typedef enum SpwRetVal SpwReturnValue;
#endif /* _SPWERROR_H_ */
/*----------------------------------------------------------------------
* spwmacro.h -- cpp macros we ALWAYS use.
*
* $Id: spwmacro.h 11091 2015-01-09 11:02:45Z jwick $
*
* We always seem to use the same macros.
* This is the place we define them.
*
*----------------------------------------------------------------------
*/
/*
* Copyright notice:
* Copyright (c) 1998-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*/
#ifndef SPWMACRO_H
#define SPWMACRO_H
#define SPW_FALSE (0)
#define SPW_TRUE (!SPW_FALSE)
#define SPW_MAX(a,b) (((a)>(b))?(a):(b))
#define SPW_MIN(a,b) (((a)<(b))?(a):(b))
#define SPW_ABS(a) (((a)<0)?(-(a)):(a))
#define SPW_SIGN(a) ((a)>=0?1:-1)
#define SPW_BIND(min,n,max) (SPW_MIN((max),SPW_MAX((min),(n))))
#define SPW_NUM_ELEMENTS_IN(a) (sizeof(a)/sizeof((a)[0]))
#define SPW_PI 3.14159265358979324f
#define SPW_DEG_TO_RAD(d) ((d)*SPW_PI/180.0f)
#define SPW_RAD_TO_DEG(r) ((r)*180.0f/SPW_PI)
#define SPW_LENGTH_OF(a) (sizeof(a)/sizeof((a)[0]))
#define SPW_END_OF(a) (&(a)[SPW_LENGTH_OF(a)-1])
#define SPW_SQ(a) ((a)*(a))
#define SPW_ABSDIFF(a, b) (fabs((double) (a) - (b)))
#endif
/*-----------------------------------------------------------------------------
*
* spwmath.h: SpaceWare Math Library public definitions
*
* $Id: spwmath.h 9452 2013-10-07 10:20:47Z jwick $
*
*-----------------------------------------------------------------------------
*
*/
#ifndef SPW_MATH_H
#define SPW_MATH_H
#define SPW_MATH_MAJOR 3
#define SPW_MATH_MINOR 0
#define SPW_MATH_UPDATE 0
#define SPW_MATH_BUILD 7
#define SPW_MATH_VERSION "MATH version 3.0"
#define SPW_MATH_DATE "March 27, 1998"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef EXPORT_FUNCTIONS
#define DLL_EXPORT __declspec(dllexport)
#define CALL_TYPE __stdcall
#else
#define DLL_EXPORT
#define CALL_TYPE __stdcall
#endif
/* PUBLIC VARIABLES & DEFINES */
#if !defined(__GL_GL_H__) && !defined(SPW_NO_MATRIX)
typedef float Matrix[4][4];
#endif
DLL_EXPORT void SPW_ArbitraryAxisToMatrix (Matrix, const float[3], float);
DLL_EXPORT int SPW_CompareMatrices (const Matrix, const Matrix);
DLL_EXPORT float SPW_DotProduct (const float [3], const float [3]);
DLL_EXPORT float SPW_GetMatrixScale (const Matrix);
DLL_EXPORT void SPW_InvertMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_LookAtUpVectorToMatrix (Matrix, const float [3], const float [3],
const float [3]);
DLL_EXPORT void SPW_MatrixToArbitraryAxis (float [3], float *, const Matrix);
DLL_EXPORT float SPW_MatrixDeterminant (const Matrix);
DLL_EXPORT void SPW_MatrixToLookAtUpVector (float [3], float [3], float [3],
const Matrix);
DLL_EXPORT void SPW_Mult44x44 (Matrix, const Matrix, const Matrix);
DLL_EXPORT void SPW_MultFull14x44 (float [3], const float [3], const Matrix);
DLL_EXPORT void SPW_Mult14x44 (float [3], const float [3], const Matrix);
DLL_EXPORT void SPW_Mult33x33 (Matrix, const Matrix, const Matrix);
DLL_EXPORT void SPW_Mult13x33 (float [3], const float [3], const Matrix);
DLL_EXPORT int SPW_OrthoNormMatrix (Matrix);
DLL_EXPORT float SPW_VectorLength (const float [3]);
DLL_EXPORT void SPW_TransposeMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_CopyMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_ScaleMatrix (Matrix, const Matrix, float);
DLL_EXPORT void SPW_GetTranslationMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_InitializeMatrix (Matrix, float, float, float, float,
float, float, float, float,
float, float, float, float,
float, float, float, float);
DLL_EXPORT void SPW_MakeIdentityMatrix (Matrix);
DLL_EXPORT void SPW_NormalizeVector (float [3], float [3]);
DLL_EXPORT void SPW_CrossProduct (float [3], const float [3], const float [3]);
DLL_EXPORT void SPW_PrintMatrix (const char *, const Matrix);
DLL_EXPORT void SPW_PrintVector (const char *, const float [3]);
DLL_EXPORT void SPW_PrintSpaceballData (const char *, const float [7]);
DLL_EXPORT void SPW_HighValuePassFilter (float *, int);
#ifdef __cplusplus
}
#endif
#endif /* SPW_MATH_H */
#ifndef virtualkeys_HPP_INCLUDED_
#define virtualkeys_HPP_INCLUDED_
// virtualkeys.hpp
/*
* Copyright notice:
* Copyright (c) 2010-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*/
///////////////////////////////////////////////////////////////////////////////////
// History
//
// $Id: virtualkeys.hpp 14192 2017-06-21 16:32:40Z jwick $
//
// 22.10.12 MSB Fix: Number of keys returned for SpacePilot Pro is incorrect (27)
// 19.06.12 MSB Added SM Touch and Generic 2 Button SM
// 09.03.12 MSB Fix VirtualKeyToHid not correctly converting SpaceMousePro buttons >V3DK_3
// 03.02.12 MSB Changed the labels of the "programmable buttons" back to "1" etc
// 22.09.11 MSB Added V3DK_USER above which the users may add their own virtual keys
// 02.08.11 MSB Added pid for Viking
// Added virtualkey / hid definition for Viking
// Added member to the tag_VirtualKeys struct for the number of
// buttons on the device
// Added methods to retrieve the number of buttons on a device
// Added methods to map the hid buttons numbers to a consecutive
// sequence (and back again)
// 11.03.11 MSB Fix incorrect label for V3DK_ROLL_CCW
// 09.03.11 MSB Added methods to return the labels of the keys on the device
// 19.10.10 MSB Moved the standard 3dmouse virtual buttons to the s3dm namespace
// 28.09.10 MSB Added spin and tilt buttons
// Added structure to convert virtual key number to string identifier
// 04.12.09 MSB Fix spelling mistake 'panzoon'
//
#define _TRACE_VIRTUAL_KEYS 0
#if !defined(numberof)
#define numberof(_x) (sizeof(_x)/sizeof(_x[0]))
#endif
namespace s3dm {
// This enum comes from trunk/inc/V3DKey.h. They must remain synced.
enum e3dmouse_virtual_key
{
V3DK_INVALID = 0,
V3DK_MENU = 1,
V3DK_FIT = 2,
V3DK_TOP = 3,
V3DK_LEFT = 4,
V3DK_RIGHT = 5,
V3DK_FRONT = 6,
V3DK_BOTTOM = 7,
V3DK_BACK = 8,
V3DK_ROLL_CW = 9,
V3DK_ROLL_CCW = 10,
V3DK_ISO1 = 11,
V3DK_ISO2 = 12,
V3DK_1 = 13,
V3DK_2 = 14,
V3DK_3 = 15,
V3DK_4 = 16,
V3DK_5 = 17,
V3DK_6 = 18,
V3DK_7 = 19,
V3DK_8 = 20,
V3DK_9 = 21,
V3DK_10 = 22,
V3DK_ESC = 23,
V3DK_ALT = 24,
V3DK_SHIFT = 25,
V3DK_CTRL = 26,
V3DK_ROTATE = 27,
V3DK_PANZOOM = 28,
V3DK_DOMINANT = 29,
V3DK_PLUS = 30,
V3DK_MINUS = 31,
V3DK_SPIN_CW = 32,
V3DK_SPIN_CCW = 33,
V3DK_TILT_CW = 34,
V3DK_TILT_CCW = 35,
V3DK_ENTER = 36,
V3DK_DELETE = 37,
V3DK_RESERVED0 = 38,
V3DK_RESERVED1 = 39,
V3DK_RESERVED2 = 40,
V3DK_F1 = 41,
V3DK_F2 = 42,
V3DK_F3 = 43,
V3DK_F4 = 44,
V3DK_F5 = 45,
V3DK_F6 = 46,
V3DK_F7 = 47,
V3DK_F8 = 48,
V3DK_F9 = 49,
V3DK_F10 = 50,
V3DK_F11 = 51,
V3DK_F12 = 52,
V3DK_F13 = 53,
V3DK_F14 = 54,
V3DK_F15 = 55,
V3DK_F16 = 56,
V3DK_F17 = 57,
V3DK_F18 = 58,
V3DK_F19 = 59,
V3DK_F20 = 60,
V3DK_F21 = 61,
V3DK_F22 = 62,
V3DK_F23 = 63,
V3DK_F24 = 64,
V3DK_F25 = 65,
V3DK_F26 = 66,
V3DK_F27 = 67,
V3DK_F28 = 68,
V3DK_F29 = 69,
V3DK_F30 = 70,
V3DK_F31 = 71,
V3DK_F32 = 72,
V3DK_F33 = 73,
V3DK_F34 = 74,
V3DK_F35 = 75,
V3DK_F36 = 76,
V3DK_11 = 77,
V3DK_12 = 78,
V3DK_13 = 79,
V3DK_14 = 80,
V3DK_15 = 81,
V3DK_16 = 82,
V3DK_17 = 83,
V3DK_18 = 84,
V3DK_19 = 85,
V3DK_20 = 86,
V3DK_21 = 87,
V3DK_22 = 88,
V3DK_23 = 89,
V3DK_24 = 90,
V3DK_25 = 91,
V3DK_26 = 92,
V3DK_27 = 93,
V3DK_28 = 94,
V3DK_29 = 95,
V3DK_30 = 96,
V3DK_31 = 97,
V3DK_32 = 98,
V3DK_33 = 99,
V3DK_34 = 100,
V3DK_35 = 101,
V3DK_36 = 102,
V3DK_VIEW_1 = 103,
V3DK_VIEW_2 = 104,
V3DK_VIEW_3 = 105,
V3DK_VIEW_4 = 106,
V3DK_VIEW_5 = 107,
V3DK_VIEW_6 = 108,
V3DK_VIEW_7 = 109,
V3DK_VIEW_8 = 110,
V3DK_VIEW_9 = 111,
V3DK_VIEW_10 = 112,
V3DK_VIEW_11 = 113,
V3DK_VIEW_12 = 114,
V3DK_VIEW_13 = 115,
V3DK_VIEW_14 = 116,
V3DK_VIEW_15 = 117,
V3DK_VIEW_16 = 118,
V3DK_VIEW_17 = 119,
V3DK_VIEW_18 = 120,
V3DK_VIEW_19 = 121,
V3DK_VIEW_20 = 122,
V3DK_VIEW_21 = 123,
V3DK_VIEW_22 = 124,
V3DK_VIEW_23 = 125,
V3DK_VIEW_24 = 126,
V3DK_VIEW_25 = 127,
V3DK_VIEW_26 = 128,
V3DK_VIEW_27 = 129,
V3DK_VIEW_28 = 130,
V3DK_VIEW_29 = 131,
V3DK_VIEW_30 = 132,
V3DK_VIEW_31 = 133,
V3DK_VIEW_32 = 134,
V3DK_VIEW_33 = 135,
V3DK_VIEW_34 = 136,
V3DK_VIEW_35 = 137,
V3DK_VIEW_36 = 138,
V3DK_SAVE_VIEW_1 = 139,
V3DK_SAVE_VIEW_2 = 140,
V3DK_SAVE_VIEW_3 = 141,
V3DK_SAVE_VIEW_4 = 142,
V3DK_SAVE_VIEW_5 = 143,
V3DK_SAVE_VIEW_6 = 144,
V3DK_SAVE_VIEW_7 = 145,
V3DK_SAVE_VIEW_8 = 146,
V3DK_SAVE_VIEW_9 = 147,
V3DK_SAVE_VIEW_10= 148,
V3DK_SAVE_VIEW_11= 149,
V3DK_SAVE_VIEW_12= 150,
V3DK_SAVE_VIEW_13= 151,
V3DK_SAVE_VIEW_14= 152,
V3DK_SAVE_VIEW_15= 153,
V3DK_SAVE_VIEW_16= 154,
V3DK_SAVE_VIEW_17= 155,
V3DK_SAVE_VIEW_18= 156,
V3DK_SAVE_VIEW_19= 157,
V3DK_SAVE_VIEW_20= 158,
V3DK_SAVE_VIEW_21= 159,
V3DK_SAVE_VIEW_22= 160,
V3DK_SAVE_VIEW_23= 161,
V3DK_SAVE_VIEW_24= 162,
V3DK_SAVE_VIEW_25= 163,
V3DK_SAVE_VIEW_26= 164,
V3DK_SAVE_VIEW_27= 165,
V3DK_SAVE_VIEW_28= 166,
V3DK_SAVE_VIEW_29= 167,
V3DK_SAVE_VIEW_30= 168,
V3DK_SAVE_VIEW_31= 169,
V3DK_SAVE_VIEW_32= 170,
V3DK_SAVE_VIEW_33= 171,
V3DK_SAVE_VIEW_34= 172,
V3DK_SAVE_VIEW_35= 173,
V3DK_SAVE_VIEW_36= 174,
V3DK_TAB = 175,
V3DK_SPACE = 176,
V3DK_MENU_1 = 177,
V3DK_MENU_2 = 178,
V3DK_MENU_3 = 179,
V3DK_MENU_4 = 180,
V3DK_MENU_5 = 181,
V3DK_MENU_6 = 182,
V3DK_MENU_7 = 183,
V3DK_MENU_8 = 184,
V3DK_MENU_9 = 185,
V3DK_MENU_10 = 186,
V3DK_MENU_11 = 187,
V3DK_MENU_12 = 188,
V3DK_MENU_13 = 189,
V3DK_MENU_14 = 190,
V3DK_MENU_15 = 191,
V3DK_MENU_16 = 192,
/* add more here as needed - don't change value of anything that may already be used */
V3DK_USER = 0x10000
};
static const e3dmouse_virtual_key VirtualKeys[]=
{
V3DK_MENU, V3DK_FIT
, V3DK_TOP, V3DK_LEFT, V3DK_RIGHT, V3DK_FRONT, V3DK_BOTTOM, V3DK_BACK
, V3DK_ROLL_CW, V3DK_ROLL_CCW
, V3DK_ISO1, V3DK_ISO2
, V3DK_1, V3DK_2, V3DK_3, V3DK_4, V3DK_5, V3DK_6, V3DK_7, V3DK_8, V3DK_9, V3DK_10
, V3DK_ESC, V3DK_ALT, V3DK_SHIFT, V3DK_CTRL
, V3DK_ROTATE, V3DK_PANZOOM, V3DK_DOMINANT
, V3DK_PLUS, V3DK_MINUS
, V3DK_SPIN_CW, V3DK_SPIN_CCW
, V3DK_TILT_CW, V3DK_TILT_CCW
};
static const size_t VirtualKeyCount = numberof(VirtualKeys);
static const size_t MaxKeyCount = 256; // Arbitary number for sanity checks
struct tag_VirtualKeyLabel
{
e3dmouse_virtual_key vkey;
const wchar_t* szLabel;
};
static const struct tag_VirtualKeyLabel VirtualKeyLabel[] =
{
{V3DK_MENU, L"MENU"} , {V3DK_FIT, L"FIT"}
, {V3DK_TOP, L"T"}, {V3DK_LEFT, L"L"}, {V3DK_RIGHT, L"R"}, {V3DK_FRONT, L"F"}, {V3DK_BOTTOM, L"B"}, {V3DK_BACK, L"BK"}
, {V3DK_ROLL_CW, L"Roll +"}, {V3DK_ROLL_CCW, L"Roll -"}
, {V3DK_ISO1, L"ISO1"}, {V3DK_ISO2, L"ISO2"}
, {V3DK_1, L"1"}, {V3DK_2, L"2"}, {V3DK_3, L"3"}, {V3DK_4, L"4"}, {V3DK_5, L"5"}
, {V3DK_6, L"6"}, {V3DK_7, L"7"}, {V3DK_8, L"8"}, {V3DK_9, L"9"}, {V3DK_10, L"10"}
, {V3DK_ESC, L"ESC"}, {V3DK_ALT, L"ALT"}, {V3DK_SHIFT, L"SHIFT"}, {V3DK_CTRL, L"CTRL"}
, {V3DK_ROTATE, L"Rotate"}, {V3DK_PANZOOM, L"Pan Zoom"}, {V3DK_DOMINANT, L"Dom"}
, {V3DK_PLUS, L"+"}, {V3DK_MINUS, L"-"}
, {V3DK_SPIN_CW, L"Spin +"}, {V3DK_SPIN_CCW, L"Spin -"}
, {V3DK_TILT_CW, L"Tilt +"}, {V3DK_TILT_CCW, L"Tilt -"}
, {V3DK_ENTER, L"Enter"}, {V3DK_DELETE, L"Delete"}
, {V3DK_RESERVED0, L"Reserved0"}, {V3DK_RESERVED1, L"Reserved1"}, {V3DK_RESERVED2, L"Reserved2"}
, {V3DK_F1, L"F1"}, {V3DK_F2, L"F2"}, {V3DK_F3, L"F3"}, {V3DK_F4, L"F4"}, {V3DK_F5, L"F5"}
, {V3DK_F6, L"F6"}, {V3DK_F7, L"F7"}, {V3DK_F8, L"F8"}, {V3DK_F9, L"F9"}, {V3DK_F10, L"F10"}
, {V3DK_F11, L"F11"}, {V3DK_F12, L"F12"}, {V3DK_F13, L"F13"}, {V3DK_F14, L"F14"}, {V3DK_F15, L"F15"}
, {V3DK_F16, L"F16"}, {V3DK_F17, L"F17"}, {V3DK_F18, L"F18"}, {V3DK_F19, L"F19"}, {V3DK_F20, L"F20"}
, {V3DK_F21, L"F21"}, {V3DK_F22, L"F22"}, {V3DK_F23, L"F23"}, {V3DK_F24, L"F24"}, {V3DK_F25, L"F25"}
, {V3DK_F26, L"F26"}, {V3DK_F27, L"F27"}, {V3DK_F28, L"F28"}, {V3DK_F29, L"F29"}, {V3DK_F30, L"F30"}
, {V3DK_F31, L"F31"}, {V3DK_F32, L"F32"}, {V3DK_F33, L"F33"}, {V3DK_F34, L"F34"}, {V3DK_F35, L"F35"}
, {V3DK_F36, L"F36"}
, {V3DK_11, L"11"}, {V3DK_12, L"12"}, {V3DK_13, L"13"}, {V3DK_14, L"14"}, {V3DK_15, L"15"}
, {V3DK_16, L"16"}, {V3DK_17, L"17"}, {V3DK_18, L"18"}, {V3DK_19, L"19"}, {V3DK_20, L"20"}
, {V3DK_21, L"21"}, {V3DK_22, L"22"}, {V3DK_23, L"23"}, {V3DK_24, L"24"}, {V3DK_25, L"25"}
, {V3DK_26, L"26"}, {V3DK_27, L"27"}, {V3DK_28, L"28"}, {V3DK_29, L"29"}, {V3DK_30, L"30"}
, {V3DK_31, L"31"}, {V3DK_32, L"32"}, {V3DK_33, L"33"}, {V3DK_34, L"34"}, {V3DK_35, L"35"}
, {V3DK_36, L"36"}
, {V3DK_VIEW_1, L"VIEW 1"}, {V3DK_VIEW_2, L"VIEW 2"}, {V3DK_VIEW_3, L"VIEW 3"}, {V3DK_VIEW_4, L"VIEW 4"}, {V3DK_VIEW_5, L"VIEW 5"}
, {V3DK_VIEW_6, L"VIEW 6"}, {V3DK_VIEW_7, L"VIEW 7"}, {V3DK_VIEW_8, L"VIEW 8"}, {V3DK_VIEW_9, L"VIEW 9"}, {V3DK_VIEW_10, L"VIEW 10"}
, {V3DK_VIEW_11, L"VIEW 11"}, {V3DK_VIEW_12, L"VIEW 12"}, {V3DK_VIEW_13, L"VIEW 13"}, {V3DK_VIEW_14, L"VIEW 14"}, {V3DK_VIEW_15, L"VIEW 15"}
, {V3DK_VIEW_16, L"VIEW 16"}, {V3DK_VIEW_17, L"VIEW 17"}, {V3DK_VIEW_18, L"VIEW 18"}, {V3DK_VIEW_19, L"VIEW 19"}, {V3DK_VIEW_20, L"VIEW 20"}
, {V3DK_VIEW_21, L"VIEW 21"}, {V3DK_VIEW_22, L"VIEW 22"}, {V3DK_VIEW_23, L"VIEW 23"}, {V3DK_VIEW_24, L"VIEW 24"}, {V3DK_VIEW_25, L"VIEW 25"}
, {V3DK_VIEW_26, L"VIEW 26"}, {V3DK_VIEW_27, L"VIEW 27"}, {V3DK_VIEW_28, L"VIEW 28"}, {V3DK_VIEW_29, L"VIEW 29"}, {V3DK_VIEW_30, L"VIEW 30"}
, {V3DK_VIEW_31, L"VIEW 31"}, {V3DK_VIEW_32, L"VIEW 32"}, {V3DK_VIEW_33, L"VIEW 33"}, {V3DK_VIEW_34, L"VIEW 34"}, {V3DK_VIEW_35, L"VIEW 35"}
, {V3DK_VIEW_36, L"VIEW 36"}
, {V3DK_SAVE_VIEW_1, L"SAVE VIEW 1"}, {V3DK_SAVE_VIEW_2, L"SAVE VIEW 2"}, {V3DK_SAVE_VIEW_3, L"SAVE VIEW 3"}, {V3DK_SAVE_VIEW_4, L"SAVE VIEW 4"}, {V3DK_SAVE_VIEW_5, L"SAVE VIEW 5"}
, {V3DK_SAVE_VIEW_6, L"SAVE VIEW 6"}, {V3DK_SAVE_VIEW_7, L"SAVE VIEW 7"}, {V3DK_SAVE_VIEW_8, L"SAVE VIEW 8"}, {V3DK_SAVE_VIEW_9, L"SAVE VIEW 9"}, {V3DK_SAVE_VIEW_10, L"SAVE VIEW 10"}
, {V3DK_SAVE_VIEW_11, L"SAVE VIEW 11"}, {V3DK_SAVE_VIEW_12, L"SAVE VIEW 12"}, {V3DK_SAVE_VIEW_13, L"SAVE VIEW 13"}, {V3DK_SAVE_VIEW_14, L"SAVE VIEW 14"}, {V3DK_SAVE_VIEW_15, L"SAVE VIEW 15"}
, {V3DK_SAVE_VIEW_16, L"VIEW 16"}, {V3DK_SAVE_VIEW_17, L"VIEW 17"}, {V3DK_SAVE_VIEW_18, L"VIEW 18"}, {V3DK_SAVE_VIEW_19, L"VIEW 19"}, {V3DK_SAVE_VIEW_20, L"VIEW 20"}
, {V3DK_SAVE_VIEW_21, L"VIEW 21"}, {V3DK_SAVE_VIEW_22, L"VIEW 22"}, {V3DK_SAVE_VIEW_23, L"VIEW 23"}, {V3DK_SAVE_VIEW_24, L"VIEW 24"}, {V3DK_SAVE_VIEW_25, L"VIEW 25"}
, {V3DK_SAVE_VIEW_26, L"VIEW 26"}, {V3DK_SAVE_VIEW_27, L"VIEW 27"}, {V3DK_SAVE_VIEW_28, L"VIEW 28"}, {V3DK_SAVE_VIEW_29, L"VIEW 29"}, {V3DK_SAVE_VIEW_30, L"VIEW 30"}
, {V3DK_SAVE_VIEW_31, L"VIEW 31"}, {V3DK_SAVE_VIEW_32, L"VIEW 32"}, {V3DK_SAVE_VIEW_33, L"VIEW 33"}, {V3DK_SAVE_VIEW_34, L"VIEW 34"}, {V3DK_SAVE_VIEW_35, L"VIEW 35"}
, {V3DK_SAVE_VIEW_36, L"VIEW 36"}
, {V3DK_TAB, L"Tab"}, {V3DK_SPACE, L"Space"}
, {V3DK_MENU_1, L"MENU 1"}, {V3DK_MENU_2, L"MENU 2"}, {V3DK_MENU_3, L"MENU 3"}, {V3DK_MENU_4, L"MENU 4"}
, {V3DK_MENU_5, L"MENU 5"}, {V3DK_MENU_6, L"MENU 6"}, {V3DK_MENU_7, L"MENU 7"}, {V3DK_MENU_8, L"MENU 8"}
, {V3DK_MENU_9, L"MENU 9"}, {V3DK_MENU_10, L"MENU 10"}, {V3DK_MENU_11, L"MENU 11"}, {V3DK_MENU_12, L"MENU 12"}
, {V3DK_MENU_13, L"MENU 13"}, {V3DK_MENU_14, L"MENU 14"}, {V3DK_MENU_15, L"MENU 15"}, {V3DK_MENU_16, L"MENU 16"}
, {V3DK_USER, L"USER"}
};
struct tag_VirtualKeyId
{
e3dmouse_virtual_key vkey;
const wchar_t* szId;
};
static const struct tag_VirtualKeyId VirtualKeyId[] =
{
{V3DK_INVALID, L"V3DK_INVALID"}
, {V3DK_MENU, L"V3DK_MENU"} , {V3DK_FIT, L"V3DK_FIT"}
, {V3DK_TOP, L"V3DK_TOP"}, {V3DK_LEFT, L"V3DK_LEFT"}, {V3DK_RIGHT, L"V3DK_RIGHT"}, {V3DK_FRONT, L"V3DK_FRONT"}, {V3DK_BOTTOM, L"V3DK_BOTTOM"}, {V3DK_BACK, L"V3DK_BACK"}
, {V3DK_ROLL_CW, L"V3DK_ROLL_CW"}, {V3DK_ROLL_CCW, L"V3DK_ROLL_CCW"}
, {V3DK_ISO1, L"V3DK_ISO1"}, {V3DK_ISO2, L"V3DK_ISO2"}
, {V3DK_1, L"V3DK_1"}, {V3DK_2, L"V3DK_2"}, {V3DK_3, L"V3DK_3"}, {V3DK_4, L"V3DK_4"}, {V3DK_5, L"V3DK_5"}
, {V3DK_6, L"V3DK_6"}, {V3DK_7, L"V3DK_7"}, {V3DK_8, L"V3DK_8"}, {V3DK_9, L"V3DK_9"}, {V3DK_10, L"V3DK_10"}
, {V3DK_ESC, L"V3DK_ESC"}, {V3DK_ALT, L"V3DK_ALT"}, {V3DK_SHIFT, L"V3DK_SHIFT"}, {V3DK_CTRL, L"V3DK_CTRL"}
, {V3DK_ROTATE, L"V3DK_ROTATE"}, {V3DK_PANZOOM, L"V3DK_PANZOOM"}, {V3DK_DOMINANT, L"V3DK_DOMINANT"}
, {V3DK_PLUS, L"V3DK_PLUS"}, {V3DK_MINUS, L"V3DK_MINUS"}
, {V3DK_SPIN_CW, L"V3DK_SPIN_CW"}, {V3DK_SPIN_CCW, L"V3DK_SPIN_CCW"}
, {V3DK_TILT_CW, L"V3DK_TILT_CW"}, {V3DK_TILT_CCW, L"V3DK_TILT_CCW"}
, {V3DK_ENTER, L"V3DK_ENTER"}, {V3DK_DELETE, L"V3DK_DELETE"}
, {V3DK_RESERVED0, L"V3DK_RESERVED0"}, {V3DK_RESERVED1, L"V3DK_RESERVED1"}, {V3DK_RESERVED2, L"V3DK_RESERVED2"}
, {V3DK_F1, L"V3DK_F1"}, {V3DK_F2, L"V3DK_F2"}, {V3DK_F3, L"V3DK_F3"}, {V3DK_F4, L"V3DK_F4"}, {V3DK_F5, L"V3DK_F5"}
, {V3DK_F6, L"V3DK_F6"}, {V3DK_F7, L"V3DK_F7"}, {V3DK_F8, L"V3DK_F8"}, {V3DK_F9, L"V3DK_F9"}, {V3DK_F10, L"V3DK_F10"}
, {V3DK_F11, L"V3DK_F11"}, {V3DK_F12, L"V3DK_F12"}, {V3DK_F13, L"V3DK_F13"}, {V3DK_F14, L"V3DK_F14"}, {V3DK_F15, L"V3DK_F15"}
, {V3DK_F16, L"V3DK_F16"}, {V3DK_F17, L"V3DK_F17"}, {V3DK_F18, L"V3DK_F18"}, {V3DK_F19, L"V3DK_F19"}, {V3DK_F20, L"V3DK_F20"}
, {V3DK_F21, L"V3DK_F21"}, {V3DK_F22, L"V3DK_F22"}, {V3DK_F23, L"V3DK_F23"}, {V3DK_F24, L"V3DK_F24"}, {V3DK_F25, L"V3DK_F25"}
, {V3DK_F26, L"V3DK_F26"}, {V3DK_F27, L"V3DK_F27"}, {V3DK_F28, L"V3DK_F28"}, {V3DK_F29, L"V3DK_F29"}, {V3DK_F30, L"V3DK_F30"}
, {V3DK_F31, L"V3DK_F31"}, {V3DK_F32, L"V3DK_F32"}, {V3DK_F33, L"V3DK_F33"}, {V3DK_F34, L"V3DK_F34"}, {V3DK_F35, L"V3DK_F35"}
, {V3DK_F36, L"V3DK_F36"}
, {V3DK_11, L"V3DK_11"}, {V3DK_12, L"V3DK_12"}, {V3DK_13, L"V3DK_13"}, {V3DK_14, L"V3DK_14"}, {V3DK_15, L"V3DK_15"}
, {V3DK_16, L"V3DK_16"}, {V3DK_17, L"V3DK_17"}, {V3DK_18, L"V3DK_18"}, {V3DK_19, L"V3DK_19"}, {V3DK_20, L"V3DK_20"}
, {V3DK_21, L"V3DK_21"}, {V3DK_22, L"V3DK_22"}, {V3DK_23, L"V3DK_23"}, {V3DK_24, L"V3DK_24"}, {V3DK_25, L"V3DK_25"}
, {V3DK_26, L"V3DK_26"}, {V3DK_27, L"V3DK_27"}, {V3DK_28, L"V3DK_28"}, {V3DK_29, L"V3DK_29"}, {V3DK_30, L"V3DK_30"}
, {V3DK_31, L"V3DK_31"}, {V3DK_32, L"V3DK_32"}, {V3DK_33, L"V3DK_33"}, {V3DK_34, L"V3DK_34"}, {V3DK_35, L"V3DK_35"}
, {V3DK_36, L"V3DK_36"}
, {V3DK_VIEW_1, L"V3DK_VIEW_1"}, {V3DK_VIEW_2, L"V3DK_VIEW_2"}, {V3DK_VIEW_3, L"V3DK_VIEW_3"}, {V3DK_VIEW_4, L"V3DK_VIEW_4"}, {V3DK_VIEW_5, L"V3DK_VIEW_5"}
, {V3DK_VIEW_6, L"V3DK_VIEW_6"}, {V3DK_VIEW_7, L"V3DK_VIEW_7"}, {V3DK_VIEW_8, L"V3DK_VIEW_8"}, {V3DK_VIEW_9, L"V3DK_VIEW_9"}, {V3DK_VIEW_10, L"V3DK_VIEW_10"}
, {V3DK_VIEW_11, L"V3DK_VIEW_11"}, {V3DK_VIEW_12, L"V3DK_VIEW_12"}, {V3DK_VIEW_13, L"V3DK_VIEW_13"}, {V3DK_VIEW_14, L"V3DK_VIEW_14"}, {V3DK_VIEW_15, L"V3DK_VIEW_15"}
, {V3DK_VIEW_16, L"V3DK_VIEW_16"}, {V3DK_VIEW_17, L"V3DK_VIEW_17"}, {V3DK_VIEW_18, L"V3DK_VIEW_18"}, {V3DK_VIEW_19, L"V3DK_VIEW_19"}, {V3DK_VIEW_20, L"V3DK_VIEW_20"}
, {V3DK_VIEW_21, L"V3DK_VIEW_21"}, {V3DK_VIEW_22, L"V3DK_VIEW_22"}, {V3DK_VIEW_23, L"V3DK_VIEW_23"}, {V3DK_VIEW_24, L"V3DK_VIEW_24"}, {V3DK_VIEW_25, L"V3DK_VIEW_25"}
, {V3DK_VIEW_26, L"V3DK_VIEW_26"}, {V3DK_VIEW_27, L"V3DK_VIEW_27"}, {V3DK_VIEW_28, L"V3DK_VIEW_28"}, {V3DK_VIEW_29, L"V3DK_VIEW_29"}, {V3DK_VIEW_30, L"V3DK_VIEW_30"}
, {V3DK_VIEW_31, L"V3DK_VIEW_31"}, {V3DK_VIEW_32, L"V3DK_VIEW_32"}, {V3DK_VIEW_33, L"V3DK_VIEW_33"}, {V3DK_VIEW_34, L"V3DK_VIEW_34"}, {V3DK_VIEW_35, L"V3DK_VIEW_35"}
, {V3DK_VIEW_36, L"V3DK_VIEW_36"}
, {V3DK_SAVE_VIEW_1, L"V3DK_SAVE_VIEW_1"}, {V3DK_SAVE_VIEW_2, L"V3DK_SAVE_VIEW_2"}, {V3DK_SAVE_VIEW_3, L"V3DK_SAVE_VIEW_3"}, {V3DK_SAVE_VIEW_4, L"V3DK_SAVE_VIEW_4"}, {V3DK_SAVE_VIEW_5, L"V3DK_SAVE_VIEW_5"}
, {V3DK_SAVE_VIEW_6, L"V3DK_SAVE_VIEW_6"}, {V3DK_SAVE_VIEW_7, L"V3DK_SAVE_VIEW_7"}, {V3DK_SAVE_VIEW_8, L"V3DK_SAVE_VIEW_8"}, {V3DK_SAVE_VIEW_9, L"V3DK_SAVE_VIEW_9"}, {V3DK_SAVE_VIEW_10, L"V3DK_SAVE_VIEW_10"}
, {V3DK_SAVE_VIEW_11, L"V3DK_SAVE_VIEW_11"}, {V3DK_SAVE_VIEW_12, L"V3DK_SAVE_VIEW_12"}, {V3DK_SAVE_VIEW_13, L"V3DK_SAVE_VIEW_13"}, {V3DK_SAVE_VIEW_14, L"V3DK_SAVE_VIEW_14"}, {V3DK_SAVE_VIEW_15, L"V3DK_SAVE_VIEW_15"}
, {V3DK_SAVE_VIEW_16, L"V3DK_SAVE_VIEW_16"}, {V3DK_SAVE_VIEW_17, L"V3DK_SAVE_VIEW_17"}, {V3DK_SAVE_VIEW_18, L"V3DK_SAVE_VIEW_18"}, {V3DK_SAVE_VIEW_19, L"V3DK_SAVE_VIEW_19"}, {V3DK_SAVE_VIEW_20, L"V3DK_SAVE_VIEW_20"}
, {V3DK_SAVE_VIEW_21, L"V3DK_SAVE_VIEW_21"}, {V3DK_SAVE_VIEW_22, L"V3DK_SAVE_VIEW_22"}, {V3DK_SAVE_VIEW_23, L"V3DK_SAVE_VIEW_23"}, {V3DK_SAVE_VIEW_24, L"V3DK_SAVE_VIEW_24"}, {V3DK_SAVE_VIEW_25, L"V3DK_SAVE_VIEW_25"}
, {V3DK_SAVE_VIEW_26, L"V3DK_SAVE_VIEW_26"}, {V3DK_SAVE_VIEW_27, L"V3DK_SAVE_VIEW_27"}, {V3DK_SAVE_VIEW_28, L"V3DK_SAVE_VIEW_28"}, {V3DK_SAVE_VIEW_29, L"V3DK_SAVE_VIEW_29"}, {V3DK_SAVE_VIEW_30, L"V3DK_SAVE_VIEW_30"}
, {V3DK_SAVE_VIEW_31, L"V3DK_SAVE_VIEW_31"}, {V3DK_SAVE_VIEW_32, L"V3DK_SAVE_VIEW_32"}, {V3DK_SAVE_VIEW_33, L"V3DK_SAVE_VIEW_33"}, {V3DK_SAVE_VIEW_34, L"V3DK_SAVE_VIEW_34"}, {V3DK_SAVE_VIEW_35, L"V3DK_SAVE_VIEW_35"}
, {V3DK_SAVE_VIEW_36, L"V3DK_SAVE_VIEW_36"}
, {V3DK_TAB, L"V3DK_TAB"}, {V3DK_SPACE, L"V3DK_SPACE"}
, {V3DK_MENU_1, L"V3DK_MENU_1"}, {V3DK_MENU_2, L"V3DK_MENU_2"}, {V3DK_MENU_3, L"V3DK_MENU_3"}, {V3DK_MENU_4, L"V3DK_MENU_4"}
, {V3DK_MENU_5, L"V3DK_MENU_5"}, {V3DK_MENU_6, L"V3DK_MENU_6"}, {V3DK_MENU_7, L"V3DK_MENU_7"}, {V3DK_MENU_8, L"V3DK_MENU_8"}
, {V3DK_MENU_9, L"V3DK_MENU_9"}, {V3DK_MENU_10, L"V3DK_MENU_10"}, {V3DK_MENU_11, L"V3DK_MENU_11"}, {V3DK_MENU_12, L"V3DK_MENU_12"}
, {V3DK_MENU_13, L"V3DK_MENU_13"}, {V3DK_MENU_14, L"V3DK_MENU_14"}, {V3DK_MENU_15, L"V3DK_MENU_15"}, {V3DK_MENU_16, L"V3DK_MENU_16"}
, {V3DK_USER, L"V3DK_USER"}
};
/*-----------------------------------------------------------------------------
*
* const wchar_t* VirtualKeyToId(e3dmouse_virtual_key virtualkey)
*
* Args:
* virtualkey the 3dmouse virtual key
*
* Return Value:
* Returns a string representation of the standard 3dmouse virtual key, or
* an empty string
*
* Description:
* Converts a 3dmouse virtual key number to its string identifier
*
*---------------------------------------------------------------------------*/
__inline const wchar_t* VirtualKeyToId(e3dmouse_virtual_key virtualkey)
{
if (0 < virtualkey && virtualkey <= numberof(VirtualKeyId)
&& virtualkey == VirtualKeyId[virtualkey-1].vkey)
return VirtualKeyId[virtualkey-1].szId;
for (size_t i=0; i<numberof(VirtualKeyId); ++i)
{
if (VirtualKeyId[i].vkey == virtualkey)
return VirtualKeyId[i].szId;
}
return L"";
}
/*-----------------------------------------------------------------------------
*
* const e3dmouse_virtual_key IdToVirtualKey ( TCHAR *id )
*
* Args:
* id - the 3dmouse virtual key ID (a string)
*
* Return Value:
* The virtual_key number for the id,
* or V3DK_INVALID if it is not a valid tag_VirtualKeyId
*
* Description:
* Converts a 3dmouse virtual key id (a string) to the V3DK number
*
*---------------------------------------------------------------------------*/
__inline e3dmouse_virtual_key IdToVirtualKey(const wchar_t* id)
{
for (size_t i=0; i<sizeof(VirtualKeyId)/sizeof(VirtualKeyId[0]); ++i)
{
if (_tcsicmp (VirtualKeyId[i].szId, id) == 0)
return VirtualKeyId[i].vkey;
}
return V3DK_INVALID;
}
/*-----------------------------------------------------------------------------
*
* const wchar_t* GetKeyLabel(e3dmouse_virtual_key virtualkey)
*
* Args:
* virtualkey the 3dmouse virtual key
*
* Return Value:
* Returns a string of thye label used on the standard 3dmouse virtual key, or
* an empty string
*
* Description:
* Converts a 3dmouse virtual key number to its label
*
*---------------------------------------------------------------------------*/
__inline const wchar_t* GetKeyLabel(e3dmouse_virtual_key virtualkey)
{
for (size_t i=0; i<numberof(VirtualKeyLabel); ++i)
{
if (VirtualKeyLabel[i].vkey == virtualkey)
return VirtualKeyLabel[i].szLabel;
}
return L"";
}
} // namespace s3dm
namespace tdx {
enum e3dconnexion_pid {
eSpacePilot = 0xc625
, eSpaceNavigator = 0xc626
, eSpaceExplorer = 0xc627
, eSpaceNavigatorForNotebooks = 0xc628
, eSpacePilotPRO = 0xc629
, eSpaceMousePRO = 0xc62b
, eSpaceMouseTouch = 0xc62c
, eSpaceMouse = 0xc62d
, eSpaceMouseWireless = 0xc62e
, eSpaceMouseEnterprise = 0xc633
, eSpaceMouseCompact = 0xc635
};
struct tag_VirtualKeys
{
e3dconnexion_pid pid;
size_t nLength;
s3dm::e3dmouse_virtual_key *vkeys;
size_t nKeys;
};
static const s3dm::e3dmouse_virtual_key SpaceExplorerKeys [] =
{
s3dm::V3DK_INVALID // there is no button 0
, s3dm::V3DK_1, s3dm::V3DK_2
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_FIT, s3dm::V3DK_MENU
, s3dm::V3DK_PLUS, s3dm::V3DK_MINUS
, s3dm::V3DK_ROTATE
};
static const s3dm::e3dmouse_virtual_key SpacePilotKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5, s3dm::V3DK_6
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_FIT, s3dm::V3DK_MENU
, s3dm::V3DK_PLUS, s3dm::V3DK_MINUS
, s3dm::V3DK_DOMINANT, s3dm::V3DK_ROTATE
, static_cast<s3dm::e3dmouse_virtual_key>(s3dm::V3DK_USER+0x01)
};
static const s3dm::e3dmouse_virtual_key SpaceMouseKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
};
static const s3dm::e3dmouse_virtual_key SpacePilotProKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_BOTTOM, s3dm::V3DK_BACK
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_ROLL_CCW
, s3dm::V3DK_ISO1, s3dm::V3DK_ISO2
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5
, s3dm::V3DK_6, s3dm::V3DK_7, s3dm::V3DK_8, s3dm::V3DK_9, s3dm::V3DK_10
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_ROTATE, s3dm::V3DK_PANZOOM, s3dm::V3DK_DOMINANT
, s3dm::V3DK_PLUS, s3dm::V3DK_MINUS
};
static const s3dm::e3dmouse_virtual_key SpaceMouseProKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_INVALID, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_INVALID
, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_INVALID
, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_ROTATE
};
static const s3dm::e3dmouse_virtual_key SpaceMouseTouchKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_BOTTOM, s3dm::V3DK_BACK
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_ROLL_CCW
, s3dm::V3DK_ISO1, s3dm::V3DK_ISO2
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5
, s3dm::V3DK_6, s3dm::V3DK_7, s3dm::V3DK_8, s3dm::V3DK_9, s3dm::V3DK_10
};
static const s3dm::e3dmouse_virtual_key SpaceMouseEnterpriseKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_BOTTOM, s3dm::V3DK_BACK
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_ROLL_CCW
, s3dm::V3DK_ISO1, s3dm::V3DK_ISO2
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5
, s3dm::V3DK_6, s3dm::V3DK_7, s3dm::V3DK_8, s3dm::V3DK_9, s3dm::V3DK_10
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_ROTATE
, /* 28 */ s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, /* 30 */ s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, /* 35 */ s3dm::V3DK_INVALID
, s3dm::V3DK_ENTER
, s3dm::V3DK_DELETE
, s3dm::V3DK_INVALID
, s3dm::V3DK_INVALID
, /* 40 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 45 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 50 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 55 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 60 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 65 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 70 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 75 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, s3dm::V3DK_11, s3dm::V3DK_12
, s3dm::V3DK_INVALID
, /* 80 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 85 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 90 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 95 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 100 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_VIEW_1,s3dm::V3DK_VIEW_2,s3dm::V3DK_VIEW_3
, /* 106 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 110 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 115 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 120 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 125 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 130 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 135 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, s3dm::V3DK_SAVE_VIEW_1,s3dm::V3DK_SAVE_VIEW_2,s3dm::V3DK_SAVE_VIEW_3
, /* 142 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 145 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 150 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 155 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 160 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 165 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 170 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, s3dm::V3DK_TAB,s3dm::V3DK_SPACE
};
static const struct tag_VirtualKeys _3dmouseHID2VirtualKeys[]=
{
eSpacePilot
, numberof(SpacePilotKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpacePilotKeys)
, numberof(SpacePilotKeys)-1
, eSpaceExplorer
, numberof(SpaceExplorerKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceExplorerKeys)
, numberof(SpaceExplorerKeys)-1
, eSpaceNavigator
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys)-1
, eSpaceNavigatorForNotebooks
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys) - 1
, eSpaceMouseWireless
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys) - 1
, eSpaceMouseCompact
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys) - 1
, eSpacePilotPRO
, numberof(SpacePilotProKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpacePilotProKeys)
, numberof(SpacePilotProKeys)-1
, eSpaceMousePRO
, numberof(SpaceMouseProKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseProKeys)
, 15 // HACK: ? why is this hard-coded to less than numberof(SpaceMouseProKeys)?
, eSpaceMouse
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys)-1
, eSpaceMouseTouch
, numberof(SpaceMouseTouchKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseTouchKeys)
, numberof(SpaceMouseTouchKeys)-1
, eSpaceMouseEnterprise
, numberof(SpaceMouseEnterpriseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseEnterpriseKeys)
, numberof(SpaceMouseEnterpriseKeys)-1
};
/*-----------------------------------------------------------------------------
*
* unsigned short HidToVirtualKey(unsigned short pid, unsigned short hidKeyCode)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* hidKeyCode - Hid keycode as retrieved from a Raw Input packet
*
* Return Value:
* Returns the standard 3d mouse virtual key (button identifier) or zero if an error occurs.
*
* Description:
* Converts a hid device keycode (button identifier) of a pre-2009 3Dconnexion USB device
* to the standard 3d mouse virtual key definition.
*
*---------------------------------------------------------------------------*/
__inline unsigned short HidToVirtualKey(unsigned long pid, unsigned short hidKeyCode)
{
unsigned short virtualkey=hidKeyCode;
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
if (hidKeyCode < _3dmouseHID2VirtualKeys[i].nLength)
virtualkey = _3dmouseHID2VirtualKeys[i].vkeys[hidKeyCode];
// Change 10/24/2012: if the key doesn't need translating then pass it through
// else
// virtualkey = s3dm::V3DK_INVALID;
break;
}
}
// Remaining devices are unchanged
#if _TRACE_VIRTUAL_KEYS
TRACE(L"Converted %d to %s(=%d) for pid 0x%x\n", hidKeyCode, VirtualKeyToId(virtualkey), virtualkey, pid);
#endif
return virtualkey;
}
/*-----------------------------------------------------------------------------
*
* unsigned short VirtualKeyToHid(unsigned short pid, unsigned short virtualkey)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* virtualkey - standard 3d mouse virtual key
*
* Return Value:
* Returns the Hid keycode as retrieved from a Raw Input packet
*
* Description:
* Converts a standard 3d mouse virtual key definition
* to the hid device keycode (button identifier).
*
*---------------------------------------------------------------------------*/
__inline unsigned short VirtualKeyToHid(unsigned long pid, unsigned short virtualkey)
{
unsigned short hidKeyCode = virtualkey;
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
for (unsigned short hidCode=0; hidCode<_3dmouseHID2VirtualKeys[i].nLength; ++hidCode)
{
if (virtualkey==_3dmouseHID2VirtualKeys[i].vkeys[hidCode])
return hidCode;
}
// Change 10/24/2012: if the key doesn't need translating then pass it through
return hidKeyCode;
}
}
// Remaining devices are unchanged
#if _TRACE_VIRTUAL_KEYS
TRACE(L"Converted %d to %s(=%d) for pid 0x%x\n", virtualkey, VirtualKeyToId(virtualkey), hidKeyCode, pid);
#endif
return hidKeyCode;
}
/*-----------------------------------------------------------------------------
*
* unsigned int NumberOfButtons(unsigned short pid)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
*
* Return Value:
* Returns the number of buttons of the device.
*
* Description:
* Returns the number of buttons of the device.
*
*---------------------------------------------------------------------------*/
__inline size_t NumberOfButtons(unsigned long pid)
{
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
return _3dmouseHID2VirtualKeys[i].nKeys;
}
return 0;
}
/*-----------------------------------------------------------------------------
*
* int HidToIndex(unsigned short pid, unsigned short hidKeyCode)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* hidKeyCode - Hid keycode as retrieved from a Raw Input packet
*
* Return Value:
* Returns the index of the hid button or -1 if an error occurs.
*
* Description:
* Converts a hid device keycode (button identifier) to a zero based
* sequential index.
*
*---------------------------------------------------------------------------*/
__inline int HidToIndex(unsigned long pid, unsigned short hidKeyCode)
{
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
int index=-1;
if (hidKeyCode < _3dmouseHID2VirtualKeys[i].nLength)
{
unsigned short virtualkey = _3dmouseHID2VirtualKeys[i].vkeys[hidKeyCode];
if (virtualkey != s3dm::V3DK_INVALID)
{
for (int key=1; key<=hidKeyCode; ++key)
{
if (_3dmouseHID2VirtualKeys[i].vkeys[key] != s3dm::V3DK_INVALID)
++index;
}
}
}
return index;
}
}
return hidKeyCode-1;
}
/*-----------------------------------------------------------------------------
*
* unsigned short IndexToHid(unsigned short pid, int index)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* index - index of button
*
* Return Value:
* Returns the Hid keycode of the nth button or 0 if an error occurs.
*
* Description:
* Returns the hid device keycode of the nth button
*
*---------------------------------------------------------------------------*/
__inline unsigned short IndexToHid(unsigned long pid, int index)
{
if (index < 0)
return 0;
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
if (index < static_cast<int>(_3dmouseHID2VirtualKeys[i].nLength))
{
for (size_t key=1; key<_3dmouseHID2VirtualKeys[i].nLength; ++key)
{
if (_3dmouseHID2VirtualKeys[i].vkeys[key] != s3dm::V3DK_INVALID)
{
--index;
if (index == -1)
return static_cast<unsigned short>(key);
}
}
}
return 0;
}
}
return static_cast<unsigned short>(index+1);
}
}; //namespace tdx
#endif // virtualkeys_HPP_INCLUDED_
#include "Navigation3D.h"
#include <exception>
/*
* @ 初始化3D鼠标
* @ hWnd: 窗口句柄
* @ Return: 是否初始化完成
*/
BOOL init_3D_Mouse(HWND hWnd)
{
try
{
if (SiInitialize() == SPW_DLL_LOAD_ERROR) //init the 3DxWare input library
{
return FALSE;
}
SiOpenData oData;
SiOpenWinInit(&oData, hWnd);
device = SiOpen("Navigation3D00", SI_ANY_DEVICE, SI_NO_MASK, SI_EVENT, &oData);
if (device == NULL)
{
SiTerminate();
return FALSE;
}
SiGrabDevice(device, 1);
WM_3DMOUSE = RegisterWindowMessage(L"SpaceWareMessage00");
return TRUE;
}
catch (const std::exception&)
{
return FALSE;
}
}
/*
* @ 销毁3D鼠标
*/
void dispose_3D_Mouse()
{
try
{
SiTerminate();
device = NULL;
}
catch (const std::exception&)
{
}
}
/*
* 处理3D鼠标消息
*/
ThreeDMouseData* on_message_3D_Mouse(WPARAM wParam, LPARAM lParam)
{
try
{
ThreeDMouseData* data = new ThreeDMouseData();
data->result = 0;
data->tx = 0;
data->ty = 0;
data->tz = 0;
data->rx = 0;
data->ry = 0;
data->rz = 0;
int num; /* number of button returned */
SiSpwEvent Event; /* 3DxWare Event */
SiGetEventData EData; /* 3DxWare Event Data */
/* init Window platform specific data for a call to SiGetEvent */
SiGetEventWinInit(&EData, WM_3DMOUSE, wParam, lParam);
/* check whether msg was a 3D mouse event and process it */
if (SiGetEvent(device, 0, &EData, &Event) == SI_IS_EVENT)
{
switch (Event.type)
{
case SI_MOTION_EVENT:
data->result = 1;
data->tx = Event.u.spwData.mData[SI_TX];
data->ty = Event.u.spwData.mData[SI_TY];
data->tz = Event.u.spwData.mData[SI_TZ];
data->rx = Event.u.spwData.mData[SI_RX];
data->ry = Event.u.spwData.mData[SI_RY];
data->rz = Event.u.spwData.mData[SI_RZ];
break;
case SI_ZERO_EVENT:
data->result = 1;
data->tx = 0;
data->ty = 0;
data->tz = 0;
data->rx = 0;
data->ry = 0;
data->rz = 0;
break;
case SI_BUTTON_EVENT:
break;
} /* end switch */
} /* end SiGetEvent */
return (data);
}
catch (const std::exception&)
{
return NULL;
}
}
/*
* 销毁3D鼠标数据
* @ data : 3D鼠标数据
*/
void dispose_3D_Mouse_data(ThreeDMouseData* data)
{
try
{
delete data;
}
catch (const std::exception&)
{
}
}
\ No newline at end of file
#pragma once
#include <Windows.h>
#include <si.h>
#include <siapp.h>
/*
* 3D鼠标设备
*/
SiHdl device = NULL;
/*
* 3D鼠标消息
*/
int WM_3DMOUSE = 0;
extern "C" {
/*
* 3D鼠标数据
*/
__declspec(dllimport) typedef struct
{
long result;
long tx;
long ty;
long tz;
long rx;
long ry;
long rz;
} ThreeDMouseData;
/*
* @ 初始化3D鼠标
* @ hWnd: 窗口句柄
* @ Return: 是否初始化完成
*/
__declspec(dllimport) BOOL init_3D_Mouse(HWND hWnd);
/*
* @ 销毁3D鼠标
*/
__declspec(dllimport) void dispose_3D_Mouse();
/*
* 处理3D鼠标消息
*/
__declspec(dllimport) ThreeDMouseData* on_message_3D_Mouse(WPARAM wParam, LPARAM lParam);
/*
* 销毁3D鼠标数据
* @ data : 3D鼠标数据
*/
__declspec(dllimport) void dispose_3D_Mouse_data(ThreeDMouseData* data);
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{d1aa6399-2000-42ba-a577-d50bc5fca393}</ProjectGuid>
<RootNamespace>VIZFrameworkCoreNavigation3D</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>NotSet</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>siapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>siapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Navigation3D.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Navigation3D.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Navigation3D.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Navigation3D.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Core
{
/// <summary>
/// 3D鼠标数据
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct Navigation3DData
{
/// <summary>
/// 返回值为1时成功获取到3D鼠标数据
/// </summary>
public int result;
/// <summary>
/// TX 值
/// </summary>
public int tx;
/// <summary>
/// TY 值
/// </summary>
public int ty;
/// <summary>
/// TZ 值
/// </summary>
public int tz;
/// <summary>
/// RX 值
/// </summary>
public int rx;
/// <summary>
/// RY 值
/// </summary>
public int ry;
/// <summary>
/// RZ 值
/// </summary>
public int rz;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using TDx.SpaceMouse.Navigation3D;
namespace VIZ.Framework.Core
{
/// <summary>
/// 3D鼠标摄像机
/// 3D鼠标辅助类
/// </summary>
public class Navigation3DCamera
public static class Navigation3DHelper
{
/// <summary>
/// 位置矩阵
/// 初始化3D鼠标
/// </summary>
public Matrix Matrix { get; internal set; } = new Matrix(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 5550, 1);
/// <param name="hWnd">窗口句柄</param>
/// <returns>是否初始化完成</returns>
[DllImport("VIZ.Framework.Core.Navigation3D.dll")]
public extern static bool init_3D_Mouse(IntPtr hWnd);
/// <summary>
/// 上方向
/// 销毁3D鼠标
/// </summary>
public Vector UpDirection { get; internal set; } = new Vector(0, 1, 0);
[DllImport("VIZ.Framework.Core.Navigation3D.dll")]
public static extern void dispose_3D_Mouse();
/// <summary>
/// 面向
/// 处理3D鼠标消息
/// </summary>
public Vector LookDirection { get; internal set; } = new Vector(0, 0, -1);
/// <param name="wParam"></param>
/// <param name="lParam"></param>
/// <returns>3D鼠标数据</returns>
[DllImport("VIZ.Framework.Core.Navigation3D.dll")]
public static extern IntPtr on_message_3D_Mouse(IntPtr wParam, IntPtr lParam);
/// <summary>
/// 位置
/// 销毁3D鼠标数据
/// </summary>
public Point Position { get; internal set; } = new Point(0, 0, 5550);
/// <param name="data">3D鼠标数据</param>
[DllImport("VIZ.Framework.Core.Navigation3D.dll")]
public static extern void dispose_3D_Mouse_data(IntPtr data);
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Core
{
/// <summary>
/// 3D鼠标数据信息
/// </summary>
public class Navigation3DDataInfo
{
public int tx;
public int ty;
public int tz;
public int rx;
public int ry;
public int rz;
}
}
......@@ -7,6 +7,10 @@ using System.Threading.Tasks;
using System.Windows.Media;
using TDx.SpaceMouse.Navigation3D;
using log4net;
using System.Windows;
using System.Windows.Interop;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
namespace VIZ.Framework.Core
{
......@@ -21,90 +25,78 @@ namespace VIZ.Framework.Core
private static readonly ILog log = LogManager.GetLogger(typeof(Navigation3DManager));
/// <summary>
/// 3D鼠标模型
/// 3D鼠标数据信息
/// </summary>
public static Navigation3DModel Navigation3DModel { get; private set; }
/// <summary>
/// 3D鼠标
/// </summary>
public static Navigation3D Navigation3D { get; private set; }
/// <summary>
/// 计时器
/// </summary>
public static Stopwatch Stopwatch { get; private set; } = new Stopwatch();
/// <summary>
/// 渲染时间
/// </summary>
public static long RenderTime { get; private set; }
public static volatile Navigation3DDataInfo Info = new Navigation3DDataInfo();
/// <summary>
/// 初始化
/// </summary>
/// <param name="profileName">3D鼠标配置名称</param>
/// <param name="maxX">X偏移量最大值</param>
/// <param name="smoothCoefficient">平滑系数</param>
public static void Init(string profileName, double maxX, double smoothCoefficient)
/// <param name="window">关联的额窗口</param>
public static void Init(Window window)
{
if (window == null)
return;
try
{
Navigation3DModel = new Navigation3DModel(smoothCoefficient);
Navigation3DModel.MaxX = maxX;
WindowInteropHelper windowInteropHelper = new WindowInteropHelper(window);
Navigation3D = new Navigation3D(Navigation3DModel);
Navigation3D.FrameTiming = Navigation3D.TimingSource.Application;
Navigation3D.Open3DMouse(profileName);
// 初始化3D鼠标
bool init_result = Navigation3DHelper.init_3D_Mouse(windowInteropHelper.Handle);
Stopwatch.Restart();
// 注册窗口消息
HwndSource source = HwndSource.FromHwnd(windowInteropHelper.Handle);
source.AddHook(Hook);
}
catch (Exception ex)
{
log.Error(ex);
}
}
/// <summary>
/// 更新渲染时间
/// 销毁
/// </summary>
/// <returns>时间差</returns>
public static long UpdateRenderTime()
public static void Dispose()
{
try
{
if (Stopwatch == null)
return 0;
RenderTime = Stopwatch.ElapsedMilliseconds;
if (Navigation3D == null)
return 0;
long diff = RenderTime - (long)Navigation3D.FrameTime;
if (Navigation3D.FrameTime >= RenderTime)
return 0;
Navigation3D.FrameTime = RenderTime;
return diff;
Navigation3DHelper.dispose_3D_Mouse();
}
catch (Exception ex)
{
log.Error(ex);
return 0;
}
}
/// <summary>
/// 销毁
/// 处理窗口消息
/// </summary>
public static void Dispose()
private static IntPtr Hook(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled)
{
try
{
// ------------------------------------
// 由于关闭系统时释放Navigation3D后会导致异常,所以该处不需要处理
// ------------------------------------
//Navigation3D?.Close();
//Navigation3DModel = null;
//Navigation3D = null;
// ------------------------------------
Stopwatch?.Stop();
Stopwatch = null;
IntPtr data_ptr = Navigation3DHelper.on_message_3D_Mouse(wparam, lparam);
Navigation3DData data = Marshal.PtrToStructure<Navigation3DData>(data_ptr);
Navigation3DHelper.dispose_3D_Mouse_data(data_ptr);
if (data.result == 1)
{
Info.tx = data.tx;
Info.ty = data.ty;
Info.tz = data.tz;
Info.rx = data.rx;
Info.ry = data.ry;
Info.rz = data.rz;
}
}
catch (Exception ex)
{
log.Error(ex);
}
return new IntPtr(1);
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TDx.SpaceMouse.Navigation3D;
namespace VIZ.Framework.Core
{
/// <summary>
/// 3D鼠标模型 INavigation
/// </summary>
public partial class Navigation3DModel : INavigation3D
{
public Matrix GetCameraMatrix()
{
#if DEBUG
Debug.WriteLine("GetCameraMatrix");
#endif
return this.Camera.Matrix;
}
public Point GetCameraTarget()
{
#if DEBUG
Debug.WriteLine("GetCameraTarget");
#endif
return this.Camera.Position;
}
public Matrix GetCoordinateSystem()
{
#if DEBUG
Debug.WriteLine("GetCoordinateSystem");
#endif
return Matrix.Identity;
}
public Matrix GetFrontView()
{
#if DEBUG
Debug.WriteLine("GetFrontView");
#endif
return Matrix.Identity;
}
public Point GetLookAt()
{
#if DEBUG
Debug.WriteLine("GetLookAt");
#endif
return new Point(0, 0, -1);
}
public Box GetModelExtents()
{
#if DEBUG
Debug.WriteLine("GetModelExtents");
#endif
return new Box(-1, -1, 0, 1, 1, 0);
}
public Point GetPivotPosition()
{
#if DEBUG
Debug.WriteLine("GetPivotPosition");
#endif
return new Point();
}
public Point GetPointerPosition()
{
#if DEBUG
Debug.WriteLine("GetPointerPosition");
#endif
return new Point();
}
public Box GetSelectionExtents()
{
#if DEBUG
Debug.WriteLine("GetSelectionExtents");
#endif
return new Box(-1, -1, 0, 1, 1, 0);
}
public Matrix GetSelectionTransform()
{
#if DEBUG
Debug.WriteLine("GetSelectionTransform");
#endif
return Matrix.Identity;
}
public Plane GetViewConstructionPlane()
{
#if DEBUG
Debug.WriteLine("GetViewConstructionPlane");
#endif
return new Plane();
}
public Box GetViewExtents()
{
#if DEBUG
Debug.WriteLine("GetViewExtents");
#endif
return new Box(-100, -100, 0, 100, 100, 0);
}
public double GetViewFOV()
{
#if DEBUG
Debug.WriteLine("GetViewFOV");
#endif
return 45;
}
public Frustum GetViewFrustum()
{
#if DEBUG
Debug.WriteLine("GetViewFrustum");
#endif
return new Frustum(-0.00041, 0.00041, -0.00034, 0.00034, 0.01, 1000);
}
public bool IsSelectionEmpty()
{
#if DEBUG
Debug.WriteLine("IsSelectionEmpty");
#endif
return true;
}
public bool IsUserPivot()
{
#if DEBUG
Debug.WriteLine("IsUserPivot");
#endif
return false;
}
public bool IsViewPerspective()
{
#if DEBUG
Debug.WriteLine("IsViewPerspective");
#endif
return true;
}
public bool IsViewRotatable()
{
#if DEBUG
Debug.WriteLine("IsViewRotatable");
#endif
return false;
}
public void SetCameraMatrix(Matrix matrix)
{
#if DEBUG
Debug.WriteLine("SetCameraMatrix");
#endif
matrix.M41 = MathHelper.Clip(-this.MaxX, this.MaxX, (int)matrix.M41);
this.Camera.Matrix = matrix;
this.Camera.Position = new Point(matrix.M41, matrix.M42, matrix.M43);
#if DEBUG
Debug.WriteLine($"({matrix.M41}, {matrix.M42})");
#endif
}
public void SetCameraTarget(Point target)
{
#if DEBUG
Debug.WriteLine("SetCameraTarget");
#endif
}
public void SetLookAperture(double aperture)
{
#if DEBUG
Debug.WriteLine("SetLookAperture");
#endif
}
public void SetLookDirection(Vector direction)
{
#if DEBUG
Debug.WriteLine("SetLookDirection");
#endif
}
public void SetLookFrom(Point eye)
{
#if DEBUG
Debug.WriteLine("SetLookFrom");
#endif
}
public void SetPivotPosition(Point position)
{
#if DEBUG
Debug.WriteLine("SetPivotPosition");
#endif
}
public void SetPivotVisible(bool visible)
{
#if DEBUG
Debug.WriteLine("SetPivotVisible");
#endif
}
public void SetPointerPosition(Point position)
{
#if DEBUG
Debug.WriteLine("SetPointerPosition");
#endif
}
public void SetSelectionOnly(bool onlySelection)
{
#if DEBUG
Debug.WriteLine("SetSelectionOnly");
#endif
}
public void SetSelectionTransform(Matrix matrix)
{
#if DEBUG
Debug.WriteLine("SetSelectionTransform");
#endif
}
public void SetViewExtents(Box extents)
{
#if DEBUG
Debug.WriteLine("SetViewExtents");
#endif
}
public void SetViewFOV(double fov)
{
#if DEBUG
Debug.WriteLine("SetViewFOV");
#endif
}
public void SetViewFrustum(Frustum frustum)
{
#if DEBUG
Debug.WriteLine("SetViewFrustum");
#endif
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TDx.SpaceMouse.Navigation3D;
namespace VIZ.Framework.Core
{
/// <summary>
/// 3D鼠标模型
/// </summary>
public partial class Navigation3DModel
{
/// <summary>
/// 3D鼠标模型
/// </summary>
public Navigation3DModel(double smoothCoefficient)
{
this.Smooth.Init(0, this.SmoothCoefficient);
}
/// <summary>
/// 摄像机
/// </summary>
public Navigation3DCamera Camera { get; private set; } = new Navigation3DCamera();
/// <summary>
/// 调匀摄像机
/// </summary>
public Navigation3DCamera SmoothCamera { get; private set; } = new Navigation3DCamera();
/// <summary>
/// 摄像机X轴最大值
/// </summary>
public double MaxX { get; set; } = 555;
/// <summary>
/// 是否使用平滑
/// </summary>
public bool IsUseSmooth { get; set; } = true;
/// <summary>
/// 是否准备完毕
/// </summary>
public bool IsReady { get; set; } = true;
/// <summary>
/// 渲染时间
/// </summary>
public TimeSpan RenderTime { get; set; } = TimeSpan.Zero;
/// <summary>
/// 平滑系数
/// </summary>
public double SmoothCoefficient { get; set; } = 0.015;
/// <summary>
/// 平滑处理器
/// </summary>
private Navigation3DSmooth Smooth = new Navigation3DSmooth();
/// <summary>
/// 更新调匀值
/// </summary>
/// <param name="t_e">时间差</param>
public void UpdateSmooth(double t_e)
{
double x = -this.Camera.Position.X;
if (this.IsUseSmooth)
{
x = this.Smooth.Call(-this.Camera.Position.X, t_e);
}
x = MathHelper.Clip(-this.MaxX, this.MaxX, x);
this.SmoothCamera.Position = new Point(x, 0, 0);
}
/// <summary>
/// 重置X值
/// </summary>
/// <param name="x">X坐标</param>
public void Reset(int x)
{
this.Camera.Position = new Point(-x, 0, 0);
this.Camera.Matrix = new Matrix(1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
-x, 0, 5550, 1);
this.Smooth.Init(x, 0, this.SmoothCoefficient);
}
}
}
......@@ -18,6 +18,20 @@ namespace VIZ.Framework.Core
/// </summary>
private static readonly ILog log = LogManager.GetLogger(typeof(Navigation3DSmooth));
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnabled { get; set; } = true;
/// <summary>
/// 平滑系数
/// </summary>
public double MinCutoff
{
get { return this.min_cutoff; }
set { this.min_cutoff = value; }
}
private double min_cutoff;
private double beta;
private double d_cutoff;
......@@ -34,7 +48,7 @@ namespace VIZ.Framework.Core
/// <param name="min_cutoff">终止值</param>
/// <param name="beta"></param>
/// <param name="d_cutoff"></param>
public void Init(double x0, double dx0 = 0, double min_cutoff = 0.015, double beta = 0, double d_cutoff = 1)
public void Init(double x0, double dx0 = 0, double min_cutoff = 0.07, double beta = 0, double d_cutoff = 1)
{
this.min_cutoff = min_cutoff;
this.beta = beta;
......@@ -54,6 +68,9 @@ namespace VIZ.Framework.Core
/// <returns>平滑后的值</returns>
public double Call(double x, double t_e)
{
if (!this.IsEnabled)
return x;
if (t_e == 0)
return this.x_prev;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Core
{
/// <summary>
/// 3D鼠标平滑 -- 1次
/// </summary>
public class Navigation3DSmoothInner
{
internal double min_cutoff;
internal double beta;
internal double d_cutoff;
internal double x_prev;
internal double dx_prev;
/// <summary>
/// 初始化
/// </summary>
/// <param name="x0">开始值</param>
/// <param name="dx0">之前的X值</param>
/// <param name="min_cutoff">终止值</param>
/// <param name="beta"></param>
/// <param name="d_cutoff"></param>
public void Init(double x0, double dx0 = 0, double min_cutoff = 1, double beta = 0, double d_cutoff = 1)
{
this.min_cutoff = min_cutoff;
this.beta = beta;
this.d_cutoff = d_cutoff;
this.x_prev = x0;
this.dx_prev = dx0;
}
/// <summary>
/// 根据实际值获取平滑值
/// </summary>
/// <param name="x">实际值</param>
/// <param name="t_e">时间差</param>
/// <returns>平滑后的值</returns>
public double Call(double x, double t_e)
{
double a_d = smoothing_factor(t_e, this.d_cutoff);
double dx = (x - this.x_prev) / t_e;
double dx_hat = exponential_smoothing(a_d, dx, this.x_prev);
double cutoff = this.min_cutoff + this.beta * Math.Abs(dx_hat);
double a = smoothing_factor(t_e, cutoff);
double x_hat = exponential_smoothing(a, x, this.x_prev);
this.x_prev = x_hat;
this.dx_prev = dx_hat;
return x_hat;
}
private double smoothing_factor(double t_e, double cutoff)
{
double r = 2 * Math.PI * cutoff * t_e;
return r / (r + 1);
}
private double exponential_smoothing(double a, double x, double x_prev)
{
return a * x + (1 - a) * x_prev;
}
}
}
\ No newline at end of file
......@@ -131,16 +131,15 @@
<Compile Include="Expand\Monitor\System\Info\SystemMonitorInfo.cs" />
<Compile Include="Expand\Monitor\System\SystemMonitorTask.cs" />
<Compile Include="Core\Net\NetHelper.cs" />
<Compile Include="Expand\ThreeDMouse\Core\Navigation3DData.cs" />
<Compile Include="Expand\ThreeDMouse\Core\Navigation3DHelper.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DDataInfo.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DMapping.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DSmoothInner.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DTcpManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Expand\SharpDx\RawRectangleFExpand.cs" />
<Compile Include="Expand\SharpDx\SharpDxColorHelper.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DCamera.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DManager.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DModel.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DModel.INavigation.cs" />
<Compile Include="Expand\ThreeDMouse\Navigation3DSmooth.cs" />
<Compile Include="Core\Winform\WinformHelper.cs" />
<Compile Include="Core\WPF\IService.cs" />
......
......@@ -186,11 +186,13 @@ namespace VIZ.Framework.Module
/// <summary>
/// 加载
/// </summary>
/// <param name="window">窗口</param>
/// <returns>启动上下文</returns>
public static AppSetupContext Load()
public static AppSetupContext Load(Window window)
{
Stopwatch stopwatch = Stopwatch.StartNew();
AppSetupContext context = new AppSetupContext();
context.Window = window;
foreach (IAppSetup setup in appLoads)
{
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace VIZ.Framework.Module
{
......@@ -12,6 +13,11 @@ namespace VIZ.Framework.Module
public class AppSetupContext
{
/// <summary>
/// 窗口
/// </summary>
public Window Window { get; set; }
/// <summary>
/// 执行器描述信息
/// </summary>
public string ProviderDetail { get; set; }
......
......@@ -28,21 +28,13 @@ namespace VIZ.Framework.Module
public override string Detail { get; } = "应用程序启动 -- 3D鼠标";
/// <summary>
/// 3D鼠标平滑系数
/// </summary>
private static readonly double APPLICATION_3D_MOUSE_SMOOTH_COEFFICIENT = ApplicationDomain.IniStorage.GetValue<ApplicationConfig, double>(p => p.APPLICATION_3D_MOUSE_SMOOTH_COEFFICIENT);
/// <summary>
/// 执行启动
/// </summary>
/// <param name="context">应用程序启动上下文</param>
/// <returns>是否成功执行</returns>
public override bool Setup(AppSetupContext context)
{
string profileName = ApplicationDomain.IniStorage.GetValue<Navigation3DConfig, string>(p => p.NAVIGATION3D_PROFILE_NAME);
double maxX = ApplicationDomain.IniStorage.GetValue<Navigation3DConfig, double>(p => p.NAVIGATION3D_MAX_VALUE);
Navigation3DManager.Init(profileName, maxX, APPLICATION_3D_MOUSE_SMOOTH_COEFFICIENT);
Navigation3DManager.Init(context.Window);
return true;
}
......
......@@ -101,7 +101,7 @@
<Compile Include="Setup\Provider\Setup\AppSetup_ApplicationSafe.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_Helper.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_CatchUnhandledException.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_Navigation3D.cs" />
<Compile Include="Setup\Provider\Load\AppSetup_Navigation3D.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_Loop.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_DelayInit.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_LogInit.cs" />
......
......@@ -52,110 +52,174 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.ImageContrast
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.MacTool", "VIZ.Framework.MacTool\VIZ.Framework.MacTool.csproj", "{6B864E7B-164B-4B1E-B7D6-1563D824F567}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VIZ.Framework.Core.Navigation3D", "VIZ.Framework.Core.Navigation3D\VIZ.Framework.Core.Navigation3D.vcxproj", "{D1AA6399-2000-42BA-A577-D50BC5FCA393}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Debug|Any CPU.ActiveCfg = Debug|x64
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Debug|Any CPU.Build.0 = Debug|x64
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Debug|x64.ActiveCfg = Debug|x64
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Debug|x64.Build.0 = Debug|x64
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Debug|x86.ActiveCfg = Debug|Any CPU
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Debug|x86.Build.0 = Debug|Any CPU
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Release|Any CPU.Build.0 = Release|Any CPU
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Release|x64.ActiveCfg = Release|x64
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Release|x64.Build.0 = Release|x64
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Release|x86.ActiveCfg = Release|Any CPU
{75B39591-4BC3-4B09-BD7D-EC9F67EFA96E}.Release|x86.Build.0 = Release|Any CPU
{92834C05-703E-4F05-9224-F36220939D8F}.Debug|Any CPU.ActiveCfg = Debug|x64
{92834C05-703E-4F05-9224-F36220939D8F}.Debug|Any CPU.Build.0 = Debug|x64
{92834C05-703E-4F05-9224-F36220939D8F}.Debug|x64.ActiveCfg = Debug|x64
{92834C05-703E-4F05-9224-F36220939D8F}.Debug|x64.Build.0 = Debug|x64
{92834C05-703E-4F05-9224-F36220939D8F}.Debug|x86.ActiveCfg = Debug|Any CPU
{92834C05-703E-4F05-9224-F36220939D8F}.Debug|x86.Build.0 = Debug|Any CPU
{92834C05-703E-4F05-9224-F36220939D8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92834C05-703E-4F05-9224-F36220939D8F}.Release|Any CPU.Build.0 = Release|Any CPU
{92834C05-703E-4F05-9224-F36220939D8F}.Release|x64.ActiveCfg = Release|x64
{92834C05-703E-4F05-9224-F36220939D8F}.Release|x64.Build.0 = Release|x64
{92834C05-703E-4F05-9224-F36220939D8F}.Release|x86.ActiveCfg = Release|Any CPU
{92834C05-703E-4F05-9224-F36220939D8F}.Release|x86.Build.0 = Release|Any CPU
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Debug|Any CPU.ActiveCfg = Debug|x64
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Debug|Any CPU.Build.0 = Debug|x64
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Debug|x64.ActiveCfg = Debug|x64
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Debug|x64.Build.0 = Debug|x64
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Debug|x86.ActiveCfg = Debug|Any CPU
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Debug|x86.Build.0 = Debug|Any CPU
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Release|Any CPU.Build.0 = Release|Any CPU
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Release|x64.ActiveCfg = Release|x64
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Release|x64.Build.0 = Release|x64
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Release|x86.ActiveCfg = Release|Any CPU
{06B80C09-343D-4BB2-AEB1-61CFBFBF5CAD}.Release|x86.Build.0 = Release|Any CPU
{28661E82-C86A-4611-A028-C34F6AC85C97}.Debug|Any CPU.ActiveCfg = Debug|x64
{28661E82-C86A-4611-A028-C34F6AC85C97}.Debug|Any CPU.Build.0 = Debug|x64
{28661E82-C86A-4611-A028-C34F6AC85C97}.Debug|x64.ActiveCfg = Debug|x64
{28661E82-C86A-4611-A028-C34F6AC85C97}.Debug|x64.Build.0 = Debug|x64
{28661E82-C86A-4611-A028-C34F6AC85C97}.Debug|x86.ActiveCfg = Debug|Any CPU
{28661E82-C86A-4611-A028-C34F6AC85C97}.Debug|x86.Build.0 = Debug|Any CPU
{28661E82-C86A-4611-A028-C34F6AC85C97}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28661E82-C86A-4611-A028-C34F6AC85C97}.Release|Any CPU.Build.0 = Release|Any CPU
{28661E82-C86A-4611-A028-C34F6AC85C97}.Release|x64.ActiveCfg = Release|x64
{28661E82-C86A-4611-A028-C34F6AC85C97}.Release|x64.Build.0 = Release|x64
{28661E82-C86A-4611-A028-C34F6AC85C97}.Release|x86.ActiveCfg = Release|Any CPU
{28661E82-C86A-4611-A028-C34F6AC85C97}.Release|x86.Build.0 = Release|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Debug|x64.ActiveCfg = Debug|x64
{B62C822E-701F-480F-BBB1-0E02217D622C}.Debug|x64.Build.0 = Debug|x64
{B62C822E-701F-480F-BBB1-0E02217D622C}.Debug|x86.ActiveCfg = Debug|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Debug|x86.Build.0 = Debug|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Release|Any CPU.Build.0 = Release|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Release|x64.ActiveCfg = Release|x64
{B62C822E-701F-480F-BBB1-0E02217D622C}.Release|x64.Build.0 = Release|x64
{B62C822E-701F-480F-BBB1-0E02217D622C}.Release|x86.ActiveCfg = Release|Any CPU
{B62C822E-701F-480F-BBB1-0E02217D622C}.Release|x86.Build.0 = Release|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Debug|x64.ActiveCfg = Debug|x64
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Debug|x64.Build.0 = Debug|x64
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Debug|x86.ActiveCfg = Debug|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Debug|x86.Build.0 = Debug|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Release|Any CPU.Build.0 = Release|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Release|x64.ActiveCfg = Release|x64
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Release|x64.Build.0 = Release|x64
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Release|x86.ActiveCfg = Release|Any CPU
{E07528DD-9DEE-47C2-B79D-235ECFA6B003}.Release|x86.Build.0 = Release|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Debug|x64.ActiveCfg = Debug|x64
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Debug|x64.Build.0 = Debug|x64
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Debug|x86.ActiveCfg = Debug|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Debug|x86.Build.0 = Debug|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Release|Any CPU.Build.0 = Release|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Release|x64.ActiveCfg = Release|x64
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Release|x64.Build.0 = Release|x64
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Release|x86.ActiveCfg = Release|Any CPU
{76EF480A-E486-41B7-B7A5-2A849FC8D5BF}.Release|x86.Build.0 = Release|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Debug|x64.ActiveCfg = Debug|x64
{F9862446-B144-42F1-87A4-FAF3707268A6}.Debug|x64.Build.0 = Debug|x64
{F9862446-B144-42F1-87A4-FAF3707268A6}.Debug|x86.ActiveCfg = Debug|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Debug|x86.Build.0 = Debug|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Release|Any CPU.Build.0 = Release|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Release|x64.ActiveCfg = Release|x64
{F9862446-B144-42F1-87A4-FAF3707268A6}.Release|x64.Build.0 = Release|x64
{F9862446-B144-42F1-87A4-FAF3707268A6}.Release|x86.ActiveCfg = Release|Any CPU
{F9862446-B144-42F1-87A4-FAF3707268A6}.Release|x86.Build.0 = Release|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Debug|x64.ActiveCfg = Debug|x64
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Debug|x64.Build.0 = Debug|x64
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Debug|x86.ActiveCfg = Debug|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Debug|x86.Build.0 = Debug|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|Any CPU.Build.0 = Release|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x64.ActiveCfg = Release|x64
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x64.Build.0 = Release|x64
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x86.ActiveCfg = Release|Any CPU
{47CF6FB0-E37D-4EF1-AFC7-03DB2BCA8892}.Release|x86.Build.0 = Release|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Debug|x64.ActiveCfg = Debug|x64
{6DDCBD19-6E92-4363-A509-9820562FC048}.Debug|x64.Build.0 = Debug|x64
{6DDCBD19-6E92-4363-A509-9820562FC048}.Debug|x86.ActiveCfg = Debug|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Debug|x86.Build.0 = Debug|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Release|Any CPU.Build.0 = Release|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Release|x64.ActiveCfg = Release|x64
{6DDCBD19-6E92-4363-A509-9820562FC048}.Release|x64.Build.0 = Release|x64
{6DDCBD19-6E92-4363-A509-9820562FC048}.Release|x86.ActiveCfg = Release|Any CPU
{6DDCBD19-6E92-4363-A509-9820562FC048}.Release|x86.Build.0 = Release|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Debug|x64.ActiveCfg = Debug|x64
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Debug|x64.Build.0 = Debug|x64
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Debug|x86.ActiveCfg = Debug|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Debug|x86.Build.0 = Debug|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Release|Any CPU.Build.0 = Release|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Release|x64.ActiveCfg = Release|x64
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Release|x64.Build.0 = Release|x64
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Release|x86.ActiveCfg = Release|Any CPU
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608}.Release|x86.Build.0 = Release|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Debug|x64.ActiveCfg = Debug|x64
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Debug|x64.Build.0 = Debug|x64
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Debug|x86.ActiveCfg = Debug|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Debug|x86.Build.0 = Debug|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|Any CPU.Build.0 = Release|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|x64.ActiveCfg = Release|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|x64.Build.0 = Release|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|x64.ActiveCfg = Release|x64
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|x64.Build.0 = Release|x64
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|x86.ActiveCfg = Release|Any CPU
{6B864E7B-164B-4B1E-B7D6-1563D824F567}.Release|x86.Build.0 = Release|Any CPU
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Debug|Any CPU.ActiveCfg = Debug|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Debug|Any CPU.Build.0 = Debug|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Debug|x64.ActiveCfg = Debug|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Debug|x64.Build.0 = Debug|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Debug|x86.ActiveCfg = Debug|Win32
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Debug|x86.Build.0 = Debug|Win32
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Release|Any CPU.ActiveCfg = Release|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Release|Any CPU.Build.0 = Release|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Release|x64.ActiveCfg = Release|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Release|x64.Build.0 = Release|x64
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Release|x86.ActiveCfg = Release|Win32
{D1AA6399-2000-42BA-A577-D50BC5FCA393}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -173,6 +237,7 @@ Global
{6DDCBD19-6E92-4363-A509-9820562FC048} = {4E1CA052-91A6-401D-9F07-4973231A33FB}
{70D6EBC7-0C32-4A52-BFD2-6D20219FC608} = {4E1CA052-91A6-401D-9F07-4973231A33FB}
{6B864E7B-164B-4B1E-B7D6-1563D824F567} = {4E1CA052-91A6-401D-9F07-4973231A33FB}
{D1AA6399-2000-42BA-A577-D50BC5FCA393} = {2F6173AD-2376-4F42-B852-10E3DBD394EE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C56D4BA-4B41-4AB8-836F-9997506EA9AC}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment