Compare commits

..
9 Commits
4371 changed files with 200 additions and 100851 deletions
-64
View File
@@ -1,64 +0,0 @@
---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignOperands: false
AlignTrailingComments: false
AlwaysBreakTemplateDeclarations: Yes
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBraces: Custom
BreakConstructorInitializers: BeforeColon
ColumnLimit: 120
IncludeCategories:
- Regex: '^<.*'
Priority: 1
- Regex: '^".*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseBlocks: true
IndentWidth: 4
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Left
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
...
-59
View File
@@ -1,59 +0,0 @@
################################################################################
# Generic Settings
################################################################################
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = false
max_line_length = 120
tab_width = 4
trim_trailing_whitespace = true
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_visual_guides = none
ij_wrap_on_typing = false
################################################################################
# Markdown
################################################################################
[*.{.markdown,md,mdx}]
trim_trailing_whitespace = false
ij_markdown_force_one_space_after_blockquote_symbol = true
ij_markdown_force_one_space_after_header_symbol = true
ij_markdown_force_one_space_after_list_bullet = true
ij_markdown_force_one_space_between_words = true
ij_markdown_insert_quote_arrows_on_wrap = true
ij_markdown_keep_indents_on_empty_lines = false
ij_markdown_keep_line_breaks_inside_text_blocks = true
ij_markdown_max_lines_around_block_elements = 1
ij_markdown_max_lines_around_header = 1
ij_markdown_max_lines_between_paragraphs = 1
ij_markdown_min_lines_around_block_elements = 1
ij_markdown_min_lines_around_header = 1
ij_markdown_min_lines_between_paragraphs = 1
ij_markdown_wrap_text_if_long = true
ij_markdown_wrap_text_inside_blockquotes = true
################################################################################
# MSBuild
################################################################################
[*.{csproj,proj,projitems,shproj,fsproj,target,props}]
indent_style = space
indent_size = 2
################################################################################
# Unreal Engine Project Files
################################################################################
[*.uproject]
indent_style = tab
+3 -37
View File
@@ -1,40 +1,6 @@
# Keep CRLF out of the repository
* text=auto
# In case the git binary/text auto-detection algorithm fails, in order to avoid
# line-ending normalization, treat these files as binary no matter what
*.{uasset,umap,3ds,fbx,flac,gif,jif,jiff,jpe,jpeg,jpg,m4a,mp3,mp4,ogg,png,psd,ttf,wav,webp,xcf} binary
# LFS: UE4 file types
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
# LFS: raw content types
*.3ds filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.flac filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.jif filter=lfs diff=lfs merge=lfs -text
*.jiff filter=lfs diff=lfs merge=lfs -text
*.jpe filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.m4a filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text
# LFS: everything under Content/
Content/**/* filter=lfs diff=lfs merge=lfs -text
# LFS: everything under Resources/
Resources/**/* filter=lfs diff=lfs merge=lfs -text
# LFS: everything under Source/ThirdParty/
Source/ThirdParty/**/* filter=lfs diff=lfs merge=lfs -text
# LFS: Linux and Windows binaries
sgum-packager filter=lfs diff=lfs merge=lfs -text
sgum-packager.exe filter=lfs diff=lfs merge=lfs -text
+4 -1
View File
@@ -124,4 +124,7 @@ DerivedDataCache/*
.ignore
# Do not ignore anything inside the ThirdParty directory at all
!Source/ThirdParty/**/*
!ThirdParty/**/*
# Do not ignore the sgum-packager Windows binary
!sgum-packager.exe
-216
View File
@@ -1,216 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.4.2] - 2023-06-01
This is a hotfix release addressing a few critical issues.
### Fixed
- Fix build issues with certain compilers when the Unreal Engine version is older than 5.2.
- Reintroduced the Virtual Hand and the Wrist Tracker debug gizmos which have temporarily been disabled due to a bug in the settings system.
- Some minor changelog fixes.
## [v1.4.1] - 2023-05-29
This is a bugfix release with a focus on Android build issues.
### Fixed
- Fix an Android Gradle build issue that happens when the game's package name won't start with com.senseglove.*.
- Suppress a grade warning for non-arm64 architectures when the build target is Android.
### Removed
- Remove dead Gradle code from the Android module.
## [v1.4.0] - 2023-05-19
This release breaks ABI/API compatibility with the previous versions.
### Added
- Added support for the stable release of Unreal Engine 5.2 (the preview release has been supported since v1.2.0).
- Added Linux AArch64 platform support.
- Added a new Grab component that can turn any actor into a grabbable object.
- Added a new Touch component that enables haptic feedback such as Buzz and Force-Feedback commands.
- Added an optional feature in order to automatically stop all haptics on the EndPlay event, wherever the virtual hand component is used. By default, it's enabled.
### Fixed
- Fix Blueprint signatures for USGVirtualHandComponentKismetLibrary and make all the Blueprint exposed functions static.
### Changed
- SenseGlove libraries have been updated to v2.7.1-965f90c with support for Linux AArch64.
- The Virtual Hand and the Wrist Tracker debug gizmos (the intended use is only for SenseGlove developers for really low-level stuff; thus won't affect the users of the plugin at all) have been disabled and will be ignored due to an esoteric bug in the settings systems which has been scheduled to be fixed in the future releases.
### Removed
- Removed the redundant SenseGloveCoreTypes module which causes all kinds of packaging issues with certain versions of the engine.
### Deprecated
- This is the last release to support Unreal Engine 4.27 and please keep in mind that the current release is not obtainable through the Unreal Engine Marketplace. The latest published version on the Marketplace for 4.27 is v1.3.1. Per Epic's Marketplace policy regarding Code Plugins, we are only able to distribute or update the SenseGlove plugin for the last 3 stable versions of Unreal Engine. As a result, we won't be able to publish updates or bug fixes for the older versions of the Engine except on rare occasions and only through our official repository on Microsoft Azure DevOps.
## [v1.3.1] - 2023-04-28
### Fixed
- Fix RunUAT build issues caused by missing headers.
- Minor documentation fixes.
## [v1.3.0] - 2023-04-28
This release breaks ABI/API compatibility with the previous versions in addition to breaking coordinates systems conversions between Unreal Engine and the SenseGlove libraries.
### Added
- A new generic SenseGlove Debug module.
- A debug virtual hand.
### Fixed
- Fix the wrist tracker miscalculations for the Quest 2 controllers (other headsets might need fixing as well, in that case, future releases will address that).
- Minor code improvement and fixes.
- Minor documentation fixes.
### Changed
- Breaking API/ABI changes in the Settings and the main SenseGlove module due to some settings refactoring.
- Breaking changes in the SenseGlove/Unreal coordinates systems conversions due to underlying changes in the SenseGlove Core Libraries.
- SenseGlove libraries have been updated to v2.6.0-aac3d56.
## [v1.2.1] - 2023-03-30
### Fixed
- Fix RunUAT build issues with Android.
## [v1.2.0] - 2023-03-28
This release breaks ABI/API compatibility with the previous versions.
### Added
- Android / Oculus on-device glove calibration.
- Introduced the animated Virtual Hand Model (as a set of virtual hand and wrist tracker components and an actor) with in-editor animation availability.
- Introduced SGPawn, SGPlayerController, SGGameModeBase, etc classes.
- Added an internal SenseGloveCoreTypes module in order to share common SenseGloveCore types between various modules.
- Segregated Android binaries for NDK r21e (UE 4.27 and 5.0) and r25b (UE 5.1, 5.2).
- Fully functional and stable Linux development support.
- Fully functional and stable Unreal Engine 5.2 preview support has been added.
- Added a Plugin's settings manager and two new modules SenseGloveSettings and SenseGloveSettingsKismet.
### Changed
- SenseGlove libraries have been updated to the Linux-aware version: v2.5.0-8069342.
- API has changed to use degrees instead of radians.
- SGCoordinates utility class name has been changed to SGAngles and now the plugin API uses degrees in contrast of SenseGlove libraries by default.
- Migrate common nested array types into the SenseGloveTypes module from the SenseGloveCore module.
### Removed
- Removed a few thousand lines of archaic pre-public-release dead code.
- Dropped Android NDK r21b binaries used by the older engine versions.
- Purged the dead code for dropped engine versions by v1.1.1 (4.22, 4.23, 4.24, 4.25, and 4.26) that carried over to the current version.
- Removed redundant SGConnectImpl/SGPlatform.
- Removed redundant SGTypes/SGConnectTypes.
### Known Issues
- Wrist Tracker's offsets are a bit off (e.g. on Quest 2), scheduled to be fixed in the next patch release.
## [1.1.1] - 2023-02-07
### Added
- Initial support for the upcoming Unreal Engine 5.2.
- Add support for Android armeabi-v7a with neon, x86-64, and x86 builds in addition to arm64-v8a.
### Fixed
- Fix various Android build issues.
- Some minor fixes and improvements.
### Changed
- Bump SenseGlove libraries to v2.1.2-95ec6e7.
## [1.1.0] - 2023-02-03
### Added
- Whitelist Android as a target platform.
- Introduce Android support.
- Add third-party library SGConnect for Android v1.1.0.
### Fixed
- Fix Android build issues caused by the log module.
### Changed
- SGConnect and SGCore libraries have been updated to v2.1.1-0569c74.
### Removed
- Removed the enum utils class due to ANY_PACKAGE deprecation warnings in Unreal Engine 5.1.
- Support for older versions of the Engine (namely, 4.22, 4.23, 4.24, 4.25, and 4.26) has been dropped.
## [1.0.4] - 2022-12-02
This is a minor release focusing mostly on adherence to the Unreal Engine Marketplace Guidelines based on the feedback from Epic Games.
### Added
- Added support for MSVC 2017
### Changed
- Updated SenseGlove libraries (SGCore/SGConnect) to v2.0.4.
## [1.0.3] - 2022-11-29
This is a minor release focusing on adherence to the Unreal Engine Marketplace Guidelines based on the feedback from Epic Games.
### Changed
- Adjust Config/FilterPlugin.ini in order to conform to Epic's Market Place Guidelines.
## [1.0.2] - 2022-11-27
This is a minor release focusing on adherence to the Unreal Engine Marketplace Guidelines based on the feedback from Epic Games.
### Added
- Added the newly acquired Unreal Engine Market Place Offer ID to the .uplugin file.
- List the dotfiles inside the FilterPlugin.ini file as well.
- Add the copyright notice to the source files missing it.
- Add the SenseGlove SDK license to the third-party license file.
### Fixed
- Fix the readme typos and errors.
- Minor fixes in the changelog for previous releases.
## [1.0.1] - 2022-11-25
### Changed
- Exposed SenseGloveTypes as a public dependency in SenseGloveConnect and SenseGloveCore modules, so that the C++ users of the API don't need to explicitly add it as a dependency.
- Cleaned up the redundant headers/modules dependencies from SGCore headers.
### Fixed
- Fix RunUAT build issues prior to Epic Store submission.
## [1.0.0] - 2022-11-24
### Added
- Initial public release of the SenseGlove haptic API for Unreal Engine with support for Microsoft Windows and GNU/Linux.
-3
View File
@@ -1,3 +0,0 @@
[FilterPlugin]
/CHANGELOG.md
/Config/FilterPlugin.ini
-87
View File
@@ -1,87 +0,0 @@
# Third Party Licenses
Please note that while the SenseGlove plug-in for Unreal Engine is made available under the [MIT License](LICENSE.md), it utilizes a few third-party libraries with permissive free licenses as well, in order to power various components. For a list of these libraries and their own respective open-source licenses take a look at [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md), please.
### SenseGlove SDK
```
SENSEGLOVE SDK LICENSE
Purchase of the Product does not entitle you to ownership or a license to any
software generated by SenseGlove for use with the Product (the “Software”).
To the extent that SenseGlove, in its sole discretion, grants you access to any
such Software, the Software is licensed by us or by the relevant licensor/owner
subject to the relevant end-user license agreement or other license terms
included with the Product and/or on the SenseGlove Websites including the Github
page of SenseGlove (the “License Terms“).
Specifically, SenseGlove shall have sole discretion to determine and change the
availability, nature, features, content, versioning of any Software that it
makes available to you, for download through the the Github page of SenseGlove
or otherwise (including the SenseGlove software developer kit (“SDK”)).
Purchase of a Product does not entitle you to access to any specific features,
content or version of the SDK, including and especially versions of the SDK that
have not yet been made available to the public. SenseGlove will have no
obligation to provide any updates or upgrades to any Software it makes available
to you, but in the event that it does, such updates, upgrades and any
documentation will be subject to the License Terms available at
https://www.senseglove.com/solutions/.
Except to the extent expressly provided by us in writing or under the License
Terms, the Software is provided “AS IS” without any warranties, terms or
conditions as to quality, fitness for purpose, non-infringement, performance or
correspondence with description and we do not offer any warranties or guarantees
in relation to the Software installation, configuration or error/defect
correction.
```
## Boost C++ Libraries License
```
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
```
## Serial Communication Library License
```
Copyright (c) 2012 William Woodall, John Harrison
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
-29
View File
@@ -1,29 +0,0 @@
# SenseGlove Unreal Engine Plug-in License
The SenseGlove plug-in for Unreal Engine is licensed under the terms of the MIT License. Below is the MIT License:
```
MIT License
Copyright (c) 2020 - 2023 SenseGlove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
Please note that while the SenseGlove plug-in for Unreal Engine is made available under the [MIT License](LICENSE.md), it utilizes a few third-party libraries with permissive free licenses as well, in order to power various components. For a list of these libraries and their own respective open-source licenses take a look at [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md), please.
+2 -246
View File
@@ -1,247 +1,3 @@
# The SenseGlove Unreal Engine Plugin
# SenseGlove Unreal Engine Marketplace Packager
## How to Download
This repository relies on Git LFS for storing binary blobs (e.g. third-party libraries). Sadly, there is a known issue with Microsoft Azure public LFS repositories that requires credential for LFS checkouts on https (LFS ssh checkouts are not supported at all). Unless, you are part of SenseGlove organization on Microsoft Azure there is no easy way to fully clone this repository using Git. Thus, the best way to download this repository is to use the 'kebab' (three vertical dots) menu next to the clone button, in order to download the whole repository including LFS objects as a unified zip file.
## Platform Support Matrix
| | **Windows (MSVC 2017)** | **Windows (MSVC 2019)** | **Windows (MSVC 2022)** | **Linux x86-64 (Native Toolchain)** | **Linux AArch64 (Native Toolchain)** | **Android (NDK)** | **UE Marketplace Version** | **Azure DevOps Version** |
|----------|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------------------:|:------------------------------------:|:-----------------:|:--------------------------:|:------------------------:|
| **4.22** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.23** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.24** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.25** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.26** | ⚠️ v1.0.x | ⚠️ v1.0.x | ❌ | ⚠️ v1.0.x | ❌ | ❌ | ❌ | ⚠️ v1.0.4 |
| **4.27** | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r21e) | ⚠️ v1.3.1 | ✅ v1.4.2 |
| **5.0** | ❌ | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r21e) | ✅ v1.4.2 | ✅ v1.4.2 |
| **5.1** | ❌ | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r25b) | ✅ v1.4.2 | ✅ v1.4.2 |
| **5.2** | ❌ | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x | ✅ v1.4.x (r25b) | ✅ v1.4.2 | ✅ v1.4.2 |
* <code>✅</code> Supported
* <code>⚠️</code> Not supported by the latest release and might be lacking features
* <code>❌</code> Not supported at all
* <code>❓</code> Unknown or untested
Remarks:
* Per Epic's Marketplace policy regarding Code Plugins, we are only able to distribute or update the SenseGlove plugin for the last 3 stable versions of Unreal Engine. As a result, we won't be able to publish updates or bug fixes for the older versions of the Engine except on rare occasions and only through our official repository on Microsoft Azure DevOps.
* Microsoft Visual Studio 2022 is not supported by Unreal Engine 4.22 through 4.26.
* All third-party libraries on Windows built against Windows SDK 10.0.
* Oculus support is only provided through the recommended Android NDK versions by Epic Games.
* The Unreal Engine 4.27+ support is provided for Android/Oculus development.
* [wjwwood/serial](https://github.com/wjwwood/serial) requires Android NDK API Level 28+ in order to be built successfully, thus some older NDKs such as r14b.
* All third-party libraries target Android NDK API Level 29, thus any project relying on the plug-in should be build with the same NDK API Level.
## Changelog
We maintain [a detailed changelog for this project](CHANGELOG.md) as well. Please consult the changelog before upgrading to any newer release.
## Documentation
[The Blueprints documentation is hosted on SenseGlove Docs](https://senseglove.gitlab.io/unreal-blueprint-docs/).
For the C++ documentation, since this plugin builds on top of [SGConnect](https://senseglove.gitlab.io/SenseGloveDocs/native/core-api-intro.html#sgconnect) and [SGCoreCpp](https://senseglove.gitlab.io/SenseGloveDocs/native/core-api-intro.html#sgcorecpp) third-party C++ libraries, please refer to [the upstream documentation](https://senseglove.gitlab.io/SenseGloveDocs/native/cpp-reference.html).
Also, you could refer to the header files in every module for extensive documentation, or the equivalent Blueprints documentation.
The following modules are intended to be used by the C++ users of this plugin:
* SenseGloveConnect module which only uses a very small subset of the Core SGConnect libary.
* SenseGloveCore module which is mostly a one-on-one wrapper call to most of the SGCoreCpp library with slight differences.
Please note that modules postfixed with **Impl** are intended for interal use and are discouraged to be used by the users of the API. The modules postfixed with **Kismet** are exposing the functionality of the equivalent modules to Blueprints. For other modules descriptions, please see [the Directory Structure section](#directory-structure).
## Directory Structure
```
/
├── Config
├── Resources
└── Source (various plug-in modules)
├── SenseGlove (the UE-specific high-level API)
├── SenseGloveAndroid (the Android-specific module)
├── SenseGloveBuildHacks (uses Exceptions and RTTI, internally used for compiler-specific build hacks)
├── SenseGloveConnect (exposes part of the SGConnect low-level API to C++)
├── SenseGloveConnectImpl (uses Exceptions and RTTI, intended for internal use only)
├── SenseGloveConnectKismet (SGConnect functionality exposed to Blueprints)
├── SenseGloveCore (exposes part of the SGCoreCpp low-level API to C++)
├── SenseGloveCoreImpl (uses Exceptions and RTTI, intended for internal use only)
├── SenseGloveCoreKismet (SGCoreCpp functionality exposed to Blueprints)
├── SenseGloveDebug (a utility debug module)
├── SenseGloveEditor (the Editor module)
├── SenseGloveInterop (internally used for interoperability between RTTI disabled/enabled modules)
├── SenseGloveKismet (exposes Blueprints-specific functionality from the SenseGlove module)
├── SenseGloveLog (the internal log module)
├── SenseGloveSettings (the plugin's settings manager)
├── SenseGloveSettingsKismet (exposes Blueprints-specific functionality from the SenseGloveSettings module)
├── SenseGloveTypes (exposes various enums from the backend libraries and also types from the SenseGlove module)
├── SenseGloveUtils (the internal utility module)
└── ThirdParty (3rd-party dependencies)
├── android (.jar file Java libraries for Android)
├── include (header files)
│ │
│ ├── boost
│ │
│ ├── SenseGlove
│ │ │
│ │ ├── Connect (SGConnect headers)
│ │ │
│ │ └── Core (SGCoreCpp headers)
│ │
│ └── serial
└── lib (platform-specific pre-built binary dependencies)
├── android
│ │
│ ├── r21e (Android NDK r21e dependencies for UE 4.27 and 5.0)
│ │ │
│ │ ├── arm64 (64-bit ARM variant of Android)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ ├── armv7 (32-bit ARM variant of Android)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ ├── x64 (64-bit x86-64 variant of Android)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ └── x86 (32-bit x86 variant of Android)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ └── r25b (Android NDK r21b dependencies for UE 5.1)
│ │
│ ├── arm64 (64-bit ARM variant of Android)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ ├── armv7 (32-bit ARM variant of Android)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ ├── x64 (64-bit x86-64 variant of Android)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ └── x86 (32-bit x86 variant of Android)
│ │
│ ├── debug
│ │
│ └── release
├── linux
│ │
│ ├── v19 (UE 4.27 Linux dependencies)
│ │ │
│ │ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ └── x86-64 (dependencies targeting x86-64 Linux architecture)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ ├── v20 (UE 5.0 and 5.1 Linux dependencies)
│ │ │
│ │ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
│ │ │ │
│ │ │ ├── debug
│ │ │ │
│ │ │ └── release
│ │ │
│ │ └── x86-64 (dependencies targeting x86-64 Linux architecture)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ └── v21 (UE 5.2 Linux dependencies)
│ │
│ ├── aarch64 (dependencies targeting AArch64 Linux architecture)
│ │ │
│ │ ├── debug
│ │ │
│ │ └── release
│ │
│ └── x86-64 (dependencies targeting x86-64 Linux architecture)
│ │
│ ├── debug
│ │
│ └── release
└── win64
├── msvc141 (Microsoft Visual Studio 2017 dependencies)
│ │
│ ├── debug
│ │
│ └── release
├── msvc142 (Microsoft Visual Studio 2019 dependencies)
│ │
│ ├── debug
│ │
│ └── release
└── msvc143 (Microsoft Visual Studio 2022 dependencies)
├── debug
└── release
```
## Licenses
### SenseGlove Unreal Engine Plug-in License
The SenseGlove plug-in for Unreal Engine is licensed under the terms of the [MIT License](LICENSE.md).
### Third-Party Licenses
Please note that while the SenseGlove plug-in for Unreal Engine is made available under the [MIT License](LICENSE.md), it utilizes a few third-party libraries with permissive free licenses as well, in order to power various components. For a list of these libraries and their own respective open-source licenses take a look at [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md), please.
This branch is a utility branch and is only meant to be used by the publisher of this plugin in order to automatically package the plugin in adherence to the Unreal Engine Marketplace Guidelines.
BIN
View File
Binary file not shown.
-221
View File
@@ -1,221 +0,0 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.4.2",
"FriendlyName": "SenseGlove",
"Description": "Integrating the SenseGlove haptic controller into Unreal Engine",
"Category": "Virtual Reality",
"CreatedBy": "SenseGlove",
"CreatedByURL": "https://www.senseglove.com/",
"DocsURL": "https://senseglove.gitlab.io/unreal-blueprint-docs/",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/5e1d408f517b4966a269ec1035de0b9e",
"SupportURL": "https://www.senseglove.com/support/",
"CanContainContent": true,
"IsBetaVersion": false,
"IsExperimentalVersion": false,
"Installed": false,
"SupportedTargetPlatforms": [
"Android",
"Linux",
"Win64"
],
"Modules": [
{
"Name": "SenseGlove",
"Type": "Runtime",
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveAndroid",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveBuildHacks",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveConnect",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveConnectImpl",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveConnectKismet",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveCore",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveCoreImpl",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveCoreKismet",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveDebug",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveEditor",
"Type": "Editor",
"LoadingPhase": "PostEngineInit",
"WhitelistPlatforms": [
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveInterop",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveKismet",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveLog",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveSettings",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveSettingsKismet",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveTypes",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
},
{
"Name": "SenseGloveUtils",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms": [
"Android",
"Linux",
"LinuxArm64",
"Win64"
]
}
]
}
-40
View File
@@ -1,40 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove.h"
#include "Modules/ModuleManager.h"
#include "SenseGloveModule.h"
IMPLEMENT_MODULE(FSenseGloveModule, SenseGlove)
-38
View File
@@ -1,38 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "CoreMinimal.h"
@@ -1,46 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
USGVirtualHandAnimInstance::USGVirtualHandAnimInstance(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
FSGVirtualHandAnimInstanceProxy* USGVirtualHandAnimInstance::CreateAnimInstanceProxy()
{
return new FSGVirtualHandAnimInstanceProxy();
}
@@ -1,158 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.h"
#include "BoneContainer.h"
#include "BoneControllers/AnimNode_ModifyBone.h"
#include "BonePose.h"
#include "Containers/Array.h"
#include "Containers/Map.h"
#include "Containers/UnrealString.h"
#include "Engine/SkeletalMesh.h"
#include "Math/Rotator.h"
#include "Runtime/Launch/Resources/Version.h"
#include "SGLog/SGLog.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
FSGVirtualHandAnimInstanceProxy::FSGVirtualHandAnimInstanceProxy()
: FAnimInstanceProxy()
{
}
FSGVirtualHandAnimInstanceProxy::FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance)
: FAnimInstanceProxy(Instance)
{
}
void FSGVirtualHandAnimInstanceProxy::PreEvaluateAnimation(UAnimInstance* InAnimInstance)
{
FAnimInstanceProxy::PreEvaluateAnimation(InAnimInstance);
if (!IsValid(InAnimInstance))
{
return;
}
USGVirtualHandComponent* VirtualHand{Cast<USGVirtualHandComponent>(GetSkelMeshComponent())};
if (!IsValid(VirtualHand))
{
return;
}
BonesRotations.Empty();
if (!VirtualHand->IsGloveConnected())
{
return;
}
BonesRotations = VirtualHand->GetFingersBonesRotations();
}
bool FSGVirtualHandAnimInstanceProxy::Evaluate(FPoseContext& Output)
{
USGVirtualHandComponent* VirtualHand{Cast<USGVirtualHandComponent>(GetSkelMeshComponent())};
if (!IsValid(VirtualHand) && !VirtualHand->IsGloveConnected())
{
return FAnimInstanceProxy::Evaluate(Output);
}
const USkeletalMesh* HandMesh{VirtualHand->
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1
GetSkeletalMeshAsset()
#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
SkeletalMesh
#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
};
if (!IsValid(HandMesh))
{
return FAnimInstanceProxy::Evaluate(Output);
}
const USkeleton* HandSkeleton{HandMesh->GetSkeleton()};
if (!IsValid(HandSkeleton))
{
return FAnimInstanceProxy::Evaluate(Output);
}
FComponentSpacePoseContext PoseContext{Output.AnimInstanceProxy};
PoseContext.Pose.InitPose(Output.Pose);
for (const TTuple<FName, FRotator>& Bone: BonesRotations)
{
FName BoneName{Bone.Key};
FRotator BoneRotation{Bone.Value};
const int32 BoneIndex = GetRequiredBones().GetPoseBoneIndexForBoneName(BoneName);
if (BoneIndex == INDEX_NONE)
{
SGLOG_WARNING(FString::Printf(TEXT("Could not find a bone index for '%s' finger bone!"),
*BoneName.ToString()));
continue;
}
FBoneReference BoneReference;
BoneReference.BoneName = MoveTemp(BoneName);
BoneReference.BoneIndex = BoneIndex;
BoneReference.bUseSkeletonIndex = true;
FAnimNode_ModifyBone BoneController;
BoneController.BoneToModify = MoveTemp(BoneReference);
BoneController.Rotation = MoveTemp(BoneRotation);
BoneController.RotationMode = EBoneModificationMode::BMM_Replace;
BoneController.RotationSpace = EBoneControlSpace::BCS_ParentBoneSpace;
BoneController.ScaleMode = EBoneModificationMode::BMM_Ignore;
BoneController.TranslationMode = EBoneModificationMode::BMM_Ignore;
if (BoneController.IsValidToEvaluate(HandSkeleton, Output.Pose.GetBoneContainer()))
{
TArray<FBoneTransform> BoneTransforms;
BoneController.EvaluateSkeletalControl_AnyThread(PoseContext, BoneTransforms);
const TArray<FBoneTransform>::SizeType BoneTransformsNum = BoneTransforms.Num();
if (BoneTransformsNum > 0)
{
PoseContext.Pose.LocalBlendCSBoneTransforms(BoneTransforms, 1.0f);
PoseContext.Pose.ConvertComponentPosesToLocalPoses(PoseContext.Pose, Output.Pose);
VirtualHand->MarkRenderStateDirty();
}
}
}
return true;
}
@@ -1,127 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Components/SGGrabComponent.h"
struct USGGrabComponent::FImpl
{
/************************
* Static methods
************************/
/************************
* Owner object
************************/
USGGrabComponent* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGGrabComponent* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
/************************
* Methods
************************/
};
USGGrabComponent* USGGrabComponent::GetGrabComponent(const AActor* Actor)
{
if (!ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!")))
{
return nullptr;
}
USGGrabComponent* GrabComponent = Cast<USGGrabComponent>(
Actor->GetComponentByClass(USGGrabComponent::StaticClass()));
return GrabComponent;
}
bool USGGrabComponent::IsGrabbable(const AActor* Actor)
{
if (!ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!")))
{
return false;
}
const USGGrabComponent* GrabComponent = Cast<USGGrabComponent>(
Actor->GetComponentByClass(USGGrabComponent::StaticClass()));
if (!IsValid(GrabComponent))
{
return false;
}
return true;
}
USGGrabComponent::USGGrabComponent(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
AttachmentLocationRule = EAttachmentRule::SnapToTarget;
AttachmentRotationRule = EAttachmentRule::KeepRelative;
AttachmentScaleRule = EAttachmentRule::KeepWorld;
bAttachmentWeldSimulatedBodies = true;
AttachmentSocketName = NAME_None;
DetachmentLocationRule = EDetachmentRule::KeepWorld;
DetachmentRotationRule = EDetachmentRule::KeepWorld;
DetachmentScaleRule = EDetachmentRule::KeepWorld;
bDetachmentCallModify = false;
bAffectPhysicsState = true;
}
USGGrabComponent::FImpl::FImpl(USGGrabComponent* InOwner)
: Owner(InOwner)
{
}
USGGrabComponent::FImpl::~FImpl() = default;
void USGGrabComponent::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,118 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Components/SGTouchComponent.h"
struct USGTouchComponent::FImpl
{
/************************
* Static methods
************************/
/************************
* Owner object
************************/
USGTouchComponent* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGTouchComponent* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
/************************
* Methods
************************/
};
USGTouchComponent* USGTouchComponent::GetTouchComponent(const AActor* Actor)
{
if (!ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!")))
{
return nullptr;
}
USGTouchComponent* TouchComponent = Cast<USGTouchComponent>(
Actor->GetComponentByClass(USGTouchComponent::StaticClass()));
return TouchComponent;
}
bool USGTouchComponent::IsTouchable(const AActor* Actor)
{
if (!ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!")))
{
return false;
}
const USGTouchComponent* TouchComponent = Cast<USGTouchComponent>(
Actor->GetComponentByClass(USGTouchComponent::StaticClass()));
if (!IsValid(TouchComponent))
{
return false;
}
return true;
}
USGTouchComponent::USGTouchComponent(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
BuzzLevel = 0;
BuzzDuration = 0.25f;
ForceFeedbackLevel = 100;
}
USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner)
: Owner(InOwner)
{
}
USGTouchComponent::FImpl::~FImpl() = default;
void USGTouchComponent::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,762 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "Animation/Skeleton.h"
#include "Components/SphereComponent.h"
#include "Components/SkeletalMeshComponent.h"
#include "Engine/SkeletalMesh.h"
#include "Kismet/GameplayStatics.h"
#include "Runtime/Launch/Resources/Version.h"
#include "UObject/ConstructorHelpers.h"
#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h"
#include "SenseGlove/Components/SGWristTrackerComponent.h"
#include "SGConnect/SGConnect.h"
#include "SGCore/SGDeviceList.h"
#include "SGCore/SGHandPose.h"
#include "SGCore/SGHapticGlove.h"
#include "SGCore/SGHapticGloveHandProfiles.h"
#include "SGDebug/SGDebugVirtualHand.h"
#include "SGLog/SGLog.h"
struct USGVirtualHandComponent::FImpl
{
/************************
* Static methods
************************/
FORCEINLINE static const FString& GetDefaultLeftHandMeshPath()
{
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'")};
return Path;
}
FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly()
{
static const FString Path{TEXT("/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left")};
return Path;
}
FORCEINLINE static const FString& GetDefaultRightHandMeshPath()
{
static const FString Path{TEXT("SkeletalMesh'/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'")};
return Path;
}
FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly()
{
static const FString Path{TEXT("/SenseGlove/Meshes/"
"SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right")};
return Path;
}
/************************
* Owner object
************************/
USGVirtualHandComponent* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGVirtualHandComponent* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
/************************
* Methods
************************/
bool IsEditor() const;
FString GetDefaultMeshPath() const;
bool IsUsingUserMesh() const;
USkeletalMesh* LoadDefaultMesh() const;
void SetDefaultMesh() const;
USkeletalMesh* GetMesh() const;
USkeleton* GetSkeleton() const;
const FReferenceSkeleton& GetRefSkeleton() const;
bool InitializeBackend() const;
bool UninitializeBackend() const;
bool CheckGlove() const;
void SetVisibility(bool bInVisible) const;
void DrawDebugVirtualHand() const;
};
const TArray<TArray<FName>>& USGVirtualHandComponent::GetLeftHandFingerBoneNames()
{
static const TArray<TArray<FName>> BoneNames{
{FName(TEXT("thumb_01_l")), FName(TEXT("thumb_02_l")), FName(TEXT("thumb_03_l"))},
{FName(TEXT("index_01_l")), FName(TEXT("index_02_l")), FName(TEXT("index_03_l"))},
{FName(TEXT("middle_01_l")), FName(TEXT("middle_02_l")), FName(TEXT("middle_03_l"))},
{FName(TEXT("ring_01_l")), FName(TEXT("ring_02_l")), FName(TEXT("ring_03_l"))},
{FName(TEXT("pinky_01_l")), FName(TEXT("pinky_02_l")), FName(TEXT("pinky_03_l"))},
};
return BoneNames;
}
const TArray<TArray<FName>>& USGVirtualHandComponent::GetRightHandFingerBoneNames()
{
static const TArray<TArray<FName>> BoneNames{
{FName(TEXT("thumb_01_r")), FName(TEXT("thumb_02_r")), FName(TEXT("thumb_03_r"))},
{FName(TEXT("index_01_r")), FName(TEXT("index_02_r")), FName(TEXT("index_03_r"))},
{FName(TEXT("middle_01_r")), FName(TEXT("middle_02_r")), FName(TEXT("middle_03_r"))},
{FName(TEXT("ring_01_r")), FName(TEXT("ring_02_r")), FName(TEXT("ring_03_r"))},
{FName(TEXT("pinky_01_r")), FName(TEXT("pinky_02_r")), FName(TEXT("pinky_03_r"))},
};
return BoneNames;
}
const FName& USGVirtualHandComponent::GetLeftHandFingerBoneName(const int32 Finger, const int32 Joint)
{
const TArray<TArray<FName>>& BoneNames{GetLeftHandFingerBoneNames()};
ensureAlwaysMsgf(Finger < BoneNames.Num(), TEXT("Finger index is out of bound!"));
ensureAlwaysMsgf(Joint < BoneNames[Finger].Num(), TEXT("Joint index is out of bound!"));
const FName& BoneName{BoneNames[Finger][Joint]};
return BoneName;
}
const FName& USGVirtualHandComponent::GetRightHandFingerBoneName(const int32 Finger, const int32 Joint)
{
const TArray<TArray<FName>>& BoneNames{GetRightHandFingerBoneNames()};
ensureAlwaysMsgf(Finger < BoneNames.Num(), TEXT("Finger index is out of bound!"));
ensureAlwaysMsgf(Joint < BoneNames[Finger].Num(), TEXT("Joint index is out of bound!"));
const FName& BoneName{BoneNames[Finger][Joint]};
return BoneName;
}
USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
PrimaryComponentTick.bTickEvenWhenPaused = false;
PrimaryComponentTick.bCanEverTick = true;
PrimaryComponentTick.bStartWithTickEnabled = true;
bTickInEditor = true;
bNeverNeedsRenderUpdate = false;
bAllowConcurrentTick = true;
SetUpdateAnimationInEditor(true);
SetCastShadow(true);
SetCastHiddenShadow(false);
bCastDynamicShadow = true;
SetOnlyOwnerSee(false);
SetReceivesDecals(true);
SetCanEverAffectNavigation(false);
Super::SetCollisionObjectType(ECC_WorldDynamic);
Super::SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
Super::SetCollisionResponseToAllChannels(ECR_Overlap);
Super::SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Block);
Super::SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Block);
Super::SetCollisionResponseToChannel(ECC_Pawn, ECR_Block);
Super::SetCollisionResponseToChannel(ECC_Visibility, ECR_Block);
Super::SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Block);
Super::SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block);
Super::SetCollisionResponseToChannel(ECC_Destructible, ECR_Block);
Super::SetAnimClass(USGVirtualHandAnimInstance::StaticClass());
bRight = true;
bAutoStopAllHapticsOnEndPlay = true;
GrabSocketName = FName{TEXT("GrabPoint")};
DefaultFingertipsGrabColliderSize = FVector{0.08f, 0.08f, 0.08f};
ThumbFingertipGrabSocketName = FName{TEXT("GrabThumbFingertip")};
IndexFingertipGrabSocketName = FName{TEXT("GrabIndexFingertip")};
MiddleFingertipGrabSocketName = FName{TEXT("GrabMiddleFingertip")};
DefaultFingertipsTouchColliderSize = FVector{0.08f, 0.08f, 0.08f};
ThumbFingertipTouchSocketName = FName{TEXT("TouchThumbFingertip")};
IndexFingertipTouchSocketName = FName{TEXT("TouchIndexFingertip")};
MiddleFingertipTouchSocketName = FName{TEXT("TouchMiddleFingertip")};
RingFingertipTouchSocketName = FName{TEXT("TouchRingFingertip")};
PinkyFingertipTouchSocketName = FName{TEXT("TouchPinkyFingertip")};
bHiddenInGameIfNoGloveDetected = false;
DebugVirtualHandSettings = FSGDebugVirtualHandSettings{
ESGDebugVirtualHandDrawingMode::None,
FVector(0.5f, 0.5f, 0.5f),
FColor(255, 0, 0, 255),
0.1f, 1.0f, 1.0f,
FColor(255, 0, 0, 255),
FColor(0, 255, 0, 255),
FColor(0, 0, 255, 255),
false, 1.1f, 0
};
Super::SetSkeletalMesh(nullptr, true);
bBackendInitialized = false;
Glove = nullptr;
WristTracker = nullptr;
}
void USGVirtualHandComponent::SetRight(const bool bInRight)
{
bRight = bInRight;
if (!Pimpl->IsUsingUserMesh())
{
Pimpl->SetDefaultMesh();
}
}
void USGVirtualHandComponent::SetAnimClass(UClass* NewClass)
{
ensureAlwaysMsgf(Cast<USGVirtualHandAnimInstance>(NewClass),
TEXT("The AnimInstance class must be a subclass of USGVirtualHandAnimInstance!"));
Super::SetAnimClass(NewClass);
}
void USGVirtualHandComponent::PostInitProperties()
{
Super::PostInitProperties();
if (!Pimpl->IsUsingUserMesh())
{
Pimpl->SetDefaultMesh();
}
}
#if WITH_EDITOR
void USGVirtualHandComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
const FName PropertyName{
PropertyChangedEvent.Property
? PropertyChangedEvent.Property->GetFName()
: NAME_None
};
if (PropertyName == GET_MEMBER_NAME_CHECKED(USGVirtualHandComponent, bRight))
{
if (!Pimpl->IsUsingUserMesh())
{
Pimpl->SetDefaultMesh();
}
}
}
#endif /* WITH_EDITOR */
void USGVirtualHandComponent::InitializeComponent()
{
Super::InitializeComponent();
if (!Pimpl->IsUsingUserMesh())
{
Pimpl->SetDefaultMesh();
}
if (Pimpl->InitializeBackend())
{
(void) Pimpl->CheckGlove();
}
}
void USGVirtualHandComponent::UninitializeComponent()
{
Super::UninitializeComponent();
(void) Pimpl->UninitializeBackend();
}
void USGVirtualHandComponent::BeginPlay()
{
Super::BeginPlay();
if (Pimpl->InitializeBackend())
{
(void) Pimpl->CheckGlove();
}
}
void USGVirtualHandComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);
if (IsValid(Glove) && AutoStopsAllHapticsOnEndPlay())
{
Glove->StopHaptics();
}
(void) Pimpl->UninitializeBackend();
}
void USGVirtualHandComponent::TickComponent(
const float DeltaTime, const ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
#if WITH_EDITOR
if (Pimpl->IsEditor())
{
EditorTick(DeltaTime, TickType, ThisTickFunction);
return;
}
#endif /* WITH_EDITOR */
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
(void) Pimpl->CheckGlove();
if (IsValid(Glove) && DebugVirtualHandSettings.DrawingMode != ESGDebugVirtualHandDrawingMode::None)
{
Pimpl->DrawDebugVirtualHand();
}
}
void USGVirtualHandComponent::SetSkeletalMesh(USkeletalMesh* NewMesh, const bool bReinitPose)
{
if (IsValid(NewMesh))
{
Super::SetSkeletalMesh(NewMesh, bReinitPose);
}
else
{
Super::SetSkeletalMesh(Pimpl->LoadDefaultMesh(), bReinitPose);
}
}
void USGVirtualHandComponent::EditorTick(
const float DeltaTime, const ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
(void) Pimpl->CheckGlove();
if (IsValid(Glove) && DebugVirtualHandSettings.DrawingMode != ESGDebugVirtualHandDrawingMode::None)
{
Pimpl->DrawDebugVirtualHand();
}
}
bool USGVirtualHandComponent::IsGloveConnected() const
{
return Pimpl->CheckGlove();
}
USGHandPose* USGVirtualHandComponent::GetHandPose()
{
USGHandPose* HandPose{nullptr};
if (IsValid(Glove))
{
#if ! PLATFORM_ANDROID
Glove->GetHandPose(this, HandPose);
#else /* ! PLATFORM_ANDROID */
const UWorld* World{GetWorld()};
const float DeltaTime = UGameplayStatics::GetWorldDeltaSeconds(World);
Glove->GetHandPose(this, DeltaTime, HandPose);
#endif /* ! PLATFORM_ANDROID */
}
return HandPose;
}
const FName& USGVirtualHandComponent::GetFingerBoneName(const int32 Finger, const int32 Joint) const
{
const FName& Name{
IsRight()
? GetRightHandFingerBoneName(Finger, Joint)
: GetLeftHandFingerBoneName(Finger, Joint)
};
return Name;
}
const FTransform& USGVirtualHandComponent::GetFingerBoneRefTransform(const int32 Finger, const int32 Joint) const
{
const FName& BoneName{GetFingerBoneName(Finger, Joint)};
const FReferenceSkeleton& ReferenceSkeleton{Pimpl->GetRefSkeleton()};
const int32 BoneIndex = ReferenceSkeleton.FindBoneIndex(BoneName);
if (BoneIndex == INDEX_NONE)
{
SGLOG_WARNING(FString::Printf(TEXT("Could not find a bone index for '%s' finger bone!"),
*BoneName.ToString()));
return FTransform::Identity;
}
const FTransform& BoneTransform{ReferenceSkeleton.GetRefBonePose()[BoneIndex]};
return BoneTransform;
}
FRotator USGVirtualHandComponent::GetFingerBoneRefRotation(const int32 Finger, const int32 Joint) const
{
const FTransform BoneTransform{GetFingerBoneRefTransform(Finger, Joint)};
FRotator BoneRotation{BoneTransform.GetRotation().Rotator()};
return MoveTemp(BoneRotation);
}
TMap<FName, FRotator> USGVirtualHandComponent::GetFingersBonesRotations()
{
TMap<FName, FRotator> Rotations;
if (!IsGloveConnected())
{
return MoveTemp(Rotations);
}
const USGHandPose* HandPose = GetHandPose();
if (!IsValid(HandPose))
{
return MoveTemp(Rotations);
}
const TArray<TArray<FVector>> HandAngles{HandPose->GetHandAngles()};
for (int32 FingerIndex = 0; FingerIndex < HandAngles.Num(); ++FingerIndex)
{
const TArray<FVector>& FingerJointAngles{HandAngles[FingerIndex]};
for (int32 JointIndex = 0; JointIndex < FingerJointAngles.Num(); ++JointIndex)
{
const FVector& JointAngle{FingerJointAngles[JointIndex]};
const FQuat JointRotation{FQuat::MakeFromEuler(JointAngle)};
const FTransform& BoneRefTransform{GetFingerBoneRefTransform(FingerIndex, JointIndex)};
FQuat NewBoneRotation{BoneRefTransform.GetRotation() * JointRotation};
FName BoneName{GetFingerBoneName(FingerIndex, JointIndex)};
Rotations.Emplace(MoveTemp(BoneName), MoveTemp(NewBoneRotation));
}
}
return MoveTemp(Rotations);
}
USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner)
: Owner(InOwner)
{
}
USGVirtualHandComponent::FImpl::~FImpl() = default;
bool USGVirtualHandComponent::FImpl::IsEditor() const
{
const UWorld* World{Owner->GetWorld()};
if (World && (World->WorldType == EWorldType::Editor || World->WorldType == EWorldType::EditorPreview))
{
return true;
}
return false;
}
FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const
{
FString SkeletalMeshPath;
if (Owner->IsRight())
{
SkeletalMeshPath = GetDefaultRightHandMeshPath();
}
else
{
SkeletalMeshPath = GetDefaultLeftHandMeshPath();
}
return MoveTemp(SkeletalMeshPath);
}
bool USGVirtualHandComponent::FImpl::IsUsingUserMesh() const
{
const USkeletalMesh* CurrentMesh{GetMesh()};
if (!IsValid(CurrentMesh))
{
return false;
}
const FString CurrentMeshPath(CurrentMesh->GetPathName());
const FString LeftHandDefaultMeshPath(GetDefaultLeftHandMeshPath());
const FString LeftHandDefaultMeshPathOnly(GetDefaultLeftHandMeshPathOnly());
const FString RightHandDefaultMeshPath(GetDefaultRightHandMeshPath());
const FString RightHandDefaultMeshPathOnly(GetDefaultRightHandMeshPathOnly());
if (CurrentMeshPath == LeftHandDefaultMeshPath
|| CurrentMeshPath == LeftHandDefaultMeshPathOnly
|| CurrentMeshPath == RightHandDefaultMeshPath
|| CurrentMeshPath == RightHandDefaultMeshPathOnly)
{
return false;
}
return true;
}
USkeletalMesh* USGVirtualHandComponent::FImpl::LoadDefaultMesh() const
{
const FString DefaultMeshPath{GetDefaultMeshPath()};
USkeletalMesh* DefaultMesh{
Cast<USkeletalMesh>(StaticLoadObject(USkeletalMesh::StaticClass(), nullptr, *DefaultMeshPath))
};
if (!IsValid(DefaultMesh))
{
SGLOG_WARNING(FString::Printf(TEXT("Failed to load the default skeletal mesh: '%s'"), *DefaultMeshPath));
}
return DefaultMesh;
}
void USGVirtualHandComponent::FImpl::SetDefaultMesh() const
{
Owner->SetSkeletalMesh(LoadDefaultMesh(), true);
}
USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const
{
return Owner->
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1
GetSkeletalMeshAsset()
#else /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
SkeletalMesh
#endif /* ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1 */
;
}
USkeleton* USGVirtualHandComponent::FImpl::GetSkeleton() const
{
USkeletalMesh* Mesh{GetMesh()};
ensureAlwaysMsgf(IsValid(Mesh), TEXT("Invalid SkeletalMesh object!"));
return Mesh->GetSkeleton();
}
const FReferenceSkeleton& USGVirtualHandComponent::FImpl::GetRefSkeleton() const
{
const USkeletalMesh* Mesh{GetMesh()};
ensureAlwaysMsgf(IsValid(Mesh), TEXT("Invalid SkeletalMesh object!"));
return Mesh->GetRefSkeleton();
}
bool USGVirtualHandComponent::FImpl::InitializeBackend() const
{
if (!Owner->bBackendInitialized)
{
#if PLATFORM_ANDROID
const int32_t Result = FSGConnect::Init();
switch (Result)
{
case -3:
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
return false;
case -2:
SGLOG_ERROR("Device Scanning is already running within a different program.");
return false;
case -1:
SGLOG_ERROR("Device Scanning already being initialized (function called twice in short succession).");
return false;
case 0:
// Do not pollute the logs!
//SGLOG_ERROR("Device Scanning is already running within this program.");
// We must return here in case there are two virtual hand components are present in the scene.
return true;
case 1:
SGLOG("Successfully started up DeviceScanning from the current program.");
break;
default:
ensureAlwaysMsgf(false, TEXT("Unhandled Init return status code!"));
return false;
}
#endif /* PLATFORM_ANDROID */
// Ensure that the device list is empty before doing anything.
FSGDeviceList::Dispose();
FSGDeviceList::Reinitialize();
// Load the latest hand profiles.
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
Owner->bBackendInitialized = true;
return true;
}
return false;
}
bool USGVirtualHandComponent::FImpl::UninitializeBackend() const
{
// NOTE
// In Editor builds we should be avoiding dispose, since stopping the game in PIE mode, causes the virtual-hand
// to disappear in the editor as the plugin won't be able to retrieve the glove status anymore.
#if ! WITH_EDITOR
if (Owner->bBackendInitialized)
{
FSGDeviceList::Dispose();
#if PLATFORM_ANDROID
const int32_t Result = FSGConnect::Dispose();
switch (Result)
{
case -3:
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
return false;
case -2:
SGLOG_ERROR("Not allowed to dispose of Device Scanning because this is not the program which started it.");
return false;
case -1:
SGLOG_ERROR("Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).");
return false;
case 0:
SGLOG_ERROR("There is no deviceScanner running from any program, so disposing is skipped.");
return false;
case 1:
SGLOG("Successfully disposed of DeviceScanner resources.");
break;
default:
ensureAlwaysMsgf(false, TEXT("Unhandled Dispose return status code!"));
return false;
}
#endif /* PLATFORM_ANDROID */
Owner->bBackendInitialized = false;
return true;
}
#endif /* ! WITH_EDITOR */
return false;
}
bool USGVirtualHandComponent::FImpl::CheckGlove() const
{
if (!Owner->bBackendInitialized)
{
const bool bSucceeded = InitializeBackend();
if (!bSucceeded)
{
return false;
}
}
const bool bGloveWasPresent = IsValid(Owner->Glove);
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bFoundGlove && bGloveWasPresent)
{
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
}
const bool bIsEditor = IsEditor();
if (!bIsEditor)
{
const bool bIsVisible = Owner->IsVisible();
if (Owner->bHiddenInGameIfNoGloveDetected)
{
if (bFoundGlove)
{
if (!bIsVisible)
{
SetVisibility(true);
}
}
else
{
if (bIsVisible)
{
SetVisibility(false);
}
}
}
else
{
if (!bIsVisible)
{
SetVisibility(true);
}
}
}
return bFoundGlove;
}
void USGVirtualHandComponent::FImpl::SetVisibility(const bool bInVisible) const
{
Owner->SetVisibility(bInVisible, true);
}
void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const
{
const UWorld* World{Owner->GetWorld()};
if (!IsValid(Owner->WristTracker))
{
return;
}
const FVector& WristLocation{Owner->WristTracker->GetWristLocation()};
const FRotator& WristRotation{Owner->WristTracker->GetWristRotation()};
const USGHandPose* HandPose{Owner->GetHandPose()};
if (!IsValid(HandPose))
{
return;
}
const TArray<TArray<FVector>>& JointPositions{HandPose->GetJointPositions()};
const TArray<TArray<FRotator>>& JointRotations{HandPose->GetJointRotations()};
FSGDebugVirtualHand::Draw(World, WristLocation, WristRotation, JointPositions, JointRotations,
Owner->DebugVirtualHandSettings);
}
void USGVirtualHandComponent::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,548 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Components/SGWristTrackerComponent.h"
#include "Animation/Skeleton.h"
#include "Components/SkeletalMeshComponent.h"
#include "Engine/SkeletalMesh.h"
#include "UObject/ConstructorHelpers.h"
#include "SGConnect/SGConnect.h"
#include "SGCore/SGDeviceList.h"
#include "SGCore/SGHapticGlove.h"
#include "SGCore/SGHapticGloveHandProfiles.h"
#include "SGDebug/SGDebugGizmo.h"
#include "SGLog/SGLog.h"
#include "SGSettings/SGSettings.h"
struct USGWristTrackerComponent::FImpl
{
/************************
* Static methods
************************/
/************************
* Owner object
************************/
USGWristTrackerComponent* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(USGWristTrackerComponent* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
/************************
* Methods
************************/
bool IsEditor() const;
bool InitializeBackend() const;
bool UninitializeBackend() const;
bool CheckGlove() const;
void UpdateWristTrackingData() const;
void DrawDebugGizmo();
};
USGWristTrackerComponent::USGWristTrackerComponent(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
PrimaryComponentTick.bTickEvenWhenPaused = false;
PrimaryComponentTick.bCanEverTick = true;
PrimaryComponentTick.bStartWithTickEnabled = true;
bTickInEditor = true;
bNeverNeedsRenderUpdate = true;
bAllowConcurrentTick = true;
SetCastShadow(false);
SetCastHiddenShadow(false);
bCastDynamicShadow = false;
SetOnlyOwnerSee(false);
SetReceivesDecals(false);
SetCanEverAffectNavigation(false);
SetRight(true);
bOverridePluginWristTrackingSettings = false;
bDrawWristTrackerDebugGizmo = false;
TrackingHardware = ESGPositionalTrackingHardware::None;
TrackingHardwareLocationOffset = FVector::ZeroVector;
TrackingHardwareLocationOffset = FVector::ZeroVector;
bOverridePluginWristTrackingDebugSettings = false;
bDrawWristTrackerDebugGizmo = false;
WristTrackerDebugGizmoSettings = FSGDebugGizmoSettings(
4.0f, 1.0f,
FColor(255, 0, 0, 255),
FColor(0, 255, 0, 255),
FColor(0, 0, 255, 255),
false, 1.1f, 0
);
bDrawWristTrackerDebugGizmo = false;
bBackendInitialized = false;
Glove = nullptr;
WristLocation = FVector::ZeroVector;
WristRotation = FRotator::ZeroRotator;
}
void USGWristTrackerComponent::SetRight(const bool bRight)
{
SetTrackingSource(bRight ? EControllerHand::Right : EControllerHand::Left);
}
ESGPositionalTrackingHardware USGWristTrackerComponent::GetTrackingHardware() const
{
if (OverridesPluginWristTrackingSettings())
{
return TrackingHardware;
}
return USGSettings::GetInstance()->GetTrackingHardware();
}
void USGWristTrackerComponent::SetTrackingHardware(const ESGPositionalTrackingHardware InTrackingHardware)
{
ensureAlwaysMsgf(
OverridesPluginWristTrackingSettings(),
TEXT( "Setting TrackingHardware is only permitted when bOverridePluginWristTrackingSettings is enabled!"));
TrackingHardware = InTrackingHardware;
}
const FVector& USGWristTrackerComponent::GetTrackingHardwareLocationOffset() const
{
ensureAlwaysMsgf(
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
TEXT( "Getting TrackingHardwareLocationOffset is only permitted when TrackingHardware is set to Custom!"));
if (OverridesPluginWristTrackingSettings())
{
return TrackingHardwareLocationOffset;
}
return IsRight()
? USGSettings::GetInstance()->GetTrackingHardwareLocationOffsetRightHand()
: USGSettings::GetInstance()->GetTrackingHardwareLocationOffsetLeftHand();
}
void USGWristTrackerComponent::SetTrackingHardwareLocationOffset(const FVector& InTrackingHardwareLocationOffset)
{
ensureAlwaysMsgf(
OverridesPluginWristTrackingSettings(),
TEXT(
"Setting TrackingHardwareLocationOffset is only permitted when bOverridePluginWristTrackingSettings is enabled!"
));
ensureAlwaysMsgf(
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
TEXT( "Setting TrackingHardwareLocationOffset is only permitted when TrackingHardware is set to Custom!"));
TrackingHardwareLocationOffset = InTrackingHardwareLocationOffset;
}
const FRotator& USGWristTrackerComponent::GetTrackingHardwareRotationOffset() const
{
ensureAlwaysMsgf(
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
TEXT( "Getting TrackingHardwareRotationOffset is only permitted when TrackingHardware is set to Custom!"));
if (OverridesPluginWristTrackingSettings())
{
return TrackingHardwareRotationOffset;
}
return IsRight()
? USGSettings::GetInstance()->GetTrackingHardwareRotationOffsetRightHand()
: USGSettings::GetInstance()->GetTrackingHardwareRotationOffsetLeftHand();
}
void USGWristTrackerComponent::SetTrackingHardwareRotationOffset(const FRotator& InTrackingHardwareRotationOffset)
{
ensureAlwaysMsgf(
OverridesPluginWristTrackingSettings(),
TEXT(
"Setting TrackingHardwareRotationOffset is only permitted when bOverridePluginWristTrackingSettings is enabled!"
));
ensureAlwaysMsgf(
GetTrackingHardware() == ESGPositionalTrackingHardware::Custom,
TEXT("Setting TrackingHardwareRotationOffsetRightHand is only permitted when TrackingHardware is set to Custom!"
));
TrackingHardwareRotationOffset = InTrackingHardwareRotationOffset;
}
bool USGWristTrackerComponent::GetDrawWristTrackerDebugGizmo() const
{
if (OverridesPluginWristTrackingDebugSettings())
{
return !!bDrawWristTrackerDebugGizmo;
}
return USGSettings::GetInstance()->GetDrawWristTrackerDebugGizmo();
}
void USGWristTrackerComponent::SetDrawWristTrackerDebugGizmo(const bool bInDrawWristTrackerDebugGizmo)
{
ensureAlwaysMsgf(
OverridesPluginWristTrackingDebugSettings(),
TEXT( "Setting bDrawWristTrackerDebugGizmo is only permitted when bOverridePluginWristTrackingDebugSettings is"
" enabled!"));
bDrawWristTrackerDebugGizmo = bInDrawWristTrackerDebugGizmo;
}
const FSGDebugGizmoSettings& USGWristTrackerComponent::GetWristTrackerDebugGizmoSettings() const
{
ensureAlwaysMsgf(
GetDrawWristTrackerDebugGizmo(),
TEXT("Getting WristTrackerDebugGizmoLength is only permitted when bDrawWristTrackerDebugGizmo is enabled!"));
if (OverridesPluginWristTrackingDebugSettings())
{
return WristTrackerDebugGizmoSettings;
}
return USGSettings::GetInstance()->GetWristTrackerDebugGizmoSettings();
}
void USGWristTrackerComponent::SetWristTrackerDebugGizmoSettings(
const FSGDebugGizmoSettings& InWristTrackerDebugGizmoSettings)
{
ensureAlwaysMsgf(
OverridesPluginWristTrackingDebugSettings(),
TEXT("Setting WristTrackerDebugGizmoLength is only permitted when bOverridePluginWristTrackingDebugSettings is"
" enabled!"));
ensureAlwaysMsgf(
GetDrawWristTrackerDebugGizmo(),
TEXT("Setting WristTrackerDebugGizmoLength is only permitted when bDrawWristTrackerDebugGizmo is enabled!"));
WristTrackerDebugGizmoSettings = InWristTrackerDebugGizmoSettings;
}
#if WITH_EDITOR
void USGWristTrackerComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
const FName PropertyName{
PropertyChangedEvent.Property
? PropertyChangedEvent.Property->GetFName()
: NAME_None
};
(void) PropertyName;
}
#endif /* WITH_EDITOR */
void USGWristTrackerComponent::InitializeComponent()
{
Super::InitializeComponent();
if (Pimpl->InitializeBackend())
{
(void) Pimpl->CheckGlove();
}
}
void USGWristTrackerComponent::UninitializeComponent()
{
Super::UninitializeComponent();
(void) Pimpl->UninitializeBackend();
}
void USGWristTrackerComponent::BeginPlay()
{
Super::BeginPlay();
if (Pimpl->InitializeBackend())
{
(void) Pimpl->CheckGlove();
}
}
void USGWristTrackerComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);
(void) Pimpl->UninitializeBackend();
}
void USGWristTrackerComponent::TickComponent(
const float DeltaTime, const ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
#if WITH_EDITOR
if (Pimpl->IsEditor())
{
EditorTick(DeltaTime, TickType, ThisTickFunction);
return;
}
#endif /* WITH_EDITOR */
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
if (GetDrawWristTrackerDebugGizmo())
{
Pimpl->DrawDebugGizmo();
}
(void) Pimpl->CheckGlove();
}
void USGWristTrackerComponent::EditorTick(
const float DeltaTime, const ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
(void) Pimpl->CheckGlove();
}
USGWristTrackerComponent::FImpl::FImpl(USGWristTrackerComponent* InOwner)
: Owner(InOwner)
{
}
USGWristTrackerComponent::FImpl::~FImpl() = default;
bool USGWristTrackerComponent::FImpl::IsEditor() const
{
const UWorld* World{Owner->GetWorld()};
if (World && (World->WorldType == EWorldType::Editor || World->WorldType == EWorldType::EditorPreview))
{
return true;
}
return false;
}
bool USGWristTrackerComponent::FImpl::InitializeBackend() const
{
if (!Owner->bBackendInitialized)
{
#if PLATFORM_ANDROID
const int32_t Result = FSGConnect::Init();
switch (Result)
{
case -3:
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
return false;
case -2:
SGLOG_ERROR("Device Scanning is already running within a different program.");
return false;
case -1:
SGLOG_ERROR("Device Scanning already being initialized (function called twice in short succession).");
return false;
case 0:
// Do not pollute the logs!
//SGLOG_ERROR("Device Scanning is already running within this program.");
// We must return here in case two virtual hand components are present in the scene.
return true;
case 1:
SGLOG("Successfully started up DeviceScanning from the current program.");
break;
default:
ensureAlwaysMsgf(false, TEXT("Unhandled Init return status code!"));
return false;
}
#endif /* PLATFORM_ANDROID */
// Ensure that the device list is empty before doing anything.
FSGDeviceList::Dispose();
FSGDeviceList::Reinitialize();
// Load the latest hand profiles.
FSGHapticGloveHandProfiles::TryLoadingFromDisk();
Owner->bBackendInitialized = true;
return true;
}
return false;
}
bool USGWristTrackerComponent::FImpl::UninitializeBackend() const
{
// NOTE
// In Editor builds we should be avoiding dispose, since stopping the game in PIE mode, causes the virtual-hand
// to disappear in the editor as the plugin won't be able to retrieve the glove status anymore.
#if ! WITH_EDITOR
if (Owner->bBackendInitialized)
{
FSGDeviceList::Dispose();
#if PLATFORM_ANDROID
const int32_t Result = FSGConnect::Dispose();
switch (Result)
{
case -3:
SGLOG_ERROR("An Unexpected error occurred. Please try again.");
return false;
case -2:
SGLOG_ERROR("Not allowed to dispose of Device Scanning because this is not the program which started it.");
return false;
case -1:
SGLOG_ERROR("Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession).");
return false;
case 0:
SGLOG_ERROR("There is no deviceScanner running from any program, so disposing is skipped.");
return false;
case 1:
SGLOG("Successfully disposed of DeviceScanner resources.");
break;
default:
ensureAlwaysMsgf(false, TEXT("Unhandled Dispose return status code!"));
return false;
}
#endif /* PLATFORM_ANDROID */
Owner->bBackendInitialized = false;
return true;
}
#endif /* ! WITH_EDITOR */
return false;
}
bool USGWristTrackerComponent::FImpl::CheckGlove() const
{
if (!Owner->bBackendInitialized)
{
const bool bSucceeded = InitializeBackend();
if (!bSucceeded)
{
return false;
}
}
const bool bGloveWasPresent = IsValid(Owner->Glove);
const bool bFoundGlove = USGHapticGlove::GetGlove(Owner, Owner->IsRight(), Owner->Glove);
if (!bFoundGlove && bGloveWasPresent)
{
SGLOG_ERROR(FString::Printf(TEXT("Could not find a %s glove!"),
(Owner->IsRight() ? TEXT("right-handed") : TEXT("left-handed"))));
}
if (bFoundGlove)
{
UpdateWristTrackingData();
}
return bFoundGlove;
}
void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const
{
ensureAlwaysMsgf(Owner->Glove, TEXT("Invalid Glove!"));
FVector TrackerLocation{Owner->GetComponentLocation()};
FRotator TrackerRotation{Owner->GetComponentRotation()};
ESGPositionalTrackingHardware TrackerHardware = Owner->GetTrackingHardware();
if (TrackerHardware == ESGPositionalTrackingHardware::None)
{
TrackerHardware = ESGPositionalTrackingHardware::Custom;
}
else if (TrackerHardware == ESGPositionalTrackingHardware::Custom)
{
TrackerLocation += Owner->GetTrackingHardwareLocationOffset();
TrackerRotation += Owner->GetTrackingHardwareRotationOffset();
}
FVector NewWristLocation;
FRotator NewWristRotation;
Owner->Glove->GetWristLocation(TrackerLocation, TrackerRotation, TrackerHardware,
NewWristLocation, NewWristRotation);
const bool bLocationUpdated = !Owner->WristLocation.Equals(NewWristLocation, SMALL_NUMBER);
const bool bRotationUpdated = !Owner->WristRotation.Equals(NewWristRotation, SMALL_NUMBER);
if (bLocationUpdated)
{
Owner->WristLocation = MoveTemp(NewWristLocation);
}
if (bRotationUpdated)
{
Owner->WristRotation = MoveTemp(NewWristRotation);
}
if (bLocationUpdated && Owner->WristLocationChangedEvent.IsBound())
{
Owner->WristLocationChangedEvent.Broadcast(Owner->WristLocation);
}
if (bRotationUpdated && Owner->WristRotationChangedEvent.IsBound())
{
Owner->WristRotationChangedEvent.Broadcast(Owner->WristRotation);
}
if ((bLocationUpdated && bRotationUpdated) && Owner->WristLocationAndRotationChangedEvent.IsBound())
{
Owner->WristLocationAndRotationChangedEvent.Broadcast(Owner->WristLocation, Owner->WristRotation);
}
}
void USGWristTrackerComponent::FImpl::DrawDebugGizmo()
{
const UWorld* World{Owner->GetWorld()};
const FVector& Location{Owner->GetComponentLocation()};
const FRotator& Rotation{Owner->GetComponentRotation()};
const FSGDebugGizmoSettings& DebugGizmoSettings{Owner->GetWristTrackerDebugGizmoSettings()};
FSGDebugGizmo::Draw(World, Location, Rotation, DebugGizmoSettings);
}
void USGWristTrackerComponent::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,46 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/GameFramework//SGGameModeBase.h"
#include "SenseGlove/GameFramework/SGPawn.h"
#include "SenseGlove/GameFramework/SGPlayerController.h"
ASGGameModeBase::ASGGameModeBase(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
DefaultPawnClass = ASGPawn::StaticClass();
PlayerControllerClass = ASGPlayerController::StaticClass();
}
File diff suppressed because it is too large Load Diff
@@ -1,372 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/GameFramework/SGPlayerController.h"
#if ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 )
#include "Engine/TimerHandle.h"
#else /* ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 ) */
#include "Engine/EngineTypes.h"
#endif /* ENGINE_MAJOR_VERSION > 5 || ( ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2 ) */
#include "TimerManager.h"
#include "SenseGlove/Components/SGGrabComponent.h"
#include "SenseGlove/Components/SGTouchComponent.h"
#include "SenseGlove/GameFramework/SGPawn.h"
#include "SenseGlove/Haptics/SGGrabState.h"
#include "SenseGlove/Haptics/SGTouchState.h"
#include "SGCore/SGBuzzCommand.h"
#include "SGCore/SGForceFeedbackCommand.h"
#include "SGCore/SGHapticGlove.h"
struct ASGPlayerController::FImpl
{
/************************
* Static methods
************************/
static int32 GetBuzzLevel(const AActor* Actor);
static float GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching);
static int32 GetForceFeedbackLevel(const AActor* Actor);
/************************
* Member variables
************************/
FTimerHandle TouchBuzzStopTimer;
/************************
* Owner object
************************/
ASGPlayerController* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(ASGPlayerController* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
/************************
* Methods
************************/
USGBuzzCommand* GetBuzzCommand(
const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const;
USGForceFeedbackCommand* GetForceFeedbackCommand(
const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const;
void UpdateHapticsFeedback(const FSGTouchState& TouchState);
};
int32 ASGPlayerController::FImpl::GetBuzzLevel(const AActor* Actor)
{
if (IsValid(Actor))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
if (TouchComponent)
{
return TouchComponent->GetBuzzLevel();
}
}
return 0;
}
float ASGPlayerController::FImpl::GetBuzzDuration(const AActor* ActorThumbTouching, const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching, const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching)
{
if (IsValid(ActorThumbTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorThumbTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorIndexTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorIndexTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorMiddleTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorMiddleTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorRingTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorRingTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
if (IsValid(ActorPinkyTouching))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(ActorPinkyTouching);
if (TouchComponent)
{
return TouchComponent->GetBuzzDuration();
}
}
return 0.0f;
}
int32 ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor)
{
if (IsValid(Actor))
{
const USGTouchComponent* TouchComponent = USGTouchComponent::GetTouchComponent(Actor);
if (TouchComponent)
{
return TouchComponent->GetForceFeedbackLevel();
}
}
return 0;
}
ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
}
void ASGPlayerController::BeginPlay()
{
Super::BeginPlay();
ASGPawn* SGPawn = Cast<ASGPawn>(GetPawn());
if (!ensureAlwaysMsgf(IsValid(SGPawn), TEXT("%s"), TEXT("ERROR: invalid SenseGlove pawn!")))
{
return;
}
SGPawn->OnGrabStateUpdated().AddWeakLambda(
this, [=](const FSGGrabState& GrabState) -> void
{
if (!IsValid(SGPawn))
{
return;
}
if (!IsValid(GrabState.Hand))
{
return;
}
if (SGPawn->IsGrabbing(GrabState.Hand))
{
if (!IsValid(GrabState.ActorThumbCanGrab) ||
(GrabState.ActorIndexCanGrab != GrabState.ActorThumbCanGrab
&& GrabState.ActorMiddleCanGrab != GrabState.ActorThumbCanGrab))
{
SGPawn->Release(GrabState.Hand);
}
}
else
{
if (SGPawn->CanGrab(GrabState.Hand, GrabState.ActorThumbCanGrab))
{
SGPawn->Grab(GrabState.Hand, GrabState.ActorThumbCanGrab);
}
}
});
SGPawn->OnTouchStateUpdated().AddWeakLambda(
this, [=](const FSGTouchState& TouchState) -> void
{
Pimpl->UpdateHapticsFeedback(TouchState);
});
}
ASGPlayerController::FImpl::FImpl(ASGPlayerController* InOwner)
: Owner(InOwner)
{
}
ASGPlayerController::FImpl::~FImpl() = default;
USGBuzzCommand* ASGPlayerController::FImpl::GetBuzzCommand(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const
{
const int32 ThumbBuzzLevel = GetBuzzLevel(ActorThumbTouching);
const int32 IndexBuzzLevel = GetBuzzLevel(ActorIndexTouching);
const int32 MiddleBuzzLevel = GetBuzzLevel(ActorMiddleTouching);
const int32 RingBuzzLevel = GetBuzzLevel(ActorRingTouching);
const int32 PinkyBuzzLevel = GetBuzzLevel(ActorThumbTouching);
if (ThumbBuzzLevel <= 0 && IndexBuzzLevel <= 0 && MiddleBuzzLevel <= 0 && RingBuzzLevel <= 0 && PinkyBuzzLevel <= 0)
{
return nullptr;
}
USGBuzzCommand* BuzzCommand = USGBuzzCommand::NewBuzzCommand(
Owner,
GetBuzzLevel(ActorThumbTouching),
GetBuzzLevel(ActorIndexTouching),
GetBuzzLevel(ActorMiddleTouching),
GetBuzzLevel(ActorRingTouching),
GetBuzzLevel(ActorPinkyTouching)
);
return BuzzCommand;
}
USGForceFeedbackCommand* ASGPlayerController::FImpl::GetForceFeedbackCommand(
const AActor* ActorThumbTouching,
const AActor* ActorIndexTouching,
const AActor* ActorMiddleTouching,
const AActor* ActorRingTouching,
const AActor* ActorPinkyTouching) const
{
const int32 ThumbForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching);
const int32 IndexForceFeedbackLevel = GetForceFeedbackLevel(ActorIndexTouching);
const int32 MiddleForceFeedbackLevel = GetForceFeedbackLevel(ActorMiddleTouching);
const int32 RingForceFeedbackLevel = GetForceFeedbackLevel(ActorRingTouching);
const int32 PinkyForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching);
if (ThumbForceFeedbackLevel <= 0 && IndexForceFeedbackLevel <= 0 && MiddleForceFeedbackLevel <= 0
&& RingForceFeedbackLevel <= 0 && PinkyForceFeedbackLevel <= 0)
{
return nullptr;
}
USGForceFeedbackCommand* ForceFeedbackCommand = USGForceFeedbackCommand::NewForceFeedbackCommand(
Owner,
GetForceFeedbackLevel(ActorThumbTouching),
GetForceFeedbackLevel(ActorIndexTouching),
GetForceFeedbackLevel(ActorMiddleTouching),
GetForceFeedbackLevel(ActorRingTouching),
GetForceFeedbackLevel(ActorPinkyTouching)
);
return ForceFeedbackCommand;
}
void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& TouchState)
{
if (!IsValid(TouchState.Hand))
{
return;
}
USGHapticGlove* Glove = TouchState.Hand->GetConnectedGlove();
if (!IsValid(Glove))
{
return;
}
const USGBuzzCommand* BuzzCommand{
GetBuzzCommand(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState.ActorRingTouching,TouchState.ActorPinkyTouching)
};
if (IsValid(BuzzCommand))
{
Glove->SendHaptics(BuzzCommand);
const float Duration = FImpl::GetBuzzDuration(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching);
Owner->GetWorldTimerManager().ClearTimer(TouchBuzzStopTimer);
FTimerDelegate TouchBuzzStopHandler;
TouchBuzzStopHandler.BindLambda([=]()-> void
{
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
});
Owner->GetWorldTimerManager().SetTimer(
TouchBuzzStopTimer, TouchBuzzStopHandler, Duration, false, -1.0f);
}
else
{
Glove->SendHaptics(USGBuzzCommand::Off(Owner));
}
const USGForceFeedbackCommand* ForceFeedbackCommand{
GetForceFeedbackCommand(
TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching,
TouchState. ActorRingTouching, TouchState.ActorPinkyTouching)
};
if (IsValid(ForceFeedbackCommand))
{
Glove->SendHaptics(ForceFeedbackCommand);
}
else
{
Glove->SendHaptics(USGForceFeedbackCommand::Off(Owner));
}
}
void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,703 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/GameFramework/SGVirtualHandActor.h"
#include "Components/SphereComponent.h"
#include "SenseGlove/Components/SGGrabComponent.h"
#include "SenseGlove/Components/SGTouchComponent.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "SenseGlove/Components/SGWristTrackerComponent.h"
struct ASGVirtualHandActor::FImpl
{
/************************
* Owner object
************************/
ASGVirtualHandActor* Owner;
/************************
* Constructor / Destructor
************************/
explicit FImpl(ASGVirtualHandActor* InOwner);
~FImpl();
/************************
* Default copy constructor & copy assignment operator
************************/
FImpl(const FImpl& Rhs) = default;
FImpl& operator=(const FImpl& Rhs) = default;
/************************
* Methods
************************/
void BindFingerGrabOverlapEvents();
void UnbindFingerGrabOverlapEvents();
void BindFingerTouchOverlapEvents();
void UnbindFingerTouchOverlapEvents();
bool IsFingerGrabbing(AActor* Actor) const;
bool IsFingerTouching(AActor* Actor) const;
};
ASGVirtualHandActor::ASGVirtualHandActor(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer),
Pimpl(TUniquePtr<FImpl, FImplDeleter>(new FImpl{this}, PimplDeleter))
{
PrimaryActorTick.bCanEverTick = true;
SceneRoot = CreateDefaultSubobject<USceneComponent>(TEXT("SceneRoot"));
SetRootComponent(SceneRoot);
VirtualHand = CreateDefaultSubobject<USGVirtualHandComponent>(TEXT("VirtualHand"));
VirtualHand->SetupAttachment(RootComponent);
VirtualHand->SetRelativeRotation(FRotator{0.0f, -90.0f, 0.0f},
false, nullptr, ETeleportType::None);
ThumbFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("ThumbFingertipGrabCollider"));
ThumbFingertipGrabCollider->SetupAttachment(VirtualHand, VirtualHand->GetThumbFingertipGrabSocketName());
ThumbFingertipGrabCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsGrabColliderSize());
ThumbFingertipGrabCollider->SetCastShadow(false);
ThumbFingertipGrabCollider->bCastDynamicShadow = false;
ThumbFingertipGrabCollider->SetReceivesDecals(true);
ThumbFingertipGrabCollider->SetCanEverAffectNavigation(false);
ThumbFingertipGrabCollider->SetCollisionObjectType(ECC_WorldDynamic);
ThumbFingertipGrabCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
ThumbFingertipGrabCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
ThumbFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
IndexFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("IndexFingertipGrabCollider"));
IndexFingertipGrabCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsGrabColliderSize());
IndexFingertipGrabCollider->SetupAttachment(VirtualHand, VirtualHand->GetIndexFingertipGrabSocketName());
IndexFingertipGrabCollider->SetCastShadow(false);
IndexFingertipGrabCollider->bCastDynamicShadow = false;
IndexFingertipGrabCollider->SetReceivesDecals(true);
IndexFingertipGrabCollider->SetCanEverAffectNavigation(false);
IndexFingertipGrabCollider->SetCollisionObjectType(ECC_WorldDynamic);
IndexFingertipGrabCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
IndexFingertipGrabCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
IndexFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
MiddleFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("MiddleFingertipGrabCollider"));
MiddleFingertipGrabCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsGrabColliderSize());
MiddleFingertipGrabCollider->SetupAttachment(VirtualHand, VirtualHand->GetMiddleFingertipGrabSocketName());
MiddleFingertipGrabCollider->SetCastShadow(false);
MiddleFingertipGrabCollider->bCastDynamicShadow = false;
MiddleFingertipGrabCollider->SetReceivesDecals(true);
MiddleFingertipGrabCollider->SetCanEverAffectNavigation(false);
MiddleFingertipGrabCollider->SetCollisionObjectType(ECC_WorldDynamic);
MiddleFingertipGrabCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
MiddleFingertipGrabCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
MiddleFingertipGrabCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
ThumbFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("ThumbFingertipTouchCollider"));
ThumbFingertipTouchCollider->SetupAttachment(VirtualHand, VirtualHand->GetThumbFingertipTouchSocketName());
ThumbFingertipTouchCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsTouchColliderSize());
ThumbFingertipTouchCollider->SetCastShadow(false);
ThumbFingertipTouchCollider->bCastDynamicShadow = false;
ThumbFingertipTouchCollider->SetReceivesDecals(true);
ThumbFingertipTouchCollider->SetCanEverAffectNavigation(false);
ThumbFingertipTouchCollider->SetCollisionObjectType(ECC_WorldDynamic);
ThumbFingertipTouchCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
ThumbFingertipTouchCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
ThumbFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
IndexFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("IndexFingertipTouchCollider"));
IndexFingertipTouchCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsTouchColliderSize());
IndexFingertipTouchCollider->SetupAttachment(VirtualHand, VirtualHand->GetIndexFingertipTouchSocketName());
IndexFingertipTouchCollider->SetCastShadow(false);
IndexFingertipTouchCollider->bCastDynamicShadow = false;
IndexFingertipTouchCollider->SetReceivesDecals(true);
IndexFingertipTouchCollider->SetCanEverAffectNavigation(false);
IndexFingertipTouchCollider->SetCollisionObjectType(ECC_WorldDynamic);
IndexFingertipTouchCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
IndexFingertipTouchCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
IndexFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
MiddleFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("MiddleFingertipTouchCollider"));
MiddleFingertipTouchCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsTouchColliderSize());
MiddleFingertipTouchCollider->SetupAttachment(VirtualHand, VirtualHand->GetMiddleFingertipTouchSocketName());
MiddleFingertipTouchCollider->SetCastShadow(false);
MiddleFingertipTouchCollider->bCastDynamicShadow = false;
MiddleFingertipTouchCollider->SetReceivesDecals(true);
MiddleFingertipTouchCollider->SetCanEverAffectNavigation(false);
MiddleFingertipTouchCollider->SetCollisionObjectType(ECC_WorldDynamic);
MiddleFingertipTouchCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
MiddleFingertipTouchCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
MiddleFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
RingFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("RingFingertipTouchCollider"));
RingFingertipTouchCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsTouchColliderSize());
RingFingertipTouchCollider->SetupAttachment(VirtualHand, VirtualHand->GetRingFingertipTouchSocketName());
RingFingertipTouchCollider->SetCastShadow(false);
RingFingertipTouchCollider->bCastDynamicShadow = false;
RingFingertipTouchCollider->SetReceivesDecals(true);
RingFingertipTouchCollider->SetCanEverAffectNavigation(false);
RingFingertipTouchCollider->SetCollisionObjectType(ECC_WorldDynamic);
RingFingertipTouchCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
RingFingertipTouchCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
RingFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
PinkyFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(
this, TEXT("PinkyFingertipTouchCollider"));
PinkyFingertipTouchCollider->SetRelativeScale3D(VirtualHand->GetDefaultFingertipsTouchColliderSize());
PinkyFingertipTouchCollider->SetupAttachment(VirtualHand, VirtualHand->GetPinkyFingertipTouchSocketName());
PinkyFingertipTouchCollider->SetCastShadow(false);
PinkyFingertipTouchCollider->bCastDynamicShadow = false;
PinkyFingertipTouchCollider->SetReceivesDecals(true);
PinkyFingertipTouchCollider->SetCanEverAffectNavigation(false);
PinkyFingertipTouchCollider->SetCollisionObjectType(ECC_WorldDynamic);
PinkyFingertipTouchCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
PinkyFingertipTouchCollider->SetCollisionResponseToAllChannels(ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap);
PinkyFingertipTouchCollider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap);
WristTracker = CreateDefaultSubobject<USGWristTrackerComponent>(TEXT("WristTracker"));
WristTracker->SetupAttachment(RootComponent);
WristTracker->SetRight(VirtualHand->IsRight());
GrabState = FSGGrabState(VirtualHand, nullptr, nullptr, nullptr, nullptr);
TouchState = FSGTouchState(VirtualHand, nullptr, nullptr, nullptr, nullptr, nullptr);
}
void ASGVirtualHandActor::BeginPlay()
{
Super::BeginPlay();
ensureAlwaysMsgf(
(WristTracker->IsLeft() && VirtualHand->IsLeft())
|| (WristTracker->IsRight() && VirtualHand->IsRight()),
TEXT("The virtual hand component and the wrist tracker component do not track the same hand!"));
WristTracker->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void
{
VirtualHand->SetWorldLocation(Location);
});
WristTracker->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void
{
VirtualHand->SetWorldRotation(Rotation);
});
Pimpl->BindFingerGrabOverlapEvents();
Pimpl->BindFingerTouchOverlapEvents();
}
void ASGVirtualHandActor::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
Super::EndPlay(EndPlayReason);
Pimpl->UnbindFingerGrabOverlapEvents();
Pimpl->UnbindFingerTouchOverlapEvents();
}
void ASGVirtualHandActor::PreInitializeComponents()
{
Super::PreInitializeComponents();
WristTracker->SetRight(VirtualHand->IsRight());
}
void ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
(void) OverlappedComponent;
(void) OtherBodyIndex;
(void) bFromSweep;
(void) SweepResult;
if (USGGrabComponent::IsGrabbable(OtherActor))
{
GrabState.ActorThumbCanGrab = OtherActor;
GrabStateUpdatedEvent.Broadcast(GrabState);
}
}
void ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherBodyIndex;
if (GrabState.ActorThumbCanGrab == OtherActor)
{
GrabState.ActorThumbCanGrab = nullptr;
GrabStateUpdatedEvent.Broadcast(GrabState);
}
}
void ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
(void) OverlappedComponent;
(void) OtherBodyIndex;
(void) bFromSweep;
(void) SweepResult;
if (USGGrabComponent::IsGrabbable(OtherActor))
{
GrabState.ActorIndexCanGrab = OtherActor;
GrabStateUpdatedEvent.Broadcast(GrabState);
}
}
void ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherBodyIndex;
if (GrabState.ActorIndexCanGrab == OtherActor)
{
GrabState.ActorIndexCanGrab = nullptr;
GrabStateUpdatedEvent.Broadcast(GrabState);
}
}
void ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
(void) OverlappedComponent;
(void) OtherBodyIndex;
(void) bFromSweep;
(void) SweepResult;
if (USGGrabComponent::IsGrabbable(OtherActor))
{
GrabState.ActorMiddleCanGrab = OtherActor;
GrabStateUpdatedEvent.Broadcast(GrabState);
}
}
void ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherBodyIndex;
if (GrabState.ActorMiddleCanGrab == OtherActor)
{
GrabState.ActorMiddleCanGrab = nullptr;
GrabStateUpdatedEvent.Broadcast(GrabState);
}
}
void ASGVirtualHandActor::OnThumbFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
(void) bFromSweep;
(void) SweepResult;
if (USGTouchComponent::IsTouchable(OtherActor))
{
TouchState.ActorThumbTouching = OtherActor;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnThumbFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
if (TouchState.ActorThumbTouching == OtherActor)
{
TouchState.ActorThumbTouching = nullptr;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnIndexFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
(void) bFromSweep;
(void) SweepResult;
if (USGTouchComponent::IsTouchable(OtherActor))
{
TouchState.ActorIndexTouching = OtherActor;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnIndexFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
if (TouchState.ActorIndexTouching == OtherActor)
{
TouchState.ActorIndexTouching = nullptr;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnMiddleFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
(void) bFromSweep;
(void) SweepResult;
if (USGTouchComponent::IsTouchable(OtherActor))
{
TouchState.ActorMiddleTouching = OtherActor;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnMiddleFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
if (TouchState.ActorMiddleTouching == OtherActor)
{
TouchState.ActorMiddleTouching = nullptr;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnRingFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
if (USGTouchComponent::IsTouchable(OtherActor))
{
TouchState.ActorRingTouching = OtherActor;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnRingFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
if (TouchState.ActorRingTouching == OtherActor)
{
TouchState.ActorRingTouching = nullptr;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnPinkyFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex,
const bool bFromSweep,
const FHitResult& SweepResult)
{
if (USGTouchComponent::IsTouchable(OtherActor))
{
TouchState.ActorPinkyTouching = OtherActor;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
void ASGVirtualHandActor::OnPinkyFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
const int32 OtherBodyIndex)
{
(void) OverlappedComponent;
(void) OtherComp;
(void) OtherBodyIndex;
if (TouchState.ActorPinkyTouching == OtherActor)
{
TouchState.ActorPinkyTouching = nullptr;
TouchStateUpdatedEvent.Broadcast(TouchState);
}
}
bool ASGVirtualHandActor::IsLeft() const
{
return WristTracker->IsLeft() && VirtualHand->IsLeft();
}
bool ASGVirtualHandActor::IsRight() const
{
return WristTracker->IsRight() && VirtualHand->IsRight();
}
void ASGVirtualHandActor::SetRight(const bool bRight)
{
WristTracker->SetRight(bRight);
VirtualHand->SetRight(bRight);
}
bool ASGVirtualHandActor::IsGloveConnected() const
{
return VirtualHand->IsGloveConnected();
}
ASGVirtualHandActor::FImpl::FImpl(ASGVirtualHandActor* InOwner)
: Owner(InOwner)
{
}
void ASGVirtualHandActor::FImpl::BindFingerGrabOverlapEvents()
{
Owner->ThumbFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapBegins);
Owner->ThumbFingertipGrabCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapEnds);
Owner->IndexFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapBegins);
Owner->IndexFingertipGrabCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapEnds);
Owner->MiddleFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapBegins);
Owner->MiddleFingertipGrabCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapEnds);
}
void ASGVirtualHandActor::FImpl::UnbindFingerGrabOverlapEvents()
{
Owner->ThumbFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapBegins);
Owner->ThumbFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipGrabColliderOverlapEnds);
Owner->IndexFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapBegins);
Owner->IndexFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipGrabColliderOverlapEnds);
Owner->MiddleFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapBegins);
Owner->MiddleFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipGrabColliderOverlapEnds);
}
void ASGVirtualHandActor::FImpl::BindFingerTouchOverlapEvents()
{
Owner->ThumbFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipTouchColliderOverlapBegins);
Owner->ThumbFingertipTouchCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipTouchColliderOverlapEnds);
Owner->IndexFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipTouchColliderOverlapBegins);
Owner->IndexFingertipTouchCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipTouchColliderOverlapEnds);
Owner->MiddleFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipTouchColliderOverlapBegins);
Owner->MiddleFingertipTouchCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipTouchColliderOverlapEnds);
Owner->RingFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnRingFingertipTouchColliderOverlapBegins);
Owner->RingFingertipTouchCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnRingFingertipTouchColliderOverlapEnds);
Owner->PinkyFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnPinkyFingertipTouchColliderOverlapBegins);
Owner->PinkyFingertipTouchCollider->OnComponentEndOverlap.AddDynamic(
Owner, &ASGVirtualHandActor::OnPinkyFingertipTouchColliderOverlapEnds);
}
void ASGVirtualHandActor::FImpl::UnbindFingerTouchOverlapEvents()
{
Owner->ThumbFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipTouchColliderOverlapBegins);
Owner->ThumbFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnThumbFingertipTouchColliderOverlapEnds);
Owner->IndexFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipTouchColliderOverlapBegins);
Owner->IndexFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnIndexFingertipTouchColliderOverlapEnds);
Owner->MiddleFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipTouchColliderOverlapBegins);
Owner->MiddleFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnMiddleFingertipTouchColliderOverlapEnds);
Owner->RingFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnRingFingertipTouchColliderOverlapBegins);
Owner->RingFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnRingFingertipTouchColliderOverlapEnds);
Owner->PinkyFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnPinkyFingertipTouchColliderOverlapBegins);
Owner->PinkyFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic(
Owner, &ASGVirtualHandActor::OnPinkyFingertipTouchColliderOverlapEnds);
}
ASGVirtualHandActor::FImpl::~FImpl() = default;
void ASGVirtualHandActor::FImplDeleter::operator()(const FImpl* P) const
{
delete P;
}
@@ -1,62 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Haptics/SGGrabState.h"
#include "GameFramework/Actor.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
FSGGrabState::FSGGrabState()
: Hand(nullptr),
ActorThumbCanGrab(nullptr),
ActorIndexCanGrab(nullptr),
ActorMiddleCanGrab(nullptr),
GrabbedActor(nullptr)
{
}
FSGGrabState::FSGGrabState(USGVirtualHandComponent* InHand,
AActor* InActorThumbCanGrab,
AActor* InActorIndexCanGrab,
AActor* InActorMiddleCanGrab,
AActor* InGrabbedActor)
: Hand(InHand),
ActorThumbCanGrab(InActorThumbCanGrab),
ActorIndexCanGrab(InActorIndexCanGrab),
ActorMiddleCanGrab(InActorMiddleCanGrab),
GrabbedActor(InGrabbedActor)
{
}
@@ -1,65 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGlove/Haptics/SGTouchState.h"
#include "GameFramework/Actor.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
FSGTouchState::FSGTouchState()
: Hand(nullptr),
ActorThumbTouching(nullptr),
ActorIndexTouching(nullptr),
ActorMiddleTouching(nullptr),
ActorRingTouching(nullptr),
ActorPinkyTouching(nullptr)
{
}
FSGTouchState::FSGTouchState(USGVirtualHandComponent* InHand,
AActor* InActorThumbTouching,
AActor* InActorIndexTouching,
AActor* InActorMiddleTouching,
AActor* InActorRingTouching,
AActor* InActorPinkyTouching)
: Hand(InHand),
ActorThumbTouching(InActorThumbTouching),
ActorIndexTouching(InActorIndexTouching),
ActorMiddleTouching(InActorMiddleTouching),
ActorRingTouching(InActorRingTouching),
ActorPinkyTouching(InActorPinkyTouching)
{
}
@@ -1,61 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGloveModule.h"
#include "SGLog/SGLog.h"
#define LOCTEXT_NAMESPACE "FSenseGloveModule"
void FSenseGloveModule::StartupModule()
{
SGLOG("Starting up SenseGlove module...");
}
void FSenseGloveModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGlove module...");
}
void FSenseGloveModule::PostLoadCallback()
{
SGLOG("Loading of SenseGlove module has succeeded!");
}
void FSenseGloveModule::ShutdownModule()
{
SGLOG("Shutting down SenseGlove module...");
}
#undef LOCTEXT_NAMESPACE
@@ -1,49 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Modules/ModuleInterface.h"
class FSenseGloveModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void PreUnloadCallback() override;
virtual void PostLoadCallback() override;
virtual void ShutdownModule() override;
};
@@ -1,51 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Animation/AnimInstance.h"
#include "SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.h"
#include "SGVirtualHandAnimInstance.generated.h"
UCLASS(Transient, Blueprintable, BlueprintType, meta=(BlueprintThreadSafe), Within=SkeletalMeshComponent)
class SENSEGLOVE_API USGVirtualHandAnimInstance : public UAnimInstance
{
GENERATED_UCLASS_BODY()
protected:
virtual FSGVirtualHandAnimInstanceProxy* CreateAnimInstanceProxy() override;
};
@@ -1,60 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Animation/AnimInstanceProxy.h"
#include "Templates/UniquePtr.h"
#include "UObject/NameTypes.h"
#include "SGVirtualHandAnimInstanceProxy.generated.h"
USTRUCT()
struct SENSEGLOVE_API FSGVirtualHandAnimInstanceProxy : public FAnimInstanceProxy
{
GENERATED_USTRUCT_BODY()
public:
TMap<FName, FRotator> BonesRotations;
public:
FSGVirtualHandAnimInstanceProxy();
FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance);
protected:
virtual void PreEvaluateAnimation(UAnimInstance* InAnimInstance) override;
virtual bool Evaluate(FPoseContext& Output) override;
};
@@ -1,199 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Components/SceneComponent.h"
#include "Engine/EngineTypes.h"
#include "Templates/UniquePtr.h"
#include "UObject/NameTypes.h"
#include "SGGrabComponent.generated.h"
class AActor;
UCLASS(Blueprintable, BlueprintType, meta=(BlueprintSpawnableComponent))
class SENSEGLOVE_API USGGrabComponent : public USceneComponent
{
GENERATED_UCLASS_BODY()
public:
static USGGrabComponent* GetGrabComponent(const AActor* Actor);
static bool IsGrabbable(const AActor* Actor);
private:
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
EAttachmentRule AttachmentLocationRule;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
EAttachmentRule AttachmentRotationRule;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
EAttachmentRule AttachmentScaleRule;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
uint8 bAttachmentWeldSimulatedBodies : 1;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
FName AttachmentSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
EDetachmentRule DetachmentLocationRule;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
EDetachmentRule DetachmentRotationRule;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
EDetachmentRule DetachmentScaleRule;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
uint8 bDetachmentCallModify : 1;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
uint8 bAffectPhysicsState : 1;
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
public:
FORCEINLINE EAttachmentRule GetAttachmentLocationRule() const
{
return AttachmentLocationRule;
}
FORCEINLINE void SetAttachmentLocationRule(const EAttachmentRule InAttachmentLocationRule)
{
AttachmentLocationRule = InAttachmentLocationRule;
}
FORCEINLINE EAttachmentRule GetAttachmentRotationRule() const
{
return AttachmentRotationRule;
}
FORCEINLINE void SetAttachmentRotationRule(const EAttachmentRule InAttachmentRotationRule)
{
AttachmentRotationRule = InAttachmentRotationRule;
}
FORCEINLINE EAttachmentRule GetAttachmentScaleRule() const
{
return AttachmentScaleRule;
}
FORCEINLINE void SetAttachmentScaleRule(const EAttachmentRule InAttachmentScaleRule)
{
AttachmentScaleRule = InAttachmentScaleRule;
}
FORCEINLINE bool GetAttachmentWeldSimulatedBodies() const
{
return !!bAttachmentWeldSimulatedBodies;
}
FORCEINLINE void SetAttachmentWeldSimulatedBodies(const bool bInAttachmentWeldSimulatedBodies)
{
bAttachmentWeldSimulatedBodies = bInAttachmentWeldSimulatedBodies;
}
FORCEINLINE const FName& GetAttachmentSocketName() const
{
return AttachmentSocketName;
}
FORCEINLINE void SetAttachmentSocketName(const FName& InAttachmentSocketName)
{
AttachmentSocketName = InAttachmentSocketName;
}
FORCEINLINE EDetachmentRule GetDetachmentLocationRule() const
{
return DetachmentLocationRule;
}
FORCEINLINE void SetDetachmentLocationRule(const EDetachmentRule InDetachmentLocationRule)
{
DetachmentLocationRule = InDetachmentLocationRule;
}
FORCEINLINE EDetachmentRule GetDetachmentRotationRule() const
{
return DetachmentRotationRule;
}
FORCEINLINE void SetDetachmentRotationRule(const EDetachmentRule InDetachmentRotationRule)
{
DetachmentRotationRule = InDetachmentRotationRule;
}
FORCEINLINE EDetachmentRule GetDetachmentScaleRule() const
{
return DetachmentScaleRule;
}
FORCEINLINE void SetDetachmentScaleRule(const EDetachmentRule InDetachmentScaleRule)
{
DetachmentScaleRule = InDetachmentScaleRule;
}
FORCEINLINE bool GetDetachmentInCallModify() const
{
return !!bDetachmentCallModify;
}
FORCEINLINE void SetDetachmentInCallModify(const bool bInDetachmentCallModify)
{
bDetachmentCallModify = bInDetachmentCallModify;
}
FORCEINLINE bool GetAffectPhysicsState() const
{
return !!bAffectPhysicsState;
}
FORCEINLINE void SetAffectPhysicsState(const bool bInAffectPhysicsState)
{
bAffectPhysicsState = bInAffectPhysicsState;
}
};
@@ -1,109 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Components/SceneComponent.h"
#include "Templates/UniquePtr.h"
#include "SGTouchComponent.generated.h"
class AActor;
UCLASS(Blueprintable, BlueprintType, meta=(BlueprintSpawnableComponent))
class SENSEGLOVE_API USGTouchComponent : public USceneComponent
{
GENERATED_UCLASS_BODY()
public:
static USGTouchComponent* GetTouchComponent(const AActor* Actor);
static bool IsTouchable(const AActor* Actor);
private:
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
int32 BuzzLevel;
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
float BuzzDuration;
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", ClampMin = "0", ClampMax = "100", UIMin = "0", UIMax = "100"))
int32 ForceFeedbackLevel;
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
public:
FORCEINLINE int32 GetBuzzLevel() const
{
return BuzzLevel;
}
FORCEINLINE void SetBuzzLevel(const int32 Level)
{
BuzzLevel = Level;
}
FORCEINLINE float GetBuzzDuration() const
{
return BuzzDuration;
}
FORCEINLINE void SetBuzzDuration(const float Duration)
{
BuzzDuration = Duration;
}
FORCEINLINE int32 GetForceFeedbackLevel() const
{
return ForceFeedbackLevel;
}
FORCEINLINE void SetForceFeedbackLevel(const int32 Level)
{
ForceFeedbackLevel = Level;
}
};
@@ -1,317 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Containers/Array.h"
#include "Components/SkeletalMeshComponent.h"
#include "Containers/Map.h"
#include "GameFramework/Actor.h"
#include "Math/Rotator.h"
#include "Math/Transform.h"
#include "ReferenceSkeleton.h"
#include "Templates/UniquePtr.h"
#include "UObject/NameTypes.h"
#include "SGSettings/SGDebugVirtualHandSettings.h"
#include "SGVirtualHandComponent.generated.h"
class USphereComponent;
class USkeletalMesh;
class USGHandPose;
class USGHapticGlove;
class USGWristTrackerComponent;
UCLASS(Config=Engine, Blueprintable, ClassGroup=(Rendering, Common), hidecategories=(Object, "Mesh|SkeletalAsset"),
editinlinenew, meta=(BlueprintSpawnableComponent))
class SENSEGLOVE_API USGVirtualHandComponent : public USkeletalMeshComponent
{
GENERATED_UCLASS_BODY()
public:
static const TArray<TArray<FName>>& GetLeftHandFingerBoneNames();
static const TArray<TArray<FName>>& GetRightHandFingerBoneNames();
static const FName& GetLeftHandFingerBoneName(int32 Finger, int32 Joint);
static const FName& GetRightHandFingerBoneName(int32 Finger, int32 Joint);
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
private:
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
uint8 bRight : 1;
UPROPERTY(EditAnywhere, Category="SenseGlove | Haptics", meta=(AllowPrivateAccess="false"))
uint8 bAutoStopAllHapticsOnEndPlay : 1;
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
FName GrabSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
FVector DefaultFingertipsGrabColliderSize;
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
FName ThumbFingertipGrabSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
FName IndexFingertipGrabSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Grab", meta=(AllowPrivateAccess="false"))
FName MiddleFingertipGrabSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Touch", meta=(AllowPrivateAccess="false"))
FVector DefaultFingertipsTouchColliderSize;
UPROPERTY(EditAnywhere, Category="SenseGlove | Touch", meta=(AllowPrivateAccess="false"))
FName ThumbFingertipTouchSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Touch", meta=(AllowPrivateAccess="false"))
FName IndexFingertipTouchSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Touch", meta=(AllowPrivateAccess="false"))
FName MiddleFingertipTouchSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Touch", meta=(AllowPrivateAccess="false"))
FName RingFingertipTouchSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove | Touch", meta=(AllowPrivateAccess="false"))
FName PinkyFingertipTouchSocketName;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
uint8 bHiddenInGameIfNoGloveDetected : 1;
UPROPERTY(EditAnywhere, Category="SenseGlove",
meta=(AllowPrivateAccess="false", EditCondition="bDrawDebugVirtualHand", EditConditionHides))
FSGDebugVirtualHandSettings DebugVirtualHandSettings;
private:
UPROPERTY(Transient)
uint8 bBackendInitialized : 1;
UPROPERTY(Transient)
USGHapticGlove* Glove;
UPROPERTY(Transient)
USGWristTrackerComponent* WristTracker;
public:
FORCEINLINE bool IsLeft() const
{
return !IsRight();
}
FORCEINLINE bool IsRight() const
{
return !!bRight;
}
void SetRight(const bool bInRight);
FORCEINLINE bool AutoStopsAllHapticsOnEndPlay() const
{
return !!bAutoStopAllHapticsOnEndPlay;
}
FORCEINLINE void SetAutoStopAllHapticsOnEndPlay(const bool bInAutoStopAllHapticsOnEndPlay)
{
bAutoStopAllHapticsOnEndPlay = bInAutoStopAllHapticsOnEndPlay;
}
FORCEINLINE const FName& GetGrabSocketName() const
{
return GrabSocketName;
}
FORCEINLINE const FVector& GetDefaultFingertipsGrabColliderSize() const
{
return DefaultFingertipsGrabColliderSize;
}
FORCEINLINE const FName& GetThumbFingertipGrabSocketName() const
{
return ThumbFingertipGrabSocketName;
}
FORCEINLINE void SetThumbFingertipGrabSocketName(const FName& SocketName)
{
ThumbFingertipGrabSocketName = SocketName;
}
FORCEINLINE const FName& GetIndexFingertipGrabSocketName() const
{
return IndexFingertipGrabSocketName;
}
FORCEINLINE void SetIndexFingertipGrabSocketName(const FName& SocketName)
{
IndexFingertipGrabSocketName = SocketName;
}
FORCEINLINE const FName& GetMiddleFingertipGrabSocketName() const
{
return MiddleFingertipGrabSocketName;
}
FORCEINLINE void SetMiddleFingertipGrabSocketName(const FName& SocketName)
{
MiddleFingertipGrabSocketName = SocketName;
}
FORCEINLINE const FVector& GetDefaultFingertipsTouchColliderSize() const
{
return DefaultFingertipsTouchColliderSize;
}
FORCEINLINE const FName& GetThumbFingertipTouchSocketName() const
{
return ThumbFingertipTouchSocketName;
}
FORCEINLINE void SetThumbFingertipTouchSocketName(const FName& SocketName)
{
ThumbFingertipTouchSocketName = SocketName;
}
FORCEINLINE const FName& GetIndexFingertipTouchSocketName() const
{
return IndexFingertipTouchSocketName;
}
FORCEINLINE void SetIndexFingertipTouchSocketName(const FName& SocketName)
{
IndexFingertipTouchSocketName = SocketName;
}
FORCEINLINE const FName& GetMiddleFingertipTouchSocketName() const
{
return MiddleFingertipTouchSocketName;
}
FORCEINLINE void SetMiddleFingertipTouchSocketName(const FName& SocketName)
{
MiddleFingertipTouchSocketName = SocketName;
}
FORCEINLINE const FName& GetRingFingertipTouchSocketName() const
{
return RingFingertipTouchSocketName;
}
FORCEINLINE void SetRingFingertipTouchSocketName(const FName& SocketName)
{
RingFingertipTouchSocketName = SocketName;
}
FORCEINLINE const FName& GetPinkyFingertipTouchSocketName() const
{
return PinkyFingertipTouchSocketName;
}
FORCEINLINE void SetPinkyFingertipTouchSocketName(const FName& SocketName)
{
PinkyFingertipTouchSocketName = SocketName;
}
FORCEINLINE bool IsHiddenInGameIfNoGloveDetected() const
{
return !!bHiddenInGameIfNoGloveDetected;
}
FORCEINLINE void SetHiddenIfNoGloveDetected(const bool bInHiddenIfNoGloveDetected)
{
bHiddenInGameIfNoGloveDetected = bInHiddenIfNoGloveDetected;
}
FORCEINLINE void SetWristTracker(USGWristTrackerComponent* InWristTracker)
{
WristTracker = InWristTracker;
}
public:
virtual void SetAnimClass(class UClass* NewClass) override;
virtual void PostInitProperties() override;
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif /* WITH_EDITOR */
virtual void InitializeComponent() override;
virtual void UninitializeComponent() override;
virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
virtual void TickComponent(float DeltaTime,
enum ELevelTick TickType,
FActorComponentTickFunction* ThisTickFunction) override;
virtual void SetSkeletalMesh(USkeletalMesh* NewMesh, bool bReinitPose = true) override;
protected:
virtual void EditorTick(float DeltaTime,
enum ELevelTick TickType,
FActorComponentTickFunction* ThisTickFunction);
public:
bool IsGloveConnected() const;
FORCEINLINE USGHapticGlove* GetConnectedGlove() const
{
return Glove;
}
USGHandPose* GetHandPose();
public:
const FName& GetFingerBoneName(int32 Finger, int32 Joint) const;
const FTransform& GetFingerBoneRefTransform(int32 Finger, int32 Joint) const;
FRotator GetFingerBoneRefRotation(int32 Finger, int32 Joint) const;
TMap<FName, FRotator> GetFingersBonesRotations();
};
@@ -1,235 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "GameFramework/Actor.h"
#include "Math/Rotator.h"
#include "Math/Vector.h"
#include "MotionControllerComponent.h"
#include "Templates/UniquePtr.h"
#include "SGSettings/SGDebugGizmoSettings.h"
#include "SGTypes/SGCoreTypes.h"
#include "SGWristTrackerComponent.generated.h"
class USGHandPose;
class USGHapticGlove;
UCLASS(Blueprintable, ClassGroup = MotionController, meta = (BlueprintSpawnableComponent))
class SENSEGLOVE_API USGWristTrackerComponent : public UMotionControllerComponent
{
GENERATED_UCLASS_BODY()
public:
DECLARE_EVENT_OneParam(USGWristTrackerComponent, FWristLocationChangedEvent, const FVector&)
FWristLocationChangedEvent& OnWristLocationChanged()
{
return WristLocationChangedEvent;
};
DECLARE_EVENT_OneParam(USGWristTrackerComponent, FWristRotationChangedEvent, const FRotator&)
FWristRotationChangedEvent& OnWristRotationChanged()
{
return WristRotationChangedEvent;
};
DECLARE_EVENT_TwoParams(USGWristTrackerComponent, FWristLocationAndRotationChangedEvent,
const FVector&, const FRotator&)
FWristLocationAndRotationChangedEvent& OnWristLocationAndRotationChanged()
{
return WristLocationAndRotationChangedEvent;
};
private:
FWristLocationChangedEvent WristLocationChangedEvent;
FWristRotationChangedEvent WristRotationChangedEvent;
FWristLocationAndRotationChangedEvent WristLocationAndRotationChangedEvent;
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
private:
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings")
uint8 bOverridePluginWristTrackingSettings : 1;
/**
* If set to Custom, any desired location and rotation can be specified.
*/
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
meta=(EditCondition="bOverridePluginWristTrackingSettings", EditConditionHides))
ESGPositionalTrackingHardware TrackingHardware;
/**
* Valid only if TrackingHardware is set to Custom.
*/
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
meta=(EditCondition=
"bOverridePluginWristTrackingSettings && TrackingHardware == ESGPositionalTrackingHardware::Custom",
EditConditionHides))
FVector TrackingHardwareLocationOffset;
/**
* Valid only if TrackingHardware is set to Custom.
*/
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
meta=(EditCondition=
"bOverridePluginWristTrackingSettings && TrackingHardware == ESGPositionalTrackingHardware::Custom",
EditConditionHides))
FRotator TrackingHardwareRotationOffset;
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings")
uint8 bOverridePluginWristTrackingDebugSettings : 1;
/**
* If enabled, draws debug Wrist trackers where possible.
*/
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
meta=(EditCondition="bOverridePluginWristTrackingDebugSettings", EditConditionHides))
uint8 bDrawWristTrackerDebugGizmo : 1;
/**
* Valid only if bDrawWristTrackerDebugGizmo is enabled.
*/
UPROPERTY(Config, EditAnywhere, Category = "Override Plugin Settings",
meta=(EditCondition="bOverridePluginWristTrackingDebugSettings && bDrawWristTrackerDebugGizmo",
EditConditionHides))
FSGDebugGizmoSettings WristTrackerDebugGizmoSettings;
private:
UPROPERTY(Transient)
uint8 bBackendInitialized : 1;
UPROPERTY(Transient)
USGHapticGlove* Glove;
UPROPERTY(Transient)
FVector WristLocation;
UPROPERTY(Transient)
FRotator WristRotation;
public:
FORCEINLINE bool OverridesPluginWristTrackingSettings() const
{
return !!bOverridePluginWristTrackingSettings;
}
FORCEINLINE void OverridePluginWristTrackingSettings(const bool bInOverridePluginWristTrackingSettings)
{
bOverridePluginWristTrackingSettings = bInOverridePluginWristTrackingSettings;
}
ESGPositionalTrackingHardware GetTrackingHardware() const;
void SetTrackingHardware(ESGPositionalTrackingHardware InTrackingHardware);
const FVector& GetTrackingHardwareLocationOffset() const;
void SetTrackingHardwareLocationOffset(const FVector& InTrackingHardwareLocationOffset);
const FRotator& GetTrackingHardwareRotationOffset() const;
void SetTrackingHardwareRotationOffset(const FRotator& InTrackingHardwareRotationOffset);
FORCEINLINE bool OverridesPluginWristTrackingDebugSettings() const
{
return !!bOverridePluginWristTrackingDebugSettings;
}
FORCEINLINE void OverridePluginWristTrackingDebugSettings(const bool bInOverridePluginWristTrackingDebugSettings)
{
bOverridePluginWristTrackingDebugSettings = bInOverridePluginWristTrackingDebugSettings;
}
bool GetDrawWristTrackerDebugGizmo() const;
void SetDrawWristTrackerDebugGizmo(bool bInDrawWristTrackerDebugGizmo);
const FSGDebugGizmoSettings& GetWristTrackerDebugGizmoSettings() const;
void SetWristTrackerDebugGizmoSettings(const FSGDebugGizmoSettings& InWristTrackerDebugGizmoSettings);
FORCEINLINE bool IsLeft() const
{
return GetTrackingSource() == EControllerHand::Left;
}
FORCEINLINE bool IsRight() const
{
return GetTrackingSource() == EControllerHand::Right;
}
void SetRight(const bool bRight);
FORCEINLINE const FVector& GetWristLocation() const
{
return WristLocation;
}
FORCEINLINE const FRotator& GetWristRotation() const
{
return WristRotation;
}
public:
#if WITH_EDITOR
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif /* WITH_EDITOR */
virtual void InitializeComponent() override;
virtual void UninitializeComponent() override;
virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
virtual void TickComponent(float DeltaTime,
enum ELevelTick TickType,
FActorComponentTickFunction* ThisTickFunction) override;
protected:
virtual void EditorTick(float DeltaTime,
enum ELevelTick TickType,
FActorComponentTickFunction* ThisTickFunction);
};
@@ -1,46 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "GameFramework/GameModeBase.h"
#include "SGGameModeBase.generated.h"
UCLASS(Config=Game, NotPlaceable, BlueprintType, Blueprintable, Transient)
class SENSEGLOVE_API ASGGameModeBase : public AGameModeBase
{
GENERATED_UCLASS_BODY()
};
@@ -1,612 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "GameFramework/Pawn.h"
#include "SenseGlove/Components/SGVirtualHandComponent.h"
#include "Templates/UniquePtr.h"
#include "SenseGlove/Haptics/SGGrabState.h"
#include "SenseGlove/Haptics/SGTouchState.h"
#include "SGPawn.generated.h"
class UCameraComponent;
class UPrimitiveComponent;
class USphereComponent;
class USGVirtualHandComponent;
class USGWristTrackerComponent;
UCLASS(Config=Game, BlueprintType, Blueprintable)
class SENSEGLOVE_API ASGPawn : public APawn
{
GENERATED_UCLASS_BODY()
public:
DECLARE_EVENT_OneParam(ASGVirtualHandActor, FGrabStateUpdatedEvent, const FSGGrabState& GrabState);
FGrabStateUpdatedEvent& OnGrabStateUpdated()
{
return GrabStateUpdatedEvent;
};
DECLARE_EVENT_OneParam(ASGVirtualHandActor, FTouchStateUpdatedEvent, const FSGTouchState& TouchState)
FTouchStateUpdatedEvent& OnTouchStateUpdated()
{
return TouchStateUpdatedEvent;
};
private:
FGrabStateUpdatedEvent GrabStateUpdatedEvent;
FTouchStateUpdatedEvent TouchStateUpdatedEvent;
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
private:
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USceneComponent* SceneRoot;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
UCameraComponent* Camera;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USGWristTrackerComponent* WristTrackerLeft;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USGVirtualHandComponent* HandLeft;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftThumbFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftIndexFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftMiddleFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftThumbFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftIndexFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftMiddleFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftRingFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* LeftPinkyFingertipTouchCollider;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USGWristTrackerComponent* WristTrackerRight;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USGVirtualHandComponent* HandRight;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightThumbFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightIndexFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightMiddleFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightThumbFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightIndexFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightMiddleFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightRingFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RightPinkyFingertipTouchCollider;
private:
UPROPERTY(Transient)
FSGGrabState LeftHandGrabState;
UPROPERTY(Transient)
FSGTouchState LeftHandTouchState;
UPROPERTY(Transient)
FSGGrabState RightHandGrabState;
UPROPERTY(Transient)
FSGTouchState RightHandTouchState;
public:
FORCEINLINE UCameraComponent* GetCamera() const
{
return Camera;
}
FORCEINLINE USGWristTrackerComponent* GetWristTrackerLeft() const
{
return WristTrackerLeft;
}
FORCEINLINE USGVirtualHandComponent* GetHandLeft() const
{
return HandLeft;
}
FORCEINLINE USphereComponent* GetLeftThumbFingertipGrabCollider() const
{
return LeftThumbFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetLeftIndexFingertipGrabCollider() const
{
return LeftIndexFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetLeftMiddleFingertipGrabCollider() const
{
return LeftMiddleFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetLeftThumbFingertipTouchCollider() const
{
return LeftThumbFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetLeftIndexFingertipTouchCollider() const
{
return LeftIndexFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetLeftMiddleFingertipTouchCollider() const
{
return LeftMiddleFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetLeftRingFingertipTouchCollider() const
{
return LeftRingFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetLeftPinkyFingertipTouchCollider() const
{
return LeftPinkyFingertipTouchCollider;
}
FORCEINLINE USGWristTrackerComponent* GetWristTrackerRight() const
{
return WristTrackerRight;
}
FORCEINLINE USGVirtualHandComponent* GetHandRight() const
{
return HandRight;
}
FORCEINLINE USphereComponent* GetRightThumbFingertipGrabCollider() const
{
return RightThumbFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetRightIndexFingertipGrabCollider() const
{
return RightIndexFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetRightMiddleFingertipGrabCollider() const
{
return RightMiddleFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetRightThumbFingertipTouchCollider() const
{
return RightThumbFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetRightIndexFingertipTouchCollider() const
{
return RightIndexFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetRightMiddleFingertipTouchCollider() const
{
return RightMiddleFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetRightRingFingertipTouchCollider() const
{
return RightRingFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetRightPinkyFingertipTouchCollider() const
{
return RightPinkyFingertipTouchCollider;
}
public:
virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
virtual void PreInitializeComponents() override;
protected:
UFUNCTION()
virtual void OnLeftThumbFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftThumbFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftIndexFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftIndexFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftMiddleFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftMiddleFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftThumbFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftThumbFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftIndexFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftIndexFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftMiddleFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftMiddleFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftRingFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftRingFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnLeftPinkyFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnLeftPinkyFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightThumbFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightThumbFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightIndexFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightIndexFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightMiddleFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightMiddleFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightThumbFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightThumbFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightIndexFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightIndexFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightMiddleFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightMiddleFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightRingFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightRingFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRightPinkyFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRightPinkyFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
public:
FORCEINLINE bool CanLeftHandGrab(const AActor* Actor) const
{
return !IsLeftHandGrabbing() && ((IsValid(Actor) && Actor == LeftHandGrabState.ActorThumbCanGrab)
&& (Actor == LeftHandGrabState.ActorIndexCanGrab || Actor == LeftHandGrabState.ActorMiddleCanGrab));
}
FORCEINLINE bool IsLeftHandGrabbing(const AActor* Actor) const
{
return IsValid(Actor) && LeftHandGrabState.GrabbedActor == Actor;
}
bool IsLeftHandGrabbing(AActor*& OutActor) const;
FORCEINLINE bool IsLeftHandGrabbing() const
{
return IsValid(LeftHandGrabState.GrabbedActor);
}
FORCEINLINE bool CanRightHandGrab(const AActor* Actor) const
{
return !IsRightHandGrabbing() && ((IsValid(Actor) && Actor == RightHandGrabState.ActorThumbCanGrab)
&& (Actor == RightHandGrabState.ActorIndexCanGrab || Actor == RightHandGrabState.ActorMiddleCanGrab));
}
FORCEINLINE bool IsRightHandGrabbing(const AActor* Actor) const
{
return IsValid(Actor) && RightHandGrabState.GrabbedActor == Actor;
}
FORCEINLINE bool IsRightHandGrabbing() const
{
return IsValid(RightHandGrabState.GrabbedActor);
}
bool IsRightHandGrabbing(AActor*& OutActor) const;
FORCEINLINE bool CanGrab(const USGVirtualHandComponent* Hand, const AActor* Actor) const
{
return Hand == HandLeft ? CanLeftHandGrab(Actor) : CanRightHandGrab(Actor);
}
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand, const AActor* Actor) const
{
return Hand == HandLeft ? IsLeftHandGrabbing(Actor) : IsRightHandGrabbing(Actor);
}
bool IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const;
FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand) const
{
return Hand == HandLeft ? IsLeftHandGrabbing() : IsRightHandGrabbing();
}
public:
FORCEINLINE void GrabLeft(AActor* Actor)
{
Grab(HandLeft, Actor);
}
FORCEINLINE void GrabRight(AActor* Actor)
{
Grab(HandRight, Actor);
}
void Grab(USGVirtualHandComponent* Hand, AActor* Actor);
void ReleaseLeft();
void ReleaseRight();
FORCEINLINE void Release(const USGVirtualHandComponent* Hand)
{
return Hand == HandLeft ? ReleaseLeft() : ReleaseRight();
}
};
@@ -1,61 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "GameFramework/PlayerController.h"
#include "Templates/UniquePtr.h"
#include "SGPlayerController.generated.h"
UCLASS(Config=Game, BlueprintType, Blueprintable)
class SENSEGLOVE_API ASGPlayerController : public APlayerController
{
GENERATED_UCLASS_BODY()
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
protected:
virtual void BeginPlay() override;
};
@@ -1,337 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Containers/Array.h"
#include "Containers/Map.h"
#include "GameFramework/Actor.h"
#include "Templates/UniquePtr.h"
#include "UObject/NameTypes.h"
#include "SenseGlove/Haptics/SGGrabState.h"
#include "SenseGlove/Haptics/SGTouchState.h"
#include "SGVirtualHandActor.generated.h"
class USceneComponent;
class USkeletalMesh;
class USkeleton;
class USphereComponent;
class USGHandPose;
class USGVirtualHandComponent;
class USGWristTrackerComponent;
UCLASS(Config=Game, BlueprintType)
class SENSEGLOVE_API ASGVirtualHandActor : public AActor
{
GENERATED_UCLASS_BODY()
public:
DECLARE_EVENT_OneParam(ASGVirtualHandActor, FGrabStateUpdatedEvent, const FSGGrabState& GrabState);
FGrabStateUpdatedEvent& OnGrabStateUpdated()
{
return GrabStateUpdatedEvent;
};
DECLARE_EVENT_OneParam(ASGVirtualHandActor, FTouchStateUpdatedEvent, const FSGTouchState& TouchState)
FTouchStateUpdatedEvent& OnTouchStateUpdated()
{
return TouchStateUpdatedEvent;
};
private:
FGrabStateUpdatedEvent GrabStateUpdatedEvent;
FTouchStateUpdatedEvent TouchStateUpdatedEvent;
private:
struct FImpl;
struct FImplDeleter
{
void operator()(const FImpl* P) const;
};
TUniquePtr<FImpl, FImplDeleter> Pimpl;
FImplDeleter PimplDeleter;
private:
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USceneComponent* SceneRoot;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USGWristTrackerComponent* WristTracker;
UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USGVirtualHandComponent* VirtualHand;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* ThumbFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* IndexFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* MiddleFingertipGrabCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* ThumbFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* IndexFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* MiddleFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* RingFingertipTouchCollider;
UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false"))
USphereComponent* PinkyFingertipTouchCollider;
private:
UPROPERTY(Transient)
FSGGrabState GrabState;
UPROPERTY(Transient)
FSGTouchState TouchState;
public:
FORCEINLINE USGWristTrackerComponent* GetWristTracker() const
{
return WristTracker;
}
FORCEINLINE USGVirtualHandComponent* GetVirtualHand() const
{
return VirtualHand;
}
FORCEINLINE USphereComponent* GetThumbFingertipGrabCollider() const
{
return ThumbFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetIndexFingertipGrabCollider() const
{
return IndexFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetMiddleFingertipGrabCollider() const
{
return MiddleFingertipGrabCollider;
}
FORCEINLINE USphereComponent* GetThumbFingertipTouchCollider() const
{
return ThumbFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetIndexFingertipTouchCollider() const
{
return IndexFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetMiddleFingertipTouchCollider() const
{
return MiddleFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetRingFingertipTouchCollider() const
{
return RingFingertipTouchCollider;
}
FORCEINLINE USphereComponent* GetPinkyFingertipTouchCollider() const
{
return PinkyFingertipTouchCollider;
}
protected:
FORCEINLINE void SetMesh(USGVirtualHandComponent* InVirtualHand)
{
VirtualHand = InVirtualHand;
}
public:
virtual void BeginPlay() override;
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
virtual void PreInitializeComponents() override;
protected:
UFUNCTION()
virtual void OnThumbFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnThumbFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnIndexFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnIndexFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnMiddleFingertipGrabColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnMiddleFingertipGrabColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnThumbFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnThumbFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnIndexFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnIndexFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnMiddleFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnMiddleFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnRingFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnRingFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
UFUNCTION()
virtual void OnPinkyFingertipTouchColliderOverlapBegins(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex,
bool bFromSweep,
const FHitResult& SweepResult);
UFUNCTION()
virtual void OnPinkyFingertipTouchColliderOverlapEnds(
UPrimitiveComponent* OverlappedComponent,
AActor* OtherActor,
UPrimitiveComponent* OtherComp,
int32 OtherBodyIndex);
public:
bool IsLeft() const;
bool IsRight() const;
void SetRight(bool bRight);
bool IsGloveConnected() const;
FORCEINLINE bool CanGrab(const AActor* Actor) const
{
return ((IsValid(Actor) && Actor == GrabState.ActorThumbCanGrab)
&& (Actor == GrabState.ActorIndexCanGrab || Actor == GrabState.ActorMiddleCanGrab));
}
};
@@ -1,76 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "UObject/ObjectMacros.h"
#include "SGGrabState.generated.h"
class AActor;
class UPrimitiveComponent;
class USGVirtualHandComponent;
USTRUCT(BlueprintType)
struct SENSEGLOVE_API FSGGrabState
{
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
USGVirtualHandComponent* Hand;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorThumbCanGrab;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorIndexCanGrab;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorMiddleCanGrab;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* GrabbedActor;
public:
FSGGrabState();
explicit FSGGrabState(USGVirtualHandComponent* InHand,
AActor* InActorThumbCanGrab,
AActor* InActorIndexCanGrab,
AActor* InActorMiddleCanGrab,
AActor* InGrabbedActor);
};
@@ -1,79 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "UObject/ObjectMacros.h"
#include "SGTouchState.generated.h"
class AActor;
class USGVirtualHandComponent;
USTRUCT(BlueprintType)
struct SENSEGLOVE_API FSGTouchState
{
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
USGVirtualHandComponent* Hand;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorThumbTouching;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorIndexTouching;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorMiddleTouching;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorRingTouching;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove")
AActor* ActorPinkyTouching;
public:
FSGTouchState();
explicit FSGTouchState(USGVirtualHandComponent* InHand,
AActor* InActorThumbTouching,
AActor* InActorIndexTouching,
AActor* InActorMiddleTouching,
AActor* InActorRingTouching,
AActor* InActorPinkyTouching);
};
-68
View File
@@ -1,68 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
using System;
using UnrealBuildTool;
public class SenseGlove : ModuleRules
{
public SenseGlove(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"AnimGraphRuntime",
"CoreUObject",
"Engine",
"HeadMountedDisplay",
"SenseGloveConnect",
"SenseGloveCore",
"SenseGloveDebug",
"SenseGloveLog",
"SenseGloveSettings",
"SenseGloveTypes",
}
);
}
}
@@ -1,126 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGAndroid/SGConnectJNI.h"
#if PLATFORM_ANDROID
#include "Android/AndroidApplication.h"
#include "Android/AndroidJava.h"
#endif /* PLATFORM_ANDROID */
#include "Misc/Paths.h"
#if PLATFORM_ANDROID
#include "SGConnectImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_jclass.h"
#include "SGInterop/SGIC_jmethodID.h"
#include "SGInterop/SGIC_JNIEnv_Ptr.h"
#endif /* PLATFORM_ANDROID */
int32 FSGConnectJNI::Initialize()
{
int32 Result = -999999;
#if PLATFORM_ANDROID
static constexpr char SGCONNECT_JAVA_CLASS_NAME[] = "com.senseglove.sgconnect.SGConnect";
SGLOG("FSGCoreJNI: attempting to get the Android JNI environment...");
JNIEnv* Env = FAndroidApplication::GetJavaEnv();
FAndroidApplication::CheckJavaException();
if (!Env)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI environmnet!");
return -1999999;
}
FSGIC_JNIEnv_Ptr InEnvContainer{Env};
SGLOG("FSGCoreJNI: attempting to find the Android Java class...");
jclass Class = FAndroidApplication::FindJavaClass(SGCONNECT_JAVA_CLASS_NAME);
FAndroidApplication::CheckJavaException();
if (Env->IsSameObject(Class, nullptr))
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android Java class!");
return -2999999;
}
Class = (jclass)Env->NewGlobalRef(Class);
FSGIC_jclass InClassContainer{Class};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'Init'...");
jmethodID InitMethodID = Env->GetStaticMethodID(Class, "Init", "()I");
FAndroidApplication::CheckJavaException();
if (!InitMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'Init'!");
return -3999999;
}
FSGIC_jmethodID InInitMethodIDContainer{InitMethodID};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'Dispose'...");
jmethodID DisposeMethodID = Env->GetStaticMethodID(Class, "Dispose", "()I");
FAndroidApplication::CheckJavaException();
if (!DisposeMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'Dispose'!");
return -4999999;
}
FSGIC_jmethodID InDisposeMethodIDContainer{DisposeMethodID};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'GetLibraryVersion'...");
jmethodID GetLibraryVersionMethodID = Env->GetStaticMethodID(Class, "GetLibraryVersion", "()Ljava/lang/String;");
FAndroidApplication::CheckJavaException();
if (!GetLibraryVersionMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'GetLibraryVersion'!");
return -5999999;
}
FSGIC_jmethodID InGetLibraryVersionMethodIDContainer{GetLibraryVersionMethodID};
FSGIC_FString ProjectSavedDirContainer{FPaths::ProjectSavedDir()};
Result = SGConnectImpl_Android_Initialize(&InEnvContainer, &InClassContainer,
&InInitMethodIDContainer,
&InDisposeMethodIDContainer,
&InGetLibraryVersionMethodIDContainer,
&ProjectSavedDirContainer);
#endif /* PLATFORM_ANDROID */
return Result;
}
@@ -1,140 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGAndroid/SGCoreJNI.h"
#if PLATFORM_ANDROID
#include "Android/AndroidApplication.h"
#include "Android/AndroidJava.h"
#endif /* PLATFORM_ANDROID */
#include "Misc/Paths.h"
#if PLATFORM_ANDROID
#include "SGCoreImpl/SGExportedFunctions.h"
#include "SGInterop/SGIC_FString.h"
#include "SGInterop/SGIC_jclass.h"
#include "SGInterop/SGIC_jmethodID.h"
#include "SGInterop/SGIC_JNIEnv_Ptr.h"
#endif /* PLATFORM_ANDROID */
#include "SGLog/SGLog.h"
int32 FSGCoreJNI::Initialize()
{
int32 Result = -999999;
#if PLATFORM_ANDROID
static constexpr char SGCONNECT_JAVA_CLASS_NAME[] = "com.senseglove.sgconnect.SGConnect";
SGLOG("FSGCoreJNI: attempting to get the Android JNI environment...");
JNIEnv* Env = FAndroidApplication::GetJavaEnv();
FAndroidApplication::CheckJavaException();
if (!Env)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI environmnet!");
return -1999999;
}
FSGIC_JNIEnv_Ptr InEnvContainer{Env};
SGLOG("FSGCoreJNI: attempting to find the Android Java class...");
jclass Class = FAndroidApplication::FindJavaClass(SGCONNECT_JAVA_CLASS_NAME);
FAndroidApplication::CheckJavaException();
if (Env->IsSameObject(Class, nullptr))
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android Java class!");
return -2999999;
}
Class = (jclass)Env->NewGlobalRef(Class);
FSGIC_jclass InClassContainer{Class};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'ActiveDevices'...");
jmethodID ActiveDevicesMethodID = Env->GetStaticMethodID(Class, "ActiveDevices", "()I");
FAndroidApplication::CheckJavaException();
if (!ActiveDevicesMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'ActiveDevices'!");
return -3999999;
}
FSGIC_jmethodID InActiveDevicesMethodIDContainer{ActiveDevicesMethodID};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'GetDeviceString'...");
jmethodID GetDeviceStringMethodID = Env->GetStaticMethodID(Class, "GetDeviceString", "(I)Ljava/lang/String;");
FAndroidApplication::CheckJavaException();
if (!GetDeviceStringMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'GetDeviceString'!");
return -4999999;
}
FSGIC_jmethodID InGetDeviceStringMethodIDContainer{GetDeviceStringMethodID};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'GetSensorString'...");
jmethodID GetSensorStringMethodID = Env->GetStaticMethodID(Class, "GetSensorString", "(I)Ljava/lang/String;");
FAndroidApplication::CheckJavaException();
if (!GetSensorStringMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'GetSensorString'!");
return -5999999;
}
FSGIC_jmethodID InGetSensorStringMethodIDContainer{GetSensorStringMethodID};
SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'WriteHaptics'...");
jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(ILjava/lang/String;)I");
FAndroidApplication::CheckJavaException();
if (!WriteHapticsMethodID)
{
SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'WriteHaptics'!");
return -6999999;
}
FSGIC_jmethodID InWriteHapticsMethodIDContainer{WriteHapticsMethodID};
FSGIC_FString ProjectSavedDirContainer{FPaths::ProjectSavedDir()};
Result = SGCoreImpl_Android_Initialize(&InEnvContainer, &InClassContainer,
&InActiveDevicesMethodIDContainer,
&InGetDeviceStringMethodIDContainer,
&InGetSensorStringMethodIDContainer,
&InWriteHapticsMethodIDContainer,
&ProjectSavedDirContainer);
#endif /* PLATFORM_ANDROID */
return Result;
}
@@ -1,41 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGloveAndroid.h"
#include "Modules/ModuleManager.h"
#include "SenseGloveAndroidModule.h"
IMPLEMENT_MODULE(FSenseGloveAndroidModule, SenseGloveAndroid)
@@ -1,38 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "CoreMinimal.h"
@@ -1,75 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SenseGloveAndroidModule.h"
#include "SGAndroid/SGConnectJNI.h"
#include "SGAndroid/SGCoreJNI.h"
#include "SGLog/SGLog.h"
#define LOCTEXT_NAMESPACE "FSenseGloveAndroidModule"
void FSenseGloveAndroidModule::StartupModule()
{
SGLOG("Starting up SenseGloveAndroid module...");
#if PLATFORM_ANDROID
const int32 R1 = FSGConnectJNI::Initialize();
const int32 R2 = FSGCoreJNI::Initialize();
ensureAlwaysMsgf(R1 == 0,
TEXT("Failed to initialize the SGConnect JNI bridge to SGConnect for Android! Status Code: %d"), R1);
ensureAlwaysMsgf(R2 == 0,
TEXT("Failed to initialize the SGCore JNI bridge to SGConnect for Android! Status Code: %d"), R2);
#endif /* PLATFORM_ANDROID */
}
void FSenseGloveAndroidModule::PreUnloadCallback()
{
SGLOG("Unloading SenseGloveAndroid module...");
}
void FSenseGloveAndroidModule::PostLoadCallback()
{
SGLOG("Loading SenseGloveAndroid module has succeeded!");
}
void FSenseGloveAndroidModule::ShutdownModule()
{
SGLOG("Shutting down SenseGloveAndroid module...");
}
#undef LOCTEXT_NAMESPACE
@@ -1,51 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "Modules/ModuleInterface.h"
#define LOCTEXT_NAMESPACE "SenseGloveAndroid"
class FSenseGloveAndroidModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void PreUnloadCallback() override;
virtual void PostLoadCallback() override;
virtual void ShutdownModule() override;
};
#undef LOCTEXT_NAMESPACE
@@ -1,49 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "UObject/ObjectMacros.h"
#include "SGConnectJNI.generated.h"
USTRUCT()
struct SENSEGLOVEANDROID_API FSGConnectJNI
{
GENERATED_BODY()
public:
static int32 Initialize();
};
@@ -1,49 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#pragma once
#include "UObject/ObjectMacros.h"
#include "SGCoreJNI.generated.h"
USTRUCT()
struct SENSEGLOVEANDROID_API FSGCoreJNI
{
GENERATED_BODY()
public:
static int32 Initialize();
};
@@ -1,71 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
using System;
using System.IO;
using UnrealBuildTool;
public class SenseGloveAndroid : ModuleRules
{
public SenseGloveAndroid(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"SenseGloveConnectImpl",
"SenseGloveCoreImpl",
"SenseGloveInterop",
"SenseGloveLog",
}
);
if (Target.Platform == UnrealTargetPlatform.Android)
{
AdditionalPropertiesForReceipt.Add("AndroidPlugin",
Path.Combine(ModuleDirectory, "SenseGloveAndroid_UPL.xml"));
}
}
}
@@ -1,141 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
@author Mamadou Babaei <mamadou@senseglove.com>
@section LICENSE
(The MIT License)
Copyright (c) 2020 - 2023 SenseGlove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<!-- https://docs.unrealengine.com/en-US/SharingAndReleasing/Mobile/UnrealPluginLanguage/index.html -->
<root xmlns:android="http://schemas.android.com/apk/res/android">
<init>
<log text="SenseGloveAndroid [INIT]: adding properties to the manifest and Gradle"/>
<trace enable="true"/>
<setBool result="bSupportedArch" value="false"/>
<isArch arch="armeabi-v7a">
<setBool result="bSupportedArch" value="true"/>
</isArch>
<isArch arch="arm64-v8a">
<setBool result="bSupportedArch" value="true"/>
</isArch>
<isArch arch="x86">
<setBool result="bSupportedArch" value="true"/>
</isArch>
<isArch arch="x86_64">
<setBool result="bSupportedArch" value="true"/>
</isArch>
<if condition="bSupportedArch">
<false>
<log text="SenseGloveAndroid [WARN]: this architecture is not supported!"/>
</false>
</if>
</init>
<resourceCopies>
<copyFile src="$S(PluginDir)/../ThirdParty/android/sgconnect.jar" dst="$S(BuildDir)/gradle/app/libs/sgconnect.jar" />
</resourceCopies>
<gradleProperties>
<insert>
kapt.incremental.apt=true
</insert>
</gradleProperties>
<proguardAdditions>
<insert>
<!-- Disable obfuscation for SenseGlove classes -->
-dontwarn com.senseglove.**
-keep class com.senseglove.** { *; }
-keep interface com.senseglove.** { *; }
-keep public class com.senseglove.sgconnect.** { public protected *; }
</insert>
</proguardAdditions>
<androidManifestUpdates>
<!-- For target SDK 31 update the SplashActivity activity -->
<loopElements tag="activity">
<setStringFromAttribute result="activityName" tag="$" name="android:name"/>
<setBoolIsEqual result="bSplashActivity" arg1="$S(activityName)" arg2="com.epicgames.ue4.SplashActivity"/>
<if condition="bSplashActivity">
<true>
<addAttribute tag="$" name="android:exported" value="true"/>
</true>
</if>
</loopElements>
<addPermission android:name="android.permission.BLUETOOTH"/>
<addPermission android:name="android.permission.BLUETOOTH_ADMIN"/>
<addPermission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<addPermission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</androidManifestUpdates>
<buildGradleAdditions>
<insert>
ext {
android {
buildTypes {
release {
minifyEnabled false
}
}
}
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation files('libs/sgconnect.jar')
}
</insert>
</buildGradleAdditions>
<baseBuildGradleAdditions>
<insert>
allprojects {
def mappings = [
]
beforeEvaluate {
}
}
</insert>
</baseBuildGradleAdditions>
</root>
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGDisable_C4263.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGDisable_C4264.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGDisable_C4706.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGDisable_C4800.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Connect_Android.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Connect_SGConnect.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Anatomy.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Android.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_BasicHandModel.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_BetaDevice.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_BuzzCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_CalibrationDataPoint.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_DeviceList.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_DeviceModel.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_FingerCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Fingers.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_ForceFeedbackCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HandInterpolator.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HandPose.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HandProfile.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGlove.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationCheck.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveCalibrationSequence.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveCommandBuffer.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveHandProfiles.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_HapticGloveQuickCalibration.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_InterpolationSet.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_JointKinematics.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Library.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGlove.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveCalibration.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveHandProfile.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveInfo.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_NovaGloveVars.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Quat.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SGDevice.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseCom.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGlove.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveHandProfile.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveInfo.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGlovePose.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveSensorData.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SenseGloveVars.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_SensorRange.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_ThumperCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_TimedBuzzCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_TimedThumpCommand.h"
@@ -1,36 +0,0 @@
/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2023 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGBuildHacks/SGInclude_Core_Tracking.h"

Some files were not shown because too many files have changed in this diff Show More