Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hyblocker committed Feb 11, 2022
0 parents commit 555014c
Show file tree
Hide file tree
Showing 35 changed files with 5,397 additions and 0 deletions.
488 changes: 488 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "openvr"]
path = openvr
url = https://github.com/ValveSoftware/openvr.git
31 changes: 31 additions & 0 deletions AugmentedHip.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31402.337
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AugmentedHip", "AugmentedHip\AugmentedHip.vcxproj", "{4CB78C73-BC6E-4E50-A626-79CD4C45706A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Debug|x64.ActiveCfg = Debug|x64
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Debug|x64.Build.0 = Debug|x64
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Debug|x86.ActiveCfg = Debug|Win32
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Debug|x86.Build.0 = Debug|Win32
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Release|x64.ActiveCfg = Release|x64
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Release|x64.Build.0 = Release|x64
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Release|x86.ActiveCfg = Release|Win32
{4CB78C73-BC6E-4E50-A626-79CD4C45706A}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BA14BC94-5482-4BA7-93E1-D939FCB04DA9}
EndGlobalSection
EndGlobal
29 changes: 29 additions & 0 deletions AugmentedHip/AbstractDevice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include <openvr_driver.h>
#include "driverlog.h"
#include "util.h"

class AbstractDevice : public vr::ITrackedDeviceServerDriver {
protected:
vr::TrackedDeviceIndex_t m_unObjectId;
vr::PropertyContainerHandle_t m_ulPropertyContainer;

std::string m_sSerialNumber;
std::string m_sModelNumber;

public:
virtual vr::EVRInitError Activate(vr::TrackedDeviceIndex_t unObjectId) = 0;
virtual void Deactivate() = 0;
virtual void EnterStandby() = 0;
virtual void* GetComponent(const char* pchComponentNameAndVersion) = 0;
virtual void PowerOff() = 0;
virtual void DebugRequest(const char* pchRequest, char* pchResponseBuffer, uint32_t unResponseBufferSize) = 0;
virtual vr::DriverPose_t GetPose() = 0;
virtual void RunFrame(vr::TrackedDevicePose_t* poses) = 0;
virtual void ProcessEvent(const vr::VREvent_t& vrEvent) = 0;

virtual const char* GetModelNumber() const = 0;
virtual const char* GetSerialNumber() const = 0;
virtual const char* GetId() const = 0;
};
218 changes: 218 additions & 0 deletions AugmentedHip/AugmentedHip.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
<?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>{4cb78c73-bc6e-4e50-a626-79cd4c45706a}</ProjectGuid>
<RootNamespace>AugmentedHip</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</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" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;AUGMENTEDHIP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(SolutionDir)openvr\headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>$(SolutionDir)openvr\lib\win32\openvr_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy /y "$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\$(ProjectName).dll" "$(SolutionDir)driver\bin\win32\driver_$(ProjectName).dll"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>xcopy /s /e /Y "$(SolutionDir)assets\" "$(SolutionDir)driver\"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;AUGMENTEDHIP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(SolutionDir)openvr\headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>$(SolutionDir)openvr\lib\win32\openvr_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy /y "$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\$(ProjectName).dll" "$(SolutionDir)driver\bin\win32\driver_$(ProjectName).dll"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>xcopy /s /e /Y "$(SolutionDir)assets\" "$(SolutionDir)driver\"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;AUGMENTEDHIP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(SolutionDir)openvr\headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>$(SolutionDir)openvr\lib\win64\openvr_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy /y "$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\$(ProjectName).dll" "$(SolutionDir)driver\bin\win64\driver_$(ProjectName).dll"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>xcopy /s /e /Y "$(SolutionDir)assets\" "$(SolutionDir)driver\"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;AUGMENTEDHIP_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(SolutionDir)openvr\headers;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>$(SolutionDir)openvr\lib\win64\openvr_api.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy /y "$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\$(ProjectName).dll" "$(SolutionDir)driver\bin\win64\driver_$(ProjectName).dll"</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>xcopy /s /e /Y "$(SolutionDir)assets\" "$(SolutionDir)driver\"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="AugmentedHipDevice.cpp" />
<ClCompile Include="basis.cpp" />
<ClCompile Include="DeviceProvider.cpp" />
<ClCompile Include="driverlog.cpp" />
<ClCompile Include="drivermain.cpp" />
<ClCompile Include="IK\FABRIKSolver.cpp" />
<ClCompile Include="IK\Transform.cpp" />
<ClCompile Include="quat.cpp" />
<ClCompile Include="vector3.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AbstractDevice.h" />
<ClInclude Include="AugmentedHipDevice.h" />
<ClInclude Include="AugmentedHipSettings.h" />
<ClInclude Include="basis.h" />
<ClInclude Include="DeviceProvider.h" />
<ClInclude Include="driverlog.h" />
<ClInclude Include="IK\FABRIKSolver.h" />
<ClInclude Include="IK\Transform.h" />
<ClInclude Include="quat.h" />
<ClInclude Include="quaternion.h" />
<ClInclude Include="shared.h" />
<ClInclude Include="util.h" />
<ClInclude Include="vector3.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
87 changes: 87 additions & 0 deletions AugmentedHip/AugmentedHip.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<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="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<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>
<ClCompile Include="drivermain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="DeviceProvider.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="driverlog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="AugmentedHipDevice.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="vector3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="quat.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="basis.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IK\FABRIKSolver.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IK\Transform.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="DeviceProvider.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="driverlog.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AbstractDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AugmentedHipDevice.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="AugmentedHipSettings.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="vector3.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="quaternion.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="quat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="basis.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="shared.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IK\FABRIKSolver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IK\Transform.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
Loading

0 comments on commit 555014c

Please sign in to comment.