diff --git a/Config/Android/AndroidEngine.ini b/Config/Android/AndroidEngine.ini new file mode 100644 index 0000000..2e9b81d --- /dev/null +++ b/Config/Android/AndroidEngine.ini @@ -0,0 +1,6 @@ +[/Script/Engine.RendererSettings] +r.DistanceFields=0 + +; r.Mobile.AllowFramebufferFetch=1 reverts the mobile deferred renderer from multi-pass to single-pass/Vulkan subpasses, which was the default before UE 5.7. +; Multi-pass deferred is disabled for VR Template for 5.7.1 due to rendering issues with mobile multi-view. +r.Mobile.AllowFramebufferFetch=1 \ No newline at end of file diff --git a/Config/DefaultEditor.ini b/Config/DefaultEditor.ini new file mode 100644 index 0000000..d9cfc79 --- /dev/null +++ b/Config/DefaultEditor.ini @@ -0,0 +1,10 @@ + + +[/Script/UnrealEd.EditorPerformanceProjectSettings] +RealtimeScreenPercentageMode=BasedOnDPIScale + +[/Script/AdvancedPreviewScene.SharedProfiles] ++Profiles=(ProfileName="Epic Headquarters",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=1.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=1.000000,bRotateLightingRig=False,bShowEnvironment=True,bShowFloor=True,bShowGrid=False,EnvironmentColor=(R=0.200000,G=0.200000,B=0.200000,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/EpicQuadPanorama_CC+EV1.EpicQuadPanorama_CC+EV1",bPostProcessingEnabled=True,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomGaussianIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionIntensity=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureHighlightThresholdStrength=False,bOverride_LocalExposureShadowThresholdStrength=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldPetzvalBokeh=False,bOverride_DepthOfFieldPetzvalBokehFalloff=False,bOverride_DepthOfFieldPetzvalExclusionBoxExtents=False,bOverride_DepthOfFieldPetzvalExclusionBoxRadius=False,bOverride_DepthOfFieldAspectRatioScalar=False,bOverride_DepthOfFieldMatteBoxFlags=False,bOverride_DepthOfFieldBarrelRadius=False,bOverride_DepthOfFieldBarrelLength=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_RayTracingTranslucencyMaxPrimaryHitEvents=False,bOverride_RayTracingTranslucencyMaxSecondaryHitEvents=False,bOverride_RayTracingTranslucencyUseRayTracedRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenSkylightLeakingTint=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomGaussianIntensity=1.000000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionIntensity=1.000000,BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenSkylightLeakingTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureHighlightThresholdStrength=1.000000,LocalExposureShadowThresholdStrength=1.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldPetzvalBokeh=0.000000,DepthOfFieldPetzvalBokehFalloff=1.000000,DepthOfFieldPetzvalExclusionBoxExtents=(X=0.000000,Y=0.000000),DepthOfFieldPetzvalExclusionBoxRadius=0.000000,DepthOfFieldAspectRatioScalar=1.000000,DepthOfFieldBarrelRadius=5.000000,DepthOfFieldBarrelLength=0.000000,DepthOfFieldMatteBoxFlags[0]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldMatteBoxFlags[1]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldMatteBoxFlags[2]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyMaxPrimaryHitEvents=4,RayTracingTranslucencyMaxSecondaryHitEvents=2,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,RayTracingTranslucencyUseRayTracedRefraction=False,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=True,bShowMeshEdges=False) ++Profiles=(ProfileName="Grey Wireframe",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=1.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=1.000000,bRotateLightingRig=False,bShowEnvironment=False,bShowFloor=False,bShowGrid=True,EnvironmentColor=(R=0.039216,G=0.039216,B=0.039216,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/EpicQuadPanorama_CC+EV1.EpicQuadPanorama_CC+EV1",bPostProcessingEnabled=False,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomGaussianIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionIntensity=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureHighlightThresholdStrength=False,bOverride_LocalExposureShadowThresholdStrength=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldPetzvalBokeh=False,bOverride_DepthOfFieldPetzvalBokehFalloff=False,bOverride_DepthOfFieldPetzvalExclusionBoxExtents=False,bOverride_DepthOfFieldPetzvalExclusionBoxRadius=False,bOverride_DepthOfFieldAspectRatioScalar=False,bOverride_DepthOfFieldMatteBoxFlags=False,bOverride_DepthOfFieldBarrelRadius=False,bOverride_DepthOfFieldBarrelLength=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_RayTracingTranslucencyMaxPrimaryHitEvents=False,bOverride_RayTracingTranslucencyMaxSecondaryHitEvents=False,bOverride_RayTracingTranslucencyUseRayTracedRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenSkylightLeakingTint=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomGaussianIntensity=1.000000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionIntensity=1.000000,BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenSkylightLeakingTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureHighlightThresholdStrength=1.000000,LocalExposureShadowThresholdStrength=1.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldPetzvalBokeh=0.000000,DepthOfFieldPetzvalBokehFalloff=1.000000,DepthOfFieldPetzvalExclusionBoxExtents=(X=0.000000,Y=0.000000),DepthOfFieldPetzvalExclusionBoxRadius=0.000000,DepthOfFieldAspectRatioScalar=1.000000,DepthOfFieldBarrelRadius=5.000000,DepthOfFieldBarrelLength=0.000000,DepthOfFieldMatteBoxFlags[0]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldMatteBoxFlags[1]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldMatteBoxFlags[2]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyMaxPrimaryHitEvents=4,RayTracingTranslucencyMaxSecondaryHitEvents=2,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,RayTracingTranslucencyUseRayTracedRefraction=False,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=False,bShowMeshEdges=True) ++Profiles=(ProfileName="Grey Ambient",bSharedProfile=True,bIsEngineDefaultProfile=True,bUseSkyLighting=True,DirectionalLightIntensity=4.000000,DirectionalLightColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SkyLightIntensity=2.000000,bRotateLightingRig=False,bShowEnvironment=True,bShowFloor=True,bShowGrid=True,EnvironmentColor=(R=0.200000,G=0.200000,B=0.200000,A=1.000000),EnvironmentIntensity=1.000000,EnvironmentCubeMapPath="/Engine/EditorMaterials/AssetViewer/T_GreyAmbient",bPostProcessingEnabled=False,PostProcessingSettings=(bOverride_TemperatureType=False,bOverride_WhiteTemp=False,bOverride_WhiteTint=False,bOverride_ColorSaturation=False,bOverride_ColorContrast=False,bOverride_ColorGamma=False,bOverride_ColorGain=False,bOverride_ColorOffset=False,bOverride_ColorSaturationShadows=False,bOverride_ColorContrastShadows=False,bOverride_ColorGammaShadows=False,bOverride_ColorGainShadows=False,bOverride_ColorOffsetShadows=False,bOverride_ColorSaturationMidtones=False,bOverride_ColorContrastMidtones=False,bOverride_ColorGammaMidtones=False,bOverride_ColorGainMidtones=False,bOverride_ColorOffsetMidtones=False,bOverride_ColorSaturationHighlights=False,bOverride_ColorContrastHighlights=False,bOverride_ColorGammaHighlights=False,bOverride_ColorGainHighlights=False,bOverride_ColorOffsetHighlights=False,bOverride_ColorCorrectionShadowsMax=False,bOverride_ColorCorrectionHighlightsMin=False,bOverride_ColorCorrectionHighlightsMax=False,bOverride_BlueCorrection=False,bOverride_ExpandGamut=False,bOverride_ToneCurveAmount=False,bOverride_FilmSlope=False,bOverride_FilmToe=False,bOverride_FilmShoulder=False,bOverride_FilmBlackClip=False,bOverride_FilmWhiteClip=False,bOverride_SceneColorTint=False,bOverride_SceneFringeIntensity=False,bOverride_ChromaticAberrationStartOffset=False,bOverride_bMegaLights=False,bOverride_AmbientCubemapTint=False,bOverride_AmbientCubemapIntensity=False,bOverride_BloomMethod=False,bOverride_BloomIntensity=False,bOverride_BloomGaussianIntensity=False,bOverride_BloomThreshold=False,bOverride_Bloom1Tint=False,bOverride_Bloom1Size=False,bOverride_Bloom2Size=False,bOverride_Bloom2Tint=False,bOverride_Bloom3Tint=False,bOverride_Bloom3Size=False,bOverride_Bloom4Tint=False,bOverride_Bloom4Size=False,bOverride_Bloom5Tint=False,bOverride_Bloom5Size=False,bOverride_Bloom6Tint=False,bOverride_Bloom6Size=False,bOverride_BloomSizeScale=False,bOverride_BloomConvolutionIntensity=False,bOverride_BloomConvolutionTexture=False,bOverride_BloomConvolutionScatterDispersion=False,bOverride_BloomConvolutionSize=False,bOverride_BloomConvolutionCenterUV=False,bOverride_BloomConvolutionPreFilterMin=False,bOverride_BloomConvolutionPreFilterMax=False,bOverride_BloomConvolutionPreFilterMult=False,bOverride_BloomConvolutionBufferScale=False,bOverride_BloomDirtMaskIntensity=False,bOverride_BloomDirtMaskTint=False,bOverride_BloomDirtMask=False,bOverride_CameraShutterSpeed=False,bOverride_CameraISO=False,bOverride_AutoExposureMethod=False,bOverride_AutoExposureLowPercent=False,bOverride_AutoExposureHighPercent=False,bOverride_AutoExposureMinBrightness=False,bOverride_AutoExposureMaxBrightness=False,bOverride_AutoExposureSpeedUp=False,bOverride_AutoExposureSpeedDown=False,bOverride_AutoExposureBias=False,bOverride_AutoExposureBiasCurve=False,bOverride_AutoExposureMeterMask=False,bOverride_AutoExposureApplyPhysicalCameraExposure=False,bOverride_HistogramLogMin=False,bOverride_HistogramLogMax=False,bOverride_LocalExposureMethod=False,bOverride_LocalExposureHighlightContrastScale=False,bOverride_LocalExposureShadowContrastScale=False,bOverride_LocalExposureHighlightContrastCurve=False,bOverride_LocalExposureShadowContrastCurve=False,bOverride_LocalExposureHighlightThreshold=False,bOverride_LocalExposureShadowThreshold=False,bOverride_LocalExposureDetailStrength=False,bOverride_LocalExposureBlurredLuminanceBlend=False,bOverride_LocalExposureBlurredLuminanceKernelSizePercent=False,bOverride_LocalExposureHighlightThresholdStrength=False,bOverride_LocalExposureShadowThresholdStrength=False,bOverride_LocalExposureMiddleGreyBias=False,bOverride_LensFlareIntensity=False,bOverride_LensFlareTint=False,bOverride_LensFlareTints=False,bOverride_LensFlareBokehSize=False,bOverride_LensFlareBokehShape=False,bOverride_LensFlareThreshold=False,bOverride_VignetteIntensity=False,bOverride_Sharpen=False,bOverride_FilmGrainIntensity=False,bOverride_FilmGrainIntensityShadows=False,bOverride_FilmGrainIntensityMidtones=False,bOverride_FilmGrainIntensityHighlights=False,bOverride_FilmGrainShadowsMax=False,bOverride_FilmGrainHighlightsMin=False,bOverride_FilmGrainHighlightsMax=False,bOverride_FilmGrainTexelSize=False,bOverride_FilmGrainTexture=False,bOverride_AmbientOcclusionIntensity=False,bOverride_AmbientOcclusionStaticFraction=False,bOverride_AmbientOcclusionRadius=False,bOverride_AmbientOcclusionFadeDistance=False,bOverride_AmbientOcclusionFadeRadius=False,bOverride_AmbientOcclusionRadiusInWS=False,bOverride_AmbientOcclusionPower=False,bOverride_AmbientOcclusionBias=False,bOverride_AmbientOcclusionQuality=False,bOverride_AmbientOcclusionMipBlend=False,bOverride_AmbientOcclusionMipScale=False,bOverride_AmbientOcclusionMipThreshold=False,bOverride_AmbientOcclusionTemporalBlendWeight=False,bOverride_RayTracingAO=False,bOverride_RayTracingAOSamplesPerPixel=False,bOverride_RayTracingAOIntensity=False,bOverride_RayTracingAORadius=False,bOverride_IndirectLightingColor=False,bOverride_IndirectLightingIntensity=False,bOverride_ColorGradingIntensity=False,bOverride_ColorGradingLUT=False,bOverride_DepthOfFieldFocalDistance=False,bOverride_DepthOfFieldFstop=False,bOverride_DepthOfFieldMinFstop=False,bOverride_DepthOfFieldBladeCount=False,bOverride_DepthOfFieldSensorWidth=False,bOverride_DepthOfFieldSqueezeFactor=False,bOverride_DepthOfFieldDepthBlurRadius=False,bOverride_DepthOfFieldUseHairDepth=False,bOverride_DepthOfFieldPetzvalBokeh=False,bOverride_DepthOfFieldPetzvalBokehFalloff=False,bOverride_DepthOfFieldPetzvalExclusionBoxExtents=False,bOverride_DepthOfFieldPetzvalExclusionBoxRadius=False,bOverride_DepthOfFieldAspectRatioScalar=False,bOverride_DepthOfFieldMatteBoxFlags=False,bOverride_DepthOfFieldBarrelRadius=False,bOverride_DepthOfFieldBarrelLength=False,bOverride_DepthOfFieldDepthBlurAmount=False,bOverride_DepthOfFieldFocalRegion=False,bOverride_DepthOfFieldNearTransitionRegion=False,bOverride_DepthOfFieldFarTransitionRegion=False,bOverride_DepthOfFieldScale=False,bOverride_DepthOfFieldNearBlurSize=False,bOverride_DepthOfFieldFarBlurSize=False,bOverride_MobileHQGaussian=False,bOverride_DepthOfFieldOcclusion=False,bOverride_DepthOfFieldSkyFocusDistance=False,bOverride_DepthOfFieldVignetteSize=False,bOverride_MotionBlurAmount=False,bOverride_MotionBlurMax=False,bOverride_MotionBlurTargetFPS=False,bOverride_MotionBlurPerObjectSize=False,bOverride_ReflectionMethod=False,bOverride_LumenReflectionQuality=False,bOverride_ScreenSpaceReflectionIntensity=False,bOverride_ScreenSpaceReflectionQuality=False,bOverride_ScreenSpaceReflectionMaxRoughness=False,bOverride_ScreenSpaceReflectionRoughnessScale=False,bOverride_UserFlags=False,bOverride_RayTracingReflectionsMaxRoughness=False,bOverride_RayTracingReflectionsMaxBounces=False,bOverride_RayTracingReflectionsSamplesPerPixel=False,bOverride_RayTracingReflectionsShadows=False,bOverride_RayTracingReflectionsTranslucency=False,bOverride_TranslucencyType=False,bOverride_RayTracingTranslucencyMaxRoughness=False,bOverride_RayTracingTranslucencyRefractionRays=False,bOverride_RayTracingTranslucencySamplesPerPixel=False,bOverride_RayTracingTranslucencyShadows=False,bOverride_RayTracingTranslucencyRefraction=False,bOverride_RayTracingTranslucencyMaxPrimaryHitEvents=False,bOverride_RayTracingTranslucencyMaxSecondaryHitEvents=False,bOverride_RayTracingTranslucencyUseRayTracedRefraction=False,bOverride_DynamicGlobalIlluminationMethod=False,bOverride_LumenSceneLightingQuality=False,bOverride_LumenSceneDetail=False,bOverride_LumenSceneViewDistance=False,bOverride_LumenSceneLightingUpdateSpeed=False,bOverride_LumenFinalGatherQuality=False,bOverride_LumenFinalGatherLightingUpdateSpeed=False,bOverride_LumenFinalGatherScreenTraces=False,bOverride_LumenMaxTraceDistance=False,bOverride_LumenDiffuseColorBoost=False,bOverride_LumenSkylightLeaking=False,bOverride_LumenSkylightLeakingTint=False,bOverride_LumenFullSkylightLeakingDistance=False,bOverride_LumenRayLightingMode=False,bOverride_LumenReflectionsScreenTraces=False,bOverride_LumenFrontLayerTranslucencyReflections=False,bOverride_LumenMaxRoughnessToTraceReflections=False,bOverride_LumenMaxReflectionBounces=False,bOverride_LumenMaxRefractionBounces=False,bOverride_LumenSurfaceCacheResolution=False,bOverride_RayTracingGI=False,bOverride_RayTracingGIMaxBounces=False,bOverride_RayTracingGISamplesPerPixel=False,bOverride_PathTracingMaxBounces=False,bOverride_PathTracingSamplesPerPixel=False,bOverride_PathTracingMaxPathIntensity=False,bOverride_PathTracingEnableEmissiveMaterials=False,bOverride_PathTracingEnableReferenceDOF=False,bOverride_PathTracingEnableReferenceAtmosphere=False,bOverride_PathTracingEnableDenoiser=False,bOverride_PathTracingIncludeEmissive=False,bOverride_PathTracingIncludeDiffuse=False,bOverride_PathTracingIncludeIndirectDiffuse=False,bOverride_PathTracingIncludeSpecular=False,bOverride_PathTracingIncludeIndirectSpecular=False,bOverride_PathTracingIncludeVolume=False,bOverride_PathTracingIncludeIndirectVolume=False,bMobileHQGaussian=False,BloomMethod=BM_SOG,AutoExposureMethod=AEM_Histogram,TemperatureType=TEMP_WhiteBalance,WhiteTemp=6500.000000,WhiteTint=0.000000,ColorSaturation=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrast=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGamma=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGain=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffset=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainShadows=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetShadows=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainMidtones=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetMidtones=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorSaturationHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorContrastHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGammaHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorGainHighlights=(X=1.000000,Y=1.000000,Z=1.000000,W=1.000000),ColorOffsetHighlights=(X=0.000000,Y=0.000000,Z=0.000000,W=0.000000),ColorCorrectionHighlightsMin=0.500000,ColorCorrectionHighlightsMax=1.000000,ColorCorrectionShadowsMax=0.090000,BlueCorrection=0.600000,ExpandGamut=1.000000,ToneCurveAmount=1.000000,FilmSlope=0.880000,FilmToe=0.550000,FilmShoulder=0.260000,FilmBlackClip=0.000000,FilmWhiteClip=0.040000,SceneColorTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),SceneFringeIntensity=0.000000,ChromaticAberrationStartOffset=0.000000,BloomIntensity=0.675000,BloomGaussianIntensity=1.000000,BloomThreshold=-1.000000,BloomSizeScale=4.000000,Bloom1Size=0.300000,Bloom2Size=1.000000,Bloom3Size=2.000000,Bloom4Size=10.000000,Bloom5Size=30.000000,Bloom6Size=64.000000,Bloom1Tint=(R=0.346500,G=0.346500,B=0.346500,A=1.000000),Bloom2Tint=(R=0.138000,G=0.138000,B=0.138000,A=1.000000),Bloom3Tint=(R=0.117600,G=0.117600,B=0.117600,A=1.000000),Bloom4Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom5Tint=(R=0.066000,G=0.066000,B=0.066000,A=1.000000),Bloom6Tint=(R=0.061000,G=0.061000,B=0.061000,A=1.000000),BloomConvolutionIntensity=1.000000,BloomConvolutionScatterDispersion=1.000000,BloomConvolutionSize=1.000000,BloomConvolutionTexture=None,BloomConvolutionCenterUV=(X=0.500000,Y=0.500000),BloomConvolutionPreFilterMin=7.000000,BloomConvolutionPreFilterMax=15000.000000,BloomConvolutionPreFilterMult=15.000000,BloomConvolutionBufferScale=0.133000,BloomDirtMask=None,BloomDirtMaskIntensity=0.000000,BloomDirtMaskTint=(R=0.500000,G=0.500000,B=0.500000,A=1.000000),DynamicGlobalIlluminationMethod=Lumen,IndirectLightingColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),IndirectLightingIntensity=1.000000,LumenRayLightingMode=Default,LumenSceneLightingQuality=1.000000,LumenSceneDetail=1.000000,LumenSceneViewDistance=20000.000000,LumenSceneLightingUpdateSpeed=1.000000,LumenFinalGatherQuality=1.000000,LumenFinalGatherLightingUpdateSpeed=1.000000,LumenFinalGatherScreenTraces=True,LumenMaxTraceDistance=20000.000000,LumenDiffuseColorBoost=1.000000,LumenSkylightLeaking=0.000000,LumenSkylightLeakingTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LumenFullSkylightLeakingDistance=1000.000000,LumenSurfaceCacheResolution=1.000000,ReflectionMethod=Lumen,LumenReflectionQuality=1.000000,LumenReflectionsScreenTraces=True,LumenFrontLayerTranslucencyReflections=False,LumenMaxRoughnessToTraceReflections=0.400000,LumenMaxReflectionBounces=1,LumenMaxRefractionBounces=0,ScreenSpaceReflectionIntensity=100.000000,ScreenSpaceReflectionQuality=50.000000,ScreenSpaceReflectionMaxRoughness=0.600000,bMegaLights=True,AmbientCubemapTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),AmbientCubemapIntensity=1.000000,AmbientCubemap=None,CameraShutterSpeed=60.000000,CameraISO=100.000000,DepthOfFieldFstop=4.000000,DepthOfFieldMinFstop=1.200000,DepthOfFieldBladeCount=5,AutoExposureBias=1.000000,AutoExposureBiasBackup=0.000000,bOverride_AutoExposureBiasBackup=False,AutoExposureApplyPhysicalCameraExposure=True,AutoExposureBiasCurve=None,AutoExposureMeterMask=None,AutoExposureLowPercent=10.000000,AutoExposureHighPercent=90.000000,AutoExposureMinBrightness=-10.000000,AutoExposureMaxBrightness=20.000000,AutoExposureSpeedUp=3.000000,AutoExposureSpeedDown=1.000000,HistogramLogMin=-10.000000,HistogramLogMax=20.000000,LocalExposureMethod=Bilateral,LocalExposureHighlightContrastScale=1.000000,LocalExposureShadowContrastScale=1.000000,LocalExposureHighlightContrastCurve=None,LocalExposureShadowContrastCurve=None,LocalExposureHighlightThreshold=0.000000,LocalExposureShadowThreshold=0.000000,LocalExposureDetailStrength=1.000000,LocalExposureBlurredLuminanceBlend=0.600000,LocalExposureBlurredLuminanceKernelSizePercent=50.000000,LocalExposureHighlightThresholdStrength=1.000000,LocalExposureShadowThresholdStrength=1.000000,LocalExposureMiddleGreyBias=0.000000,LensFlareIntensity=1.000000,LensFlareTint=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),LensFlareBokehSize=3.000000,LensFlareThreshold=8.000000,LensFlareBokehShape=None,LensFlareTints[0]=(R=1.000000,G=0.800000,B=0.400000,A=0.600000),LensFlareTints[1]=(R=1.000000,G=1.000000,B=0.600000,A=0.530000),LensFlareTints[2]=(R=0.800000,G=0.800000,B=1.000000,A=0.460000),LensFlareTints[3]=(R=0.500000,G=1.000000,B=0.400000,A=0.390000),LensFlareTints[4]=(R=0.500000,G=0.800000,B=1.000000,A=0.310000),LensFlareTints[5]=(R=0.900000,G=1.000000,B=0.800000,A=0.270000),LensFlareTints[6]=(R=1.000000,G=0.800000,B=0.400000,A=0.220000),LensFlareTints[7]=(R=0.900000,G=0.700000,B=0.700000,A=0.150000),VignetteIntensity=0.400000,Sharpen=0.000000,FilmGrainIntensity=0.000000,FilmGrainIntensityShadows=1.000000,FilmGrainIntensityMidtones=1.000000,FilmGrainIntensityHighlights=1.000000,FilmGrainShadowsMax=0.090000,FilmGrainHighlightsMin=0.500000,FilmGrainHighlightsMax=1.000000,FilmGrainTexelSize=1.000000,FilmGrainTexture=None,AmbientOcclusionIntensity=0.500000,AmbientOcclusionStaticFraction=1.000000,AmbientOcclusionRadius=200.000000,AmbientOcclusionRadiusInWS=False,AmbientOcclusionFadeDistance=8000.000000,AmbientOcclusionFadeRadius=5000.000000,AmbientOcclusionPower=2.000000,AmbientOcclusionBias=3.000000,AmbientOcclusionQuality=50.000000,AmbientOcclusionMipBlend=0.600000,AmbientOcclusionMipScale=1.700000,AmbientOcclusionMipThreshold=0.010000,AmbientOcclusionTemporalBlendWeight=0.100000,RayTracingAO=False,RayTracingAOSamplesPerPixel=1,RayTracingAOIntensity=1.000000,RayTracingAORadius=200.000000,ColorGradingIntensity=1.000000,ColorGradingLUT=None,DepthOfFieldSensorWidth=24.576000,DepthOfFieldSqueezeFactor=1.000000,DepthOfFieldFocalDistance=0.000000,DepthOfFieldDepthBlurAmount=1.000000,DepthOfFieldDepthBlurRadius=0.000000,DepthOfFieldUseHairDepth=False,DepthOfFieldPetzvalBokeh=0.000000,DepthOfFieldPetzvalBokehFalloff=1.000000,DepthOfFieldPetzvalExclusionBoxExtents=(X=0.000000,Y=0.000000),DepthOfFieldPetzvalExclusionBoxRadius=0.000000,DepthOfFieldAspectRatioScalar=1.000000,DepthOfFieldBarrelRadius=5.000000,DepthOfFieldBarrelLength=0.000000,DepthOfFieldMatteBoxFlags[0]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldMatteBoxFlags[1]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldMatteBoxFlags[2]=(Pitch=0.000000,Roll=0.000000,Length=0.000000),DepthOfFieldFocalRegion=0.000000,DepthOfFieldNearTransitionRegion=300.000000,DepthOfFieldFarTransitionRegion=500.000000,DepthOfFieldScale=0.000000,DepthOfFieldNearBlurSize=15.000000,DepthOfFieldFarBlurSize=15.000000,DepthOfFieldOcclusion=0.400000,DepthOfFieldSkyFocusDistance=0.000000,DepthOfFieldVignetteSize=200.000000,MotionBlurAmount=0.500000,MotionBlurMax=5.000000,MotionBlurTargetFPS=30,MotionBlurPerObjectSize=0.000000,TranslucencyType=Raster,RayTracingTranslucencyMaxRoughness=0.600000,RayTracingTranslucencyRefractionRays=3,RayTracingTranslucencySamplesPerPixel=1,RayTracingTranslucencyMaxPrimaryHitEvents=4,RayTracingTranslucencyMaxSecondaryHitEvents=2,RayTracingTranslucencyShadows=Hard_shadows,RayTracingTranslucencyRefraction=True,RayTracingTranslucencyUseRayTracedRefraction=False,PathTracingMaxBounces=32,PathTracingSamplesPerPixel=2048,PathTracingMaxPathIntensity=24.000000,PathTracingEnableEmissiveMaterials=True,PathTracingEnableReferenceDOF=False,PathTracingEnableReferenceAtmosphere=False,PathTracingEnableDenoiser=True,PathTracingIncludeEmissive=True,PathTracingIncludeDiffuse=True,PathTracingIncludeIndirectDiffuse=True,PathTracingIncludeSpecular=True,PathTracingIncludeIndirectSpecular=True,PathTracingIncludeVolume=True,PathTracingIncludeIndirectVolume=True,UserFlags=0,WeightedBlendables=(Array=)),LightingRigRotation=0.000000,RotationSpeed=2.000000,DirectionalLightRotation=(Pitch=-40.000000,Yaw=-67.500000,Roll=0.000000),bEnableToneMapping=False,bShowMeshEdges=False) + diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini new file mode 100644 index 0000000..59e0d17 --- /dev/null +++ b/Config/DefaultEngine.ini @@ -0,0 +1,174 @@ +[/Script/EngineSettings.GameMapsSettings] +GlobalDefaultGameMode=/Game/XRFramework/Blueprints/BP_XRGameMode.BP_XRGameMode_C +EditorStartupMap=/Game/VRTemplate/VRTemplateMap.VRTemplateMap +GameDefaultMap=/Game/VRTemplate/VRTemplateMap.VRTemplateMap + +[/Script/Engine.RendererSettings] +r.ForwardShading=True +r.MobileHDR=False +vr.MobileMultiView=True +vr.InstancedStereo=True +r.DefaultFeature.AutoExposure=False +r.DefaultFeature.AmbientOcclusion=False +r.DefaultFeature.AmbientOcclusionStaticFraction=False +r.DefaultFeature.MotionBlur=False +r.Mobile.UseHWsRGBEncoding=True + +r.Shadow.Virtual.Enable=1 + +r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True +r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True +r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True + +r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8 +r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8 +r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8 + +r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8 +r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8 +r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8 + +r.GenerateMeshDistanceFields=True + +r.DynamicGlobalIlluminationMethod=1 + +r.ReflectionMethod=1 +r.Mobile.AntiAliasing=3 +r.AntiAliasingMethod=3 +r.AllowStaticLighting=True +r.Mobile.PropagateAlpha=True +r.Mobile.ShadingPath=0 + +r.SkinCache.CompileShaders=True + +r.RayTracing=True + +r.RayTracing.RayTracingProxies.ProjectEnabled=True + +r.Substrate=True + +r.Substrate.ProjectGBufferFormat=0 + +[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings] +bBuildForES31=False +ExtraApplicationSettings= +bPackageForMetaQuest=True +MinSDKVersion=32 +TargetSDKVersion=32 + +[/Script/WindowsTargetPlatform.WindowsTargetSettings] +DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 +DefaultGraphicsRHI=DefaultGraphicsRHI_Default +-D3D12TargetedShaderFormats=PCD3D_SM5 ++D3D12TargetedShaderFormats=PCD3D_SM6 +-D3D11TargetedShaderFormats=PCD3D_SM5 ++D3D11TargetedShaderFormats=PCD3D_SM5 +Compiler=Default +AudioSampleRate=48000 +AudioCallbackBufferFrameSize=1024 +AudioNumBuffersToEnqueue=1 +AudioMaxChannels=0 +AudioNumSourceWorkers=4 +SpatializationPlugin= +SourceDataOverridePlugin= +ReverbPlugin= +OcclusionPlugin= +CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0) +CacheSizeKB=65536 +MaxChunkSizeOverrideKB=0 +bResampleForDevice=False +MaxSampleRate=48000.000000 +HighSampleRate=32000.000000 +MedSampleRate=24000.000000 +LowSampleRate=12000.000000 +MinSampleRate=8000.000000 +CompressionQualityModifier=1.000000 +AutoStreamingThreshold=0.000000 +SoundCueCookQualityIndex=-1 + +[/Script/NavigationSystem.NavigationSystemV1] +bAllowClientSideNavigation=True + +[/Script/LinuxTargetPlatform.LinuxTargetSettings] +-TargetedRHIs=SF_VULKAN_SM5 ++TargetedRHIs=SF_VULKAN_SM6 + +[/Script/Engine.CollisionProfile] +-Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision",bCanModify=False) +-Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ",bCanModify=False) +-Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ",bCanModify=False) +-Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic",Response=ECR_Block),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.",bCanModify=False) +-Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors",bCanModify=False) +-Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors",bCanModify=False) +-Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.",bCanModify=False) +-Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.",bCanModify=False) +-Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="UI",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Block),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) ++Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision") ++Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.") ++Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ") ++Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ") ++Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic"),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.") ++Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.") ++Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors") ++Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors") ++Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.") ++Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.") ++Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.") ++Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.") ++Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.") ++Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Ignore,bTraceType=True,bStaticObject=False,Name="3DWidget") +-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") +-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") +-ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") +-ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") +-ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") ++ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") ++ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") ++ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") ++ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") ++ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") +-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") +-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") +-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") +-CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") ++CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") ++CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") ++CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") ++CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") + +[/Script/OpenXRHMD.OpenXRHMDSettings] +xr.OpenXRInvertAlpha=True + + +[/Script/Engine.Engine] ++ActiveGameNameRedirects=(OldGameName="TP_VirtualRealityBP",NewGameName="/Script/OXRHandIntxn") ++ActiveGameNameRedirects=(OldGameName="/Script/TP_VirtualRealityBP",NewGameName="/Script/OXRHandIntxn") + +[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] +bEnablePlugin=True +bAllowNetworkConnection=True +SecurityToken=332AFB814629DBFC77F7FAA59AA3C639 +bIncludeInShipping=False +bAllowExternalStartInShipping=False +bCompileAFSProject=False +bUseCompression=False +bLogFiles=False +bReportStats=False +ConnectionType=USBOnly +bUseManualIPAddress=False +ManualIPAddress= + diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini new file mode 100644 index 0000000..dea8592 --- /dev/null +++ b/Config/DefaultGame.ini @@ -0,0 +1,4 @@ +[/Script/EngineSettings.GeneralProjectSettings] +ProjectID=4B38CC344E7EB6CB23B64C9DDE9F31B2 +bStartInVR=True + diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini new file mode 100644 index 0000000..b902e93 --- /dev/null +++ b/Config/DefaultInput.ini @@ -0,0 +1,128 @@ +[/Script/Engine.InputSettings] +-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) +-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) +-AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) ++AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Touch",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_FaceButton1",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_FaceButton2",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_IndexPointing",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_ThumbUp",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_FaceButton1",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_FaceButton2",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_IndexPointing",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_ThumbUp",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Left_ThumbPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Left_IndexPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Left_MiddlePinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Left_RingPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Left_PinkPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Right_ThumbPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Right_IndexPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Right_MiddlePinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Right_RingPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusHand_Right_PinkPinchStrength",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_ThumbRest",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_ThumbRest",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) +bAltEnterTogglesFullscreen=True +bF11TogglesFullscreen=True +bUseMouseForTouch=False +bEnableMouseSmoothing=True +bEnableFOVScaling=True +bCaptureMouseOnLaunch=True +bEnableLegacyInputScales=True +bEnableMotionControls=True +bFilterInputByPlatformUser=False +bShouldFlushPressedKeysOnViewportFocusLost=True +bAlwaysShowTouchInterface=False +bShowConsoleOnFourFingerTap=True +bEnableGestureRecognizer=False +bUseAutocorrect=False +DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown +DefaultViewportMouseLockMode=LockOnCapture +FOVScale=0.011110 +DoubleClickTime=0.200000 +DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput +DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent +DefaultTouchInterface=None +-ConsoleKeys=Tilde ++ConsoleKeys=Tilde + +[/Script/EnhancedInput.EnhancedInputDeveloperSettings] ++DefaultMappingContexts=(InputMappingContext="/Game/XRFramework/Input/IMC_Default.IMC_Default",Priority=0,bAddImmediately=True,bRegisterWithUserSettings=False) ++DefaultMappingContexts=(InputMappingContext="/Game/XRFramework/Input/IMC_Hands.IMC_Hands",Priority=0,bAddImmediately=True,bRegisterWithUserSettings=False) ++DefaultMappingContexts=(InputMappingContext="/Game/XRFramework/Input/IMC_Weapon_Left.IMC_Weapon_Left",Priority=0,bAddImmediately=True,bRegisterWithUserSettings=False) ++DefaultMappingContexts=(InputMappingContext="/Game/XRFramework/Input/IMC_Weapon_Right.IMC_Weapon_Right",Priority=0,bAddImmediately=True,bRegisterWithUserSettings=False) ++DefaultMappingContexts=(InputMappingContext="/Game/XRFramework/Input/IMC_Menu.IMC_Menu",Priority=0,bAddImmediately=True,bRegisterWithUserSettings=False) +UserSettingsClass=/Script/EnhancedInput.EnhancedInputUserSettings +DefaultPlayerMappableKeyProfileClass=/Script/EnhancedInput.EnhancedPlayerMappableKeyProfile +InputSettingsSaveSlotName=EnhancedInputUserSettings +DefaultWorldInputClass=/Script/EnhancedInput.EnhancedPlayerInput +bSendTriggeredEventsWhenInputIsFlushed=True +bEnableUserSettings=False +EnhancedInput.EnableDefaultMappingContexts=True +EnhancedInput.OnlyTriggerLastActionInChord=True +bEnableInputModeFiltering=True +bEnableWorldSubsystem=False +DefaultMappingContextInputModeQuery=(TokenStreamVersion=0,TagDictionary=((TagName="EnhancedInput.Modes.Default")),QueryTokenStream=(0,1,2,1,0),UserDescription="",AutoDescription="") +DefaultInputMode=(GameplayTags=((TagName="EnhancedInput.Modes.Default"))) + diff --git a/Config/DefaultSenseGloveSettings.ini b/Config/DefaultSenseGloveSettings.ini new file mode 100644 index 0000000..77788a6 --- /dev/null +++ b/Config/DefaultSenseGloveSettings.ini @@ -0,0 +1,6 @@ + + +[/Script/SenseGloveSettings.SGSettings] +TrackingSettings=(bFallbackToHandTrackingIfNoGloveDetected=True,GloveTrackingSettings=(DataRetrievalRefreshRate=60.000000),HandTrackingSettings=(bUseMoreSpecificMotionSourceNames=False,bSupportLegacyControllerMotionSources=True),HMDTrackingSettings=(ViveHMDDetectionPriority=FocusVision_XRElite_Focus3),WristTrackingSettings=(OpenXRPositionalTrackingProvider=OpenXR,TrackingHardware=Quest3Controller,TrackingHardwareLocationOffsetLeftHand=(X=0.000000,Y=0.000000,Z=0.000000),TrackingHardwareLocationOffsetRightHand=(X=0.000000,Y=0.000000,Z=0.000000),TrackingHardwareRotationOffsetLeftHand=(Pitch=0.000000,Yaw=0.000000,Roll=0.000000),TrackingHardwareRotationOffsetRightHand=(Pitch=0.000000,Yaw=0.000000,Roll=0.000000),LeftHandMotionSource="Left",RightHandMotionSource="Right",DebuggingSettings=(bDrawDebugWristTracker=False,DebugWristTrackerSettings=(Length=4.000000,XAxisColor=(B=0,G=0,R=255,A=255),YAxisColor=(B=0,G=255,R=0,A=255),ZAxisColor=(B=255,G=0,R=0,A=255),bPersistentLines=False,LifeTimeModifier=1.100000,DepthPriority=0,Thickness=0.400000)))) +VirtualHandSettings=(bVisibleWhenHandDataUnavailable=False,AnimationSettings=(AnimationBoneRotationCorrectionOffset=(Pitch=0.000000,Yaw=90.000000,Roll=90.000000),bShouldAnimationApplyBoneLocation=True),DebuggingSettings=(bDrawDebugVirtualHand=False,DrawingMode=None,DebugCubicHandSettings=(Extent=(X=0.500000,Y=0.500000,Z=0.500000),Color=(B=0,G=0,R=255,A=255),bPersistentLines=False,LifeTimeModifier=1.100000,DepthPriority=0,Thickness=0.200000),DebugGizmoHandSettings=(Length=1.000000,XAxisColor=(B=0,G=0,R=255,A=255),YAxisColor=(B=0,G=255,R=0,A=255),ZAxisColor=(B=255,G=0,R=0,A=255),bPersistentLines=False,LifeTimeModifier=1.100000,DepthPriority=0,Thickness=0.250000)),GrabSettings=(GrabAttachPointSocketName="GrabAttachPoint",GrabAttachPointSocketTransform=(Rotation=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Translation=(X=0.000000,Y=5.000000,Z=-6.615570),Scale3D=(X=1.000000,Y=1.000000,Z=1.000000)),DefaultColliderSize=(X=0.040000,Y=0.040000,Z=0.040000),ThumbColliderSocketName="GrabThumbCollider",IndexColliderSocketName="GrabIndexCollider",MiddleColliderSocketName="GrabMiddleCollider"),HapticsSettings=(bAutoStopAllHapticsOnEndPlay=True),MeshSettings=(LeftHandReferenceMesh="/Game/OpenXRMannequins/Meshes/SKM_QuinnXR_left.SKM_QuinnXR_left",RightHandReferenceMesh="/Game/OpenXRMannequins/Meshes/SKM_QuinnXR_right.SKM_QuinnXR_right",DistalPhalangesLengthSettings=(Thumb=2.400000,Index=2.400000,Middle=2.400000,Ring=2.400000,Little=2.400000),RootBoneRotationCorrection=(Pitch=0.000000,Yaw=-90.000000,Roll=0.000000),LeftHandDefaultReferenceBoneTransforms=(("hand_l", (Rotation=(X=-0.000000,Y=0.707107,Z=-0.707107,W=0.000000))),("palm_l", (Translation=(X=0.000000,Y=0.000000,Z=-6.615570))),("thumb_01_l", (Rotation=(X=-0.067039,Y=-0.369130,Z=0.505193,W=0.777193),Translation=(X=2.581536,Y=1.356605,Z=-1.992447))),("thumb_02_l", (Rotation=(X=0.201856,Y=0.010302,Z=0.033565,W=0.978786),Translation=(X=0.000000,Y=0.000000,Z=-4.378000))),("thumb_03_l", (Rotation=(X=0.087156,Y=0.000000,Z=0.000000,W=0.996195),Translation=(X=0.000000,Y=0.000000,Z=-3.086000))),("index_metacarpal_l", (Rotation=(X=-0.007109,Y=-0.063705,Z=0.028966,W=0.997523),Translation=(X=2.379324,Y=-0.384681,Z=-3.444506))),("index_01_l", (Rotation=(X=0.202557,Y=0.000000,Z=0.000000,W=0.979271),Translation=(X=-0.240876,Y=0.043182,Z=-5.877098))),("index_02_l", (Rotation=(X=0.129597,Y=0.000000,Z=0.000000,W=0.991567),Translation=(X=0.000000,Y=0.000000,Z=-4.080000))),("index_03_l", (Rotation=(X=0.109009,Y=0.000000,Z=0.000000,W=0.994041),Translation=(X=0.000000,Y=0.000000,Z=-2.595000))),("middle_metacarpal_l", (Rotation=(X=-0.020259,Y=0.000386,Z=-0.037291,W=0.999099),Translation=(X=0.182864,Y=-0.753571,Z=-3.375834))),("middle_01_l", (Rotation=(X=0.272051,Y=0.000000,Z=0.000000,W=0.962283),Translation=(X=0.000000,Y=0.000000,Z=-6.098209))),("middle_02_l", (Rotation=(X=0.180255,Y=0.000000,Z=0.000000,W=0.983620),Translation=(X=0.000000,Y=0.000000,Z=-5.169000))),("middle_03_l", (Rotation=(X=0.087156,Y=0.000000,Z=0.000000,W=0.996195),Translation=(X=0.000000,Y=0.000000,Z=-2.474000))),("ring_metacarpal_l", (Rotation=(X=-0.025660,Y=0.100569,Z=-0.116599,W=0.987741),Translation=(X=-1.091757,Y=-0.542517,Z=-3.374304))),("ring_01_l", (Rotation=(X=0.253540,Y=-0.013177,Z=0.054216,W=0.965715),Translation=(X=0.020689,Y=-0.041625,Z=-5.645517))),("ring_02_l", (Rotation=(X=0.164738,Y=0.000000,Z=0.000000,W=0.986337),Translation=(X=0.000000,Y=0.000000,Z=-4.977000))),("ring_03_l", (Rotation=(X=0.079921,Y=0.000000,Z=0.000000,W=0.996801),Translation=(X=0.000000,Y=0.000000,Z=-2.265000))),("pinky_metacarpal_l", (Rotation=(X=0.058286,Y=0.188166,Z=-0.218231,W=0.955809),Translation=(X=-2.391111,Y=-0.305917,Z=-3.314378))),("pinky_01_l", (Rotation=(X=0.128066,Y=-0.017016,Z=0.089984,W=0.987528),Translation=(X=0.198840,Y=-0.143120,Z=-4.957568))),("pinky_02_l", (Rotation=(X=0.184698,Y=0.000000,Z=0.000000,W=0.982795),Translation=(X=0.000000,Y=0.000000,Z=-3.816000))),("pinky_03_l", (Rotation=(X=0.042896,Y=0.000000,Z=0.000000,W=0.999080),Translation=(X=0.000000,Y=0.000000,Z=-2.040000)))),RightHandDefaultReferenceBoneTransforms=(("hand_r", (Rotation=(X=-0.000000,Y=0.707107,Z=-0.707107,W=0.000000))),("palm_r", (Translation=(X=0.000052,Y=-0.000629,Z=-6.615405))),("thumb_01_r", (Rotation=(X=-0.067039,Y=0.369130,Z=-0.505193,W=0.777193),Translation=(X=-2.581326,Y=1.356657,Z=-1.992833))),("thumb_02_r", (Rotation=(X=0.201856,Y=-0.010302,Z=-0.033565,W=0.978786),Translation=(X=0.000136,Y=-0.000427,Z=-4.377825))),("thumb_03_r", (Rotation=(X=0.087156,Y=0.000000,Z=0.000000,W=0.996195),Translation=(X=-0.000046,Y=0.000015,Z=-3.085952))),("index_metacarpal_r", (Rotation=(X=-0.007109,Y=0.063705,Z=-0.028966,W=0.997523),Translation=(X=-2.379309,Y=-0.385167,Z=-3.444514))),("index_01_r", (Rotation=(X=0.202557,Y=0.000000,Z=0.000000,W=0.979271),Translation=(X=0.240952,Y=0.043412,Z=-5.877205))),("index_02_r", (Rotation=(X=0.129597,Y=0.000000,Z=0.000000,W=0.991567),Translation=(X=-0.000032,Y=-0.000005,Z=-4.079933))),("index_03_r", (Rotation=(X=0.109009,Y=0.000000,Z=0.000000,W=0.994041),Translation=(X=0.000004,Y=-0.000040,Z=-2.595076))),("middle_metacarpal_r", (Rotation=(X=-0.020259,Y=-0.000386,Z=0.037291,W=0.999099),Translation=(X=-0.182806,Y=-0.754004,Z=-3.375800))),("middle_01_r", (Rotation=(X=0.272051,Y=0.000000,Z=0.000000,W=0.962283),Translation=(X=-0.000001,Y=0.000124,Z=-6.098366))),("middle_02_r", (Rotation=(X=0.180255,Y=0.000000,Z=0.000000,W=0.983620),Translation=(X=0.000037,Y=0.000077,Z=-5.168992))),("middle_03_r", (Rotation=(X=0.087156,Y=0.000000,Z=0.000000,W=0.996195),Translation=(X=-0.000034,Y=-0.000046,Z=-2.474047))),("ring_metacarpal_r", (Rotation=(X=-0.025660,Y=-0.100569,Z=0.116599,W=0.987741),Translation=(X=1.091782,Y=-0.542992,Z=-3.374208))),("ring_01_r", (Rotation=(X=0.253540,Y=0.013177,Z=-0.054216,W=0.965715),Translation=(X=-0.020675,Y=-0.041443,Z=-5.645712))),("ring_02_r", (Rotation=(X=0.164738,Y=0.000000,Z=0.000000,W=0.986337),Translation=(X=0.000024,Y=0.000021,Z=-4.977067))),("ring_03_r", (Rotation=(X=0.079921,Y=0.000000,Z=0.000000,W=0.996801),Translation=(X=0.000011,Y=-0.000050,Z=-2.264975))),("pinky_metacarpal_r", (Rotation=(X=0.058286,Y=-0.188166,Z=0.218231,W=0.955809),Translation=(X=2.391287,Y=-0.305935,Z=-3.314677))),("pinky_01_r", (Rotation=(X=0.128066,Y=0.017016,Z=-0.089984,W=0.987528),Translation=(X=-0.198920,Y=-0.143261,Z=-4.957301))),("pinky_02_r", (Rotation=(X=0.184698,Y=0.000000,Z=0.000000,W=0.982795),Translation=(X=-0.000033,Y=-0.000030,Z=-3.816036))),("pinky_03_r", (Rotation=(X=0.042896,Y=-0.000000,Z=-0.000000,W=0.999080),Translation=(X=0.000031,Y=0.000018,Z=-2.040000)))),LeftHandBoneNames=("palm_l","hand_l","thumb_01_l","thumb_02_l","thumb_03_l","","index_metacarpal_l","index_01_l","index_02_l","index_03_l","","middle_metacarpal_l","middle_01_l","middle_02_l","middle_03_l","","ring_metacarpal_l","ring_01_l","ring_02_l","ring_03_l","","pinky_metacarpal_l","pinky_01_l","pinky_02_l","pinky_03_l",""),RightHandBoneNames=("palm_r","hand_r","thumb_01_r","thumb_02_r","thumb_03_r","","index_metacarpal_r","index_01_r","index_02_r","index_03_r","","middle_metacarpal_r","middle_01_r","middle_02_r","middle_03_r","","ring_metacarpal_r","ring_01_r","ring_02_r","ring_03_r","","pinky_metacarpal_r","pinky_01_r","pinky_02_r","pinky_03_r",""),DefaultLeftHandMeshPath="SkeletalMesh\'/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left\'",DefaultLeftHandMeshPathOnly="/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left",DefaultRightHandMeshPath="SkeletalMesh\'/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right\'",DefaultRightHandMeshPathOnly="/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right"),TouchSettings=(DefaultColliderSize=(X=0.040000,Y=0.040000,Z=0.040000),ThumbColliderSocketName="TouchThumbCollider",IndexColliderSocketName="TouchIndexCollider",MiddleColliderSocketName="TouchMiddleCollider",RingColliderSocketName="TouchRingCollider",PinkyColliderSocketName="TouchPinkyCollider")) + diff --git a/Config/Mac/MacEngine.ini b/Config/Mac/MacEngine.ini new file mode 100644 index 0000000..f1b23bb --- /dev/null +++ b/Config/Mac/MacEngine.ini @@ -0,0 +1,4 @@ + +[/Script/Engine.RendererSettings] +vr.InstancedStereo=False +vr.MobileMultiView=False diff --git a/Config/VisionOS/VisionOSDeviceProfiles.ini b/Config/VisionOS/VisionOSDeviceProfiles.ini new file mode 100644 index 0000000..d80311e --- /dev/null +++ b/Config/VisionOS/VisionOSDeviceProfiles.ini @@ -0,0 +1,6 @@ +[VisionPro DeviceProfile] +;MSAA +;+CVars=r.Mobile.XRMSAAMode=2 ;Note: this is in BaseDeviceProfiles.ini, so you don't actually need to set it. + +;NOT MSAA ++CVars=r.Mobile.XRMSAAMode=0 diff --git a/Config/VisionOS/VisionOSEngine.ini b/Config/VisionOS/VisionOSEngine.ini new file mode 100644 index 0000000..ed86c82 --- /dev/null +++ b/Config/VisionOS/VisionOSEngine.ini @@ -0,0 +1,30 @@ +[/Script/Engine.RendererSettings] +;These settings are currently required for all visionOS projects. +vr.InstancedStereo=False +vr.MobileMultiView=False +xr.OpenXRAcquireMode=1 + +;MSAA ;Note these are the default settings, specified in DefaultEngine.ini and BaseDeviceProfiles.ini +;r.Mobile.XRMSAAMode=2 +;r.Mobile.AntiAliasing=3 +;r.AntiAliasingMethod=3 +;MSAA END + +;FXAA +;r.Mobile.XRMSAAMode=0 ; This is overridden in BaseDeviceProfile.ini for VisionPro. It can be changed in VisionOSDeviceProfiles.ini for this project. +r.Mobile.AntiAliasing=1 +r.AntiAliasingMethod=1 +;FXAA END + +;MIXED IMMERSION Enable these settings for .mixed immesion mode, aka passthrough, AR. +;Comment them all out and full immesion will be used. +;Note: You would also probably need to delete the skybox from the level, etc, so that you are not covering up all of the real world. +r.Mobile.PropagateAlpha=1 +r.PostProcessing.PropagateAlpha=1 +r.AlphaInvertPass=1 + +;Note: this could also be done in Editor->ProjectSettings->Platforms->visionOS->Immersive Space->ImmsersiveStyle to 1. +[/Script/VisionOSRuntimeSettings.VisionOSRuntimeSettings] +ImmersiveStyle=1 +;MIXED IMMERSION END + diff --git a/Content/LevelPrototyping/Interactable/Door/BP_DoorFrame.uasset b/Content/LevelPrototyping/Interactable/Door/BP_DoorFrame.uasset new file mode 100644 index 0000000..038f9e8 --- /dev/null +++ b/Content/LevelPrototyping/Interactable/Door/BP_DoorFrame.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4386d7d71b8d5241fd8150aa47900711eb0d8bd069c00de25fce07f011d698fa +size 448616 diff --git a/Content/LevelPrototyping/Interactable/Door/Meshes/SM_Door.uasset b/Content/LevelPrototyping/Interactable/Door/Meshes/SM_Door.uasset new file mode 100644 index 0000000..244ff77 --- /dev/null +++ b/Content/LevelPrototyping/Interactable/Door/Meshes/SM_Door.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa98c4fc5083393e085d7b44d0b67a7e830922e2601a439167916616bbc29993 +size 59267 diff --git a/Content/LevelPrototyping/Interactable/Door/Meshes/SM_DoorFrame_Corner.uasset b/Content/LevelPrototyping/Interactable/Door/Meshes/SM_DoorFrame_Corner.uasset new file mode 100644 index 0000000..68fec6c --- /dev/null +++ b/Content/LevelPrototyping/Interactable/Door/Meshes/SM_DoorFrame_Corner.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:383dea9555e76303d60d0011fae6651a4be07c24033c0aceeecd137c954ee3fc +size 86885 diff --git a/Content/LevelPrototyping/Interactable/Door/Meshes/SM_DoorFrame_Edge.uasset b/Content/LevelPrototyping/Interactable/Door/Meshes/SM_DoorFrame_Edge.uasset new file mode 100644 index 0000000..e15c698 --- /dev/null +++ b/Content/LevelPrototyping/Interactable/Door/Meshes/SM_DoorFrame_Edge.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26eb76a2ce36be334bf0770561475a9e06be928e9ca75b4a31f5df3debb36592 +size 69088 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/MI_GlowNT.uasset b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/MI_GlowNT.uasset new file mode 100644 index 0000000..413555f --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/MI_GlowNT.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fd40bc38bfea9418fa54fe365732a1219e615169542a0a4d2e1d518318c864b +size 4145 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/M_GradientGlow.uasset b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/M_GradientGlow.uasset new file mode 100644 index 0000000..ecf223d --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/M_GradientGlow.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1b29ad29c2eac3dba6dd6a90aed9de8c6147a13b6288a42bd73fe14b78970a8 +size 17587 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/M_SimpleGlow.uasset b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/M_SimpleGlow.uasset new file mode 100644 index 0000000..203e88d --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Materials/M_SimpleGlow.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6098242541b34be6aba19ea1fbfa35107f891e8f55d30d4061aa11b065b8bd8 +size 15213 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/Assets/Meshes/SM_CircularBand.uasset b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Meshes/SM_CircularBand.uasset new file mode 100644 index 0000000..76776ce --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Meshes/SM_CircularBand.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97fbe3da2d907279dcbfbbf285e1b111ceb8d5f4a1c9d6bd48fcb8defc86842b +size 70608 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/Assets/Meshes/SM_CircularGlow.uasset b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Meshes/SM_CircularGlow.uasset new file mode 100644 index 0000000..6cb18b2 --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/Assets/Meshes/SM_CircularGlow.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ddb27bf7020f4980d3f8435cb0928fb48b32c1ab3ea24bac7e253435081bf6b +size 71705 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/Assets/NS_JumpPad.uasset b/Content/LevelPrototyping/Interactable/JumpPad/Assets/NS_JumpPad.uasset new file mode 100644 index 0000000..7510742 --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/Assets/NS_JumpPad.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e76849cbb139160e5e73c226fe6aaa66a63fbf75cbd1213f871cca65e409817 +size 795908 diff --git a/Content/LevelPrototyping/Interactable/JumpPad/BP_JumpPad.uasset b/Content/LevelPrototyping/Interactable/JumpPad/BP_JumpPad.uasset new file mode 100644 index 0000000..ff56bc2 --- /dev/null +++ b/Content/LevelPrototyping/Interactable/JumpPad/BP_JumpPad.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42ba8262f07355cdf36e33977f3bb415810390cf210b75573d766bd819cf8401 +size 92487 diff --git a/Content/LevelPrototyping/Interactable/Target/Assets/SM_TargetBaseMesh.uasset b/Content/LevelPrototyping/Interactable/Target/Assets/SM_TargetBaseMesh.uasset new file mode 100644 index 0000000..a8140cd --- /dev/null +++ b/Content/LevelPrototyping/Interactable/Target/Assets/SM_TargetBaseMesh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:378ace355b8f5e71a12e459d9f8cf4958626884142fec34be8630db6d8412cad +size 283425 diff --git a/Content/LevelPrototyping/Interactable/Target/BP_WobbleTarget.uasset b/Content/LevelPrototyping/Interactable/Target/BP_WobbleTarget.uasset new file mode 100644 index 0000000..8f7dc3b --- /dev/null +++ b/Content/LevelPrototyping/Interactable/Target/BP_WobbleTarget.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bd8784bf03cb945d63deb2c4c22261a9a9ea2af1f84766805ca92ec7b521ab3 +size 45551 diff --git a/Content/LevelPrototyping/Materials/MF_ProcGrid.uasset b/Content/LevelPrototyping/Materials/MF_ProcGrid.uasset new file mode 100644 index 0000000..d998cb3 --- /dev/null +++ b/Content/LevelPrototyping/Materials/MF_ProcGrid.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5ee13abdb241d9811f6c1bcc0a607d229fa7adc5f46bfd5a9d5fedbfa279683 +size 49820 diff --git a/Content/LevelPrototyping/Materials/MI_DefaultColorway.uasset b/Content/LevelPrototyping/Materials/MI_DefaultColorway.uasset new file mode 100644 index 0000000..cc18613 --- /dev/null +++ b/Content/LevelPrototyping/Materials/MI_DefaultColorway.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:786a4dfcaaa6f4daf459c77bda247c2c138140680a8246d521974d0cc4fc8a8e +size 9260 diff --git a/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray.uasset b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray.uasset new file mode 100644 index 0000000..d844901 --- /dev/null +++ b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:084681bf680dad66b8c8ca803d927053cf46756f2f2e62d18fcc439e07de7263 +size 13121 diff --git a/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray_02.uasset b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray_02.uasset new file mode 100644 index 0000000..d727d35 --- /dev/null +++ b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray_02.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa0f2a06a7d937127d7d737c13bacb3f8fe88c8e0479f5e6b7cda81fd225d077 +size 11922 diff --git a/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray_Round.uasset b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray_Round.uasset new file mode 100644 index 0000000..4778f66 --- /dev/null +++ b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_Gray_Round.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:901ec868e81e7a73c9f3ad4814e1205af27abc772949e5a30550a00f31ce4437 +size 11413 diff --git a/Content/LevelPrototyping/Materials/MI_PrototypeGrid_TopDark.uasset b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_TopDark.uasset new file mode 100644 index 0000000..1eae7f9 --- /dev/null +++ b/Content/LevelPrototyping/Materials/MI_PrototypeGrid_TopDark.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:838034e5afc7ab3a70bfff6de2e1237aa02337fb423e95c1b536b3e30c61c982 +size 11957 diff --git a/Content/LevelPrototyping/Materials/M_FlatCol.uasset b/Content/LevelPrototyping/Materials/M_FlatCol.uasset new file mode 100644 index 0000000..0be45d4 --- /dev/null +++ b/Content/LevelPrototyping/Materials/M_FlatCol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41dbbda4b463a224c29ee01765e1f52a8ae63f2f94f1440ee267fe7b1a481585 +size 11771 diff --git a/Content/LevelPrototyping/Materials/M_PrototypeGrid.uasset b/Content/LevelPrototyping/Materials/M_PrototypeGrid.uasset new file mode 100644 index 0000000..73c3bcf --- /dev/null +++ b/Content/LevelPrototyping/Materials/M_PrototypeGrid.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf8625ad5917cee705867038d8a590b25465e6b5d5818a738a584e515d7cbdfc +size 79863 diff --git a/Content/LevelPrototyping/Meshes/SM_ChamferCube.uasset b/Content/LevelPrototyping/Meshes/SM_ChamferCube.uasset new file mode 100644 index 0000000..dcc10b1 --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_ChamferCube.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b20a3ae9668ec599db519af3f84b67952d0e31ac4427b80ee812232edde91f53 +size 128849 diff --git a/Content/LevelPrototyping/Meshes/SM_Cube.uasset b/Content/LevelPrototyping/Meshes/SM_Cube.uasset new file mode 100644 index 0000000..fcb2e03 --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_Cube.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4680317a8c87f983e077f6c0a6b93ffaa0ba4dbddbc810960d4553e6ad380a89 +size 18279 diff --git a/Content/LevelPrototyping/Meshes/SM_Cylinder.uasset b/Content/LevelPrototyping/Meshes/SM_Cylinder.uasset new file mode 100644 index 0000000..ffaea18 --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_Cylinder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76aaa3c2b812ff790fb57ae7736b748e4e1556afbb13466fd787d4bacd2c7dfe +size 193636 diff --git a/Content/LevelPrototyping/Meshes/SM_Plane.uasset b/Content/LevelPrototyping/Meshes/SM_Plane.uasset new file mode 100644 index 0000000..8a6e0cd --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_Plane.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39ab83dc57a9a27a80476711610f72e81c0685a05d4aa95413b3e4e7f6c4a3f2 +size 15581 diff --git a/Content/LevelPrototyping/Meshes/SM_QuarterCylinder.uasset b/Content/LevelPrototyping/Meshes/SM_QuarterCylinder.uasset new file mode 100644 index 0000000..e3e30cc --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_QuarterCylinder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4087b3f85753d9ccbced7d00d42208dad4d21185f24a97b0c86db31be867b733 +size 135087 diff --git a/Content/LevelPrototyping/Meshes/SM_QuarterCylinderOuter.uasset b/Content/LevelPrototyping/Meshes/SM_QuarterCylinderOuter.uasset new file mode 100644 index 0000000..108131a --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_QuarterCylinderOuter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab58a5224da57452f367c9d55ea4976466138fc2cb8ec9e2fa92748c86a07f11 +size 79741 diff --git a/Content/LevelPrototyping/Meshes/SM_Ramp.uasset b/Content/LevelPrototyping/Meshes/SM_Ramp.uasset new file mode 100644 index 0000000..d176359 --- /dev/null +++ b/Content/LevelPrototyping/Meshes/SM_Ramp.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5b472deb37a9956b9112dccee3d09498a456baeacc574db8c5d725463b73597 +size 18690 diff --git a/Content/LevelPrototyping/Textures/T_GridChecker_A.uasset b/Content/LevelPrototyping/Textures/T_GridChecker_A.uasset new file mode 100644 index 0000000..37cf466 --- /dev/null +++ b/Content/LevelPrototyping/Textures/T_GridChecker_A.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb8334767064b107ec4f4407ef1365e8b9e2dfeff5984e66d4a6232254ddd02a +size 9600 diff --git a/Content/NonUsable/Blueprints/BP_OXRPawn.uasset b/Content/NonUsable/Blueprints/BP_OXRPawn.uasset new file mode 100644 index 0000000..6d902e2 --- /dev/null +++ b/Content/NonUsable/Blueprints/BP_OXRPawn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd3ead833abbcfc50f01c529326019b15e5ff3c3b33c40d05ad849ea13479211 +size 2610650 diff --git a/Content/NonUsable/Blueprints/EGrabState.uasset b/Content/NonUsable/Blueprints/EGrabState.uasset new file mode 100644 index 0000000..fc9aefc --- /dev/null +++ b/Content/NonUsable/Blueprints/EGrabState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea7533d3ba1d692f027b462f7367b09de8156bfb14d51e1710d47ab60c822090 +size 2173 diff --git a/Content/NonUsable_Prototyping/Blueprints/BP_OXRGameModeBase.uasset b/Content/NonUsable_Prototyping/Blueprints/BP_OXRGameModeBase.uasset new file mode 100644 index 0000000..d417f04 --- /dev/null +++ b/Content/NonUsable_Prototyping/Blueprints/BP_OXRGameModeBase.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dab8209a2a871b75c69fc5f89fdec7c70dfd5486753b1fecaed34d6c22380839 +size 21531 diff --git a/Content/NonUsable_Prototyping/Blueprints/BP_OXRHandInteractor.uasset b/Content/NonUsable_Prototyping/Blueprints/BP_OXRHandInteractor.uasset new file mode 100644 index 0000000..a8bff7b --- /dev/null +++ b/Content/NonUsable_Prototyping/Blueprints/BP_OXRHandInteractor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36fee2672111792b52d3f44c522ffd7041bda981b3947013f722108518f21482 +size 35135 diff --git a/Content/NonUsable_Prototyping/Blueprints/BP_OXRPawn.uasset b/Content/NonUsable_Prototyping/Blueprints/BP_OXRPawn.uasset new file mode 100644 index 0000000..6ac0e9f --- /dev/null +++ b/Content/NonUsable_Prototyping/Blueprints/BP_OXRPawn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfba7ce6403cbbdee5fbc2d909a0165375b3e89f4c7ec8b7da1c46e34af8d01c +size 2609506 diff --git a/Content/NonUsable_Prototyping/Blueprints/BP_OXRPlayerController.uasset b/Content/NonUsable_Prototyping/Blueprints/BP_OXRPlayerController.uasset new file mode 100644 index 0000000..7969625 --- /dev/null +++ b/Content/NonUsable_Prototyping/Blueprints/BP_OXRPlayerController.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a3f8e0b64734655b23718098e68cdd7e2a4e29227acea9a1c327f21e9df59b7 +size 20562 diff --git a/Content/NonUsable_Prototyping/Blueprints/EGrabState.uasset b/Content/NonUsable_Prototyping/Blueprints/EGrabState.uasset new file mode 100644 index 0000000..3e71f43 --- /dev/null +++ b/Content/NonUsable_Prototyping/Blueprints/EGrabState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2dfe9840a51f44b7caa82ac6ca57df7c7214c47cb14efdc3a6f12490a9c68f06 +size 2566 diff --git a/Content/NonUsable_Prototyping/Blueprints/TRIAL_OXRPawn.uasset b/Content/NonUsable_Prototyping/Blueprints/TRIAL_OXRPawn.uasset new file mode 100644 index 0000000..2f2809c --- /dev/null +++ b/Content/NonUsable_Prototyping/Blueprints/TRIAL_OXRPawn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f89cc5cf4e0e947917045c019ceda1581f7cd85c61b9c0f737800b029ab047e1 +size 353497 diff --git a/Content/NonUsable_Prototyping/Objects/BP_Grabbable_Object.uasset b/Content/NonUsable_Prototyping/Objects/BP_Grabbable_Object.uasset new file mode 100644 index 0000000..f4e21b7 --- /dev/null +++ b/Content/NonUsable_Prototyping/Objects/BP_Grabbable_Object.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:169ca90a1fd1512d63e8f6e92b5bcd516e6f97136ca0b3d69686ab2def4299e0 +size 29330 diff --git a/Content/NonUsable_Prototyping/Objects/BP_Grabbable_SmallSphere.uasset b/Content/NonUsable_Prototyping/Objects/BP_Grabbable_SmallSphere.uasset new file mode 100644 index 0000000..c8d1101 --- /dev/null +++ b/Content/NonUsable_Prototyping/Objects/BP_Grabbable_SmallSphere.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03f4c9553322e60045dd6de4d462b8d0fd55ff71ebf21498adb7486abc114dd3 +size 39026 diff --git a/Content/NonUsable_Prototyping/Objects/BP_Grabbable_Sphere.uasset b/Content/NonUsable_Prototyping/Objects/BP_Grabbable_Sphere.uasset new file mode 100644 index 0000000..82011bf --- /dev/null +++ b/Content/NonUsable_Prototyping/Objects/BP_Grabbable_Sphere.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aa0f69fd162ad9b880ddec59ec71ef077910b267314cd74ab849d465bec714f +size 38243 diff --git a/Content/OpenXRFramework/Blueprints/BP_Basket.uasset b/Content/OpenXRFramework/Blueprints/BP_Basket.uasset new file mode 100644 index 0000000..4cff852 --- /dev/null +++ b/Content/OpenXRFramework/Blueprints/BP_Basket.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06f4687fffc71d44c50360980ed37f77494c03d85a4af2f7251055f309fa6ea7 +size 35635 diff --git a/Content/OpenXRFramework/Blueprints/BP_InstructionForDevelopers.uasset b/Content/OpenXRFramework/Blueprints/BP_InstructionForDevelopers.uasset new file mode 100644 index 0000000..ef014a5 --- /dev/null +++ b/Content/OpenXRFramework/Blueprints/BP_InstructionForDevelopers.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0f7cb7707c971b58b1ded0a9d6ee4e12e36e15a7d36ed34b260cd0990070d14 +size 36419 diff --git a/Content/OpenXRFramework/Blueprints/BP_InstructionForUsers.uasset b/Content/OpenXRFramework/Blueprints/BP_InstructionForUsers.uasset new file mode 100644 index 0000000..08ce7a2 --- /dev/null +++ b/Content/OpenXRFramework/Blueprints/BP_InstructionForUsers.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf4ec14e439ca7d765cb472ac67d4734789b97a4551fc3fc7cc85fdf4cd46355 +size 34408 diff --git a/Content/OpenXRFramework/Blueprints/BP_OXRPawn.uasset b/Content/OpenXRFramework/Blueprints/BP_OXRPawn.uasset new file mode 100644 index 0000000..f28d155 --- /dev/null +++ b/Content/OpenXRFramework/Blueprints/BP_OXRPawn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c8b10f8964df470f02995727010c14cfbf64372eb0c042e1a81277c1f4b32ff +size 2608500 diff --git a/Content/OpenXRFramework/Blueprints/EGrabState.uasset b/Content/OpenXRFramework/Blueprints/EGrabState.uasset new file mode 100644 index 0000000..3ba717e --- /dev/null +++ b/Content/OpenXRFramework/Blueprints/EGrabState.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9be46d2c96e2707321974c43a23f71b8f19343a67c3c3d14063d6941e70277d7 +size 2185 diff --git a/Content/OpenXRFramework/Materials/M_Basket.uasset b/Content/OpenXRFramework/Materials/M_Basket.uasset new file mode 100644 index 0000000..de6887f --- /dev/null +++ b/Content/OpenXRFramework/Materials/M_Basket.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afa4b5bdd920b539d613df6eb5569b30115461d8463ee5b5b90af6d637eea8cf +size 11528 diff --git a/Content/OpenXRFramework/Materials/M_Floor.uasset b/Content/OpenXRFramework/Materials/M_Floor.uasset new file mode 100644 index 0000000..8a126b5 --- /dev/null +++ b/Content/OpenXRFramework/Materials/M_Floor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f912da5b0cd526c07bb1f63ce6af5f3b9de63e2c65d2d85e7247683d8b30aa94 +size 10831 diff --git a/Content/OpenXRFramework/Materials/M_Object.uasset b/Content/OpenXRFramework/Materials/M_Object.uasset new file mode 100644 index 0000000..cb46819 --- /dev/null +++ b/Content/OpenXRFramework/Materials/M_Object.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70b01cd7e82b76804c1a0a55995658bfebc5b7d43bf1fa76a3d420f346a68881 +size 12361 diff --git a/Content/OpenXRFramework/Materials/M_Screen.uasset b/Content/OpenXRFramework/Materials/M_Screen.uasset new file mode 100644 index 0000000..d5b307b --- /dev/null +++ b/Content/OpenXRFramework/Materials/M_Screen.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88b623ef4d11d7609ff40fc6c1be3fa7b1999879cdde8aa83a1ae9b5a06bfbc2 +size 9215 diff --git a/Content/OpenXRFramework/Materials/M_Table.uasset b/Content/OpenXRFramework/Materials/M_Table.uasset new file mode 100644 index 0000000..8cff9d9 --- /dev/null +++ b/Content/OpenXRFramework/Materials/M_Table.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4059d300a283aec7990d8302f1d4de3b1b26792d36eeacb5d24ff41da6d58c80 +size 10835 diff --git a/Content/OpenXRFramework/Materials/M_Wall.uasset b/Content/OpenXRFramework/Materials/M_Wall.uasset new file mode 100644 index 0000000..9b41aed --- /dev/null +++ b/Content/OpenXRFramework/Materials/M_Wall.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15ced81284bc3ce7ac273db3c049a5bbfacd7d89ebe0778e637726480e491268 +size 11133 diff --git a/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left.uasset b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left.uasset new file mode 100644 index 0000000..7ca2b4a --- /dev/null +++ b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f13f8607e2690c378c1ebd08267aded5d38ac8f65363eabf0ee1d1dc0e951be4 +size 1358019 diff --git a/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left_PhysicsAsset.uasset b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left_PhysicsAsset.uasset new file mode 100644 index 0000000..9ece5ce --- /dev/null +++ b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left_PhysicsAsset.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b9927ed6be31a044547982983bacac72632de78799202fbc6aa114afb50fe0c +size 8780 diff --git a/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left_Skeleton.uasset b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left_Skeleton.uasset new file mode 100644 index 0000000..eec43f6 --- /dev/null +++ b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_left_Skeleton.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccfd69a052acd69fd8f533ecc566bcab9a593e75607cf3a34069c9f7fd5d4235 +size 57366 diff --git a/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right.uasset b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right.uasset new file mode 100644 index 0000000..e6b85d2 --- /dev/null +++ b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aa5e1fab55664f55a190dda26458c3ea5d8d01eb6b47b430bc0f8ae4e115c03 +size 1359089 diff --git a/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right_PhysicsAsset.uasset b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right_PhysicsAsset.uasset new file mode 100644 index 0000000..48a3353 --- /dev/null +++ b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right_PhysicsAsset.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95240fdc0165a5a42c74bf9b1ef5a1529bcb3013595c178d1ef7e1accfb97545 +size 7487 diff --git a/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right_Skeleton.uasset b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right_Skeleton.uasset new file mode 100644 index 0000000..567f54b --- /dev/null +++ b/Content/OpenXRMannequins/Meshes/SKM_QuinnXR_right_Skeleton.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0685d744b1441a33acb16e73fd9fa52898d9a60153ad9c231f1663461cbfb4b5 +size 57328 diff --git a/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Grasp_Right.uasset b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Grasp_Right.uasset new file mode 100644 index 0000000..88a7972 --- /dev/null +++ b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Grasp_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3fd8e1fb929cfb9254d83d0cbc38a8264f4b63d55f6aaf4ec27b097bd497026 +size 81776 diff --git a/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Idle_Right.uasset b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Idle_Right.uasset new file mode 100644 index 0000000..928c2c3 --- /dev/null +++ b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Idle_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1313477640f6bc31981085b9d6ada66cb60611de39e32a4acd79e142eb2763c6 +size 66795 diff --git a/Content/TemplateXRMannequins/Animations/A_MannequinsXR_IndexCurl_Right.uasset b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_IndexCurl_Right.uasset new file mode 100644 index 0000000..741d07d --- /dev/null +++ b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_IndexCurl_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea8e95d99267f1d63d8b6e0415a40c89637740cecc3b472d3ed0ea5901b0177a +size 82071 diff --git a/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Point_Right.uasset b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Point_Right.uasset new file mode 100644 index 0000000..b2b2a43 --- /dev/null +++ b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_Point_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4f2467c0af16f38a0b95ee6d05b7b481eefe00b99bc22bc01240cd1c23859e2 +size 82018 diff --git a/Content/TemplateXRMannequins/Animations/A_MannequinsXR_ThumbUp_Right.uasset b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_ThumbUp_Right.uasset new file mode 100644 index 0000000..ded845d --- /dev/null +++ b/Content/TemplateXRMannequins/Animations/A_MannequinsXR_ThumbUp_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bea60924ca2b948dc2a63e9734b959908fb81e24d06c5372d754dec0820142c2 +size 82132 diff --git a/Content/TemplateXRMannequins/Animations/MDT_MannequinsXR.uasset b/Content/TemplateXRMannequins/Animations/MDT_MannequinsXR.uasset new file mode 100644 index 0000000..85d8517 --- /dev/null +++ b/Content/TemplateXRMannequins/Animations/MDT_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c24dbe5ab20b0ddd0a1ce81f58660a8b118594dca473ceb4d8023d4ff70477e9 +size 13538 diff --git a/Content/TemplateXRMannequins/BP_MannequinsXR.uasset b/Content/TemplateXRMannequins/BP_MannequinsXR.uasset new file mode 100644 index 0000000..506b6de --- /dev/null +++ b/Content/TemplateXRMannequins/BP_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca90922250a8f1e32dd3aff3e757018f1a30c0196daa81638a150ac6ed7ea517 +size 14555 diff --git a/Content/TemplateXRMannequins/Materials/Functions/CA_Mannequin.uasset b/Content/TemplateXRMannequins/Materials/Functions/CA_Mannequin.uasset new file mode 100644 index 0000000..598e5ab --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Functions/CA_Mannequin.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3cc29a80726dc15b98981ec091509d89c9a6739e25892dfc29ae9b012f2d33c +size 5248 diff --git a/Content/TemplateXRMannequins/Materials/Functions/ChromaticCurve.uasset b/Content/TemplateXRMannequins/Materials/Functions/ChromaticCurve.uasset new file mode 100644 index 0000000..2e0ecd0 --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Functions/ChromaticCurve.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cc3085bedd6c978e53e33971cb00ada8ac52b1a4ae456dbc0604a902779f0fd +size 6182 diff --git a/Content/TemplateXRMannequins/Materials/Functions/MF_Diffraction.uasset b/Content/TemplateXRMannequins/Materials/Functions/MF_Diffraction.uasset new file mode 100644 index 0000000..43decb1 --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Functions/MF_Diffraction.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8f155b2645752c043e43390eb5f77b4ccd55e76d937d19a5e69a61f8196dae3 +size 32250 diff --git a/Content/TemplateXRMannequins/Materials/Functions/MF_logo3layers.uasset b/Content/TemplateXRMannequins/Materials/Functions/MF_logo3layers.uasset new file mode 100644 index 0000000..84bb7e9 --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Functions/MF_logo3layers.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8157a91a96cd8dc30fcf7781c96b666f75486db3430be21179913ae545ee552 +size 56826 diff --git a/Content/TemplateXRMannequins/Materials/Functions/ML_BaseColorFallOff.uasset b/Content/TemplateXRMannequins/Materials/Functions/ML_BaseColorFallOff.uasset new file mode 100644 index 0000000..451d063 --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Functions/ML_BaseColorFallOff.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0bdb0ca8f217b61bb00a4be779a22bc2c45ca17ec8201375e2ee0d64e28e18 +size 14390 diff --git a/Content/TemplateXRMannequins/Materials/Instances/Manny/MI_Manny_01.uasset b/Content/TemplateXRMannequins/Materials/Instances/Manny/MI_Manny_01.uasset new file mode 100644 index 0000000..2d14a88 --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Instances/Manny/MI_Manny_01.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af503afeac7c4cfb1166acdafe9889e2b359ece04cbefa3a9c57ad1f4a2df3bf +size 19429 diff --git a/Content/TemplateXRMannequins/Materials/Instances/Manny/MI_Manny_02.uasset b/Content/TemplateXRMannequins/Materials/Instances/Manny/MI_Manny_02.uasset new file mode 100644 index 0000000..aa39241 --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Instances/Manny/MI_Manny_02.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b46d93d3b1b1ffe0cc62f4c27a1fb805532f86402dd51833cf87a07a97dec1e +size 19802 diff --git a/Content/TemplateXRMannequins/Materials/Instances/Quinn/MI_Quinn_01.uasset b/Content/TemplateXRMannequins/Materials/Instances/Quinn/MI_Quinn_01.uasset new file mode 100644 index 0000000..2b68ebd --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Instances/Quinn/MI_Quinn_01.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68ad9b793fc7f88c0dc932ad3133db6913753813636311ad81c923af7ec04c1c +size 17536 diff --git a/Content/TemplateXRMannequins/Materials/Instances/Quinn/MI_Quinn_02.uasset b/Content/TemplateXRMannequins/Materials/Instances/Quinn/MI_Quinn_02.uasset new file mode 100644 index 0000000..b49551f --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/Instances/Quinn/MI_Quinn_02.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e14ae72514cc7a49ca3fd130b26989f8ad71d28093599428a0222f42c58b409 +size 19867 diff --git a/Content/TemplateXRMannequins/Materials/M_Mannequin.uasset b/Content/TemplateXRMannequins/Materials/M_Mannequin.uasset new file mode 100644 index 0000000..77d025a --- /dev/null +++ b/Content/TemplateXRMannequins/Materials/M_Mannequin.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6861db9b30ceedf9b39bc5c9999a7e7ba85a2756fad0c8dab7665730f474c3 +size 83632 diff --git a/Content/TemplateXRMannequins/Meshes/ABP_MannequinsXR.uasset b/Content/TemplateXRMannequins/Meshes/ABP_MannequinsXR.uasset new file mode 100644 index 0000000..ace5235 --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/ABP_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f624ac1db8b1c02206d0e168f09d87b6ad2b04376bc188addee53e6683c58ac +size 215941 diff --git a/Content/TemplateXRMannequins/Meshes/SKM_MannyXR_left.uasset b/Content/TemplateXRMannequins/Meshes/SKM_MannyXR_left.uasset new file mode 100644 index 0000000..9e5e4be --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/SKM_MannyXR_left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb1c439647cf11e8e53cc844c320e740c3c159cd73b9b883474a412f39ccd28f +size 1347093 diff --git a/Content/TemplateXRMannequins/Meshes/SKM_MannyXR_right.uasset b/Content/TemplateXRMannequins/Meshes/SKM_MannyXR_right.uasset new file mode 100644 index 0000000..4f717dd --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/SKM_MannyXR_right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca42ed8b79acbd05ce6a0a96020c300f0a6bcb3d51433bfd38b676d7b39e8728 +size 1346139 diff --git a/Content/TemplateXRMannequins/Meshes/SKM_QuinnXR_left.uasset b/Content/TemplateXRMannequins/Meshes/SKM_QuinnXR_left.uasset new file mode 100644 index 0000000..6b6791a --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/SKM_QuinnXR_left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b67aa04fcbc8a527db6dd5966d2098353cba6e65944012349e1e46472d426ef1 +size 1416856 diff --git a/Content/TemplateXRMannequins/Meshes/SKM_QuinnXR_right.uasset b/Content/TemplateXRMannequins/Meshes/SKM_QuinnXR_right.uasset new file mode 100644 index 0000000..7b16480 --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/SKM_QuinnXR_right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9aa8f72b0fd19f4b530814ace0761083705176750bee89bb3f9d02338c32d95b +size 1414861 diff --git a/Content/TemplateXRMannequins/Meshes/SK_MannequinsXR.uasset b/Content/TemplateXRMannequins/Meshes/SK_MannequinsXR.uasset new file mode 100644 index 0000000..6460402 --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/SK_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98cdafa11e43d7a748afb675fc14ee2ce923e474d97a80a2c838445fcea53fda +size 58148 diff --git a/Content/TemplateXRMannequins/Meshes/SkeletalMeshLODSettings_MannequinsXR.uasset b/Content/TemplateXRMannequins/Meshes/SkeletalMeshLODSettings_MannequinsXR.uasset new file mode 100644 index 0000000..e240d88 --- /dev/null +++ b/Content/TemplateXRMannequins/Meshes/SkeletalMeshLODSettings_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab98c7a7b80ba9a10883cecac78342078cdc1f21c95e7d054ffc7d7ccbb36241 +size 8238 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_ASAOPMASK_MSK.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_ASAOPMASK_MSK.uasset new file mode 100644 index 0000000..6e50715 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_ASAOPMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c41224f93901591593826641fa79bcffcc8d5d20853fa8427e3675dc0b7ed17a +size 464936 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_BN.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_BN.uasset new file mode 100644 index 0000000..94ba2a9 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7182a4975d044f23ad68a57265740a547716035c16d09a660c922d124d3c83bb +size 1226719 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_CCRCCPlastic_MSK.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..ee629b4 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bc1ee56a90b5c9c7a3f5cdfb4df0c71ac99b5c4a8c255e56dd23f9410e7d59c +size 740524 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_D.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_D.uasset new file mode 100644 index 0000000..dac258e --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77dcee1485cab91f418254eeb85dad4d2f211373f4c13ed530d0f4f32bcc434f +size 709973 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_MSR_MSK.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_MSR_MSK.uasset new file mode 100644 index 0000000..e3fb5f4 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9757557b0d02ec50eb026cc3baa8b9b31c09e239968033d2259278407d168aee +size 804968 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_N.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_N.uasset new file mode 100644 index 0000000..a95a688 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38d78dcfae714867e7d62366849cbf2c4cb81b8cc74b27eef90275899ecaedc3 +size 674336 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_Tan.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_Tan.uasset new file mode 100644 index 0000000..e1e16cc --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_01_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:454ca4b6a6493102ecc91bb3233eacd81c667d3dff8ebdbc2a6b4a0ba5bfdec6 +size 182368 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_ASAOPMASK_MSK.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_ASAOPMASK_MSK.uasset new file mode 100644 index 0000000..257c677 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_ASAOPMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41d5279324c8b57e2de71b0d8231ec0314ee15d11023744d21dbde34cbb2d733 +size 752506 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_BN.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_BN.uasset new file mode 100644 index 0000000..72bd31a --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91430b61e964ad56a8f1e2e8e31b81a4fdc2560c33914dde41a1805437afd386 +size 1513459 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_CCRCCPlastic_MSK.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..e41886f --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b86a538e4e1d4e77f37312eeb8c7a9f572b8ca308768bee3d8c9edc503c80328 +size 1030503 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_D.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_D.uasset new file mode 100644 index 0000000..23c62b7 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d538855569f14f7cf95466ac0099735895f9829b65e172ea1079eacfd0d0ebe6 +size 1021402 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_MSR_MSK.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_MSR_MSK.uasset new file mode 100644 index 0000000..586e669 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92c6ad4b3ac2811187cf1f862e550856684165b3b8858413009209accedaa672 +size 1038471 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_N.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_N.uasset new file mode 100644 index 0000000..0d70662 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a823b311f08685e097d1c5d4814802918875df18105af44e1f0767780f7b00a +size 671894 diff --git a/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_Tan.uasset b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_Tan.uasset new file mode 100644 index 0000000..6ac0f4d --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Manny/T_Manny_02_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c602a1590736258ab79eac3b371688c08fd4ca316fcec658d62fc091d558815e +size 307100 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_BN.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_BN.uasset new file mode 100644 index 0000000..fa460e7 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70b7f20ff2e3e13b7e372f830f7b0e80b0c55060df83a9c6e5abf212ff9b82eb +size 1087323 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_D.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_D.uasset new file mode 100644 index 0000000..31f3c66 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07bba80114621eed5f8d66091efe2f7c0b9381ad38bbe2e57434cb2f6c0f0136 +size 711778 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_MSR_MSK.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_MSR_MSK.uasset new file mode 100644 index 0000000..cbc787d --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62ffab09d644a3559c813b7fae499113006e004ce1f3482409d4f2107027d8c9 +size 699838 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_N.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_N.uasset new file mode 100644 index 0000000..0e85973 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4a7afff9c98492c68004a2125400f2116538b0c03b5933c74efb3648ac69ba2 +size 539472 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_Tan.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_Tan.uasset new file mode 100644 index 0000000..19c6686 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01ID_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cfdcc98f059e700cc91dca4f090445fd754a9d2fdd8ec530bad4c17b431cdeb +size 128217 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01_ASAOMASK_MSK.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01_ASAOMASK_MSK.uasset new file mode 100644 index 0000000..306491f --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01_ASAOMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d558d81e3a64f3a4d566d026c86bdca3c36ccda515ea19246b38068663356740 +size 466596 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01_CCRCCPlastic_MSK.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..69ca3f4 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_01_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7f4556102c75311e7dd61a44a1eacffefcef1bc77b291f2f8f5c4c9a52161c7 +size 708119 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_BN.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_BN.uasset new file mode 100644 index 0000000..bc83755 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72055c416f0aeda993bdab043118e444507b8d362ec979af9683c1f78b18b688 +size 1369142 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_D.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_D.uasset new file mode 100644 index 0000000..9a75b67 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f571a3e3625403afd907e8b461757f275cf995aae8a4e5e3ea618c8a8609514 +size 949879 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_MSR_MSK.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_MSR_MSK.uasset new file mode 100644 index 0000000..9756766 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddd2361f4f3b0881edc5cb75b79e13794faaa0a152a5cb48fd998b568b8075 +size 924030 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_N.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_N.uasset new file mode 100644 index 0000000..30f0499 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f88859d8d58b2bb62a4326e2c2e7613542c7ead93a3f1efce0abcfb8deadbf16 +size 539472 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_Tan.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_Tan.uasset new file mode 100644 index 0000000..5be74bc --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02ID_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:508c42791d7cd9a3d06ca4aec5d84804b29b65ad847c12e0b90b243147f8b15c +size 234040 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02_ASAOMASK_MSK.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02_ASAOMASK_MSK.uasset new file mode 100644 index 0000000..b9369a6 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02_ASAOMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:508fbe4ca48161339f779b22c72e145395372d06a01f0202ae157ff1cca924d0 +size 646963 diff --git a/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02_CCRCCPlastic_MSK.uasset b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..9735ccb --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Quinn/T_Quinn_02_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90524ee187bb716acc6a0969e17af2d3a85c223a1c600f785f56ed8ecb56c06d +size 878248 diff --git a/Content/TemplateXRMannequins/Textures/Shared/T_UE_Logo_M.uasset b/Content/TemplateXRMannequins/Textures/Shared/T_UE_Logo_M.uasset new file mode 100644 index 0000000..eca2807 --- /dev/null +++ b/Content/TemplateXRMannequins/Textures/Shared/T_UE_Logo_M.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58d5dcf56f208a2249579a6ef821f454f1a889fecfa3e041e5d328dc5c47550c +size 40398 diff --git a/Content/VRSpectator/EVRSpectatorMode.uasset b/Content/VRSpectator/EVRSpectatorMode.uasset new file mode 100644 index 0000000..690b949 --- /dev/null +++ b/Content/VRSpectator/EVRSpectatorMode.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa6df298d25cd834f0dbf61085f8a575acec266f223c3f5046be099b243ba799 +size 2258 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_FOV.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_FOV.uasset new file mode 100644 index 0000000..8a2369f --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_FOV.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beffb8ed9644112c6201fa115440b210999f3db66a99c845473d5a0ef7e7cbd0 +size 1823 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_FOV_Reset.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_FOV_Reset.uasset new file mode 100644 index 0000000..92b2a98 --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_FOV_Reset.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d757a1a22d3d258c97587b011f2298d921fcd4b3192864b1142924881462e78 +size 1335 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_FadeInOut.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_FadeInOut.uasset new file mode 100644 index 0000000..fb4a310 --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_FadeInOut.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc3e8f32dec0548eaa07d802244e83c74734df1941300508cfeeef413f1f6af2 +size 1335 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_Look.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_Look.uasset new file mode 100644 index 0000000..4546cef --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_Look.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d877954be45775869a06a3f6bd4736ff154e244419aa3ecbab151b5b48668c38 +size 1393 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_Move.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_Move.uasset new file mode 100644 index 0000000..254f572 --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_Move.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57056afa83714794315c94fc21a406d49399eee95a3dad4a832c1e4ac9a32fa1 +size 1393 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_ResetRotation.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_ResetRotation.uasset new file mode 100644 index 0000000..703ddf6 --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_ResetRotation.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4795719d2268e50dff3c06a3818e7e92a461352203a280d2be4d7c980373511 +size 1351 diff --git a/Content/VRSpectator/Input/Actions/IA_VRSpectator_Toggle.uasset b/Content/VRSpectator/Input/Actions/IA_VRSpectator_Toggle.uasset new file mode 100644 index 0000000..3218c81 --- /dev/null +++ b/Content/VRSpectator/Input/Actions/IA_VRSpectator_Toggle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a940acc6d5ea65d7bf60f4d59560e67902c52bff0b396ebbf9d405e833a0caa7 +size 1323 diff --git a/Content/VRSpectator/Input/IMC_VRSpectator.uasset b/Content/VRSpectator/Input/IMC_VRSpectator.uasset new file mode 100644 index 0000000..c52a5c3 --- /dev/null +++ b/Content/VRSpectator/Input/IMC_VRSpectator.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da5f583933d9a6001fc3e1ac1791a28471274b08a6b3345a9de385e9bad6c771 +size 16331 diff --git a/Content/VRSpectator/RT_VRSpectator.uasset b/Content/VRSpectator/RT_VRSpectator.uasset new file mode 100644 index 0000000..27e393e --- /dev/null +++ b/Content/VRSpectator/RT_VRSpectator.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7817529fc5665f53c0fed68b6dcb2915dff8fbe0cab4f55e5ae42e98f85b64fd +size 4077 diff --git a/Content/VRSpectator/VRSpectator.uasset b/Content/VRSpectator/VRSpectator.uasset new file mode 100644 index 0000000..d71c2ff --- /dev/null +++ b/Content/VRSpectator/VRSpectator.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d9a064c38fc863bcfabbcbaa3d2b3530d9eae7137a37d0f9943d7354767d020 +size 622191 diff --git a/Content/VRTemplate/VRTemplateMap.umap b/Content/VRTemplate/VRTemplateMap.umap new file mode 100644 index 0000000..29bed7b --- /dev/null +++ b/Content/VRTemplate/VRTemplateMap.umap @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7f525b8d27e91fd134017358cd68a52a427453b9519dbf5d31bfcf9658341c7 +size 158356 diff --git a/Content/VRTemplate/VRTemplateMap_BuiltData.uasset b/Content/VRTemplate/VRTemplateMap_BuiltData.uasset new file mode 100644 index 0000000..cd7112a --- /dev/null +++ b/Content/VRTemplate/VRTemplateMap_BuiltData.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf6bd54cf1ec301a77662b3dc2f81fb7b1ecdd0bbd3024db813febcc153736b7 +size 3682015 diff --git a/Content/Weapons/GrenadeLauncher/Audio/FirstPersonTemplateWeaponFire02.uasset b/Content/Weapons/GrenadeLauncher/Audio/FirstPersonTemplateWeaponFire02.uasset new file mode 100644 index 0000000..2571c5d --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Audio/FirstPersonTemplateWeaponFire02.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89a195929a0ead34f4b3b3901270350b2d3854ad9a98df75f3b7c74a849b3ff8 +size 308458 diff --git a/Content/Weapons/GrenadeLauncher/Materials/M_GrenadeLauncher.uasset b/Content/Weapons/GrenadeLauncher/Materials/M_GrenadeLauncher.uasset new file mode 100644 index 0000000..9710e1b --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Materials/M_GrenadeLauncher.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0efea7f92b8d05461c4dbf6fdb23e5519d48795680658575138a4b097cb46b6c +size 27126 diff --git a/Content/Weapons/GrenadeLauncher/Materials/M_ProjectileBullet.uasset b/Content/Weapons/GrenadeLauncher/Materials/M_ProjectileBullet.uasset new file mode 100644 index 0000000..70e32cc --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Materials/M_ProjectileBullet.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a632681a46fef4cc87f4a9933eb7e19d73a9efbd856b55335bd883309b92530a +size 14888 diff --git a/Content/Weapons/GrenadeLauncher/Meshes/FirstPersonProjectileMesh.uasset b/Content/Weapons/GrenadeLauncher/Meshes/FirstPersonProjectileMesh.uasset new file mode 100644 index 0000000..c4b6c41 --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Meshes/FirstPersonProjectileMesh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ceea86d9723b80c01e88d55e4277cccbf6f71da3ce209562dd9c35743342a82 +size 33630 diff --git a/Content/Weapons/GrenadeLauncher/Meshes/PA_GrenadeLauncher.uasset b/Content/Weapons/GrenadeLauncher/Meshes/PA_GrenadeLauncher.uasset new file mode 100644 index 0000000..e91b892 --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Meshes/PA_GrenadeLauncher.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8917535392ac6df3f7f29c8a675a2357d02d2abf6034215106a4c34cba0b9f34 +size 10166 diff --git a/Content/Weapons/GrenadeLauncher/Meshes/SKM_GrenadeLauncher.uasset b/Content/Weapons/GrenadeLauncher/Meshes/SKM_GrenadeLauncher.uasset new file mode 100644 index 0000000..87a0a9a --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Meshes/SKM_GrenadeLauncher.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cad142505e8354c5db09683074624b7fe89dbc8a450dcfcf3476ce70d0e0941d +size 2698295 diff --git a/Content/Weapons/GrenadeLauncher/Meshes/SK_GrenadeLauncher.uasset b/Content/Weapons/GrenadeLauncher/Meshes/SK_GrenadeLauncher.uasset new file mode 100644 index 0000000..63b89b7 --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Meshes/SK_GrenadeLauncher.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13a244b07acf7288f3d1da0dcf954c53b4c29f0007cd00ce1b4d5f8fc531c15b +size 9165 diff --git a/Content/Weapons/GrenadeLauncher/Meshes/SM_GrenadeLauncher.uasset b/Content/Weapons/GrenadeLauncher/Meshes/SM_GrenadeLauncher.uasset new file mode 100644 index 0000000..79a3794 --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Meshes/SM_GrenadeLauncher.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d10839f109baf5e7424759d3e5f7d8c7588f080a28a4a1d93b0b4eefc73a378 +size 512976 diff --git a/Content/Weapons/GrenadeLauncher/Textures/T_FPGun_M.uasset b/Content/Weapons/GrenadeLauncher/Textures/T_FPGun_M.uasset new file mode 100644 index 0000000..6d6c0f0 --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Textures/T_FPGun_M.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87b4ef72e628f6140ffe677d2b64082b10acbd0e03940fc5e0627ccccd091887 +size 156597 diff --git a/Content/Weapons/GrenadeLauncher/Textures/T_FPGun_N.uasset b/Content/Weapons/GrenadeLauncher/Textures/T_FPGun_N.uasset new file mode 100644 index 0000000..8cadd22 --- /dev/null +++ b/Content/Weapons/GrenadeLauncher/Textures/T_FPGun_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:223e0f814cbd8bae88b719b654380cb60755c768217ab0ccdd83c462a913aa7d +size 1734086 diff --git a/Content/Weapons/Pistol/Materials/MI_Weapon_Pistol.uasset b/Content/Weapons/Pistol/Materials/MI_Weapon_Pistol.uasset new file mode 100644 index 0000000..273bb3c --- /dev/null +++ b/Content/Weapons/Pistol/Materials/MI_Weapon_Pistol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9213d13b5529f4c4fa84877099127d9dbc0a779a8afcca48ea1ceabb8bf07634 +size 17359 diff --git a/Content/Weapons/Pistol/Meshes/PA_Pistol.uasset b/Content/Weapons/Pistol/Meshes/PA_Pistol.uasset new file mode 100644 index 0000000..e9a85cc --- /dev/null +++ b/Content/Weapons/Pistol/Meshes/PA_Pistol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:312403ecb1c0f9c735345928619f366cb16027aa7ee22c9142f807a6511b2512 +size 8807 diff --git a/Content/Weapons/Pistol/Meshes/SKM_Pistol.uasset b/Content/Weapons/Pistol/Meshes/SKM_Pistol.uasset new file mode 100644 index 0000000..fda4700 --- /dev/null +++ b/Content/Weapons/Pistol/Meshes/SKM_Pistol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdfe37753e21c8c88c32caa1b7919918fb53c4adeda7c7fd472e9bc6730eb694 +size 999935 diff --git a/Content/Weapons/Pistol/Meshes/SK_Pistol.uasset b/Content/Weapons/Pistol/Meshes/SK_Pistol.uasset new file mode 100644 index 0000000..32d9141 --- /dev/null +++ b/Content/Weapons/Pistol/Meshes/SK_Pistol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6aeb605a2b969ab8a6d48a56c35bb44d96651727e9bfdd7f7fa38a71606e918 +size 9704 diff --git a/Content/Weapons/Pistol/Meshes/SM_Pistol.uasset b/Content/Weapons/Pistol/Meshes/SM_Pistol.uasset new file mode 100644 index 0000000..39056dd --- /dev/null +++ b/Content/Weapons/Pistol/Meshes/SM_Pistol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6066bce4cafc04232614f1e24fd44ea0b5c6a3f314dbdfb102356e59c7f56 +size 183837 diff --git a/Content/Weapons/Pistol/Textures/T_Pistol_AORM.uasset b/Content/Weapons/Pistol/Textures/T_Pistol_AORM.uasset new file mode 100644 index 0000000..ecec1f5 --- /dev/null +++ b/Content/Weapons/Pistol/Textures/T_Pistol_AORM.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65789a079408010ddc777e9291aecbcda28ea550832429b2c05c48f8dbe3c708 +size 1263989 diff --git a/Content/Weapons/Pistol/Textures/T_Pistol_D.uasset b/Content/Weapons/Pistol/Textures/T_Pistol_D.uasset new file mode 100644 index 0000000..fcacac4 --- /dev/null +++ b/Content/Weapons/Pistol/Textures/T_Pistol_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9014359ad0a79b762fccd472fa5dc5b1087a5407564952c0982d7c907dc9a588 +size 791319 diff --git a/Content/Weapons/Pistol/Textures/T_Pistol_Masks.uasset b/Content/Weapons/Pistol/Textures/T_Pistol_Masks.uasset new file mode 100644 index 0000000..29f52a1 --- /dev/null +++ b/Content/Weapons/Pistol/Textures/T_Pistol_Masks.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:506d1878e24b3dffb04e9df90d287117a0e12445e5e46d1732a093b96e2a43e3 +size 54818 diff --git a/Content/Weapons/Pistol/Textures/T_Pistol_N.uasset b/Content/Weapons/Pistol/Textures/T_Pistol_N.uasset new file mode 100644 index 0000000..660616b --- /dev/null +++ b/Content/Weapons/Pistol/Textures/T_Pistol_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a3cabf7783371d113c47b6fe82d2b5cc478c09f1155f54cf08e857e472f54f5 +size 1094269 diff --git a/Content/Weapons/Rifle/Materials/M_Rifle.uasset b/Content/Weapons/Rifle/Materials/M_Rifle.uasset new file mode 100644 index 0000000..1fa592b --- /dev/null +++ b/Content/Weapons/Rifle/Materials/M_Rifle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4825031b9d0c4607f541b778b6e29baf5d3da3aa0a8ae511742eb93ebc429a3 +size 12404 diff --git a/Content/Weapons/Rifle/Materials/M_Weapon.uasset b/Content/Weapons/Rifle/Materials/M_Weapon.uasset new file mode 100644 index 0000000..2157891 --- /dev/null +++ b/Content/Weapons/Rifle/Materials/M_Weapon.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:304ab2ae0a6ba53d20b4d45ce3761e39c7d28597027bcd0f17d67618bc13c175 +size 29581 diff --git a/Content/Weapons/Rifle/Meshes/PA_Rifle.uasset b/Content/Weapons/Rifle/Meshes/PA_Rifle.uasset new file mode 100644 index 0000000..9a1612b --- /dev/null +++ b/Content/Weapons/Rifle/Meshes/PA_Rifle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b33b03102c2ff60f6c6f4856a8293d3160293a1582219fdbd39ff0527ac16b75 +size 7677 diff --git a/Content/Weapons/Rifle/Meshes/SKM_Rifle.uasset b/Content/Weapons/Rifle/Meshes/SKM_Rifle.uasset new file mode 100644 index 0000000..e90a3e2 --- /dev/null +++ b/Content/Weapons/Rifle/Meshes/SKM_Rifle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:349e47d396d21d908cf4763dfc759e9fd49da776b09dc699799e1b19591c0506 +size 2584805 diff --git a/Content/Weapons/Rifle/Meshes/SK_Rifle.uasset b/Content/Weapons/Rifle/Meshes/SK_Rifle.uasset new file mode 100644 index 0000000..02e5c94 --- /dev/null +++ b/Content/Weapons/Rifle/Meshes/SK_Rifle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc21d41a9a220446bcb9b7d021bee25d8811cfc6a01b8b381000f22e586c8e17 +size 7939 diff --git a/Content/Weapons/Rifle/Meshes/SM_Rifle.uasset b/Content/Weapons/Rifle/Meshes/SM_Rifle.uasset new file mode 100644 index 0000000..4f2e05e --- /dev/null +++ b/Content/Weapons/Rifle/Meshes/SM_Rifle.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f32e41a07638d165957caee2ba550aac591503b69b8c897e7bd3b284b8d775e2 +size 450116 diff --git a/Content/Weapons/Rifle/Textures/T_Rifle_BC.uasset b/Content/Weapons/Rifle/Textures/T_Rifle_BC.uasset new file mode 100644 index 0000000..a613c42 --- /dev/null +++ b/Content/Weapons/Rifle/Textures/T_Rifle_BC.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a186121704cce5edc611c79a0476a935387c5d2c627a219dcdfe75205be8b979 +size 429100 diff --git a/Content/Weapons/Rifle/Textures/T_Rifle_N.uasset b/Content/Weapons/Rifle/Textures/T_Rifle_N.uasset new file mode 100644 index 0000000..5be981c --- /dev/null +++ b/Content/Weapons/Rifle/Textures/T_Rifle_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df596e6ab2c7c94bddf9eb71717896c6d2c1b7ccf14b804b59b5e54f29d39a16 +size 1115236 diff --git a/Content/XRFramework/Audio/Fire01.uasset b/Content/XRFramework/Audio/Fire01.uasset new file mode 100644 index 0000000..0b173b9 --- /dev/null +++ b/Content/XRFramework/Audio/Fire01.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11575b78135959575a45e156c6b30838c35f7cbcc9e5ff92b577ff7ce6fb8878 +size 553301 diff --git a/Content/XRFramework/Audio/Fire_Cue.uasset b/Content/XRFramework/Audio/Fire_Cue.uasset new file mode 100644 index 0000000..42c602e --- /dev/null +++ b/Content/XRFramework/Audio/Fire_Cue.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:701f343660e1495d7fe3d81dbb568086de821856880b1a54e5fd614402fdda0d +size 4945 diff --git a/Content/XRFramework/Blueprints/BPI_PawnAnim.uasset b/Content/XRFramework/Blueprints/BPI_PawnAnim.uasset new file mode 100644 index 0000000..3d96122 --- /dev/null +++ b/Content/XRFramework/Blueprints/BPI_PawnAnim.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca764a748e0a999387e87f1d5eafc38ba95604ba5a4032629cb0b38a7edcca93 +size 10316 diff --git a/Content/XRFramework/Blueprints/BP_AssetGuideline.uasset b/Content/XRFramework/Blueprints/BP_AssetGuideline.uasset new file mode 100644 index 0000000..90ae88d --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_AssetGuideline.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d270d55435de4516ac338e82b0fa9e31efce439420ed01cc547d1ddd52b7d4ac +size 7950 diff --git a/Content/XRFramework/Blueprints/BP_GrabComponent.uasset b/Content/XRFramework/Blueprints/BP_GrabComponent.uasset new file mode 100644 index 0000000..c156efc --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_GrabComponent.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:469043a3458f91439b1fc0f03bc3e2f2085737ed024077ac9f866d515d7ae1bb +size 261010 diff --git a/Content/XRFramework/Blueprints/BP_Grabbable_SmallCube.uasset b/Content/XRFramework/Blueprints/BP_Grabbable_SmallCube.uasset new file mode 100644 index 0000000..97bad4c --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_Grabbable_SmallCube.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d23219274a9777b230623a24fa8d0fc42775c21feaf3982f0d9304e59a1feefc +size 30104 diff --git a/Content/XRFramework/Blueprints/BP_Grabbable_SmallSphere.uasset b/Content/XRFramework/Blueprints/BP_Grabbable_SmallSphere.uasset new file mode 100644 index 0000000..2adae4d --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_Grabbable_SmallSphere.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:463af588bcab716b5e180ced501e58bdf16127c3416a379ff552ed454d21861e +size 2590 diff --git a/Content/XRFramework/Blueprints/BP_Menu.uasset b/Content/XRFramework/Blueprints/BP_Menu.uasset new file mode 100644 index 0000000..ae3461d --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_Menu.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8b7a52071399da863d152b978d2dafc906691a48eee675dc2ad20bdacfdf084 +size 528845 diff --git a/Content/XRFramework/Blueprints/BP_Passthrough.uasset b/Content/XRFramework/Blueprints/BP_Passthrough.uasset new file mode 100644 index 0000000..09c96ff --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_Passthrough.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5df569844792cccc8d63404473feb1edd1c89af4d51c96cf3a21c1b84b8ee86d +size 123685 diff --git a/Content/XRFramework/Blueprints/BP_Pistol.uasset b/Content/XRFramework/Blueprints/BP_Pistol.uasset new file mode 100644 index 0000000..0aea387 --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_Pistol.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64ef2376114ab0a20c7facb6e7ad863095c641ac2866b6b713c9f3a137f0c12b +size 148086 diff --git a/Content/XRFramework/Blueprints/BP_Projectile.uasset b/Content/XRFramework/Blueprints/BP_Projectile.uasset new file mode 100644 index 0000000..69b0142 --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_Projectile.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c920786fff12da70144056c42ff0281d488b7b490f69d1e19b6000ae278b57ef +size 96725 diff --git a/Content/XRFramework/Blueprints/BP_TeleportVisualizer.uasset b/Content/XRFramework/Blueprints/BP_TeleportVisualizer.uasset new file mode 100644 index 0000000..ed9a941 --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_TeleportVisualizer.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8cae996aedc4aa3e3e351029e8b413bc57ae9e8c0429a8dd3b42ccd8504e95e +size 78876 diff --git a/Content/XRFramework/Blueprints/BP_XRGameMode.uasset b/Content/XRFramework/Blueprints/BP_XRGameMode.uasset new file mode 100644 index 0000000..00472a2 --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_XRGameMode.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e35fd1fb205be76109ddd26498f61332738052d23e7df9d8481b60de1d2ab17 +size 21668 diff --git a/Content/XRFramework/Blueprints/BP_XRPawn.uasset b/Content/XRFramework/Blueprints/BP_XRPawn.uasset new file mode 100644 index 0000000..f03b5ae --- /dev/null +++ b/Content/XRFramework/Blueprints/BP_XRPawn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5c850a3373bd0cf1d992953e01efdcf1ddb585b1ae7e81234d6de3d7c0dab2d +size 945124 diff --git a/Content/XRFramework/Blueprints/E_GrabType.uasset b/Content/XRFramework/Blueprints/E_GrabType.uasset new file mode 100644 index 0000000..7f50632 --- /dev/null +++ b/Content/XRFramework/Blueprints/E_GrabType.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f10a3cf38bc90768b98934a11ebaa6eb660a3ec60769f6c6676b1b95efa9087d +size 2856 diff --git a/Content/XRFramework/Blueprints/WBP_Menu.uasset b/Content/XRFramework/Blueprints/WBP_Menu.uasset new file mode 100644 index 0000000..00d9932 --- /dev/null +++ b/Content/XRFramework/Blueprints/WBP_Menu.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c74438c0e7f8a6563fc1cdf3c1245c34a4556dcd9b9c48f609b709461ccda44f +size 117862 diff --git a/Content/XRFramework/Haptics/GrabHapticEffect.uasset b/Content/XRFramework/Haptics/GrabHapticEffect.uasset new file mode 100644 index 0000000..92d6c25 --- /dev/null +++ b/Content/XRFramework/Haptics/GrabHapticEffect.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4aa9bdfdac2145d2cdb139d905e683308d344cb49e28137607dceed9ed32cc2e +size 1893 diff --git a/Content/XRFramework/Haptics/PistolFireHapticEffect.uasset b/Content/XRFramework/Haptics/PistolFireHapticEffect.uasset new file mode 100644 index 0000000..e8034a3 --- /dev/null +++ b/Content/XRFramework/Haptics/PistolFireHapticEffect.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aca10dc99e9728514bbd4bdaef2ade825f663331c5818bdbb44b2b51e1aeeeb +size 1923 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_Grasp_Left.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Grasp_Left.uasset new file mode 100644 index 0000000..7cc3869 --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Grasp_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45a0c32a9f18eacec89db6dc1e06e66aca85e6e2651acf14b15bd53fcbf24a7f +size 1840 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_Grasp_Right.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Grasp_Right.uasset new file mode 100644 index 0000000..4ccd308 --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Grasp_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdc2af73d20e3d86544ce2db064a87c05800771963d29655611f05447da2d4a1 +size 1849 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_IndexCurl_Left.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_IndexCurl_Left.uasset new file mode 100644 index 0000000..03773f2 --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_IndexCurl_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87d71151b277ec0f747ce55a804595a32e5e6d0197cd897b082715d123baa71e +size 1878 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_IndexCurl_Right.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_IndexCurl_Right.uasset new file mode 100644 index 0000000..f334f14 --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_IndexCurl_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e1340686328894b3f012aefc896fd95363f63bdbe120654d5bca6e6cf4ab6ff +size 1887 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_Point_Left.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Point_Left.uasset new file mode 100644 index 0000000..3ca07a4 --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Point_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e2301cccec7da79d80a1e28d22ba13f585a4fc0c59ee840cea0a50421e5d804 +size 1840 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_Point_Right.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Point_Right.uasset new file mode 100644 index 0000000..c8d6be2 --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_Point_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bae11eb510f3c450b1075c4f23961891a9f2fcd2e20a8d35d51263faaf4b51b1 +size 1849 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_ThumbUp_Left.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_ThumbUp_Left.uasset new file mode 100644 index 0000000..25b59bb --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_ThumbUp_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc77f49a865a3e41509cb301378d5ccda780613735eed5fa1db8b99385dabe7b +size 1860 diff --git a/Content/XRFramework/Input/Actions/Hands/IA_Hand_ThumbUp_Right.uasset b/Content/XRFramework/Input/Actions/Hands/IA_Hand_ThumbUp_Right.uasset new file mode 100644 index 0000000..5ffcf8a --- /dev/null +++ b/Content/XRFramework/Input/Actions/Hands/IA_Hand_ThumbUp_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b501e68a42fcf6530ce17fd63b27d5b08244ad15878dc4454402a6d70c2d2d6 +size 1869 diff --git a/Content/XRFramework/Input/Actions/IA_Grab_Left_Pressed.uasset b/Content/XRFramework/Input/Actions/IA_Grab_Left_Pressed.uasset new file mode 100644 index 0000000..081c469 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Grab_Left_Pressed.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4783b28ecd7f66a39a64c23b340bb87f57858a60cf59da22172c1a1288ac0fb +size 2338 diff --git a/Content/XRFramework/Input/Actions/IA_Grab_Left_Released.uasset b/Content/XRFramework/Input/Actions/IA_Grab_Left_Released.uasset new file mode 100644 index 0000000..9a39f54 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Grab_Left_Released.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03fb746fd9615e47157a7c3518d82d88147e3e8a8d793b1d3cbee468d43781ff +size 2164 diff --git a/Content/XRFramework/Input/Actions/IA_Grab_Right_Pressed.uasset b/Content/XRFramework/Input/Actions/IA_Grab_Right_Pressed.uasset new file mode 100644 index 0000000..651b928 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Grab_Right_Pressed.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08363d7f6189af64246554ef97fa1d1ebcb0d42f0c5007e20d9477269edd8e66 +size 2347 diff --git a/Content/XRFramework/Input/Actions/IA_Grab_Right_Released.uasset b/Content/XRFramework/Input/Actions/IA_Grab_Right_Released.uasset new file mode 100644 index 0000000..c281678 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Grab_Right_Released.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb160d0d99cf85bbd0cf7084488b995a732f88a49737c37990930d8205063cbe +size 2173 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Cursor_Left.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Cursor_Left.uasset new file mode 100644 index 0000000..39df400 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Cursor_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d01e4a0083fb8187c88243a16e4d3af42761044e50722f8a1393d13a0b3979fe +size 2070 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Cursor_Right.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Cursor_Right.uasset new file mode 100644 index 0000000..74764dc --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Cursor_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f67928e46481523a4b7983136a8679876d636e0bec42b78904196aa66dba271 +size 2079 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Interact_Left_Pressed.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Left_Pressed.uasset new file mode 100644 index 0000000..dc3f110 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Left_Pressed.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5c6cfafd43a478fb754719d2f2458cdea6f21d6969362f95924f809f79fbbaf +size 1961 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Interact_Left_Released.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Left_Released.uasset new file mode 100644 index 0000000..97e7ed2 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Left_Released.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f28a1ad295c440d01b8ca8fa60ab6237cf5abaf46f714ab774aa9f68b3d70a6 +size 1971 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Interact_Right_Pressed.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Right_Pressed.uasset new file mode 100644 index 0000000..74649e9 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Right_Pressed.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54d9b03fceb06061dfc6d0db1b300adde9d3550fff5ed06e9093964d99e0246f +size 1970 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Interact_Right_Released.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Right_Released.uasset new file mode 100644 index 0000000..76c0fd2 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Interact_Right_Released.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f84444024f35c1d09baeaf7a900560dc386cec15b6dffd7458eeb58a0ef58b0 +size 1979 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Toggle_Left.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Toggle_Left.uasset new file mode 100644 index 0000000..71eb6a5 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Toggle_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12ecd23defd720b56c4843507042d4b8aaf9f7a9c86ca944be7740144aca20c8 +size 1871 diff --git a/Content/XRFramework/Input/Actions/IA_Menu_Toggle_Right.uasset b/Content/XRFramework/Input/Actions/IA_Menu_Toggle_Right.uasset new file mode 100644 index 0000000..4a90876 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Menu_Toggle_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb00b3bbe6e9de661048523593679a41b1166c26ebaf4768b4ee8b17509ba682 +size 1880 diff --git a/Content/XRFramework/Input/Actions/IA_Move.uasset b/Content/XRFramework/Input/Actions/IA_Move.uasset new file mode 100644 index 0000000..b41153c --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Move.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea961c9a25cac6a0bdab41a5dd336bc308f2ce80c7eccfdbd4d1d1ef3611ab64 +size 2416 diff --git a/Content/XRFramework/Input/Actions/IA_Shoot_Left.uasset b/Content/XRFramework/Input/Actions/IA_Shoot_Left.uasset new file mode 100644 index 0000000..665d647 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Shoot_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16d3cc2e4a6d66f792f4164c78f32ce42a2a78d0d3114d6fc0e1d62cebef0f3e +size 1817 diff --git a/Content/XRFramework/Input/Actions/IA_Shoot_Right.uasset b/Content/XRFramework/Input/Actions/IA_Shoot_Right.uasset new file mode 100644 index 0000000..f6d8054 --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Shoot_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99b627720c2babbb05ad6bfd60570bb7a8fa21c1848fe980a838165e3b795141 +size 1826 diff --git a/Content/XRFramework/Input/Actions/IA_Turn.uasset b/Content/XRFramework/Input/Actions/IA_Turn.uasset new file mode 100644 index 0000000..44c0ded --- /dev/null +++ b/Content/XRFramework/Input/Actions/IA_Turn.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdf2bdf02850e37f8c5b2654410d41b2b04e894c1719569398df5d38ff30afd2 +size 2295 diff --git a/Content/XRFramework/Input/BP_InputModifier_XAxisPositiveOnly.uasset b/Content/XRFramework/Input/BP_InputModifier_XAxisPositiveOnly.uasset new file mode 100644 index 0000000..bcc97b5 --- /dev/null +++ b/Content/XRFramework/Input/BP_InputModifier_XAxisPositiveOnly.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cf5f39509ca36896fe3b3144003e2aaf6203e4f2bf79048737ebd4303ee296f +size 39719 diff --git a/Content/XRFramework/Input/IMC_Default.uasset b/Content/XRFramework/Input/IMC_Default.uasset new file mode 100644 index 0000000..810014d --- /dev/null +++ b/Content/XRFramework/Input/IMC_Default.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:639156684e5a7712c146af0ba623e22775f804452ef996ea6172ddd2a17a1c5f +size 15034 diff --git a/Content/XRFramework/Input/IMC_Hands.uasset b/Content/XRFramework/Input/IMC_Hands.uasset new file mode 100644 index 0000000..1aafd8a --- /dev/null +++ b/Content/XRFramework/Input/IMC_Hands.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:477c8592066ca9ede11b7770562d6b21d4e99ee4fc700720045ab74f8cb0260b +size 16626 diff --git a/Content/XRFramework/Input/IMC_Menu.uasset b/Content/XRFramework/Input/IMC_Menu.uasset new file mode 100644 index 0000000..d1c3675 --- /dev/null +++ b/Content/XRFramework/Input/IMC_Menu.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9200a31eb20689b74340a5f0eb7de9618965e15f8eb2dec80018032adfa7088c +size 8378 diff --git a/Content/XRFramework/Input/IMC_Weapon_Left.uasset b/Content/XRFramework/Input/IMC_Weapon_Left.uasset new file mode 100644 index 0000000..53b5107 --- /dev/null +++ b/Content/XRFramework/Input/IMC_Weapon_Left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24865958f25da645237a5bfbe3f4de603a6c3e270428b56de9f9b869f3b6b733 +size 3754 diff --git a/Content/XRFramework/Input/IMC_Weapon_Right.uasset b/Content/XRFramework/Input/IMC_Weapon_Right.uasset new file mode 100644 index 0000000..908d674 --- /dev/null +++ b/Content/XRFramework/Input/IMC_Weapon_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2220ebd2ea2a57c27b33c82b0b3276a373b8aa50da8e85da68994d338a1dd5ea +size 3769 diff --git a/Content/XRFramework/Materials/DefaultRibbonMaterial_NoGradient.uasset b/Content/XRFramework/Materials/DefaultRibbonMaterial_NoGradient.uasset new file mode 100644 index 0000000..a492fe0 --- /dev/null +++ b/Content/XRFramework/Materials/DefaultRibbonMaterial_NoGradient.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4796ef8a0d49690f10a61eaa9756d2cda663f5e27137db6a144ceebe2435447 +size 67436 diff --git a/Content/XRFramework/Materials/Functions/MF_OccludedPixels.uasset b/Content/XRFramework/Materials/Functions/MF_OccludedPixels.uasset new file mode 100644 index 0000000..f696419 --- /dev/null +++ b/Content/XRFramework/Materials/Functions/MF_OccludedPixels.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe9c3eb506fff90f176d2a88f5b1807cacd491fa2c6a9fa4f2a9e2036d69b84e +size 116119 diff --git a/Content/XRFramework/Materials/MI_Grid_Accent.uasset b/Content/XRFramework/Materials/MI_Grid_Accent.uasset new file mode 100644 index 0000000..686a632 --- /dev/null +++ b/Content/XRFramework/Materials/MI_Grid_Accent.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81c3f0b900043c4be003f8e239b21e3b92414b6aa5e1f8b748761530e9372aa9 +size 114254 diff --git a/Content/XRFramework/Materials/MI_Grid_Default.uasset b/Content/XRFramework/Materials/MI_Grid_Default.uasset new file mode 100644 index 0000000..5fa651d --- /dev/null +++ b/Content/XRFramework/Materials/MI_Grid_Default.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c5ef9073b231688b5754c097e37a0ea6d9d99d67570418bb75df0ebcc85e2c8 +size 119057 diff --git a/Content/XRFramework/Materials/MI_Projectile.uasset b/Content/XRFramework/Materials/MI_Projectile.uasset new file mode 100644 index 0000000..ec568ed --- /dev/null +++ b/Content/XRFramework/Materials/MI_Projectile.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b2976faa5a5eb4672270546b543e2156f21a6c08ba275e3ad0f692809b37d5e +size 101581 diff --git a/Content/XRFramework/Materials/MI_VRColorway.uasset b/Content/XRFramework/Materials/MI_VRColorway.uasset new file mode 100644 index 0000000..0120490 --- /dev/null +++ b/Content/XRFramework/Materials/MI_VRColorway.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f664e6a6a5f11fb319b2df21fc908da7c2bb3e6dfb15103fe6018240cdfc5f4a +size 8878 diff --git a/Content/XRFramework/Materials/M_GridRotation.uasset b/Content/XRFramework/Materials/M_GridRotation.uasset new file mode 100644 index 0000000..e37eda7 --- /dev/null +++ b/Content/XRFramework/Materials/M_GridRotation.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c7a77d2a94f3d8253f3525b0aa6f5f22c767b55f4c9d9432e0ddce8d217c783 +size 129893 diff --git a/Content/XRFramework/Materials/M_LeftEyeGreen_RightEyeRed.uasset b/Content/XRFramework/Materials/M_LeftEyeGreen_RightEyeRed.uasset new file mode 100644 index 0000000..6ac90bf --- /dev/null +++ b/Content/XRFramework/Materials/M_LeftEyeGreen_RightEyeRed.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10da0f64f947af67755ba08f39b33a37e7c3aae33346c2b58d0249f3b23fb183 +size 12118 diff --git a/Content/XRFramework/Materials/M_Projectile.uasset b/Content/XRFramework/Materials/M_Projectile.uasset new file mode 100644 index 0000000..e424298 --- /dev/null +++ b/Content/XRFramework/Materials/M_Projectile.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46fcf7c8d8fb61b2e6ae8ac27dcb3654f48d08e330a6604e8527d397fc51f5d0 +size 106534 diff --git a/Content/XRFramework/Materials/M_TeleportCylinder.uasset b/Content/XRFramework/Materials/M_TeleportCylinder.uasset new file mode 100644 index 0000000..75f7069 --- /dev/null +++ b/Content/XRFramework/Materials/M_TeleportCylinder.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5f5c5914b67b93b11a3f7ded26ca9a6805bf147ddb168025dfb56799ef50074 +size 83829 diff --git a/Content/XRFramework/Materials/M_TeleportNoise.uasset b/Content/XRFramework/Materials/M_TeleportNoise.uasset new file mode 100644 index 0000000..0daa71c --- /dev/null +++ b/Content/XRFramework/Materials/M_TeleportNoise.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06f16735ac8b2d555134e8051b6848518c018e3ad72c0e31f94870b0121a1dfd +size 73169 diff --git a/Content/XRFramework/Materials/M_VRCursor.uasset b/Content/XRFramework/Materials/M_VRCursor.uasset new file mode 100644 index 0000000..834f010 --- /dev/null +++ b/Content/XRFramework/Materials/M_VRCursor.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a02584982d3201d37d2953256524adb9ba27b7b5205c7ba0fc65faa2d79bdcb5 +size 56045 diff --git a/Content/XRFramework/Textures/T_Grid.uasset b/Content/XRFramework/Textures/T_Grid.uasset new file mode 100644 index 0000000..edb10d2 --- /dev/null +++ b/Content/XRFramework/Textures/T_Grid.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44c1d931a292273693ff4394d9504966d1a8f36431dafd8e8b4c9c3c5b6c824f +size 36448 diff --git a/Content/XRFramework/VFX/NPC_VRTemplate.uasset b/Content/XRFramework/VFX/NPC_VRTemplate.uasset new file mode 100644 index 0000000..095303f --- /dev/null +++ b/Content/XRFramework/VFX/NPC_VRTemplate.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef474d9c26cba1fb1270952fb1bb3320d8acdeaaed3451c12af6ce13686ef88b +size 2746 diff --git a/Content/XRFramework/VFX/NS_MenuLaser.uasset b/Content/XRFramework/VFX/NS_MenuLaser.uasset new file mode 100644 index 0000000..7011b2e --- /dev/null +++ b/Content/XRFramework/VFX/NS_MenuLaser.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4f1966c980d572857887598d9cc81eeb8598de05a740ba412515f97ad1809a9 +size 282875 diff --git a/Content/XRFramework/VFX/NS_PlayAreaBounds.uasset b/Content/XRFramework/VFX/NS_PlayAreaBounds.uasset new file mode 100644 index 0000000..43dbef9 --- /dev/null +++ b/Content/XRFramework/VFX/NS_PlayAreaBounds.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35ccc4483508403163493111e5ad353b5de05416b4ecf3865a714b79c171dbcf +size 341574 diff --git a/Content/XRFramework/VFX/NS_TeleportRing.uasset b/Content/XRFramework/VFX/NS_TeleportRing.uasset new file mode 100644 index 0000000..cbea83b --- /dev/null +++ b/Content/XRFramework/VFX/NS_TeleportRing.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43f39953414e69e9250e61b6b65d9977ec9e4b7dd92b72eeb4a8d0c6d7b3f23f +size 422501 diff --git a/Content/XRFramework/VFX/NS_TeleportTrace.uasset b/Content/XRFramework/VFX/NS_TeleportTrace.uasset new file mode 100644 index 0000000..38b344f --- /dev/null +++ b/Content/XRFramework/VFX/NS_TeleportTrace.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccd994d3715a32c95af05ff8f332253ceac911d7ff63d6b54d3d0a6aad76a2c4 +size 342337 diff --git a/Content/XRMannequins/Animations/A_MannequinsXR_Grasp_Right.uasset b/Content/XRMannequins/Animations/A_MannequinsXR_Grasp_Right.uasset new file mode 100644 index 0000000..d0e8967 --- /dev/null +++ b/Content/XRMannequins/Animations/A_MannequinsXR_Grasp_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85aa88651a9839e95426057de6b8d8cf0abf7e68e3fbbc6cfaf981c950651f05 +size 81728 diff --git a/Content/XRMannequins/Animations/A_MannequinsXR_Idle_Right.uasset b/Content/XRMannequins/Animations/A_MannequinsXR_Idle_Right.uasset new file mode 100644 index 0000000..bd2b2a0 --- /dev/null +++ b/Content/XRMannequins/Animations/A_MannequinsXR_Idle_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0e134e2a8a58343a1a71a037af1adbeb36d837472766179fa20a0b1ec29a2e4 +size 66747 diff --git a/Content/XRMannequins/Animations/A_MannequinsXR_IndexCurl_Right.uasset b/Content/XRMannequins/Animations/A_MannequinsXR_IndexCurl_Right.uasset new file mode 100644 index 0000000..b0e42bc --- /dev/null +++ b/Content/XRMannequins/Animations/A_MannequinsXR_IndexCurl_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7feab0fcd6cd8bb1c23acc6947a0f0cd1571e3d7885d6f16df0aaa5a51ae76bb +size 82023 diff --git a/Content/XRMannequins/Animations/A_MannequinsXR_Point_Right.uasset b/Content/XRMannequins/Animations/A_MannequinsXR_Point_Right.uasset new file mode 100644 index 0000000..b848646 --- /dev/null +++ b/Content/XRMannequins/Animations/A_MannequinsXR_Point_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d41054dc51ebd87ea0d6d76cf19d9a9282863dc1f88b2ba342dfd62b63f1793 +size 81970 diff --git a/Content/XRMannequins/Animations/A_MannequinsXR_ThumbUp_Right.uasset b/Content/XRMannequins/Animations/A_MannequinsXR_ThumbUp_Right.uasset new file mode 100644 index 0000000..dd7ed35 --- /dev/null +++ b/Content/XRMannequins/Animations/A_MannequinsXR_ThumbUp_Right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:726a3e36cbb7973b85f7f259b959ba7c82888c2b77a7ccc036f6978b3ab0bc16 +size 82084 diff --git a/Content/XRMannequins/Animations/MDT_MannequinsXR.uasset b/Content/XRMannequins/Animations/MDT_MannequinsXR.uasset new file mode 100644 index 0000000..e7968ad --- /dev/null +++ b/Content/XRMannequins/Animations/MDT_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b5e257560910542340b49c07a4cd88d350177dc99cfc07e1a0f56a0b3da3d10 +size 13445 diff --git a/Content/XRMannequins/BP_MannequinsXR.uasset b/Content/XRMannequins/BP_MannequinsXR.uasset new file mode 100644 index 0000000..2923792 --- /dev/null +++ b/Content/XRMannequins/BP_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87280917c4dec6c5723802fe0af8d836260bfe7c14431a3a2720e751ac1393ec +size 14387 diff --git a/Content/XRMannequins/Materials/Functions/CA_Mannequin.uasset b/Content/XRMannequins/Materials/Functions/CA_Mannequin.uasset new file mode 100644 index 0000000..4868ff6 --- /dev/null +++ b/Content/XRMannequins/Materials/Functions/CA_Mannequin.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1d617ad3c490faa15b5c04571bb629ec226038df4a752530389dc17b8ed1acc +size 5224 diff --git a/Content/XRMannequins/Materials/Functions/ChromaticCurve.uasset b/Content/XRMannequins/Materials/Functions/ChromaticCurve.uasset new file mode 100644 index 0000000..b90c0aa --- /dev/null +++ b/Content/XRMannequins/Materials/Functions/ChromaticCurve.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77518f2b4f885f89204a9ed021e2d9569512539e4e913d3ecbde9e9739a0923e +size 6166 diff --git a/Content/XRMannequins/Materials/Functions/MF_Diffraction.uasset b/Content/XRMannequins/Materials/Functions/MF_Diffraction.uasset new file mode 100644 index 0000000..d00d3c3 --- /dev/null +++ b/Content/XRMannequins/Materials/Functions/MF_Diffraction.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e1768e5d8826d5d86ee8d9a4e622dc0807a7ba92c75a38573fe6f85b4ff8a98 +size 32218 diff --git a/Content/XRMannequins/Materials/Functions/MF_logo3layers.uasset b/Content/XRMannequins/Materials/Functions/MF_logo3layers.uasset new file mode 100644 index 0000000..4318e98 --- /dev/null +++ b/Content/XRMannequins/Materials/Functions/MF_logo3layers.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6f5148bfd6fe342f7a41942d947b1e3e9fdd0ae303e2e04d2be6482d3b15182 +size 56802 diff --git a/Content/XRMannequins/Materials/Functions/ML_BaseColorFallOff.uasset b/Content/XRMannequins/Materials/Functions/ML_BaseColorFallOff.uasset new file mode 100644 index 0000000..d031c7b --- /dev/null +++ b/Content/XRMannequins/Materials/Functions/ML_BaseColorFallOff.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:866fdffd4fbb0787ecf57b397a415d4a13ab8d8ca888b4bf53e128f3b379bb29 +size 14374 diff --git a/Content/XRMannequins/Materials/Instances/Manny/MI_Manny_01.uasset b/Content/XRMannequins/Materials/Instances/Manny/MI_Manny_01.uasset new file mode 100644 index 0000000..8ec2568 --- /dev/null +++ b/Content/XRMannequins/Materials/Instances/Manny/MI_Manny_01.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a31bf5325e8d5aa27e541ba3ef0f5218cf6f61ab1d1cd9a949fe8fd2c020291 +size 19341 diff --git a/Content/XRMannequins/Materials/Instances/Manny/MI_Manny_02.uasset b/Content/XRMannequins/Materials/Instances/Manny/MI_Manny_02.uasset new file mode 100644 index 0000000..469fea3 --- /dev/null +++ b/Content/XRMannequins/Materials/Instances/Manny/MI_Manny_02.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b768c1d3124cbde26b3b35ec815eaedfc7810763e620418f3ac007e412038b2 +size 19706 diff --git a/Content/XRMannequins/Materials/Instances/Quinn/MI_Quinn_01.uasset b/Content/XRMannequins/Materials/Instances/Quinn/MI_Quinn_01.uasset new file mode 100644 index 0000000..98a8368 --- /dev/null +++ b/Content/XRMannequins/Materials/Instances/Quinn/MI_Quinn_01.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fe280b5d4e8e19b74080ab41a9126b34e1dfdc46b04dbb49bebc0579631c34c +size 17448 diff --git a/Content/XRMannequins/Materials/Instances/Quinn/MI_Quinn_02.uasset b/Content/XRMannequins/Materials/Instances/Quinn/MI_Quinn_02.uasset new file mode 100644 index 0000000..bf6f13f --- /dev/null +++ b/Content/XRMannequins/Materials/Instances/Quinn/MI_Quinn_02.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f845fdaf8a5ad058e2c2b6fb3fd21513b0f843d68a7074fe0663b13158c031d8 +size 19771 diff --git a/Content/XRMannequins/Materials/M_Mannequin.uasset b/Content/XRMannequins/Materials/M_Mannequin.uasset new file mode 100644 index 0000000..926fbf0 --- /dev/null +++ b/Content/XRMannequins/Materials/M_Mannequin.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc25d4e8759b0230991da67e8912f991cc77f985c25854d2163879e4de3a80bf +size 83448 diff --git a/Content/XRMannequins/Meshes/ABP_MannequinsXR.uasset b/Content/XRMannequins/Meshes/ABP_MannequinsXR.uasset new file mode 100644 index 0000000..eefc000 --- /dev/null +++ b/Content/XRMannequins/Meshes/ABP_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97f03fd306dd463a3d8092b137a948d38f849d9f51811d1702d897ad8287963a +size 215702 diff --git a/Content/XRMannequins/Meshes/SKM_MannyXR_left.uasset b/Content/XRMannequins/Meshes/SKM_MannyXR_left.uasset new file mode 100644 index 0000000..0641775 --- /dev/null +++ b/Content/XRMannequins/Meshes/SKM_MannyXR_left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f96f17ec7c1a31a9dedc436bc625cc3b32d5c2beff8cb6fa8922b36c84fd282 +size 1347037 diff --git a/Content/XRMannequins/Meshes/SKM_MannyXR_right.uasset b/Content/XRMannequins/Meshes/SKM_MannyXR_right.uasset new file mode 100644 index 0000000..fa28771 --- /dev/null +++ b/Content/XRMannequins/Meshes/SKM_MannyXR_right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f0e05254596f9ceb5888fd08618a6ebee3469b9dc174d01dc95764fac566ce1 +size 1346194 diff --git a/Content/XRMannequins/Meshes/SKM_QuinnXR_left.uasset b/Content/XRMannequins/Meshes/SKM_QuinnXR_left.uasset new file mode 100644 index 0000000..c9534dc --- /dev/null +++ b/Content/XRMannequins/Meshes/SKM_QuinnXR_left.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:720a0e8920aa48924c850a6c734b6d786c1549600582707417fbd13d41b4f9e4 +size 1416800 diff --git a/Content/XRMannequins/Meshes/SKM_QuinnXR_right.uasset b/Content/XRMannequins/Meshes/SKM_QuinnXR_right.uasset new file mode 100644 index 0000000..7fec1dd --- /dev/null +++ b/Content/XRMannequins/Meshes/SKM_QuinnXR_right.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecabc844ba6daf530357849053ed230416886c97683d510fb3f04ebcf5e403fa +size 1414716 diff --git a/Content/XRMannequins/Meshes/SK_MannequinsXR.uasset b/Content/XRMannequins/Meshes/SK_MannequinsXR.uasset new file mode 100644 index 0000000..5424751 --- /dev/null +++ b/Content/XRMannequins/Meshes/SK_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a59f41fd3ea9c2509b1bff0f1b9db3c477e5aa5e3e30bb02e11a55167dbd7609 +size 54437 diff --git a/Content/XRMannequins/Meshes/SkeletalMeshLODSettings_MannequinsXR.uasset b/Content/XRMannequins/Meshes/SkeletalMeshLODSettings_MannequinsXR.uasset new file mode 100644 index 0000000..b90b263 --- /dev/null +++ b/Content/XRMannequins/Meshes/SkeletalMeshLODSettings_MannequinsXR.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9d8e45d24fc858a02e326e269339f723e694195f6d94c829a6a569a4b67c72a +size 8133 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_ASAOPMASK_MSK.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_ASAOPMASK_MSK.uasset new file mode 100644 index 0000000..99a5495 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_ASAOPMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b105c97f736cfa8769656368ee0b05d70c16dfb6b1c1ed34efaf37f8cfe1db4b +size 464920 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_BN.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_BN.uasset new file mode 100644 index 0000000..f670307 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f96cebf8654531935ef18d4f6860a39b6abcab1b856d6d7239f4a907ff42d87f +size 1226703 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_CCRCCPlastic_MSK.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..f3fc544 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80c4a696338594410906c486d9d2230831e1e85259bd19624be0ede152245463 +size 740508 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_D.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_D.uasset new file mode 100644 index 0000000..7589c58 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49231c4d5fff91bde6e367bccb56fcb0ecad2cfd3bd948b8a2337d18187a3e10 +size 709957 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_MSR_MSK.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_MSR_MSK.uasset new file mode 100644 index 0000000..6195b60 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3a0b07dbbea0d4499030f5a4f6e6e6ce0eadc37c4083a989d4783da498baddb +size 804952 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_N.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_N.uasset new file mode 100644 index 0000000..2ddc2f1 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e3160c4dc0442e80cd27102297f2bf839b09bc1a3e2a737c614ba85e4fd75a7 +size 674320 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_01_Tan.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_01_Tan.uasset new file mode 100644 index 0000000..d600443 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_01_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31cdcd3779814b7c34da8d577a1b3dfdc3030c918e5cf4616c3a7ebdaea1bf1a +size 182352 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_ASAOPMASK_MSK.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_ASAOPMASK_MSK.uasset new file mode 100644 index 0000000..2952f85 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_ASAOPMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53a34df436ae63521139cf38a84f37e3fbff8955fec86b7ea71055936e9b8888 +size 752490 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_BN.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_BN.uasset new file mode 100644 index 0000000..a6104e1 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cfc9a23534b3588b759e42d0d14e33b6b78dfdc990ed2c5622a11c68d01d1b3 +size 1513443 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_CCRCCPlastic_MSK.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..38b79d1 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60ff3314a4244948372bc638ba88c51d8015196df21c89df84a7dc372a8d8354 +size 1030487 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_D.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_D.uasset new file mode 100644 index 0000000..460f082 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d87001ca22340f0990aac98a0feb60393faa62490a1ce7bbc7126cab489cea4 +size 1021386 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_MSR_MSK.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_MSR_MSK.uasset new file mode 100644 index 0000000..4378950 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ef3890133cbd40dd5a92fb4a93069abfc5ba2a3139504457279709efabd3b38 +size 1038455 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_N.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_N.uasset new file mode 100644 index 0000000..a847fc3 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9433f649a62cb7060b997aed55306857d5bd3edaf1647d250a9c44a56d6e0fe5 +size 671878 diff --git a/Content/XRMannequins/Textures/Manny/T_Manny_02_Tan.uasset b/Content/XRMannequins/Textures/Manny/T_Manny_02_Tan.uasset new file mode 100644 index 0000000..5f3c977 --- /dev/null +++ b/Content/XRMannequins/Textures/Manny/T_Manny_02_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48187c7f67f9991cccd7603833ff5f3c435289e88987ca93528fb27497af7f85 +size 307084 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_BN.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_BN.uasset new file mode 100644 index 0000000..4051e86 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fb881a5310d6bbb3044fc69683d2b1dd1a31f006aa266d2b22946a29ae5644c +size 1087307 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_D.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_D.uasset new file mode 100644 index 0000000..7312951 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac9e4864aea0618ce031c2ad477bfa6e8df8407f9e71bae6a354f4a24099ba58 +size 711762 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_MSR_MSK.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_MSR_MSK.uasset new file mode 100644 index 0000000..9fea3a0 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:949fb0f7bc5ae9d1d3a6036a06ff761b894f3ffd48d37c713ca679204c3ec9a3 +size 699822 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_N.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_N.uasset new file mode 100644 index 0000000..3356731 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a7cf98000b127030d1564b07014370a55012e1f3562c99d9691a68ac6210155 +size 539456 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_Tan.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_Tan.uasset new file mode 100644 index 0000000..271f1fa --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01ID_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc77cc7ffb5fa514db7d3c096bfd600ee77c7368ad6af40ace52b8435af30363 +size 128201 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01_ASAOMASK_MSK.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01_ASAOMASK_MSK.uasset new file mode 100644 index 0000000..465c008 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01_ASAOMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87d72f28d1f8715bab4acd9059667c841b42feb38f2c634c2368b237060701a3 +size 466580 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_01_CCRCCPlastic_MSK.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_01_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..4b3ad81 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_01_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e382153a1d79af6adb0a7626b8935e6111e82ba67a89c004b97db33a50a94a1 +size 708103 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_BN.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_BN.uasset new file mode 100644 index 0000000..1772c30 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_BN.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffd08e14956b5c1d47fe96df3002d129e937917fbb83d051f3fa9ef7217b0ba2 +size 1369126 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_D.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_D.uasset new file mode 100644 index 0000000..f8d7eb7 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_D.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ce98db1ef002599832d13c917b4a5dd3609c194c31e666781bdae9d31ec00c5 +size 949863 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_MSR_MSK.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_MSR_MSK.uasset new file mode 100644 index 0000000..f178851 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_MSR_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df541622450f3b4c68f824ee371414e099d27359fb5592c51f3a0756adec4f37 +size 924014 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_N.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_N.uasset new file mode 100644 index 0000000..dcd135d --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_N.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8dcf71e827099941563156686feca0e65fec33bbd0b08abdef9662027574910 +size 539456 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_Tan.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_Tan.uasset new file mode 100644 index 0000000..b24204d --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02ID_Tan.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ed5901802cbdb712b16c4be732261a568d75b016255a39198d202b34f21ac00 +size 234024 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02_ASAOMASK_MSK.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02_ASAOMASK_MSK.uasset new file mode 100644 index 0000000..fb2ba32 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02_ASAOMASK_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0f1e19581242c0221e06b03a2f4217b04be739ea133a42321fe91309281abc3 +size 646947 diff --git a/Content/XRMannequins/Textures/Quinn/T_Quinn_02_CCRCCPlastic_MSK.uasset b/Content/XRMannequins/Textures/Quinn/T_Quinn_02_CCRCCPlastic_MSK.uasset new file mode 100644 index 0000000..8d97205 --- /dev/null +++ b/Content/XRMannequins/Textures/Quinn/T_Quinn_02_CCRCCPlastic_MSK.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eda5d50bf61d9196cec21bf0065a7b4b4f1026b56f301843dea7456a960b52b1 +size 878232 diff --git a/Content/XRMannequins/Textures/Shared/T_UE_Logo_M.uasset b/Content/XRMannequins/Textures/Shared/T_UE_Logo_M.uasset new file mode 100644 index 0000000..cc1702c --- /dev/null +++ b/Content/XRMannequins/Textures/Shared/T_UE_Logo_M.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0661aef80718dec776743f8965ea29bbf8dcf7f20315d92ac675c6db6ca13ed7 +size 40382 diff --git a/OXRHandIntxn.uproject b/OXRHandIntxn.uproject new file mode 100644 index 0000000..5cb0992 --- /dev/null +++ b/OXRHandIntxn.uproject @@ -0,0 +1,40 @@ +{ + "FileVersion": 3, + "EngineAssociation": "5.7", + "Category": "", + "Description": "", + "Plugins": [ + { + "Name": "OpenXR", + "Enabled": true + }, + { + "Name": "OpenXREyeTracker", + "Enabled": true + }, + { + "Name": "SenseGlove", + "Enabled": true, + "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/5e1d408f517b4966a269ec1035de0b9e", + "SupportedTargetPlatforms": [ + "Android", + "Linux", + "Win64" + ] + } + ], + "TargetPlatforms": [ + "Android", + "IOS", + "Linux", + "Mac", + "PS4", + "PS5", + "Windows", + "WindowsNoEditor", + "Switch", + "XboxOne", + "XSX", + "VisionOS" + ] +} \ No newline at end of file diff --git a/Plugins/SenseGlove/.gitattributes b/Plugins/SenseGlove/.gitattributes new file mode 100644 index 0000000..28ca956 --- /dev/null +++ b/Plugins/SenseGlove/.gitattributes @@ -0,0 +1,58 @@ +# 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 +# Except +Source/ThirdParty/**/*.Build.cs filter= diff= merge= text + +# LFS: everything under Handbook/dist/ +Handbook/dist/**/* filter=lfs diff=lfs merge=lfs -text +# Except +.gitignore filter= diff= merge= text +.gitattributes filter= diff= merge= text + +# LFS: sgum-packager Linux and Windows binaries +Packager/sgum-packager filter=lfs diff=lfs merge=lfs -text +Packager/sgum-packager.exe filter=lfs diff=lfs merge=lfs -text + +# LFS: sgfakeshm-connect-client abd sgfakeshm-core-client Linux and Windows binaries +Tuning/sgfakeshm-connect-client filter=lfs diff=lfs merge=lfs -text +Tuning/sgfakeshm-connect-client.exe filter=lfs diff=lfs merge=lfs -text +Tuning/sgfakeshm-core-client filter=lfs diff=lfs merge=lfs -text +Tuning/sgfakeshm-core-client.exe filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/Plugins/SenseGlove/.gitignore b/Plugins/SenseGlove/.gitignore new file mode 100644 index 0000000..e7ba676 --- /dev/null +++ b/Plugins/SenseGlove/.gitignore @@ -0,0 +1,135 @@ +# Explcitly ignore annoying Windows files, regardless of where they are +[Dd]esktop.ini +Thumbs.db + +# Explcitly ignore annoying macOS files, regardless of where they are +.DS_Store + +# Makefile; only in the project root +/Makefile + +# CMake; only in the project root +/CMakeLists.txt + +# QMake / Qt Creator +*.pro +*Config.pri +*Defines.pri +*Header.pri +*Includes.pri +*Source.pri +.qmake.stash +*.autosave +*.pro.user +*.pro.user.* +CMakeLists.txt.user +CMakeLists.txt.user.* + +# Visual Studio +.vs/ +*.sln +*.suo +*.opensdf +*.sdf +*.VC.db +*.VC.opendb + +# Visual Studio Code +.vscode/ +*.code-workspace + +# Code::Blocks +*.workspace + +# CodeLite +*CodeLitePreProcessor.txt + +# KDevelop +.kdev4/ +*.kdev4 + +# CLion +*CodeCompletionFolders.txt + +# IntelliJ IDE +.idea/ + +# Xcode +*.xcodeproj +*.xcworkspace + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +*.ipa + +# Precompiled Assets +SourceArt/**/*.png +SourceArt/**/*.tga + +# Binary Files +Binaries/* +Plugins/*/Binaries/* + +# Builds +Build/* + +# Whitelist PakBlacklist-.txt files +!Build/*/ +Build/*/** +!Build/*/PakBlacklist*.txt + +# Don't ignore icon files in Build +!Build/**/*.ico + +# Built data for maps +*_BuiltData.uasset + +# Configuration files generated by the Editor +Saved/* + +# Compiled source files for the engine to use +Intermediate/* +Plugins/*/Intermediate/* + +# Cache files for the editor to use +DerivedDataCache/* + +# Misc +.ignore + +# Do not ignore anything inside the ThirdParty directory at all +!Source/ThirdParty/**/* + +# The Handbook +Documentation/ +Handbook/book/ + +# sgum-packager +# Do not ignore the sgum-packager Windows binary +!Packager/sgum-packager.exe \ No newline at end of file diff --git a/Plugins/SenseGlove/Config/FilterPlugin.ini b/Plugins/SenseGlove/Config/FilterPlugin.ini new file mode 100644 index 0000000..b45ca7a --- /dev/null +++ b/Plugins/SenseGlove/Config/FilterPlugin.ini @@ -0,0 +1,5 @@ +[FilterPlugin] +/Config/FilterPlugin.ini +/Documentation/the-senseglove-unreal-engine-handbook.epub +/Documentation/the-senseglove-unreal-engine-handbook.pdf +/Documentation/the-senseglove-unreal-engine-handbook.zip diff --git a/Plugins/SenseGlove/Content/Materials/M_SenseGlove_VirtualHand.uasset b/Plugins/SenseGlove/Content/Materials/M_SenseGlove_VirtualHand.uasset new file mode 100644 index 0000000..960a80c --- /dev/null +++ b/Plugins/SenseGlove/Content/Materials/M_SenseGlove_VirtualHand.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffc5ec37eff81f3298922c7cc4807144181289129485e3e7bbd0cd10b1186c52 +size 9219 diff --git a/Plugins/SenseGlove/Resources/Icon128.png b/Plugins/SenseGlove/Resources/Icon128.png new file mode 100644 index 0000000..59687cb --- /dev/null +++ b/Plugins/SenseGlove/Resources/Icon128.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21dd03aae60812bdd01f6afe261accd4d3152be594e097c30f5abf0b5afa5d75 +size 11743 diff --git a/Plugins/SenseGlove/SenseGlove.uplugin b/Plugins/SenseGlove/SenseGlove.uplugin new file mode 100644 index 0000000..adfbb20 --- /dev/null +++ b/Plugins/SenseGlove/SenseGlove.uplugin @@ -0,0 +1,292 @@ +{ + "FileVersion": 3, + "Version": 1, + "VersionName": "2.8.0", + "FriendlyName": "SenseGlove", + "Description": "Integrating the SenseGlove haptic controller into Unreal Engine", + "Category": "Virtual Reality", + "CreatedBy": "SenseGlove", + "CreatedByURL": "https://www.senseglove.com/", + "DocsURL": "https://unreal.docs.senseglove.com/", + "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/5e1d408f517b4966a269ec1035de0b9e", + "SupportURL": "https://www.senseglove.com/support/", + "EngineVersion": "5.7.0", + "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": "SenseGloveBackend", + "Type": "Runtime", + "LoadingPhase": "PreDefault", + "WhitelistPlatforms": [ + "Android", + "Linux", + "LinuxArm64", + "Win64" + ] + }, + { + "Name": "SenseGloveBackendKismet", + "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": "SenseGloveDebugKismet", + "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": "SenseGloveTracking", + "Type": "Runtime", + "LoadingPhase": "PostConfigInit", + "WhitelistPlatforms": [ + "Android", + "Linux", + "LinuxArm64", + "Win64" + ] + }, + { + "Name": "SenseGloveTrackingKismet", + "Type": "Runtime", + "LoadingPhase": "PostConfigInit", + "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" + ] + } + ], + "Plugins": [ + { + "Name": "AndroidPermission", + "Enabled": true + }, + { + "Name": "OpenXR", + "Enabled": true, + "PlatformAllowList": [ + "Android", + "Linux", + "Win64" + ] + } + ] +} diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove.cpp new file mode 100644 index 0000000..ac13303 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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) diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove.h b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Animation/SGVirtualHandAnimInstance.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Animation/SGVirtualHandAnimInstance.cpp new file mode 100644 index 0000000..a2664fd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Animation/SGVirtualHandAnimInstance.cpp @@ -0,0 +1,46 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.cpp new file mode 100644 index 0000000..eebcc3c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.cpp @@ -0,0 +1,231 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Animation/AnimInstance.h" +#include "Animation/Skeleton.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 "SenseGlove/Components/SGVirtualHandComponent.h" + +FSGVirtualHandAnimInstanceProxy::FSGVirtualHandAnimInstanceProxy() + : FAnimInstanceProxy{} +{ + VirtualHand = nullptr; + HandMeshAsset = nullptr; + HandSkeleton = nullptr; + + bVirtualHandVisible = false; + bMarkRenderStateDirty = false; + + bShouldAnimationApplyBoneLocation = false; +} + +FSGVirtualHandAnimInstanceProxy::FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance) + : FAnimInstanceProxy{Instance} +{ + VirtualHand = nullptr; + HandMeshAsset = nullptr; + HandSkeleton = nullptr; + + bVirtualHandVisible = false; + bMarkRenderStateDirty = false; + + bShouldAnimationApplyBoneLocation = false; +} + +void FSGVirtualHandAnimInstanceProxy::PreEvaluateAnimation(UAnimInstance* InAnimInstance) +{ + FAnimInstanceProxy::PreEvaluateAnimation(InAnimInstance); + + if (!IsValid(InAnimInstance)) + { + return; + } + + VirtualHand = Cast(GetSkelMeshComponent()); + if (!IsValid(VirtualHand)) + { + return; + } + + HandMeshAsset = VirtualHand->GetSkeletalMeshAsset(); + if (!IsValid(HandMeshAsset)) + { + return; + } + + HandSkeleton = HandMeshAsset->GetSkeleton(); + if (!IsValid(HandSkeleton)) + { + return; + } + + bVirtualHandVisible = VirtualHand->IsVisible() && VirtualHand->GetVisibleFlag(); + if (!bVirtualHandVisible) + { + return; + } + + HandTrackingState = VirtualHand->GetHandTrackingState(); + if (!HandTrackingState.bValid) + { + return; + } + ensureAlwaysMsgf(HandTrackingState.HandKeyLocations.Num() == HandTrackingState.HandKeyRotations.Num(), + TEXT("Mismatched hand tracking state locations and rotations!")); + + BoneNamesMap.Empty(); + for (TArray::SizeType HandKeyIndex = 0; + HandKeyIndex < HandTrackingState.HandKeyRotations.Num(); + ++HandKeyIndex) + { + const FName& BoneName{VirtualHand->GetHandBoneName(HandKeyIndex)}; + BoneNamesMap.Add(HandKeyIndex, BoneName); + } + + const FSGVirtualHandAnimationSettings AnimationSettings{VirtualHand->GetVirtualHandSettings().AnimationSettings}; + AnimationBoneCorrectionOffsetTransform = FTransform{AnimationSettings.AnimationBoneRotationCorrectionOffset}; + bShouldAnimationApplyBoneLocation = AnimationSettings.bShouldAnimationApplyBoneLocation; +} + +bool FSGVirtualHandAnimInstanceProxy::Evaluate(FPoseContext& Output) +{ + if (!bVirtualHandVisible) + { + return FAnimInstanceProxy::Evaluate(Output); + } + + if (!HandTrackingState.bValid) + { + return FAnimInstanceProxy::Evaluate(Output); + } + + FComponentSpacePoseContext PoseContext{Output.AnimInstanceProxy}; + PoseContext.Pose.InitPose(Output.Pose); + + for (const TTuple::SizeType, FName>& Bone: BoneNamesMap) + { + const TArray::SizeType HandKeyIndex = Bone.Key; + const FName& BoneName{Bone.Value}; + if (BoneName == NAME_None) + { + continue; + } + + const int32 BoneIndex = GetRequiredBones().GetPoseBoneIndexForBoneName(BoneName); + if (BoneIndex == INDEX_NONE) + { + continue; + } + + FBoneReference BoneReference; + BoneReference.BoneName = BoneName; + BoneReference.BoneIndex = BoneIndex; + BoneReference.bUseSkeletonIndex = true; + + const FVector& HandKeyLocation{HandTrackingState.HandKeyLocations[HandKeyIndex]}; + const FQuat& HandKeyRotation{HandTrackingState.HandKeyRotations[HandKeyIndex]}; + const FTransform HandKeyTransform{HandKeyRotation, HandKeyLocation}; + + const FTransform BoneTransform{AnimationBoneCorrectionOffsetTransform * HandKeyTransform}; + FRotator BoneRotation{BoneTransform.GetRotation().Rotator()}; + + FAnimNode_ModifyBone BoneController; + BoneController.BoneToModify = MoveTemp(BoneReference); + BoneController.Rotation = MoveTemp(BoneRotation); + BoneController.RotationMode = EBoneModificationMode::BMM_Replace; + BoneController.RotationSpace = EBoneControlSpace::BCS_WorldSpace; + BoneController.ScaleMode = EBoneModificationMode::BMM_Ignore; + + if (bShouldAnimationApplyBoneLocation) + { + FVector BoneTranslation{BoneTransform.GetLocation()}; + BoneController.TranslationMode = EBoneModificationMode::BMM_Replace; + BoneController.TranslationSpace = EBoneControlSpace::BCS_WorldSpace; + BoneController.Translation = MoveTemp(BoneTranslation); + } + else + { + BoneController.TranslationMode = EBoneModificationMode::BMM_Ignore; + } + + const bool bValidToEvaluate = + BoneController.IsValidToEvaluate(HandSkeleton, Output.Pose.GetBoneContainer()); + if (!bValidToEvaluate) + { + continue; + } + + TArray BoneTransforms; + BoneController.EvaluateSkeletalControl_AnyThread(PoseContext, BoneTransforms); + + const TArray::SizeType BoneTransformsNum = BoneTransforms.Num(); + if (BoneTransformsNum > 0) + { + PoseContext.Pose.LocalBlendCSBoneTransforms(BoneTransforms, 1.0f); + PoseContext.Pose.ConvertComponentPosesToLocalPoses(PoseContext.Pose, Output.Pose); + + bMarkRenderStateDirty = true; + } + } + + return true; +} + +void FSGVirtualHandAnimInstanceProxy::PostEvaluate(UAnimInstance* InAnimInstance) +{ + FAnimInstanceProxy::PostEvaluate(InAnimInstance); + + if (!bMarkRenderStateDirty) + { + return; + } + + if (!IsValid(VirtualHand)) + { + return; + } + + VirtualHand->MarkRenderStateDirty(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGGrabComponent.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGGrabComponent.cpp new file mode 100644 index 0000000..7a91a65 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGGrabComponent.cpp @@ -0,0 +1,177 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +#include "Components/PrimitiveComponent.h" +#include "GameFramework/Actor.h" + +#include "SGSettings/SGSettings.h" + +struct USGGrabComponent::FImpl +{ + /************************ + * Static methods + ************************/ + + FORCEINLINE static const FName& GetDefaultGrabAttachPointSocketName() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + const FName& SocketName{Settings->GetVirtualHandSettings().GrabSettings.GrabAttachPointSocketName}; + return SocketName; + } + + /************************ + * 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( + 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( + Actor->GetComponentByClass(USGGrabComponent::StaticClass())); + if (!IsValid(GrabComponent)) + { + return false; + } + + return true; +} + +USGGrabComponent::USGGrabComponent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + AttachmentLocationRule = EAttachmentRule::SnapToTarget; + AttachmentRotationRule = EAttachmentRule::KeepRelative; + AttachmentScaleRule = EAttachmentRule::KeepWorld; + bAttachmentWeldSimulatedBodies = true; + + AttachmentSocketName = FImpl::GetDefaultGrabAttachPointSocketName(); + + 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; +} + +void USGGrabComponent::SimulatePhysics(const bool bSimulatePhysics) const +{ + const AActor* OwnerActor{GetOwner()}; + if (!ensureAlwaysMsgf(IsValid(OwnerActor), TEXT("Invalid OwnerActor!"))) + { + return; + } + + UPrimitiveComponent* ActorRootComponent{Cast(OwnerActor->GetRootComponent())}; + if (!ensureAlwaysMsgf(IsValid(ActorRootComponent), + TEXT("RootComponent is not a valid UPrimativeComponent!"))) + { + return; + } + + ActorRootComponent->SetEnableGravity(bSimulatePhysics); + ActorRootComponent->SetSimulatePhysics(bSimulatePhysics); + + if (bSimulatePhysics) + { + ActorRootComponent->WakeRigidBody(); + } + else + { + ActorRootComponent->PutRigidBodyToSleep(); + } +} + +void USGGrabComponent::BeginPlay() +{ + Super::BeginPlay(); + + if (bAffectPhysicsState) + { + SimulatePhysics(true); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGHandTrackerComponent.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGHandTrackerComponent.cpp new file mode 100644 index 0000000..ed889d5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGHandTrackerComponent.cpp @@ -0,0 +1,181 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGHandTrackerComponent.h" + +#include "SGDebug/SGDebugVirtualHand.h" +#include "SGTracking/SGXRTracker.h" + +struct USGHandTrackerComponent::FImpl +{ + /************************ + * Static methods + ************************/ + + /************************ + * Member variables + ************************/ + + FXRHandTrackingState HandTrackingState; + + /************************ + * Owner object + ************************/ + + USGHandTrackerComponent* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGHandTrackerComponent* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + void UpdateXRData(); + + void Visualize() const; +}; + +USGHandTrackerComponent::USGHandTrackerComponent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + PrimaryComponentTick.bTickEvenWhenPaused = false; + PrimaryComponentTick.bCanEverTick = true; + PrimaryComponentTick.bStartWithTickEnabled = true; + bTickInEditor = false; + bNeverNeedsRenderUpdate = true; + bAllowConcurrentTick = true; + + bRight = true; + + bVisualize = false; + VisualizationSettings.Length = 1.0f; + VisualizationSettings.XAxisColor = FColor::Red; + VisualizationSettings.YAxisColor = FColor::Green; + VisualizationSettings.ZAxisColor = FColor::Blue; + VisualizationSettings.bPersistentLines = false; + VisualizationSettings.LifeTimeModifier = 1.1f; + VisualizationSettings.DepthPriority = 0; + VisualizationSettings.Thickness = 0.15f; +} + +void USGHandTrackerComponent::SetRight(const bool bInRight) +{ + bRight = bInRight; + + Pimpl->UpdateXRData(); +} + +void USGHandTrackerComponent::InitializeComponent() +{ + Super::InitializeComponent(); + + Pimpl->UpdateXRData(); +} + +void USGHandTrackerComponent::BeginPlay() +{ + Super::BeginPlay(); + + Pimpl->UpdateXRData(); +} + +void USGHandTrackerComponent::TickComponent( + const float DeltaTime, const ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + + Pimpl->UpdateXRData(); + + if (IsVisualized()) + { + Pimpl->Visualize(); + } +} + +const FXRHandTrackingState& USGHandTrackerComponent::GetHandTrackingState() const +{ + return Pimpl->HandTrackingState; +} + +USGHandTrackerComponent::FImpl::FImpl(USGHandTrackerComponent* InOwner) + : Owner(InOwner) +{ +} + +USGHandTrackerComponent::FImpl::~FImpl() = default; + +void USGHandTrackerComponent::FImpl::UpdateXRData() +{ + const EControllerHand Hand = Owner->IsRight() ? EControllerHand::Right : EControllerHand::Left; + + FXRHandTrackingState State; + State.bValid = false; + const bool bGotHandTrackingState = + FSGXRTracker::GetHandTrackingState( + Owner, EXRSpaceType::UnrealWorldSpace, Hand, State); + + (void) bGotHandTrackingState; + HandTrackingState = MoveTemp(State); +} + +void USGHandTrackerComponent::FImpl::Visualize() const +{ + const UWorld* World{Owner->GetWorld()}; + + if (!HandTrackingState.bValid) + { + return; + } + + FSGDebugVirtualHand::Draw(World, HandTrackingState, Owner->VisualizationSettings); +} + +void USGHandTrackerComponent::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGHapticsComponent.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGHapticsComponent.cpp new file mode 100644 index 0000000..8d09fa3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGHapticsComponent.cpp @@ -0,0 +1,276 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGHapticsComponent.h" + +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGHapticGlove.h" +#include "SGCore/SGHandLayer.h" +#include "SGTracking/SGGloveTracker.h" + +struct USGHapticsComponent::FImpl +{ + /************************ + * Static methods + ************************/ + + /************************ + * Owner object + ************************/ + + USGHapticsComponent* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGHapticsComponent* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + FORCEINLINE USGHapticGlove* GetGlove() const + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance(Owner->GetOuter())}; + USGHapticGlove* Glove{IsValid(GloveTracker) ? GloveTracker->GetGlove(Owner->IsRight()) : nullptr}; + return Glove; + } + + void AutoStopAllHaptics() const; +}; + +USGHapticsComponent::USGHapticsComponent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + bRight = true; + bAutoStopAllHaptics = true; +} + +void USGHapticsComponent::SetRight(const bool bInRight) +{ + bRight = bInRight; + + if (bAutoStopAllHaptics) + { + Pimpl->AutoStopAllHaptics(); + } +} + +void USGHapticsComponent::UninitializeComponent() +{ + Super::UninitializeComponent(); + + if (bAutoStopAllHaptics) + { + Pimpl->AutoStopAllHaptics(); + } +} + +void USGHapticsComponent::EndPlay(const EEndPlayReason::Type EndPlayReason) +{ + Super::EndPlay(EndPlayReason); + + if (bAutoStopAllHaptics) + { + Pimpl->AutoStopAllHaptics(); + } +} + +void USGHapticsComponent::StopHaptics() +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + Glove->StopHaptics(); + } +} + +void USGHapticsComponent::StopVibrations() +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + Glove->StopVibrations(); + } +} + +bool USGHapticsComponent::SendHaptics() +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->SendHaptics(); + } + + return false; +} + +bool USGHapticsComponent::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->SupportsCustomWaveform(AtLocation); + } + + return false; +} + +bool USGHapticsComponent::SendCustomWaveform( + USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->SendCustomWaveform(OutWaveform, Location); + } + + return false; +} + +bool USGHapticsComponent::SendCustomWaveform( + const float Amplitude, const float Duration, const ESGHapticLocation Location) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + USGCustomWaveform* Waveform{ + USGCustomWaveform::NewCustomWaveform(GetOuter(), Amplitude, Duration) + }; + return Glove->SendCustomWaveform(MoveTemp(Waveform), Location); + } + + return false; +} + +bool USGHapticsComponent::SendCustomWaveform( + const float Amplitude, const float Duration, const float Frequency, const ESGHapticLocation Location) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + USGCustomWaveform* Waveform{ + USGCustomWaveform::NewCustomWaveform(GetOuter(), Amplitude, Duration, Frequency) + }; + return Glove->SendCustomWaveform(MoveTemp(Waveform), Location); + } + + return false; +} + +bool USGHapticsComponent::QueueForceFeedbackLevels(const TArray& Levels01) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->QueueForceFeedbackLevels(Levels01); + } + + return false; +} + +bool USGHapticsComponent::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->QueueForceFeedbackLevel(Finger, Level01); + } + + return false; +} + +bool USGHapticsComponent::QueueVibroLevels(const TArray& Levels01) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->QueueVibroLevels(Levels01); + } + + return false; +} + +bool USGHapticsComponent::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + USGHapticGlove* Glove{Pimpl->GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected()) + { + return Glove->QueueVibroLevel(Location, Level01); + } + + return false; +} + +bool USGHapticsComponent::SupportsWristSqueeze() const +{ + return FSGHandLayer::SupportsWristSqueeze(IsRight()); +} + +bool USGHapticsComponent::QueueWristSqueeze(const float SqueezeLevel01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_WristSqueeze(IsRight(), SqueezeLevel01, bSendImmediate); +} + +USGHapticsComponent::FImpl::FImpl(USGHapticsComponent* InOwner) + : Owner(InOwner) +{ +} + +USGHapticsComponent::FImpl::~FImpl() = default; + +void USGHapticsComponent::FImpl::AutoStopAllHaptics() const +{ + USGHapticGlove* Glove{GetGlove()}; + if (IsValid(Glove) && Glove->IsConnected() && Owner->bAutoStopAllHaptics) + { + Glove->StopHaptics(); + } +} + +void USGHapticsComponent::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGTouchComponent.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGTouchComponent.cpp new file mode 100644 index 0000000..281e437 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGTouchComponent.cpp @@ -0,0 +1,121 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +#include "GameFramework/Actor.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( + 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( + Actor->GetComponentByClass(USGTouchComponent::StaticClass())); + if (!IsValid(TouchComponent)) + { + return false; + } + + return true; +} + +USGTouchComponent::USGTouchComponent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + ForceFeedbackLevel = 1.0f; + + VibrotactileAmplitude = 1.0f; + VibrotactileDuration = 1.0f; + VibrotactileFrequency= 180.0f; +} + +USGTouchComponent::FImpl::FImpl(USGTouchComponent* InOwner) + : Owner(InOwner) +{ +} + +USGTouchComponent::FImpl::~FImpl() = default; + +void USGTouchComponent::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp new file mode 100644 index 0000000..8297e4b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGVirtualHandComponent.cpp @@ -0,0 +1,850 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "Animation/Skeleton.h" +#include "Components/SkeletalMeshComponent.h" +#include "Engine/Engine.h" +#include "Engine/EngineTypes.h" +#include "Engine/SkeletalMesh.h" +#include "InputCoreTypes.h" +#include "Templates/UnrealTypeTraits.h" +#include "UObject/ConstructorHelpers.h" + +#include "SenseGlove/Animation/SGVirtualHandAnimInstance.h" +#include "SenseGlove/Components/SGWristTrackerComponent.h" +#include "SGCore/SGHapticGlove.h" +#include "SGDebug/SGDebugVirtualHand.h" +#include "SGLog/SGLog.h" +#include "SGSettings/SGSettings.h" +#include "SGTracking/SGGloveTracker.h" +#include "SGTracking/SGXRTracker.h" + +struct USGVirtualHandComponent::FImpl +{ + /************************ + * Static methods + ************************/ + + static FName ParseVirtualHandSettingsOverridesPropertyName(const FName& PropertyName); + + FORCEINLINE static const FSGVirtualHandSettings& GetPluginVirtualHandSettings() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + return Settings->GetVirtualHandSettings(); + } + + FORCEINLINE static const FString& GetDefaultLeftHandMeshPath() + { + return GetPluginVirtualHandSettings().MeshSettings.DefaultLeftHandMeshPath; + } + + FORCEINLINE static const FString& GetDefaultLeftHandMeshPathOnly() + { + return GetPluginVirtualHandSettings().MeshSettings.DefaultLeftHandMeshPathOnly; + } + + FORCEINLINE static const FString& GetDefaultRightHandMeshPath() + { + return GetPluginVirtualHandSettings().MeshSettings.DefaultRightHandMeshPath; + } + + FORCEINLINE static const FString& GetDefaultRightHandMeshPathOnly() + { + return GetPluginVirtualHandSettings().MeshSettings.DefaultRightHandMeshPathOnly; + } + + /************************ + * Member variables + ************************/ + + bool bOverridePluginSettingsPropertyAlreadyModified; + + bool bCachedGenerateOverlapEvents; + ECollisionEnabled::Type CachedCollisionEnabled; + FCollisionResponseContainer CachedCollisionResponse; + + FXRHandTrackingState HandTrackingState; + + /************************ + * 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; + + void RightPropertyChanged(); + void OverridePluginSettingsPropertyChanged(); + + FString GetDefaultMeshPath() const; + bool IsUsingDefaultMesh() const; + bool IsUsingUserMesh() const; + USkeletalMesh* LoadDefaultMesh() const; + void SetDefaultMesh() const; + + USkeletalMesh* GetMesh() const; + USkeleton* GetSkeleton() const; + const FReferenceSkeleton& GetRefSkeleton() const; + + void DisableCollisionResponse(); + void RestoreCollisionResponse() const; + + void UpdateXRData(); + + void SetVisibility(const bool bInVisible); + void UpdateVisibility(); + + FORCEINLINE bool ShouldDrawDebugVirtualHand() const + { + const FSGVirtualHandDebuggingSettings& Settings{Owner->GetVirtualHandSettings().DebuggingSettings}; + const bool bDraw = Settings.bDrawDebugVirtualHand + && Settings.DrawingMode != ESGDebugVirtualHandDrawingMode::None; + return bDraw; + } + + void DrawDebugVirtualHand() const; + + void TriggerHandVisibilityChangedEvent(bool bNewVisibility) const; + + void AutoStopAllHaptics() const; +}; + +FName USGVirtualHandComponent::FImpl::ParseVirtualHandSettingsOverridesPropertyName(const FName& PropertyName) +{ + static const UStruct* Struct{FSGVirtualHandSettingsOverrides::StaticStruct()}; + if (!ensureAlwaysMsgf(Struct, TEXT("Invalid Struct!"))) + { + return NAME_None; + } + + // +3 because of :: + static const int32 StructNameLength = Struct->GetFName().ToString().Len() + 3; + + const FString PropertyString{PropertyName.ToString()}; + const int32 PropertyStringLength = PropertyString.Len(); + const int32 PropertyNameLength = PropertyStringLength - StructNameLength; + + const FName ParsedName{*PropertyString.Right(PropertyNameLength)}; + return ParsedName; +} + +const TArray& USGVirtualHandComponent::GetLeftHandBoneNames() +{ + return FImpl::GetPluginVirtualHandSettings().MeshSettings.LeftHandBoneNames; +} + +const TArray& USGVirtualHandComponent::GetRightHandBoneNames() +{ + return FImpl::GetPluginVirtualHandSettings().MeshSettings.RightHandBoneNames; +} + +const FName& USGVirtualHandComponent::GetLeftHandBoneName(const int32 Joint) +{ + const TArray& BoneNames{GetLeftHandBoneNames()}; + + ensureAlwaysMsgf(Joint < BoneNames.Num(), TEXT("Joint index is out of bound!")); + + const FName& BoneName{BoneNames[Joint]}; + return BoneName; +} + +const FName& USGVirtualHandComponent::GetRightHandBoneName(const int32 Joint) +{ + const TArray& BoneNames{GetRightHandBoneNames()}; + + ensureAlwaysMsgf(Joint < BoneNames.Num(), TEXT("Joint index is out of bound!")); + + const FName& BoneName{BoneNames[Joint]}; + return BoneName; +} + +USGVirtualHandComponent::USGVirtualHandComponent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(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::SetAnimInstanceClass(USGVirtualHandAnimInstance::StaticClass()); + + bRight = true; + + Super::SetSkeletalMesh(nullptr, true); + + WristTracker = nullptr; +} + +void USGVirtualHandComponent::OnHandVisibilityChanged_Implementation(bool bNewVisibility) +{ +} + +void USGVirtualHandComponent::SetRight(const bool bInRight) +{ + bRight = bInRight; + + const bool bAutoStopHaptics = GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay; + if (bAutoStopHaptics) + { + Pimpl->AutoStopAllHaptics(); + } + + Pimpl->UpdateXRData(); + + if (!Pimpl->IsUsingUserMesh()) + { + Pimpl->SetDefaultMesh(); + } +} + +void USGVirtualHandComponent::SetVirtualHandSettingsOverrides( + const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides) +{ + VirtualHandSettingsOverrides = InVirtualHandSettingsOverrides; +} + +FSGVirtualHandSettings USGVirtualHandComponent::GetVirtualHandSettings() const +{ + const USGSettings* Settings{USGSettings::GetInstance()}; + if (!IsValid(Settings)) + { + return FSGVirtualHandSettings{}; + } + + const FSGVirtualHandSettings& PluginVirtualHandSettings{Settings->GetVirtualHandSettings()}; + if (!OverridesPluginVirtualHandSettings()) + { + return PluginVirtualHandSettings; + } + + const FSGVirtualHandSettings VirtualHandSettings{ + VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable, + VirtualHandSettingsOverrides.AnimationSettings, + VirtualHandSettingsOverrides.DebuggingSettings, + VirtualHandSettingsOverrides.GrabSettings, + VirtualHandSettingsOverrides.HapticsSettings, + PluginVirtualHandSettings.MeshSettings, + VirtualHandSettingsOverrides.TouchSettings + }; + return VirtualHandSettings; +} + +void USGVirtualHandComponent::SetAnimInstanceClass(UClass* NewClass) +{ + ensureAlwaysMsgf((TIsDerivedFrom::IsDerived), + TEXT("The AnimInstance class must be a subclass of USGVirtualHandAnimInstance!")); + + Super::SetAnimInstanceClass(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 + }; + + static const FName RightName{ + GET_MEMBER_NAME_CHECKED(USGVirtualHandComponent, bRight) + }; + + static const FName OverridePluginSettingsName{ + FImpl::ParseVirtualHandSettingsOverridesPropertyName( + GET_MEMBER_NAME_CHECKED(FSGVirtualHandSettingsOverrides, + FSGVirtualHandSettingsOverrides::bOverridePluginSettings)) + }; + + if (PropertyName == RightName) + { + Pimpl->RightPropertyChanged(); + return; + } + + if (PropertyName == OverridePluginSettingsName) + { + Pimpl->OverridePluginSettingsPropertyChanged(); + return; + } +} +#endif /* WITH_EDITOR */ + +void USGVirtualHandComponent::InitializeComponent() +{ + Super::InitializeComponent(); + + Pimpl->UpdateXRData(); + + if (!Pimpl->IsUsingUserMesh()) + { + Pimpl->SetDefaultMesh(); + } +} + +void USGVirtualHandComponent::UninitializeComponent() +{ + Super::UninitializeComponent(); + + const bool bAutoStopHaptics = GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay; + if (bAutoStopHaptics) + { + Pimpl->AutoStopAllHaptics(); + } +} + +void USGVirtualHandComponent::BeginPlay() +{ + Super::BeginPlay(); + + Pimpl->UpdateXRData(); +} + +void USGVirtualHandComponent::EndPlay(const EEndPlayReason::Type EndPlayReason) +{ + Super::EndPlay(EndPlayReason); + + const bool bAutoStopHaptics = GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay; + if (bAutoStopHaptics) + { + Pimpl->AutoStopAllHaptics(); + } +} + +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); + + Pimpl->UpdateXRData(); + + if (Pimpl->ShouldDrawDebugVirtualHand()) + { + 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) +{ + Pimpl->UpdateXRData(); + + if (Pimpl->ShouldDrawDebugVirtualHand()) + { + Pimpl->DrawDebugVirtualHand(); + } +} + +bool USGVirtualHandComponent::IsGloveConnected() const +{ + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance(GetOuter())}; + const USGHapticGlove* Glove{IsValid(GloveTracker) ? GloveTracker->GetGlove(IsRight()) : nullptr}; + return IsValid(Glove); +} + +USGHapticGlove* USGVirtualHandComponent::GetConnectedGlove() const +{ + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance(GetOuter())}; + USGHapticGlove* Glove{IsValid(GloveTracker) ? GloveTracker->GetGlove(IsRight()) : nullptr}; + return Glove; +} + +const FXRHandTrackingState& USGVirtualHandComponent::GetHandTrackingState() const +{ + return Pimpl->HandTrackingState; +} + +const TArray& USGVirtualHandComponent::GetHandBoneNames() const +{ + const TArray& Names{ + IsRight() + ? GetRightHandBoneNames() + : GetLeftHandBoneNames() + }; + return Names; +} + +const FName& USGVirtualHandComponent::GetHandBoneName(const int32 Joint) const +{ + const FName& Name{ + IsRight() + ? GetRightHandBoneName(Joint) + : GetLeftHandBoneName(Joint) + }; + return Name; +} + +const FTransform& USGVirtualHandComponent::GetHandBoneRefTransform(const FName& BoneName) const +{ + 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 the '%s' joint!"), + *BoneName.ToString())); + return FTransform::Identity; + } + + const FTransform& BoneTransform{ReferenceSkeleton.GetRefBonePose()[BoneIndex]}; + return BoneTransform; +} + +const FTransform& USGVirtualHandComponent::GetHandRootBoneRefTransform() const +{ + static constexpr int32 WristKeypointIndex = static_cast(EHandKeypoint::Wrist); + const FTransform& BoneTransform{GetHandBoneRefTransform(WristKeypointIndex)}; + return BoneTransform; +} + +const FTransform& USGVirtualHandComponent::GetHandBoneRefTransform(const int32 Joint) const +{ + const FName& BoneName{GetHandBoneName(Joint)}; + return GetHandBoneRefTransform(BoneName); +} + +FRotator USGVirtualHandComponent::GetHandBoneRefRotation(const FName& BoneName) const +{ + const FTransform BoneTransform{GetHandBoneRefTransform(BoneName)}; + const FRotator BoneRotation{BoneTransform.GetRotation().Rotator()}; + return BoneRotation; +} + +FRotator USGVirtualHandComponent::GetHandBoneRefRotation(const int32 Joint) const +{ + const FTransform BoneTransform{GetHandBoneRefTransform(Joint)}; + const FRotator BoneRotation{BoneTransform.GetRotation().Rotator()}; + return BoneRotation; +} + +USGVirtualHandComponent::FImpl::FImpl(USGVirtualHandComponent* InOwner) + : bOverridePluginSettingsPropertyAlreadyModified(false), + bCachedGenerateOverlapEvents(InOwner->GetGenerateOverlapEvents()), + CachedCollisionEnabled(InOwner->GetCollisionEnabled()), + 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; +} + +void USGVirtualHandComponent::FImpl::RightPropertyChanged() +{ + if (!IsUsingUserMesh()) + { + SetDefaultMesh(); + } +} + +void USGVirtualHandComponent::FImpl::OverridePluginSettingsPropertyChanged() +{ + if (bOverridePluginSettingsPropertyAlreadyModified) + { + return; + } + + bOverridePluginSettingsPropertyAlreadyModified = true; + + if (!Owner->VirtualHandSettingsOverrides.bOverridePluginSettings) + { + return; + } + + const USGSettings* Settings{USGSettings::GetInstance()}; + if (!ensureAlwaysMsgf(IsValid(Settings), TEXT("The settings subsystem has not been initialized!"))) + { + return; + } + + const FSGVirtualHandSettings& PluginVirtualHandSettings{Settings->GetVirtualHandSettings()}; + Owner->VirtualHandSettingsOverrides.bVisibleWhenHandDataUnavailable = + PluginVirtualHandSettings.bVisibleWhenHandDataUnavailable; + Owner->VirtualHandSettingsOverrides.AnimationSettings = PluginVirtualHandSettings.AnimationSettings; + Owner->VirtualHandSettingsOverrides.DebuggingSettings = PluginVirtualHandSettings.DebuggingSettings; + Owner->VirtualHandSettingsOverrides.GrabSettings = PluginVirtualHandSettings.GrabSettings; + Owner->VirtualHandSettingsOverrides.HapticsSettings = PluginVirtualHandSettings.HapticsSettings; + Owner->VirtualHandSettingsOverrides.TouchSettings = PluginVirtualHandSettings.TouchSettings; +} + +FString USGVirtualHandComponent::FImpl::GetDefaultMeshPath() const +{ + FString SkeletalMeshPath; + + if (Owner->IsRight()) + { + SkeletalMeshPath = GetDefaultRightHandMeshPath(); + } + else + { + SkeletalMeshPath = GetDefaultLeftHandMeshPath(); + } + + return SkeletalMeshPath; +} + +bool USGVirtualHandComponent::FImpl::IsUsingDefaultMesh() 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 true; + } + + return false; +} + +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 +{ + // FIXME + // Disable this warning altogether as it results in polluting the packaging logs, at least until we ship a set of + // virtual hand meshes again. + // const FString DefaultMeshPath{GetDefaultMeshPath()}; + // USkeletalMesh* DefaultMesh{ + // Cast(StaticLoadObject(USkeletalMesh::StaticClass(), nullptr, *DefaultMeshPath)) + // }; + + // FIXME + // Disable this warning altogether as it results in polluting the packaging logs, at least until we ship a set of + // virtual hand meshes again. + // if (!IsValid(DefaultMesh)) + // { + // SGLOG_WARNING(FString::Printf(TEXT("Failed to load the default skeletal mesh: '%s'"), *DefaultMeshPath)); + // } + + // FIXME + //return DefaultMesh; + + return nullptr; +} + +void USGVirtualHandComponent::FImpl::SetDefaultMesh() const +{ + // FIXME + // Since we don't ship a default virtual hand mesh at the moment, calling SetDefaultMesh causes the following + // failed assertion due the fact that the engine won't be able to find the asset at the default location: + // Assertion failed: IsInGameThread() + // Unable to load /SenseGlove/Meshes/SK_SenseGlove_VirtualHand_*. Objects and Packages can only be loaded from the + // game thread with the currently active loader '%s'. + // One workaround would be disabling the async loading or as an alternative simply disabling this portion of the + // code should be a good-enough fix until we address this issue in its own time. + //Owner->SetSkeletalMesh(LoadDefaultMesh(), true); + // Temporary hack to make it work inside the Blueprint Editor. +#if WITH_EDITOR + // FIXME + //Owner->SetSkeletalMesh(LoadDefaultMesh(), true); + // Instead + Owner->SetSkeletalMesh(nullptr, true); +#endif /* WITH_EDITOR */ +} + +USkeletalMesh* USGVirtualHandComponent::FImpl::GetMesh() const +{ + return Owner->GetSkeletalMeshAsset(); +} + +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(); +} + +void USGVirtualHandComponent::FImpl::DisableCollisionResponse() +{ + bCachedGenerateOverlapEvents = Owner->GetGenerateOverlapEvents(); + CachedCollisionEnabled = Owner->GetCollisionEnabled(); + CachedCollisionResponse = Owner->GetCollisionResponseToChannels(); + Owner->SetGenerateOverlapEvents(false); + Owner->SetCollisionEnabled(ECollisionEnabled::NoCollision); + Owner->SetCollisionResponseToAllChannels(ECR_Ignore); +} + +void USGVirtualHandComponent::FImpl::RestoreCollisionResponse() const +{ + Owner->SetGenerateOverlapEvents(bCachedGenerateOverlapEvents); + Owner->SetCollisionEnabled(CachedCollisionEnabled); + Owner->SetCollisionResponseToChannels(CachedCollisionResponse); +} + +void USGVirtualHandComponent::FImpl::UpdateXRData() +{ + const EControllerHand Hand = Owner->IsRight() ? EControllerHand::Right : EControllerHand::Left; + + FXRHandTrackingState State; + State.bValid = false; + const bool bGotHandTrackingState = + FSGXRTracker::GetHandTrackingState( + Owner, EXRSpaceType::UnrealWorldSpace, Hand, State); + + (void) bGotHandTrackingState; + HandTrackingState = MoveTemp(State); +} + +void USGVirtualHandComponent::FImpl::SetVisibility(const bool bInVisible) +{ + Owner->SetHiddenInGame(!bInVisible, false); + + if (bInVisible) + { + RestoreCollisionResponse(); + } + else + { + DisableCollisionResponse(); + } + + TriggerHandVisibilityChangedEvent(bInVisible); +} + +void USGVirtualHandComponent::FImpl::UpdateVisibility() +{ + const bool bHandDataAvailable = HandTrackingState.bValid; + const bool bHandVisible = Owner->IsVisible(); + const bool bShouldBeVisibleWhenHandDataUnavailable = + Owner->GetVirtualHandSettings().bVisibleWhenHandDataUnavailable; + + bool bSetNewVisibility = false; + + if (bHandDataAvailable) + { + if (bHandVisible) + { + bSetNewVisibility = false; + } + else + { + bSetNewVisibility = true; + } + } + else + { + if (bHandVisible) + { + if (bShouldBeVisibleWhenHandDataUnavailable) + { + bSetNewVisibility = false; + } + else + { + bSetNewVisibility = true; + } + } + else + { + if (bShouldBeVisibleWhenHandDataUnavailable) + { + bSetNewVisibility = true; + } + else + { + bSetNewVisibility = false; + } + } + } + + if (bSetNewVisibility) + { + SetVisibility(bHandDataAvailable); + } +} + +void USGVirtualHandComponent::FImpl::DrawDebugVirtualHand() const +{ + const UWorld* World{Owner->GetWorld()}; + + if (!IsValid(Owner->WristTracker)) + { + return; + } + + if (!HandTrackingState.bValid) + { + return; + } + + FSGDebugVirtualHand::Draw(World, HandTrackingState, Owner->GetVirtualHandSettings().DebuggingSettings); +} + +void USGVirtualHandComponent::FImpl::TriggerHandVisibilityChangedEvent(const bool bNewVisibility) const +{ + Owner->HandVisibilityChangedEvent.Broadcast(bNewVisibility); + Owner->OnHandVisibilityChanged(bNewVisibility); +} + +void USGVirtualHandComponent::FImpl::AutoStopAllHaptics() const +{ + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance(Owner->GetOuter())}; + USGHapticGlove* Glove{IsValid(GloveTracker) ? GloveTracker->GetGlove(Owner->IsRight()) : nullptr}; + const bool bAutoStopHaptics = Owner->GetVirtualHandSettings().HapticsSettings.bAutoStopAllHapticsOnEndPlay; + if (IsValid(Glove) && Glove->IsConnected() && bAutoStopHaptics) + { + Glove->StopHaptics(); + } +} + +void USGVirtualHandComponent::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp new file mode 100644 index 0000000..9a034d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Components/SGWristTrackerComponent.cpp @@ -0,0 +1,376 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "IXRTrackingSystem.h" + +#include "SGDebug/SGDebugGizmo.h" +#include "SGLog/SGLog.h" +#include "SGSettings/SGSettings.h" +#include "SGTracking/SGXRTracker.h" + +struct USGWristTrackerComponent::FImpl +{ + /************************ + * Static methods + ************************/ + + static FName ParseWristTrackingSettingsOverridesPropertyName(const FName& PropertyName); + + /************************ + * Member variables + ************************/ + + bool bOverridePluginSettingsPropertyAlreadyModified; + + FXRHandTrackingState HandTrackingState; + + /************************ + * 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; + + void OverridePluginSettingsPropertyChanged(); + + void UpdateMotionSource() const; + void UpdateXRData(); + void UpdateWristTrackingData() const; + + void DrawDebugWristTracker() const; +}; + +USGWristTrackerComponent::USGWristTrackerComponent(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(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); + + bRight = true; + + WristLocation = FVector::ZeroVector; + WristRotation = FRotator::ZeroRotator; +} + +FName USGWristTrackerComponent::FImpl::ParseWristTrackingSettingsOverridesPropertyName(const FName& PropertyName) +{ + static const UStruct* Struct{FSGWristTrackingSettingsOverrides::StaticStruct()}; + if (!ensureAlwaysMsgf(Struct, TEXT("Invalid Struct!"))) + { + return NAME_None; + } + + // +3 because of :: + static const int32 StructNameLength = Struct->GetFName().ToString().Len() + 3; + + const FString PropertyString{PropertyName.ToString()}; + const int32 PropertyStringLength = PropertyString.Len(); + const int32 PropertyNameLength = PropertyStringLength - StructNameLength; + + const FName ParsedName{*PropertyString.Right(PropertyNameLength)}; + return ParsedName; +} + +void USGWristTrackerComponent::SetRight(const bool bInRight) +{ + bRight = bInRight; + + Pimpl->UpdateMotionSource(); + Pimpl->UpdateXRData(); + Pimpl->UpdateWristTrackingData(); +} + +void USGWristTrackerComponent::SetWristTrackingSettingsOverrides( + const FSGWristTrackingSettingsOverrides& InWristTrackingSettingsOverrides) +{ + WristTrackingSettingsOverrides = InWristTrackingSettingsOverrides; +} + +FSGWristTrackingSettings USGWristTrackerComponent::GetWristTrackingSettings() const +{ + const USGSettings* Settings{USGSettings::GetInstance()}; + if (!IsValid(Settings)) + { + return FSGWristTrackingSettings{}; + } + + const FSGWristTrackingSettings& PluginWristTrackingSettings{Settings->GetTrackingSettings().WristTrackingSettings}; + if (!OverridesPluginWristTrackingSettings()) + { + return PluginWristTrackingSettings; + } + + const FSGWristTrackingSettings WristTrackingSettings{ + PluginWristTrackingSettings.OpenXRPositionalTrackingProvider, + PluginWristTrackingSettings.TrackingHardware, + PluginWristTrackingSettings.TrackingHardwareLocationOffsetLeftHand, + PluginWristTrackingSettings.TrackingHardwareLocationOffsetRightHand, + PluginWristTrackingSettings.TrackingHardwareRotationOffsetLeftHand, + PluginWristTrackingSettings.TrackingHardwareRotationOffsetRightHand, + PluginWristTrackingSettings.LeftHandMotionSource, + PluginWristTrackingSettings.RightHandMotionSource, + WristTrackingSettingsOverrides.DebuggingSettings, + }; + return WristTrackingSettings; +} + +#if WITH_EDITOR +void USGWristTrackerComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) +{ + Super::PostEditChangeProperty(PropertyChangedEvent); + + const FName PropertyName{ + PropertyChangedEvent.Property + ? PropertyChangedEvent.Property->GetFName() + : NAME_None + }; + + static const FName OverridePluginSettingsName{ + FImpl::ParseWristTrackingSettingsOverridesPropertyName( + GET_MEMBER_NAME_CHECKED(FSGWristTrackingSettingsOverrides, + FSGWristTrackingSettingsOverrides::bOverridePluginSettings)) + }; + + if (PropertyName == OverridePluginSettingsName) + { + Pimpl->OverridePluginSettingsPropertyChanged(); + return; + } +} +#endif /* WITH_EDITOR */ + +void USGWristTrackerComponent::InitializeComponent() +{ + Super::InitializeComponent(); + + Pimpl->UpdateMotionSource(); + Pimpl->UpdateXRData(); + Pimpl->UpdateWristTrackingData(); +} + +void USGWristTrackerComponent::BeginPlay() +{ + Super::BeginPlay(); + + Pimpl->UpdateMotionSource(); + Pimpl->UpdateXRData(); + Pimpl->UpdateWristTrackingData(); +} + +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); + + Pimpl->UpdateXRData(); + Pimpl->UpdateWristTrackingData(); + + if (GetWristTrackingSettings().DebuggingSettings.bDrawDebugWristTracker) + { + Pimpl->DrawDebugWristTracker(); + } +} + +void USGWristTrackerComponent::EditorTick( + const float DeltaTime, const ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Pimpl->UpdateXRData(); + Pimpl->UpdateWristTrackingData(); +} + +const FXRHandTrackingState& USGWristTrackerComponent::GetHandTrackingState() const +{ + return Pimpl->HandTrackingState; +} + +USGWristTrackerComponent::FImpl::FImpl(USGWristTrackerComponent* InOwner) + : bOverridePluginSettingsPropertyAlreadyModified(false), + 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; +} + +void USGWristTrackerComponent::FImpl::OverridePluginSettingsPropertyChanged() +{ + if (bOverridePluginSettingsPropertyAlreadyModified) + { + return; + } + + bOverridePluginSettingsPropertyAlreadyModified = true; + + if (!Owner->WristTrackingSettingsOverrides.bOverridePluginSettings) + { + return; + } + + const USGSettings* Settings{USGSettings::GetInstance()}; + if (!ensureAlwaysMsgf(IsValid(Settings), TEXT("The settings subsystem has not been initialized!"))) + { + return; + } + + const FSGWristTrackingSettings& PluginWristTrackingSettings{Settings->GetTrackingSettings().WristTrackingSettings}; + Owner->WristTrackingSettingsOverrides.DebuggingSettings = PluginWristTrackingSettings.DebuggingSettings; +} + +void USGWristTrackerComponent::FImpl::UpdateMotionSource() const +{ + if (!GEngine) + { + return; + } + + const FName& TrackingMotionSource{ + Owner->IsRight() + ? Owner->GetWristTrackingSettings().RightHandMotionSource + : Owner->GetWristTrackingSettings().LeftHandMotionSource + }; + Owner->SetTrackingMotionSource(TrackingMotionSource); +} + +void USGWristTrackerComponent::FImpl::UpdateXRData() +{ + const EControllerHand Hand = Owner->IsRight() ? EControllerHand::Right : EControllerHand::Left; + + FXRHandTrackingState State; + State.bValid = false; + const bool bGotHandTrackingState = + FSGXRTracker::GetHandTrackingState( + Owner, EXRSpaceType::UnrealWorldSpace, Hand, State); + + (void) bGotHandTrackingState; + HandTrackingState = MoveTemp(State); +} + +void USGWristTrackerComponent::FImpl::UpdateWristTrackingData() const +{ + FVector NewWristLocation{Owner->GetComponentLocation()}; + FRotator NewWristRotation{Owner->GetComponentRotation()}; + + 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::DrawDebugWristTracker() const +{ + const UWorld* World{Owner->GetWorld()}; + const FSGWristTrackingDebuggingSettings& DebuggingSettings{Owner->GetWristTrackingSettings().DebuggingSettings}; + + FSGDebugGizmo::Draw(World, Owner->WristLocation, Owner->WristRotation, DebuggingSettings.DebugWristTrackerSettings); +} + +void USGWristTrackerComponent::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Engine/SGGameInstance.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Engine/SGGameInstance.cpp new file mode 100644 index 0000000..a8f54d7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Engine/SGGameInstance.cpp @@ -0,0 +1,97 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/Engine/SGGameInstance.h" + +#include "Engine/Engine.h" + +#include "SenseGlove/GameFramework/SGGameUserSettings.h" +#include "SGLog/SGLog.h" + +void USGGameInstance::SG_GetEngineScalabilitySettings() +{ + const USGGameUserSettings* GameUserSettings{USGGameUserSettings::GetInstance()}; + ensureAlwaysMsgf(GameUserSettings, TEXT("Invalid GameUserSettings!")); + + static UEnum* EnumPtr{StaticEnum()}; + ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the ESGEngineScalabilitySettings enum!")); + + const ESGEngineScalabilitySettings Scalability = GameUserSettings->GetEngineScalabilitySettings(); + const FName ScalabilityName{ + EnumPtr->GetNameByValue(static_cast(Scalability)) + }; + + SGLOG("Get Engine Scalability Settings", ScalabilityName); +} + +void USGGameInstance::SG_SetEngineScalabilitySettings(const ESGEngineScalabilitySettings Scalability) +{ + USGGameUserSettings* GameUserSettings{USGGameUserSettings::GetInstance()}; + ensureAlwaysMsgf(GameUserSettings, TEXT("Invalid GameUserSettings!")); + + static UEnum* EnumPtr{StaticEnum()}; + ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the ESGEngineScalabilitySettings enum!")); + + GameUserSettings->SetEngineScalabilitySettings(Scalability); + + const FName ScalabilityName{ + EnumPtr->GetNameByValue(static_cast(Scalability)) + }; + + SGLOG("Set Engine Scalability Settings", ScalabilityName); +} + +USGGameInstance::USGGameInstance(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer) +{ +} + +void USGGameInstance::Init() +{ + Super::Init(); + + SGLOG("Initializing the SenseGlove GameInstance...") + + SGLOG("The SenseGlove GameInstance has been initialized successfully!") +} + +void USGGameInstance::Shutdown() +{ + Super::Shutdown(); + + SGLOG("Shutting down the SenseGlove GameInstance...") + + SGLOG("The SenseGlove GameInstance has been shutdown successfully!") +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp new file mode 100644 index 0000000..13372f6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameModeBase.cpp @@ -0,0 +1,46 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameUserSettings.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameUserSettings.cpp new file mode 100644 index 0000000..57c5bdb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGGameUserSettings.cpp @@ -0,0 +1,300 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGGameUserSettings.h" + +#include "Engine/Engine.h" +#include "HAL/IConsoleManager.h" +#include "Misc/ConfigCacheIni.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Scalability.h" + +#include "SGSettings/SGSettings.h" + +struct USGGameUserSettings::FImpl +{ + /************************ + * Static methods + ************************/ + + static float GetRenderScaleLevelFromQualityLevel( + int32 InQualityLevel, + Scalability::EQualityLevelBehavior Behavior = Scalability::EQualityLevelBehavior::EAbsolute); + + /************************ + * Owner object + ************************/ + + USGGameUserSettings* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGGameUserSettings* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + bool DoesCurrentSettingsMatch(ESGEngineScalabilitySettings Scalability) const; +}; + +float USGGameUserSettings::FImpl::GetRenderScaleLevelFromQualityLevel( + const int32 InQualityLevel, const Scalability::EQualityLevelBehavior Behavior) +{ + if (!ensureAlwaysMsgf(GConfig, TEXT("Invalid GConfig!"))) + { + return 0.0f; + } + + TArray ResolutionValueStrings; + GConfig->GetSingleLineArray(TEXT("ScalabilitySettings"), TEXT("PerfIndexValues_ResolutionQuality"), + ResolutionValueStrings, GScalabilityIni); + + if (ResolutionValueStrings.Num() == 0) + { + UE_LOG(LogConsoleResponse, Display, + TEXT("Failed to find resolution value strings in scalability ini. Falling back to the default.")); + return 100.0f; + } + + // No negative levels! + int32 QualityLevel = FMath::Max(0, InQualityLevel); + if (Behavior == Scalability::EQualityLevelBehavior::ERelativeToMax) + { + QualityLevel = FMath::Max(ResolutionValueStrings.Num() - 1 - QualityLevel, 0); + } + else + { + QualityLevel = FMath::Clamp(QualityLevel, 0, ResolutionValueStrings.Num() - 1); + } + + return FCString::Atof(*ResolutionValueStrings[QualityLevel]); +} + +USGGameUserSettings::USGGameUserSettings(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +USGGameUserSettings* USGGameUserSettings::GetInstance() +{ + USGGameUserSettings* Instance{GEngine ? Cast(GEngine->GetGameUserSettings()) : nullptr}; + ensureAlwaysMsgf(Instance, TEXT("Invalid GameUserSettings!")); + return Instance; +} + +ESGEngineScalabilitySettings USGGameUserSettings::GetEngineScalabilitySettings() const +{ + const bool bDoesCurrentSettingsMatchLow = Pimpl->DoesCurrentSettingsMatch(ESGEngineScalabilitySettings::Low); + if (bDoesCurrentSettingsMatchLow) + { + return ESGEngineScalabilitySettings::Low; + } + + const bool bDoesCurrentSettingsMatchMedium = Pimpl->DoesCurrentSettingsMatch(ESGEngineScalabilitySettings::Medium); + if (bDoesCurrentSettingsMatchMedium) + { + return ESGEngineScalabilitySettings::Medium; + } + + const bool bDoesCurrentSettingsMatchHigh = Pimpl->DoesCurrentSettingsMatch(ESGEngineScalabilitySettings::High); + if (bDoesCurrentSettingsMatchHigh) + { + return ESGEngineScalabilitySettings::High; + } + + const bool bDoesCurrentSettingsMatchEpic = Pimpl->DoesCurrentSettingsMatch(ESGEngineScalabilitySettings::Epic); + if (bDoesCurrentSettingsMatchEpic) + { + return ESGEngineScalabilitySettings::Epic; + } + + const bool bDoesCurrentSettingsMatchCinematic = Pimpl->DoesCurrentSettingsMatch( + ESGEngineScalabilitySettings::Cinematic); + if (bDoesCurrentSettingsMatchCinematic) + { + return ESGEngineScalabilitySettings::Cinematic; + } + + return ESGEngineScalabilitySettings::Custom; +} + +void USGGameUserSettings::SetEngineScalabilitySettings(ESGEngineScalabilitySettings Scalability) +{ + if (!ensureAlwaysMsgf(Scalability != ESGEngineScalabilitySettings::Custom, + TEXT("Cannot set the engine scalability directly to custom!" + " It should be either: Low, Medium, High, Epic, Cinematic," + " or Auto (determined by hardware benchmarking)!"))) + { + return; + } + + const FSGHardwareBenchmarkingSettings& Settings{ + USGSettings::GetInstance()->GetGameUserSettings().HardwareBenchmarkingSettings + }; + + if (IsDirty()) + { + ValidateSettings(); + ConfirmVideoMode(); + } + + if (Scalability != ESGEngineScalabilitySettings::Auto) + { + const int32 ScalabilityValue = static_cast(Scalability); + + const float ResolutionScaleNormalized = FImpl::GetRenderScaleLevelFromQualityLevel( + ScalabilityValue, Scalability::EQualityLevelBehavior::EAbsolute); + SetResolutionScaleNormalized(ResolutionScaleNormalized); + + ScalabilityQuality.SetViewDistanceQuality(ScalabilityValue); + ScalabilityQuality.SetAntiAliasingQuality(ScalabilityValue); + ScalabilityQuality.SetShadowQuality(ScalabilityValue); + ScalabilityQuality.SetGlobalIlluminationQuality(ScalabilityValue); + ScalabilityQuality.SetReflectionQuality(ScalabilityValue); + ScalabilityQuality.SetPostProcessQuality(ScalabilityValue); + ScalabilityQuality.SetTextureQuality(ScalabilityValue); + ScalabilityQuality.SetEffectsQuality(ScalabilityValue); + ScalabilityQuality.SetFoliageQuality(ScalabilityValue); + ScalabilityQuality.SetShadingQuality(ScalabilityValue); + ScalabilityQuality.SetLandscapeQuality(ScalabilityValue); + } + else + { + RunHardwareBenchmark( + Settings.WorkScale, + Settings.CPUMultiplier, + Settings.GPUMultiplier); + ApplyHardwareBenchmarkResults(); + } + + ConfirmVideoMode(); + ApplySettings(false); +} + +USGGameUserSettings::FImpl::FImpl(USGGameUserSettings* InOwner) + : Owner(InOwner) +{ +} + +USGGameUserSettings::FImpl::~FImpl() = default; + +bool USGGameUserSettings::FImpl::DoesCurrentSettingsMatch(const ESGEngineScalabilitySettings Scalability) const +{ + static const float ResolutionScaleNormalizedLow = FImpl::GetRenderScaleLevelFromQualityLevel( + static_cast(ESGEngineScalabilitySettings::Low)); + static const float ResolutionScaleNormalizedMedium = FImpl::GetRenderScaleLevelFromQualityLevel( + static_cast(ESGEngineScalabilitySettings::Medium)); + static const float ResolutionScaleNormalizedHigh = FImpl::GetRenderScaleLevelFromQualityLevel( + static_cast(ESGEngineScalabilitySettings::High)); + static const float ResolutionScaleNormalizedEpic = FImpl::GetRenderScaleLevelFromQualityLevel( + static_cast(ESGEngineScalabilitySettings::Epic)); + static const float ResolutionScaleNormalizedCinematic = FImpl::GetRenderScaleLevelFromQualityLevel( + static_cast(ESGEngineScalabilitySettings::Cinematic)); + + float ResolutionScaleNormalized = 0.0f; + switch (Scalability) + { + case ESGEngineScalabilitySettings::Low: + ResolutionScaleNormalized = ResolutionScaleNormalizedLow; + break; + case ESGEngineScalabilitySettings::Medium: + ResolutionScaleNormalized = ResolutionScaleNormalizedMedium; + break; + case ESGEngineScalabilitySettings::High: + ResolutionScaleNormalized = ResolutionScaleNormalizedHigh; + break; + case ESGEngineScalabilitySettings::Epic: + ResolutionScaleNormalized = ResolutionScaleNormalizedEpic; + break; + case ESGEngineScalabilitySettings::Cinematic: + ResolutionScaleNormalized = ResolutionScaleNormalizedCinematic; + break; + default: + ensureAlwaysMsgf(false, TEXT("Login Error: the execution flow should never reach here!")); + break; + } + + const int32 ScalabilityValue = static_cast(Scalability); + + const float CurrentResolutionScaleNormalized = FImpl::GetRenderScaleLevelFromQualityLevel( + ScalabilityValue, Scalability::EQualityLevelBehavior::EAbsolute); + + const int32 CurrentViewDistanceQuality = Owner->ScalabilityQuality.ViewDistanceQuality; + const int32 CurrentAntiAliasingQuality = Owner->ScalabilityQuality.AntiAliasingQuality; + const int32 CurrentShadowQuality = Owner->ScalabilityQuality.ShadowQuality; + const int32 CurrentGlobalIlluminationQuality = Owner->ScalabilityQuality.GlobalIlluminationQuality; + const int32 CurrentReflectionQuality = Owner->ScalabilityQuality.ReflectionQuality; + const int32 CurrentPostProcessingQuality = Owner->ScalabilityQuality.PostProcessQuality; + const int32 CurrentTextureQuality = Owner->ScalabilityQuality.TextureQuality; + const int32 CurrentEffectQuality = Owner->ScalabilityQuality.EffectsQuality; + const int32 CurrentFoliageQuality = Owner->ScalabilityQuality.FoliageQuality; + const int32 CurrentShadingQuality = Owner->ScalabilityQuality.ShadingQuality; + const int32 CurrentLandscapeQuality = Owner->ScalabilityQuality.LandscapeQuality; + + if (FMath::IsNearlyEqual(CurrentResolutionScaleNormalized, ResolutionScaleNormalized) + && CurrentViewDistanceQuality == ScalabilityValue + && CurrentAntiAliasingQuality == ScalabilityValue + && CurrentShadowQuality == ScalabilityValue + && CurrentGlobalIlluminationQuality == ScalabilityValue + && CurrentReflectionQuality == ScalabilityValue + && CurrentPostProcessingQuality == ScalabilityValue + && CurrentTextureQuality == ScalabilityValue + && CurrentEffectQuality == ScalabilityValue + && CurrentFoliageQuality == ScalabilityValue + && CurrentShadingQuality == ScalabilityValue + && CurrentLandscapeQuality == ScalabilityValue) + { + return true; + } + + return false; +} + +void USGGameUserSettings::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp new file mode 100644 index 0000000..7dacfd3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPawn.cpp @@ -0,0 +1,2279 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGPawn.h" + +#include "Camera/CameraComponent.h" +#include "Components/PrimitiveComponent.h" +#include "Components/SphereComponent.h" +#include "Kismet/KismetMathLibrary.h" +#include "Runtime/Launch/Resources/Version.h" +#include "UObject/UObjectGlobals.h" +#include "XRDeviceVisualizationComponent.h" + +#include "SenseGlove/Components/SGGrabComponent.h" +#include "SenseGlove/Components/SGTouchComponent.h" +#include "SenseGlove/Components/SGVirtualHandComponent.h" +#include "SenseGlove/Components/SGWristTrackerComponent.h" +#include "SGSettings/SGSettings.h" +#include "SGLog/SGLog.h" + +struct ASGPawn::FImpl +{ + /************************ + * Static methods + ************************/ + + /************************ + * Owner object + ************************/ + + ASGPawn* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(ASGPawn* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + void BindRealHandsOverlapEvents(); + void UnbindRealHandsOverlapEvents(); + + void BindFingerGrabOverlapEvents(); + void UnbindFingerGrabOverlapEvents(); + + void BindFingerTouchOverlapEvents(); + void UnbindFingerTouchOverlapEvents(); + + void SetVisibility(USceneComponent* SceneComponent, const bool bVisibility) const; + + void UpdateHandLocation(const bool bRight, const FVector& Location, const bool bUpdateVirtualHand) const; + void UpdateLeftHandLocation(const FVector& Location, const bool bUpdateVirtualHand) const; + void UpdateRightHandLocation(const FVector& Location, const bool bUpdateVirtualHand) const; + + void UpdateHandRotation(const bool bRight, const FRotator& Rotation, const bool bUpdateVirtualHand); + void UpdateLeftHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand); + void UpdateRightHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand); + + void UpdateHandLocationAndRotation( + const bool bRight, const FVector& Location, const FRotator& Rotation, const bool bUpdateVirtualHand); + void UpdateLeftHandLocationAndRotation( + const FVector& Location, const FRotator& Rotation, const bool bUpdateVirtualHand); + void UpdateRightHandLocationAndRotation( + const FVector& Location, const FRotator& Rotation, const bool bUpdateVirtualHand); + + void SetFingerColliderCollisionEnabled(USphereComponent* Collider, bool bEnabled) const; + void SetAllFingersColliderCollisionEnabled(bool bRight, bool bEnabled) const; + + FORCEINLINE void RegisterLeftHandOverlappedActor(const AActor* Actor) const + { + Owner->LeftHandOverlappedActors.AddUnique(Actor); + } + + FORCEINLINE void UnregisterLeftHandOverlappedActor(const AActor* Actor) const + { + Owner->LeftHandOverlappedActors.Remove(Actor); + } + + FORCEINLINE void RegisterRightHandOverlappedActor(const AActor* Actor) const + { + Owner->RightHandOverlappedActors.AddUnique(Actor); + } + + FORCEINLINE void UnregisterRightHandOverlappedActor(const AActor* Actor) const + { + Owner->RightHandOverlappedActors.Remove(Actor); + } + + FORCEINLINE bool IsLeftHandOverlappingWithAnyActor() const + { + return Owner->LeftHandOverlappedActors.Num() > 0; + } + + FORCEINLINE bool IsRightHandOverlappingWithAnyActor() const + { + return Owner->RightHandOverlappedActors.Num() > 0; + } + + void ApplyHandVelocityToGrabbedActor(const FSGGrabState& GrabState) const; + + void SetGrabbedActor(FSGGrabState& GrabState, AActor* Actor) const; + void SetLeftHandGrabbedActor(AActor* Actor) const; + void SetRightHandGrabbedActor(AActor* Actor) const; + + void RecordHandVelocity(FSGGrabState& GrabState, const float DeltaSeconds) const; + + void Release(FSGGrabState& GrabState) const; + + void TriggerGrabStateUpdatedEvent(const FSGGrabState& GrabState) const; + void TriggerTouchStateUpdatedEvent(const FSGTouchState& TouchState) const; + void TriggerActorGrabbedEvent(const USGVirtualHandComponent* Hand, const AActor* Actor) const; + void TriggerActorReleasedEvent(const USGVirtualHandComponent* Hand, const AActor* Actor) const; + void TriggerBeginTouch(const USGVirtualHandComponent* Hand, const AActor* Actor) const; + void TriggerEndTouch(const USGVirtualHandComponent* Hand, const AActor* Actor) const; +}; + +ASGPawn::ASGPawn(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + PrimaryActorTick.bCanEverTick = true; + + SceneRoot = ObjectInitializer.CreateDefaultSubobject(this, TEXT("SceneRoot")); + SetRootComponent(SceneRoot); + + Camera = ObjectInitializer.CreateDefaultSubobject(this, TEXT("Camera")); + Camera->SetupAttachment(GetRootComponent()); + Camera->SetCanEverAffectNavigation(false); + + WristTrackerLeft = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("WristTrackerLeft")); + WristTrackerLeft->SetupAttachment(GetRootComponent()); + WristTrackerLeft->SetRight(false); + + ControllerVisualizerLeft = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("ControllerVisualizerLeft")); + ControllerVisualizerLeft->SetupAttachment(WristTrackerLeft); + ControllerVisualizerLeft->SetDisplayModelSource(FName("OpenXR")); + + HandLeft = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("HandLeft")); + HandLeft->SetupAttachment(GetRootComponent()); + HandLeft->SetCanEverAffectNavigation(false); + HandLeft->SetGenerateOverlapEvents(true); + HandLeft->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + HandLeft->SetCollisionObjectType(ECC_Pawn); + HandLeft->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); + HandLeft->SetCollisionResponseToAllChannels(ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_Pawn, ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_Visibility, ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block); + HandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block); + HandLeft->SetRight(false); + + const FSGVirtualHandSettings LeftHandSettings{HandLeft->GetVirtualHandSettings()}; + HandLeft->SetRelativeRotation(LeftHandSettings.MeshSettings.RootBoneRotationCorrection, + false, nullptr, ETeleportType::None); + HandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f}, + false, nullptr, ETeleportType::None); + HandLeft->SetWristTracker(WristTrackerLeft); + + RealHandLeft = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RealHandLeft")); + RealHandLeft->SetupAttachment(GetRootComponent()); + RealHandLeft->SetCanEverAffectNavigation(false); + RealHandLeft->SetGenerateOverlapEvents(true); + RealHandLeft->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RealHandLeft->SetCollisionObjectType(ECC_Pawn); + RealHandLeft->SetCollisionEnabled(ECollisionEnabled::QueryOnly); + RealHandLeft->SetCollisionResponseToAllChannels(ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap); + RealHandLeft->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap); + RealHandLeft->SetRight(false); + Pimpl->SetVisibility(RealHandLeft, false); + + const FSGVirtualHandMeshSettings RealLeftHandMeshSettings{HandLeft->GetVirtualHandSettings().MeshSettings}; + RealHandLeft->SetRelativeRotation(RealLeftHandMeshSettings.RootBoneRotationCorrection, + false, nullptr, ETeleportType::None); + RealHandLeft->SetRelativeLocation(FVector{30.0f, -20.0f, -10.0f}, + false, nullptr, ETeleportType::None); + RealHandLeft->SetWristTracker(WristTrackerLeft); + + LeftThumbFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftThumbFingertipGrabCollider")); + LeftThumbFingertipGrabCollider->SetRelativeScale3D(LeftHandSettings.GrabSettings.DefaultColliderSize); + LeftThumbFingertipGrabCollider->SetupAttachment(HandLeft, LeftHandSettings.GrabSettings.ThumbColliderSocketName); + LeftThumbFingertipGrabCollider->SetCastShadow(false); + LeftThumbFingertipGrabCollider->bCastDynamicShadow = false; + LeftThumbFingertipGrabCollider->SetReceivesDecals(true); + LeftThumbFingertipGrabCollider->SetCanEverAffectNavigation(false); + LeftThumbFingertipGrabCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftThumbFingertipGrabCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftThumbFingertipGrabCollider, true); + + LeftIndexFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftIndexFingertipGrabCollider")); + LeftIndexFingertipGrabCollider->SetRelativeScale3D(LeftHandSettings.GrabSettings.DefaultColliderSize); + LeftIndexFingertipGrabCollider->SetupAttachment(HandLeft, LeftHandSettings.GrabSettings.IndexColliderSocketName); + LeftIndexFingertipGrabCollider->SetCastShadow(false); + LeftIndexFingertipGrabCollider->bCastDynamicShadow = false; + LeftIndexFingertipGrabCollider->SetReceivesDecals(true); + LeftIndexFingertipGrabCollider->SetCanEverAffectNavigation(false); + LeftIndexFingertipGrabCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftIndexFingertipGrabCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftIndexFingertipGrabCollider, true); + + LeftMiddleFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftMiddleFingertipGrabCollider")); + LeftMiddleFingertipGrabCollider->SetRelativeScale3D(LeftHandSettings.GrabSettings.DefaultColliderSize); + LeftMiddleFingertipGrabCollider->SetupAttachment(HandLeft, LeftHandSettings.GrabSettings.MiddleColliderSocketName); + LeftMiddleFingertipGrabCollider->SetCastShadow(false); + LeftMiddleFingertipGrabCollider->bCastDynamicShadow = false; + LeftMiddleFingertipGrabCollider->SetReceivesDecals(true); + LeftMiddleFingertipGrabCollider->SetCanEverAffectNavigation(false); + LeftMiddleFingertipGrabCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftMiddleFingertipGrabCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftMiddleFingertipGrabCollider, true); + + LeftThumbFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftThumbFingertipTouchCollider")); + LeftThumbFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize); + LeftThumbFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.ThumbColliderSocketName); + LeftThumbFingertipTouchCollider->SetCastShadow(false); + LeftThumbFingertipTouchCollider->bCastDynamicShadow = false; + LeftThumbFingertipTouchCollider->SetReceivesDecals(true); + LeftThumbFingertipTouchCollider->SetCanEverAffectNavigation(false); + LeftThumbFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftThumbFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftThumbFingertipTouchCollider, true); + + LeftIndexFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftIndexFingertipTouchCollider")); + LeftIndexFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize); + LeftIndexFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.IndexColliderSocketName); + LeftIndexFingertipTouchCollider->SetCastShadow(false); + LeftIndexFingertipTouchCollider->bCastDynamicShadow = false; + LeftIndexFingertipTouchCollider->SetReceivesDecals(true); + LeftIndexFingertipTouchCollider->SetCanEverAffectNavigation(false); + LeftIndexFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftIndexFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftIndexFingertipTouchCollider, true); + + LeftMiddleFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftMiddleFingertipTouchCollider")); + LeftMiddleFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize); + LeftMiddleFingertipTouchCollider->SetupAttachment( + HandLeft, LeftHandSettings.TouchSettings.MiddleColliderSocketName); + LeftMiddleFingertipTouchCollider->SetCastShadow(false); + LeftMiddleFingertipTouchCollider->bCastDynamicShadow = false; + LeftMiddleFingertipTouchCollider->SetReceivesDecals(true); + LeftMiddleFingertipTouchCollider->SetCanEverAffectNavigation(false); + LeftMiddleFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftMiddleFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + LeftMiddleFingertipTouchCollider->SetCollisionEnabled(ECollisionEnabled::QueryOnly); + Pimpl->SetFingerColliderCollisionEnabled(LeftMiddleFingertipTouchCollider, true); + + LeftRingFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftRingFingertipTouchCollider")); + LeftRingFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize); + LeftRingFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.RingColliderSocketName); + LeftRingFingertipTouchCollider->SetCastShadow(false); + LeftRingFingertipTouchCollider->bCastDynamicShadow = false; + LeftRingFingertipTouchCollider->SetReceivesDecals(true); + LeftRingFingertipTouchCollider->SetCanEverAffectNavigation(false); + LeftRingFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftRingFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftRingFingertipTouchCollider, true); + + LeftPinkyFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("LeftPinkyFingertipTouchCollider")); + LeftPinkyFingertipTouchCollider->SetRelativeScale3D(LeftHandSettings.TouchSettings.DefaultColliderSize); + LeftPinkyFingertipTouchCollider->SetupAttachment(HandLeft, LeftHandSettings.TouchSettings.PinkyColliderSocketName); + LeftPinkyFingertipTouchCollider->SetCastShadow(false); + LeftPinkyFingertipTouchCollider->bCastDynamicShadow = false; + LeftPinkyFingertipTouchCollider->SetReceivesDecals(true); + LeftPinkyFingertipTouchCollider->SetCanEverAffectNavigation(false); + LeftPinkyFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + LeftPinkyFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(LeftPinkyFingertipTouchCollider, true); + + WristTrackerRight = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("WristTrackerRight")); + WristTrackerRight->SetupAttachment(GetRootComponent()); + WristTrackerRight->SetRight(true); + + ControllerVisualizerRight = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("ControllerVisualizerRight")); + ControllerVisualizerRight->SetupAttachment(WristTrackerRight); + ControllerVisualizerRight->SetDisplayModelSource(FName("OpenXR")); + + HandRight = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("HandRight")); + HandRight->SetupAttachment(GetRootComponent()); + HandRight->SetCanEverAffectNavigation(false); + HandRight->SetGenerateOverlapEvents(true); + HandRight->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + HandRight->SetCollisionObjectType(ECC_Pawn); + HandRight->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); + HandRight->SetCollisionResponseToAllChannels(ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_Pawn, ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_Visibility, ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Block); + HandRight->SetCollisionResponseToChannel(ECC_Destructible, ECR_Block); + HandRight->SetRight(true); + + const FSGVirtualHandSettings RightHandSettings{HandRight->GetVirtualHandSettings()}; + HandRight->SetRelativeRotation(RightHandSettings.MeshSettings.RootBoneRotationCorrection, + false, nullptr, ETeleportType::None); + HandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f}, + false, nullptr, ETeleportType::None); + HandRight->SetWristTracker(WristTrackerRight); + + RealHandRight = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RealHandRight")); + RealHandRight->SetupAttachment(GetRootComponent()); + RealHandRight->SetCanEverAffectNavigation(false); + RealHandRight->SetGenerateOverlapEvents(true); + RealHandRight->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RealHandRight->SetCollisionObjectType(ECC_Pawn); + RealHandRight->SetCollisionEnabled(ECollisionEnabled::QueryOnly); + RealHandRight->SetCollisionResponseToAllChannels(ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap); + RealHandRight->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap); + RealHandRight->SetRight(true); + Pimpl->SetVisibility(RealHandRight, false); + + const FSGVirtualHandMeshSettings RealRightHandMeshSettings{HandRight->GetVirtualHandSettings().MeshSettings}; + RealHandRight->SetRelativeRotation(RealRightHandMeshSettings.RootBoneRotationCorrection, + false, nullptr, ETeleportType::None); + RealHandRight->SetRelativeLocation(FVector{30.0f, 20.0f, -10.0f}, + false, nullptr, ETeleportType::None); + RealHandRight->SetWristTracker(WristTrackerRight); + + RightThumbFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightThumbFingertipGrabCollider")); + RightThumbFingertipGrabCollider->SetRelativeScale3D(RightHandSettings.GrabSettings.DefaultColliderSize); + RightThumbFingertipGrabCollider->SetupAttachment(HandRight, RightHandSettings.GrabSettings.ThumbColliderSocketName); + RightThumbFingertipGrabCollider->SetCastShadow(false); + RightThumbFingertipGrabCollider->bCastDynamicShadow = false; + RightThumbFingertipGrabCollider->SetReceivesDecals(true); + RightThumbFingertipGrabCollider->SetCanEverAffectNavigation(false); + RightThumbFingertipGrabCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightThumbFingertipGrabCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightThumbFingertipGrabCollider, true); + + RightIndexFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightIndexFingertipGrabCollider")); + RightIndexFingertipGrabCollider->SetRelativeScale3D(RightHandSettings.GrabSettings.DefaultColliderSize); + RightIndexFingertipGrabCollider->SetupAttachment(HandRight, RightHandSettings.GrabSettings.IndexColliderSocketName); + RightIndexFingertipGrabCollider->SetCastShadow(false); + RightIndexFingertipGrabCollider->bCastDynamicShadow = false; + RightIndexFingertipGrabCollider->SetReceivesDecals(true); + RightIndexFingertipGrabCollider->SetCanEverAffectNavigation(false); + RightIndexFingertipGrabCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightIndexFingertipGrabCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightIndexFingertipGrabCollider, true); + + RightMiddleFingertipGrabCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightMiddleFingertipGrabCollider")); + RightMiddleFingertipGrabCollider->SetRelativeScale3D(RightHandSettings.GrabSettings.DefaultColliderSize); + RightMiddleFingertipGrabCollider->SetupAttachment( + HandRight, RightHandSettings.GrabSettings.MiddleColliderSocketName); + RightMiddleFingertipGrabCollider->SetCastShadow(false); + RightMiddleFingertipGrabCollider->bCastDynamicShadow = false; + RightMiddleFingertipGrabCollider->SetReceivesDecals(true); + RightMiddleFingertipGrabCollider->SetCanEverAffectNavigation(false); + RightMiddleFingertipGrabCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightMiddleFingertipGrabCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightMiddleFingertipGrabCollider, true); + + RightThumbFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightThumbFingertipTouchCollider")); + RightThumbFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize); + RightThumbFingertipTouchCollider->SetupAttachment( + HandRight, RightHandSettings.TouchSettings.ThumbColliderSocketName); + RightThumbFingertipTouchCollider->SetCastShadow(false); + RightThumbFingertipTouchCollider->bCastDynamicShadow = false; + RightThumbFingertipTouchCollider->SetReceivesDecals(true); + RightThumbFingertipTouchCollider->SetCanEverAffectNavigation(false); + RightThumbFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightThumbFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightThumbFingertipTouchCollider, true); + + RightIndexFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightIndexFingertipTouchCollider")); + RightIndexFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize); + RightIndexFingertipTouchCollider->SetupAttachment( + HandRight, RightHandSettings.TouchSettings.IndexColliderSocketName); + RightIndexFingertipTouchCollider->SetCastShadow(false); + RightIndexFingertipTouchCollider->bCastDynamicShadow = false; + RightIndexFingertipTouchCollider->SetReceivesDecals(true); + RightIndexFingertipTouchCollider->SetCanEverAffectNavigation(false); + RightIndexFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightIndexFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightIndexFingertipTouchCollider, true); + + RightMiddleFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightMiddleFingertipTouchCollider")); + RightMiddleFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize); + RightMiddleFingertipTouchCollider->SetupAttachment( + HandRight, RightHandSettings.TouchSettings.MiddleColliderSocketName); + RightMiddleFingertipTouchCollider->SetCastShadow(false); + RightMiddleFingertipTouchCollider->bCastDynamicShadow = false; + RightMiddleFingertipTouchCollider->SetReceivesDecals(true); + RightMiddleFingertipTouchCollider->SetCanEverAffectNavigation(false); + RightMiddleFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightMiddleFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightMiddleFingertipTouchCollider, true); + + RightRingFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightRingFingertipTouchCollider")); + RightRingFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize); + RightRingFingertipTouchCollider->SetupAttachment(HandRight, RightHandSettings.TouchSettings.RingColliderSocketName); + RightRingFingertipTouchCollider->SetCastShadow(false); + RightRingFingertipTouchCollider->bCastDynamicShadow = false; + RightRingFingertipTouchCollider->SetReceivesDecals(true); + RightRingFingertipTouchCollider->SetCanEverAffectNavigation(false); + RightRingFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightRingFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightRingFingertipTouchCollider, true); + + RightPinkyFingertipTouchCollider = ObjectInitializer.CreateDefaultSubobject( + this, TEXT("RightPinkyFingertipTouchCollider")); + RightPinkyFingertipTouchCollider->SetRelativeScale3D(RightHandSettings.TouchSettings.DefaultColliderSize); + RightPinkyFingertipTouchCollider->SetupAttachment( + HandRight, RightHandSettings.TouchSettings.PinkyColliderSocketName); + RightPinkyFingertipTouchCollider->SetCastShadow(false); + RightPinkyFingertipTouchCollider->bCastDynamicShadow = false; + RightPinkyFingertipTouchCollider->SetReceivesDecals(true); + RightPinkyFingertipTouchCollider->SetCanEverAffectNavigation(false); + RightPinkyFingertipTouchCollider->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Owner; + RightPinkyFingertipTouchCollider->SetCollisionObjectType(ECC_Pawn); + Pimpl->SetFingerColliderCollisionEnabled(RightPinkyFingertipTouchCollider, true); + + MaxNumberOfHandVelocitySamples = 10; + + LeftHandGrabState = FSGGrabState{ + HandLeft, FVector::Zero(), {}, nullptr, nullptr, nullptr, nullptr + }; + LeftHandTouchState = FSGTouchState{ + HandLeft, nullptr, nullptr, nullptr, nullptr, nullptr + }; + + RightHandGrabState = FSGGrabState{ + HandRight, FVector::Zero(), {}, nullptr, nullptr, nullptr, nullptr + }; + RightHandTouchState = FSGTouchState{ + HandRight, nullptr, nullptr, nullptr, nullptr, nullptr + }; +} + +void ASGPawn::OnGrabStateUpdated_Implementation(const FSGGrabState& GrabState) +{ +} + +void ASGPawn::OnTouchStateUpdated_Implementation(const FSGTouchState& TouchState) +{ +} + +void ASGPawn::OnActorGrabbed_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor) +{ +} + +void ASGPawn::OnActorReleased_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor) +{ +} + +void ASGPawn::OnActorBeginTouch_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor) +{ +} + +void ASGPawn::OnActorEndTouch_Implementation(const USGVirtualHandComponent* Hand, const AActor* Actor) +{ +} + +void ASGPawn::BeginPlay() +{ + Super::BeginPlay(); + + ensureAlwaysMsgf( + WristTrackerLeft->IsLeft() && HandLeft->IsLeft(), + TEXT("The left hand and the left wrist do not track the left hand!")); + ensureAlwaysMsgf( + WristTrackerRight->IsRight() && HandRight->IsRight(), + TEXT("The right hand and the right wrist do not track the right hand!")); + + WristTrackerLeft->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void + { + Pimpl->UpdateLeftHandLocation(Location, !Pimpl->IsLeftHandOverlappingWithAnyActor()); + }); + + WristTrackerLeft->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void + { + Pimpl->UpdateLeftHandRotation(Rotation, !Pimpl->IsLeftHandOverlappingWithAnyActor()); + }); + + WristTrackerRight->OnWristLocationChanged().AddWeakLambda(this, [&](const FVector& Location)-> void + { + Pimpl->UpdateRightHandLocation(Location, !Pimpl->IsRightHandOverlappingWithAnyActor()); + }); + + WristTrackerRight->OnWristRotationChanged().AddWeakLambda(this, [&](const FRotator& Rotation)-> void + { + Pimpl->UpdateRightHandRotation(Rotation, !Pimpl->IsRightHandOverlappingWithAnyActor()); + }); + + HandLeft->OnHandVisibilityChanged().AddWeakLambda(this, [&](const bool bNewVisibility)-> void + { + Pimpl->SetAllFingersColliderCollisionEnabled(false, bNewVisibility); + }); + + HandRight->OnHandVisibilityChanged().AddWeakLambda(this, [&](const bool bNewVisibility)-> void + { + Pimpl->SetAllFingersColliderCollisionEnabled(true, bNewVisibility); + }); + + Pimpl->BindRealHandsOverlapEvents(); + + Pimpl->BindFingerGrabOverlapEvents(); + Pimpl->BindFingerTouchOverlapEvents(); +} + +void ASGPawn::EndPlay(const EEndPlayReason::Type EndPlayReason) +{ + Super::EndPlay(EndPlayReason); + + Pimpl->UnbindRealHandsOverlapEvents(); + + Pimpl->UnbindFingerGrabOverlapEvents(); + Pimpl->UnbindFingerTouchOverlapEvents(); +} + +void ASGPawn::Tick(const float DeltaSeconds) +{ + Super::Tick(DeltaSeconds); + + Pimpl->RecordHandVelocity(LeftHandGrabState, DeltaSeconds); + Pimpl->RecordHandVelocity(RightHandGrabState, DeltaSeconds); +} + +void ASGPawn::PreInitializeComponents() +{ + Super::PreInitializeComponents(); + + WristTrackerLeft->SetRight(HandLeft->IsRight()); + WristTrackerRight->SetRight(HandRight->IsRight()); +} + +void ASGPawn::PostInitializeComponents() +{ + Super::PostInitializeComponents(); +} + +void ASGPawn::OnRealLeftHandOverlapBegins( + 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 (OtherActor == this) + { + return; + } + + Pimpl->RegisterLeftHandOverlappedActor(OtherActor); +} + +void ASGPawn::OnRealLeftHandOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (OtherActor == this) + { + return; + } + + Pimpl->UnregisterLeftHandOverlappedActor(OtherActor); +} + +void ASGPawn::OnRealRightHandOverlapBegins( + 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 (OtherActor == this) + { + return; + } + + Pimpl->RegisterRightHandOverlappedActor(OtherActor); +} + +void ASGPawn::OnRealRightHandOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (OtherActor == this) + { + return; + } + + Pimpl->UnregisterRightHandOverlappedActor(OtherActor); +} + +void ASGPawn::OnLeftThumbFingertipGrabColliderOverlapBegins( + 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 (!IsValid(LeftHandGrabState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandGrabState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGGrabComponent::IsGrabbable(OtherActor)) + { + return; + } + + LeftHandGrabState.ActorThumbCanGrab = OtherActor; + Pimpl->TriggerGrabStateUpdatedEvent(LeftHandGrabState); +} + +void ASGPawn::OnLeftThumbFingertipGrabColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandGrabState.Hand)) + { + return; + } + + if (LeftHandGrabState.ActorThumbCanGrab != OtherActor) + { + return; + } + + LeftHandGrabState.ActorThumbCanGrab = nullptr; + Pimpl->TriggerGrabStateUpdatedEvent(LeftHandGrabState); +} + +void ASGPawn::OnLeftIndexFingertipGrabColliderOverlapBegins( + 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 (!IsValid(LeftHandGrabState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandGrabState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGGrabComponent::IsGrabbable(OtherActor)) + { + return; + } + + LeftHandGrabState.ActorIndexCanGrab = OtherActor; + Pimpl->TriggerGrabStateUpdatedEvent(LeftHandGrabState); +} + +void ASGPawn::OnLeftIndexFingertipGrabColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandGrabState.Hand)) + { + return; + } + + if (LeftHandGrabState.ActorIndexCanGrab != OtherActor) + { + return; + } + + LeftHandGrabState.ActorIndexCanGrab = nullptr; + Pimpl->TriggerGrabStateUpdatedEvent(LeftHandGrabState); +} + +void ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapBegins( + 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 (!IsValid(LeftHandGrabState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandGrabState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGGrabComponent::IsGrabbable(OtherActor)) + { + return; + } + + LeftHandGrabState.ActorMiddleCanGrab = OtherActor; + Pimpl->TriggerGrabStateUpdatedEvent(LeftHandGrabState); +} + +void ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandGrabState.Hand)) + { + return; + } + + if (LeftHandGrabState.ActorMiddleCanGrab != OtherActor) + { + return; + } + + LeftHandGrabState.ActorMiddleCanGrab = nullptr; + Pimpl->TriggerGrabStateUpdatedEvent(LeftHandGrabState); +} + +void ASGPawn::OnLeftThumbFingertipTouchColliderOverlapBegins( + 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 (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + LeftHandTouchState.ActorThumbTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerBeginTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftThumbFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + if (LeftHandTouchState.ActorThumbTouching != OtherActor) + { + return; + } + + LeftHandTouchState.ActorThumbTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerEndTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftIndexFingertipTouchColliderOverlapBegins( + 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 (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + LeftHandTouchState.ActorIndexTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerBeginTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftIndexFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + if (LeftHandTouchState.ActorIndexTouching != OtherActor) + { + return; + } + + LeftHandTouchState.ActorIndexTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerEndTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftMiddleFingertipTouchColliderOverlapBegins( + 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 (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + LeftHandTouchState.ActorMiddleTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerBeginTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftMiddleFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + if (LeftHandTouchState.ActorMiddleTouching != OtherActor) + { + return; + } + + LeftHandTouchState.ActorMiddleTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerEndTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftRingFingertipTouchColliderOverlapBegins( + 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 (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + LeftHandTouchState.ActorRingTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerBeginTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftRingFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + if (LeftHandTouchState.ActorRingTouching != OtherActor) + { + return; + } + + LeftHandTouchState.ActorRingTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerEndTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftPinkyFingertipTouchColliderOverlapBegins( + 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 (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = LeftHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + LeftHandTouchState.ActorPinkyTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerBeginTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnLeftPinkyFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(LeftHandTouchState.Hand)) + { + return; + } + + if (LeftHandTouchState.ActorPinkyTouching != OtherActor) + { + return; + } + + LeftHandTouchState.ActorPinkyTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(LeftHandTouchState); + Pimpl->TriggerEndTouch(LeftHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightThumbFingertipGrabColliderOverlapBegins( + 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 (!IsValid(RightHandGrabState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandGrabState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGGrabComponent::IsGrabbable(OtherActor)) + { + return; + } + + RightHandGrabState.ActorThumbCanGrab = OtherActor; + Pimpl->TriggerGrabStateUpdatedEvent(RightHandGrabState); +} + +void ASGPawn::OnRightThumbFingertipGrabColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandGrabState.Hand)) + { + return; + } + + if (RightHandGrabState.ActorThumbCanGrab != OtherActor) + { + return; + } + + RightHandGrabState.ActorThumbCanGrab = nullptr; + Pimpl->TriggerGrabStateUpdatedEvent(RightHandGrabState); +} + +void ASGPawn::OnRightIndexFingertipGrabColliderOverlapBegins( + 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 (!IsValid(RightHandGrabState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandGrabState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGGrabComponent::IsGrabbable(OtherActor)) + { + return; + } + + RightHandGrabState.ActorIndexCanGrab = OtherActor; + Pimpl->TriggerGrabStateUpdatedEvent(RightHandGrabState); +} + +void ASGPawn::OnRightIndexFingertipGrabColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandGrabState.Hand)) + { + return; + } + + if (RightHandGrabState.ActorThumbCanGrab != OtherActor) + { + return; + } + + RightHandGrabState.ActorIndexCanGrab = nullptr; + Pimpl->TriggerGrabStateUpdatedEvent(RightHandGrabState); +} + +void ASGPawn::OnRightMiddleFingertipGrabColliderOverlapBegins( + 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 (!IsValid(RightHandGrabState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandGrabState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGGrabComponent::IsGrabbable(OtherActor)) + { + return; + } + + RightHandGrabState.ActorMiddleCanGrab = OtherActor; + Pimpl->TriggerGrabStateUpdatedEvent(RightHandGrabState); +} + +void ASGPawn::OnRightMiddleFingertipGrabColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandGrabState.Hand)) + { + return; + } + + if (RightHandGrabState.ActorMiddleCanGrab != OtherActor) + { + return; + } + + RightHandGrabState.ActorMiddleCanGrab = nullptr; + Pimpl->TriggerGrabStateUpdatedEvent(RightHandGrabState); +} + +void ASGPawn::OnRightThumbFingertipTouchColliderOverlapBegins( + 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 (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + RightHandTouchState.ActorThumbTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerBeginTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightThumbFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + if (RightHandTouchState.ActorThumbTouching != OtherActor) + { + return; + } + + RightHandTouchState.ActorThumbTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerEndTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightIndexFingertipTouchColliderOverlapBegins( + 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 (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + RightHandTouchState.ActorIndexTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerBeginTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightIndexFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + if (RightHandTouchState.ActorIndexTouching != OtherActor) + { + return; + } + + RightHandTouchState.ActorIndexTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerEndTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightMiddleFingertipTouchColliderOverlapBegins( + 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 (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + RightHandTouchState.ActorMiddleTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerBeginTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightMiddleFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + if (RightHandTouchState.ActorMiddleTouching != OtherActor) + { + return; + } + + RightHandTouchState.ActorMiddleTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerEndTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightRingFingertipTouchColliderOverlapBegins( + 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 (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + RightHandTouchState.ActorRingTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerBeginTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightRingFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + if (RightHandTouchState.ActorRingTouching != OtherActor) + { + return; + } + + RightHandTouchState.ActorRingTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerEndTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightPinkyFingertipTouchColliderOverlapBegins( + 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 (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + const bool bHandVisible = RightHandTouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!USGTouchComponent::IsTouchable(OtherActor)) + { + return; + } + + RightHandTouchState.ActorPinkyTouching = OtherActor; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerBeginTouch(RightHandTouchState.Hand, OtherActor); +} + +void ASGPawn::OnRightPinkyFingertipTouchColliderOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + const int32 OtherBodyIndex) +{ + (void) OverlappedComponent; + (void) OtherComp; + (void) OtherBodyIndex; + + if (!IsValid(RightHandTouchState.Hand)) + { + return; + } + + if (RightHandTouchState.ActorPinkyTouching != OtherActor) + { + return; + } + + RightHandTouchState.ActorPinkyTouching = nullptr; + Pimpl->TriggerTouchStateUpdatedEvent(RightHandTouchState); + Pimpl->TriggerEndTouch(RightHandTouchState.Hand, OtherActor); +} + +bool ASGPawn::IsLeftHandGrabbing(AActor*& OutActor) const +{ + if (!IsValid(LeftHandGrabState.Hand)) + { + return false; + } + + if (!IsValid(LeftHandGrabState.GrabbedActor)) + { + return false; + } + + OutActor = LeftHandGrabState.GrabbedActor; + return true; +} + +bool ASGPawn::IsRightHandGrabbing(AActor*& OutActor) const +{ + if (!IsValid(RightHandGrabState.Hand)) + { + return false; + } + + if (!IsValid(RightHandGrabState.GrabbedActor)) + { + return false; + } + + OutActor = RightHandGrabState.GrabbedActor; + return true; +} + +bool ASGPawn::IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const +{ + return Hand == HandLeft ? IsLeftHandGrabbing(OutActor) : IsRightHandGrabbing(OutActor); +} + +void ASGPawn::Grab(USGVirtualHandComponent* Hand, AActor* Actor) +{ + if (!ensureAlwaysMsgf(IsValid(Hand), TEXT("%s"), TEXT("ERROR: invalid hand!"))) + { + return; + } + + const bool bHandVisible = Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + if (!ensureAlwaysMsgf(IsValid(Actor), TEXT("%s"), TEXT("ERROR: invalid actor!"))) + { + return; + } + + const USGGrabComponent* GrabComponent{USGGrabComponent::GetGrabComponent(Actor)}; + if (!IsValid(GrabComponent)) + { + return; + } + + FAttachmentTransformRules AttachmentRules{ + FAttachmentTransformRules(GrabComponent->GetAttachmentLocationRule(), + GrabComponent->GetAttachmentRotationRule(), + GrabComponent->GetAttachmentScaleRule(), + GrabComponent->GetAttachmentWeldSimulatedBodies()) + }; + + const FName SocketName{GrabComponent->GetAttachmentSocketName()}; + ensureAlwaysMsgf(SocketName != NAME_None, TEXT("invalid attachment socket name!")); + + if (GrabComponent->GetAffectPhysicsState()) + { + GrabComponent->SimulatePhysics(false); + } + + if (Hand->IsRight()) + { + Pimpl->UnregisterRightHandOverlappedActor(Actor); + } + else + { + Pimpl->UnregisterLeftHandOverlappedActor(Actor); + } + + const bool bAttached = Actor->AttachToComponent(Hand, MoveTemp(AttachmentRules), SocketName); + if (bAttached) + { + if (Hand->IsRight()) + { + Pimpl->SetRightHandGrabbedActor(Actor); + } + else + { + Pimpl->SetLeftHandGrabbedActor(Actor); + } + } + else + { + if (Hand->IsRight()) + { + SGLOG_ERROR("Failed to grab the actor with the right hand!", Actor, SocketName); + } + else + { + SGLOG_ERROR("Failed to grab the actor with the left hand!", Actor, SocketName); + } + } + + Pimpl->TriggerActorGrabbedEvent(Hand, Actor); +} + +void ASGPawn::ReleaseLeft() +{ + Pimpl->Release(LeftHandGrabState); +} + +void ASGPawn::ReleaseRight() +{ + Pimpl->Release(RightHandGrabState); +} + +ASGPawn::FImpl::FImpl(ASGPawn* InOwner) + : Owner(InOwner) +{ +} + +ASGPawn::FImpl::~FImpl() = default; + +void ASGPawn::FImpl::BindRealHandsOverlapEvents() +{ + Owner->RealHandLeft->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRealLeftHandOverlapBegins); + Owner->RealHandLeft->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRealLeftHandOverlapEnds); + + Owner->RealHandRight->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRealRightHandOverlapBegins); + Owner->RealHandRight->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRealRightHandOverlapEnds); +} + +void ASGPawn::FImpl::UnbindRealHandsOverlapEvents() +{ + Owner->RealHandLeft->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRealLeftHandOverlapBegins); + Owner->RealHandLeft->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRealLeftHandOverlapEnds); + + Owner->RealHandRight->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRealRightHandOverlapBegins); + Owner->RealHandRight->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRealRightHandOverlapEnds); +} + +void ASGPawn::FImpl::BindFingerGrabOverlapEvents() +{ + Owner->LeftThumbFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipGrabColliderOverlapBegins); + Owner->LeftThumbFingertipGrabCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipGrabColliderOverlapEnds); + + Owner->LeftIndexFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipGrabColliderOverlapBegins); + Owner->LeftIndexFingertipGrabCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipGrabColliderOverlapEnds); + + Owner->LeftMiddleFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapBegins); + Owner->LeftMiddleFingertipGrabCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapEnds); + + Owner->RightThumbFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightThumbFingertipGrabColliderOverlapBegins); + Owner->RightThumbFingertipGrabCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightThumbFingertipGrabColliderOverlapEnds); + + Owner->RightIndexFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightIndexFingertipGrabColliderOverlapBegins); + Owner->RightIndexFingertipGrabCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightIndexFingertipGrabColliderOverlapEnds); + + Owner->RightMiddleFingertipGrabCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipGrabColliderOverlapBegins); + Owner->RightMiddleFingertipGrabCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipGrabColliderOverlapEnds); +} + +void ASGPawn::FImpl::UnbindFingerGrabOverlapEvents() +{ + Owner->LeftThumbFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipGrabColliderOverlapBegins); + Owner->LeftThumbFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipGrabColliderOverlapEnds); + + Owner->LeftIndexFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipGrabColliderOverlapBegins); + Owner->LeftIndexFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipGrabColliderOverlapEnds); + + Owner->LeftMiddleFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapBegins); + Owner->LeftMiddleFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipGrabColliderOverlapEnds); + + Owner->RightThumbFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightThumbFingertipGrabColliderOverlapBegins); + Owner->RightThumbFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightThumbFingertipGrabColliderOverlapEnds); + + Owner->RightIndexFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightIndexFingertipGrabColliderOverlapBegins); + Owner->RightIndexFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightIndexFingertipGrabColliderOverlapEnds); + + Owner->RightMiddleFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipGrabColliderOverlapBegins); + Owner->RightMiddleFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipGrabColliderOverlapEnds); +} + +void ASGPawn::FImpl::BindFingerTouchOverlapEvents() +{ + Owner->LeftThumbFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipTouchColliderOverlapBegins); + Owner->LeftThumbFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipTouchColliderOverlapEnds); + + Owner->LeftIndexFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipTouchColliderOverlapBegins); + Owner->LeftIndexFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipTouchColliderOverlapEnds); + + Owner->LeftMiddleFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipTouchColliderOverlapBegins); + Owner->LeftMiddleFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipTouchColliderOverlapEnds); + + Owner->LeftRingFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftRingFingertipTouchColliderOverlapBegins); + Owner->LeftRingFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftRingFingertipTouchColliderOverlapEnds); + + Owner->LeftPinkyFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftPinkyFingertipTouchColliderOverlapBegins); + Owner->LeftPinkyFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnLeftPinkyFingertipTouchColliderOverlapEnds); + + Owner->RightThumbFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightThumbFingertipTouchColliderOverlapBegins); + Owner->RightThumbFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightThumbFingertipTouchColliderOverlapEnds); + + Owner->RightIndexFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightIndexFingertipTouchColliderOverlapBegins); + Owner->RightIndexFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightIndexFingertipTouchColliderOverlapEnds); + + Owner->RightMiddleFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipTouchColliderOverlapBegins); + Owner->RightMiddleFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipTouchColliderOverlapEnds); + + Owner->RightRingFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightRingFingertipTouchColliderOverlapBegins); + Owner->RightRingFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightRingFingertipTouchColliderOverlapEnds); + + Owner->RightPinkyFingertipTouchCollider->OnComponentBeginOverlap.AddDynamic( + Owner, &ASGPawn::OnRightPinkyFingertipTouchColliderOverlapBegins); + Owner->RightPinkyFingertipTouchCollider->OnComponentEndOverlap.AddDynamic( + Owner, &ASGPawn::OnRightPinkyFingertipTouchColliderOverlapEnds); +} + +void ASGPawn::FImpl::UnbindFingerTouchOverlapEvents() +{ + Owner->LeftThumbFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipTouchColliderOverlapBegins); + Owner->LeftThumbFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftThumbFingertipTouchColliderOverlapEnds); + + Owner->LeftIndexFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipTouchColliderOverlapBegins); + Owner->LeftIndexFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftIndexFingertipTouchColliderOverlapEnds); + + Owner->LeftMiddleFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipTouchColliderOverlapBegins); + Owner->LeftMiddleFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftMiddleFingertipTouchColliderOverlapEnds); + + Owner->LeftRingFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftRingFingertipTouchColliderOverlapBegins); + Owner->LeftRingFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftRingFingertipTouchColliderOverlapEnds); + + Owner->LeftPinkyFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftPinkyFingertipTouchColliderOverlapBegins); + Owner->LeftPinkyFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnLeftPinkyFingertipTouchColliderOverlapEnds); + + Owner->RightThumbFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightThumbFingertipGrabColliderOverlapBegins); + Owner->RightThumbFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightThumbFingertipGrabColliderOverlapEnds); + + Owner->RightIndexFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightIndexFingertipGrabColliderOverlapBegins); + Owner->RightIndexFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightIndexFingertipGrabColliderOverlapEnds); + + Owner->RightMiddleFingertipGrabCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipGrabColliderOverlapBegins); + Owner->RightMiddleFingertipGrabCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipGrabColliderOverlapEnds); + + Owner->RightThumbFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightThumbFingertipTouchColliderOverlapBegins); + Owner->RightThumbFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightThumbFingertipTouchColliderOverlapEnds); + + Owner->RightIndexFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightIndexFingertipTouchColliderOverlapBegins); + Owner->RightIndexFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightIndexFingertipTouchColliderOverlapEnds); + + Owner->RightMiddleFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipTouchColliderOverlapBegins); + Owner->RightMiddleFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightMiddleFingertipTouchColliderOverlapEnds); + + Owner->RightRingFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightRingFingertipTouchColliderOverlapBegins); + Owner->RightRingFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightRingFingertipTouchColliderOverlapEnds); + + Owner->RightPinkyFingertipTouchCollider->OnComponentBeginOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightPinkyFingertipTouchColliderOverlapBegins); + Owner->RightPinkyFingertipTouchCollider->OnComponentEndOverlap.RemoveDynamic( + Owner, &ASGPawn::OnRightPinkyFingertipTouchColliderOverlapEnds); +} + +void ASGPawn::FImpl::SetVisibility(USceneComponent* SceneComponent, const bool bVisibility) const +{ + if (!ensureAlwaysMsgf(IsValid(SceneComponent), TEXT("Invalid SceneComponent!"))) + { + return; + } + + SceneComponent->SetHiddenInGame(!bVisibility, false); +} + +void ASGPawn::FImpl::UpdateHandLocation(const bool bRight, const FVector& Location, const bool bUpdateVirtualHand) const +{ + if (bRight) + { + UpdateRightHandLocation(Location, bUpdateVirtualHand); + } + else + { + UpdateLeftHandLocation(Location, bUpdateVirtualHand); + } +} + +void ASGPawn::FImpl::UpdateLeftHandLocation(const FVector& Location, const bool bUpdateVirtualHand) const +{ + if (bUpdateVirtualHand) + { + Owner->HandLeft->SetWorldLocation(Location); + } + Owner->RealHandLeft->SetWorldLocation(Location); +} + +void ASGPawn::FImpl::UpdateRightHandLocation(const FVector& Location, const bool bUpdateVirtualHand) const +{ + if (bUpdateVirtualHand) + { + Owner->HandRight->SetWorldLocation(Location); + } + Owner->RealHandRight->SetWorldLocation(Location); +} + +void ASGPawn::FImpl::UpdateHandRotation(const bool bRight, const FRotator& Rotation, const bool bUpdateVirtualHand) +{ + if (bRight) + { + UpdateRightHandRotation(Rotation, bUpdateVirtualHand); + } + else + { + UpdateLeftHandRotation(Rotation, bUpdateVirtualHand); + } +} + +void ASGPawn::FImpl::UpdateLeftHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand) +{ + const FSGVirtualHandMeshSettings& MeshSettings{Owner->HandLeft->GetVirtualHandSettings().MeshSettings}; + const FQuat NewRotation{ + Rotation.Quaternion() * MeshSettings.RootBoneRotationCorrection.Quaternion() + }; + if (bUpdateVirtualHand) + { + Owner->HandLeft->SetWorldRotation(NewRotation); + } + Owner->RealHandLeft->SetWorldRotation(NewRotation); +} + +void ASGPawn::FImpl::UpdateRightHandRotation(const FRotator& Rotation, const bool bUpdateVirtualHand) +{ + const FSGVirtualHandMeshSettings& MeshSettings{Owner->HandLeft->GetVirtualHandSettings().MeshSettings}; + const FQuat NewRotation{ + Rotation.Quaternion() * MeshSettings.RootBoneRotationCorrection.Quaternion() + }; + if (bUpdateVirtualHand) + { + Owner->HandRight->SetWorldRotation(NewRotation); + } + Owner->RealHandRight->SetWorldRotation(NewRotation); +} + +void ASGPawn::FImpl::UpdateHandLocationAndRotation( + const bool bRight, const FVector& Location, const FRotator& Rotation, const bool bUpdateVirtualHand) +{ + if (bRight) + { + UpdateRightHandLocationAndRotation(Location, Rotation, bUpdateVirtualHand); + } + else + { + UpdateLeftHandLocationAndRotation(Location, Rotation, bUpdateVirtualHand); + } +} + +void ASGPawn::FImpl::UpdateLeftHandLocationAndRotation( + const FVector& Location, const FRotator& Rotation, const bool bUpdateVirtualHand) +{ + UpdateLeftHandLocation(Location, bUpdateVirtualHand); + UpdateLeftHandRotation(Rotation, bUpdateVirtualHand); +} + +void ASGPawn::FImpl::UpdateRightHandLocationAndRotation( + const FVector& Location, const FRotator& Rotation, const bool bUpdateVirtualHand) +{ + UpdateRightHandLocation(Location, bUpdateVirtualHand); + UpdateRightHandRotation(Rotation, bUpdateVirtualHand); +} + +void ASGPawn::FImpl::SetFingerColliderCollisionEnabled(USphereComponent* Collider, const bool bEnabled) const +{ + if (!ensureAlwaysMsgf(IsValid(Collider), TEXT("Invalid collider object!"))) + { + return; + } + + if (bEnabled) + { + Collider->SetGenerateOverlapEvents(true); + Collider->SetCollisionEnabled(ECollisionEnabled::QueryOnly); + Collider->SetCollisionResponseToAllChannels(ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_WorldStatic, ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_WorldDynamic, ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_Visibility, ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_PhysicsBody, ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Overlap); + Collider->SetCollisionResponseToChannel(ECC_Destructible, ECR_Overlap); + } + else + { + Collider->SetGenerateOverlapEvents(false); + Collider->SetCollisionEnabled(ECollisionEnabled::NoCollision); + Collider->SetCollisionResponseToAllChannels(ECR_Ignore); + } +} + +void ASGPawn::FImpl::SetAllFingersColliderCollisionEnabled(const bool bRight, const bool bEnabled) const +{ + if (bRight) + { + SetFingerColliderCollisionEnabled(Owner->RightThumbFingertipGrabCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightThumbFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightIndexFingertipGrabCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightIndexFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightMiddleFingertipGrabCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightMiddleFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightRingFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->RightPinkyFingertipTouchCollider, bEnabled); + } + else + { + SetFingerColliderCollisionEnabled(Owner->LeftThumbFingertipGrabCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftThumbFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftIndexFingertipGrabCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftIndexFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftMiddleFingertipGrabCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftMiddleFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftRingFingertipTouchCollider, bEnabled); + SetFingerColliderCollisionEnabled(Owner->LeftPinkyFingertipTouchCollider, bEnabled); + } +} + +void ASGPawn::FImpl::ApplyHandVelocityToGrabbedActor(const FSGGrabState& GrabState) const +{ + if (!IsValid(GrabState.Hand)) + { + return; + } + + if (!IsValid(GrabState.GrabbedActor)) + { + return; + } + + UPrimitiveComponent* ActorRootComponent{Cast(GrabState.GrabbedActor->GetRootComponent())}; + if (!ensureAlwaysMsgf(IsValid(ActorRootComponent), TEXT("RootComponent is not a valid UPrimativeComponent!"))) + { + return; + } + + FVector HandVelocity{UKismetMathLibrary::GetVectorArrayAverage(GrabState.HandVelocityHistory)}; + + ActorRootComponent->SetPhysicsLinearVelocity(HandVelocity); + ActorRootComponent->AddImpulse(MoveTemp(HandVelocity), NAME_None, true); +} + +void ASGPawn::FImpl::SetGrabbedActor(FSGGrabState& GrabState, AActor* Actor) const +{ + GrabState.GrabbedActor = Actor; +} + +void ASGPawn::FImpl::SetLeftHandGrabbedActor(AActor* Actor) const +{ + SetGrabbedActor(Owner->LeftHandGrabState, Actor); +} + +void ASGPawn::FImpl::SetRightHandGrabbedActor(AActor* Actor) const +{ + SetGrabbedActor(Owner->RightHandGrabState, Actor); +} + +void ASGPawn::FImpl::RecordHandVelocity(FSGGrabState& GrabState, const float DeltaSeconds) const +{ + if (!IsValid(GrabState.Hand)) + { + return; + } + + FVector HandVelocity{ + (GrabState.Hand->GetComponentLocation() - GrabState.PreviousHandLocation) / DeltaSeconds + }; + + if (GrabState.HandVelocityHistory.Num() >= Owner->MaxNumberOfHandVelocitySamples) + { + if (GrabState.HandVelocityHistory.IsValidIndex(0)) + { + GrabState.HandVelocityHistory.RemoveAt(0, 1, EAllowShrinking::No); + GrabState.HandVelocityHistory.Emplace(MoveTemp(HandVelocity)); + } + } + else + { + GrabState.HandVelocityHistory.Emplace(MoveTemp(HandVelocity)); + } + + GrabState.PreviousHandLocation = GrabState.Hand->GetComponentLocation(); +} + +void ASGPawn::FImpl::Release(FSGGrabState& GrabState) const +{ + if (!IsValid(GrabState.GrabbedActor)) + { + return; + } + + const USGGrabComponent* GrabComponent{USGGrabComponent::GetGrabComponent(GrabState.GrabbedActor)}; + if (!IsValid(GrabComponent)) + { + return; + } + + GrabState.GrabbedActor->DetachFromActor( + FDetachmentTransformRules(GrabComponent->GetDetachmentLocationRule(), + GrabComponent->GetDetachmentRotationRule(), + GrabComponent->GetDetachmentScaleRule(), + GrabComponent->GetDetachmentInCallModify()) + ); + + if (GrabComponent->GetAffectPhysicsState()) + { + GrabComponent->SimulatePhysics(true); + } + + ApplyHandVelocityToGrabbedActor(GrabState); + + TriggerActorReleasedEvent(GrabState.Hand, GrabState.GrabbedActor); + + SetGrabbedActor(GrabState, nullptr); +} + +void ASGPawn::FImpl::TriggerGrabStateUpdatedEvent(const FSGGrabState& GrabState) const +{ + Owner->GrabStateUpdatedEvent.Broadcast(GrabState); + Owner->OnGrabStateUpdated(GrabState); +} + +void ASGPawn::FImpl::TriggerTouchStateUpdatedEvent(const FSGTouchState& TouchState) const +{ + Owner->TouchStateUpdatedEvent.Broadcast(TouchState); + Owner->OnTouchStateUpdated(TouchState); +} + +void ASGPawn::FImpl::TriggerActorGrabbedEvent(const USGVirtualHandComponent* Hand, const AActor* Actor) const +{ + Owner->ActorGrabbedEvent.Broadcast(Hand, Actor); + Owner->OnActorGrabbed(Hand, Actor); +} + +void ASGPawn::FImpl::TriggerActorReleasedEvent(const USGVirtualHandComponent* Hand, const AActor* Actor) const +{ + Owner->ActorReleasedEvent.Broadcast(Hand, Actor); + Owner->OnActorReleased(Hand, Actor); +} + +void ASGPawn::FImpl::TriggerBeginTouch(const USGVirtualHandComponent* Hand, const AActor* Actor) const +{ + Owner->ActorBeginTouchEvent.Broadcast(Hand, Actor); + Owner->OnActorBeginTouch(Hand, Actor); +} + +void ASGPawn::FImpl::TriggerEndTouch(const USGVirtualHandComponent* Hand, const AActor* Actor) const +{ + Owner->ActorEndTouchEvent.Broadcast(Hand, Actor); + Owner->OnActorEndTouch(Hand, Actor); +} + +void ASGPawn::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp new file mode 100644 index 0000000..a3bc988 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/GameFramework/SGPlayerController.cpp @@ -0,0 +1,320 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +#include "Runtime/Launch/Resources/Version.h" + +#include "SenseGlove/Components/SGTouchComponent.h" +#include "SenseGlove/Components/SGVirtualHandComponent.h" +#include "SenseGlove/GameFramework/SGPawn.h" +#include "SenseGlove/Haptics/SGGrabState.h" +#include "SenseGlove/Haptics/SGTouchState.h" +#include "SGBuildHacks/SGPlatform.h" +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGHapticGlove.h" + +struct ASGPlayerController::FImpl +{ + /************************ + * Static methods + ************************/ + + static float GetForceFeedbackLevel(const AActor* Actor); + + static TArray GetForceFeedbackLevels( + const AActor* ActorThumbTouching, + const AActor* ActorIndexTouching, + const AActor* ActorMiddleTouching, + const AActor* ActorRingTouching, + const AActor* ActorPinkyTouching); + + /************************ + * Member variables + ************************/ + + /************************ + * 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 + ************************/ + + USGCustomWaveform* GetCustomWaveform(const AActor* Actor); + + void UpdateHapticsFeedback(const FSGTouchState& TouchState); +}; + +float ASGPlayerController::FImpl::GetForceFeedbackLevel(const AActor* Actor) +{ + if (IsValid(Actor)) + { + const USGTouchComponent* TouchComponent{USGTouchComponent::GetTouchComponent(Actor)}; + if (IsValid(TouchComponent)) + { + return TouchComponent->GetForceFeedbackLevel(); + } + } + + return 0.0f; +} + +TArray ASGPlayerController::FImpl::GetForceFeedbackLevels( + const AActor* ActorThumbTouching, + const AActor* ActorIndexTouching, + const AActor* ActorMiddleTouching, + const AActor* ActorRingTouching, + const AActor* ActorPinkyTouching) +{ + const float ThumbForceFeedbackLevel = GetForceFeedbackLevel(ActorThumbTouching); + const float IndexForceFeedbackLevel = GetForceFeedbackLevel(ActorIndexTouching); + const float MiddleForceFeedbackLevel = GetForceFeedbackLevel(ActorMiddleTouching); + const float RingForceFeedbackLevel = GetForceFeedbackLevel(ActorRingTouching); + const float PinkyForceFeedbackLevel = GetForceFeedbackLevel(ActorPinkyTouching); + + const TArray ForceFeedbackLevels{ + ThumbForceFeedbackLevel, + IndexForceFeedbackLevel, + MiddleForceFeedbackLevel, + RingForceFeedbackLevel, + PinkyForceFeedbackLevel, + }; + + return ForceFeedbackLevels; +} + +ASGPlayerController::ASGPlayerController(const FObjectInitializer& ObjectInitializer) + : Super(ObjectInitializer), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +void ASGPlayerController::BeginPlay() +{ + Super::BeginPlay(); + + ASGPawn* SGPawn{Cast(GetPawn())}; + if (!ensureAlwaysMsgf(IsValid(SGPawn), TEXT("%s"), TEXT("ERROR: invalid SenseGlove pawn!"))) + { + return; + } + + SGPawn->OnGrabStateUpdated().AddWeakLambda( + this, [= SG_CAPTURE_THIS](const FSGGrabState& GrabState) -> void + { + if (!IsValid(SGPawn)) + { + return; + } + + if (!IsValid(GrabState.Hand)) + { + return; + } + + const bool bHandVisible = GrabState.Hand->IsVisible(); + if (!bHandVisible) + { + if (SGPawn->IsGrabbing(GrabState.Hand)) + { + SGPawn->Release(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, [= SG_CAPTURE_THIS](const FSGTouchState& TouchState) -> void + { + if (!IsValid(SGPawn)) + { + return; + } + + if (!IsValid(TouchState.Hand)) + { + return; + } + + const bool bHandVisible = TouchState.Hand->IsVisible(); + if (!bHandVisible) + { + return; + } + + const bool bGloveConnected = TouchState.Hand->IsGloveConnected(); + if (!bGloveConnected) + { + return; + } + + Pimpl->UpdateHapticsFeedback(TouchState); + }); +} + +ASGPlayerController::FImpl::FImpl(ASGPlayerController* InOwner) + : Owner(InOwner) +{ +} + +ASGPlayerController::FImpl::~FImpl() = default; + +USGCustomWaveform* ASGPlayerController::FImpl::GetCustomWaveform(const AActor* Actor) +{ + float Amplitude = 0.0f; + float Duration = 0.0f; + float Frequency = 0.0f; + + if (IsValid(Actor)) + { + const USGTouchComponent* TouchComponent{USGTouchComponent::GetTouchComponent(Actor)}; + if (IsValid(TouchComponent)) + { + Amplitude = TouchComponent->GetVibrotactileAmplitude(); + Duration = TouchComponent->GetVibrotactileDuration(); + Frequency = TouchComponent->GetVibrotactileFrequency(); + } + } + + USGCustomWaveform* CustomWaveform{ + USGCustomWaveform::NewCustomWaveform(Owner, Amplitude, Duration, Frequency) + }; + return CustomWaveform; +} + +void ASGPlayerController::FImpl::UpdateHapticsFeedback(const FSGTouchState& TouchState) +{ + if (!IsValid(TouchState.Hand)) + { + return; + } + + USGHapticGlove* Glove{TouchState.Hand->GetConnectedGlove()}; + if (!IsValid(Glove)) + { + return; + } + + const bool bGloveConnected = Glove->IsConnected(); + if (!bGloveConnected) + { + return; + } + + // Queue the Force-Feedback command... + TArray ForceFeedbackLevels{ + GetForceFeedbackLevels( + TouchState.ActorThumbTouching, TouchState.ActorIndexTouching, TouchState.ActorMiddleTouching, + TouchState.ActorRingTouching, TouchState.ActorPinkyTouching) + }; + Glove->QueueForceFeedbackLevels(MoveTemp(ForceFeedbackLevels)); + + // Send the haptics commands! + Glove->SendHaptics(); + + // Send Vibrotactile to the thumb finger if it's touching an actor... + if (IsValid(TouchState.ActorThumbTouching)) + { + USGCustomWaveform* CustomWaveform(GetCustomWaveform(TouchState.ActorThumbTouching)); + Glove->SendCustomWaveform(CustomWaveform, ESGHapticLocation::ThumbTip); + } + + // Send Vibrotactile to the index finger if it's touching an actor... + if (IsValid(TouchState.ActorIndexTouching)) + { + USGCustomWaveform* CustomWaveform(GetCustomWaveform(TouchState.ActorIndexTouching)); + Glove->SendCustomWaveform(CustomWaveform, ESGHapticLocation::IndexTip); + } + + // Send Vibrotactile to the middle finger if it's touching an actor... + if (IsValid(TouchState.ActorMiddleTouching)) + { + USGCustomWaveform* CustomWaveform(GetCustomWaveform(TouchState.ActorMiddleTouching)); + Glove->SendCustomWaveform(CustomWaveform, ESGHapticLocation::MiddleTip); + } + + // Send Vibrotactile to the ring finger if it's touching an actor... + if (IsValid(TouchState.ActorRingTouching)) + { + USGCustomWaveform* CustomWaveform(GetCustomWaveform(TouchState.ActorRingTouching)); + Glove->SendCustomWaveform(CustomWaveform, ESGHapticLocation::RingTip); + } + + // Send Vibrotactile to the pinky finger if it's touching an actor... + if (IsValid(TouchState.ActorPinkyTouching)) + { + USGCustomWaveform* CustomWaveform(GetCustomWaveform(TouchState.ActorPinkyTouching)); + Glove->SendCustomWaveform(CustomWaveform, ESGHapticLocation::PinkyTip); + } +} + +void ASGPlayerController::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp new file mode 100644 index 0000000..e0ce638 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Haptics/SGGrabState.cpp @@ -0,0 +1,68 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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), + PreviousHandLocation(FVector::Zero()), + HandVelocityHistory{}, + ActorThumbCanGrab(nullptr), + ActorIndexCanGrab(nullptr), + ActorMiddleCanGrab(nullptr), + GrabbedActor(nullptr) +{ +} + +FSGGrabState::FSGGrabState(USGVirtualHandComponent* InHand, + const FVector& InPreviousHandLocation, + const TArray& InHandVelocityHistory, + AActor* InActorThumbCanGrab, + AActor* InActorIndexCanGrab, + AActor* InActorMiddleCanGrab, + AActor* InGrabbedActor) + : Hand(InHand), + PreviousHandLocation(InPreviousHandLocation), + HandVelocityHistory(InHandVelocityHistory), + ActorThumbCanGrab(InActorThumbCanGrab), + ActorIndexCanGrab(InActorIndexCanGrab), + ActorMiddleCanGrab(InActorMiddleCanGrab), + GrabbedActor(InGrabbedActor) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Haptics/SGTouchState.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Haptics/SGTouchState.cpp new file mode 100644 index 0000000..d3ac11b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGlove/Haptics/SGTouchState.cpp @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGloveModule.cpp b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGloveModule.cpp new file mode 100644 index 0000000..566542a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGloveModule.cpp @@ -0,0 +1,221 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Engine/Engine.h" +#include "GameMapsSettings.h" +#include "Misc/CoreDelegates.h" + +#include "SGLog/SGLog.h" +#include "SenseGlove/Engine/SGGameInstance.h" +#include "SenseGlove/GameFramework/SGGameModeBase.h" +#include "SenseGlove/GameFramework/SGGameUserSettings.h" +#include "SGSettings/SGSettings.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveModule" + +void FSenseGloveModule::StartupModule() +{ + SGLOG("Starting up the SenseGlove module..."); + + OnPostEngineInitHandle = FCoreDelegates::OnPostEngineInit.AddRaw( + this, &FSenseGloveModule::OnPostEngineInit); +} + +void FSenseGloveModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGlove module..."); +} + +void FSenseGloveModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGlove module has succeeded!"); +} + +void FSenseGloveModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGlove module..."); + + FCoreDelegates::OnPostEngineInit.Remove(OnPostEngineInitHandle); +} + +void FSenseGloveModule::OnPostEngineInit() const +{ + const FSGInitializationSettings& Settings{ + USGSettings::GetInstance()->GetInitializationSettings() + }; + if (!Settings.bValidateIfDefaultClassesAreSGCompliant) + { + SGLOG("Will not be checking whether the default classes are SenseGlove-compliant, or not since it's disabled!"); + return; + } + + SGLOG("Checking whether the default classes are SenseGlove-compliant, or not..."); + + SGLOG("Checking whether the GameMapsSettings is compliant with SenseGlove, or not..."); + + UGameMapsSettings* GameMapsSettings{UGameMapsSettings::GetGameMapsSettings()}; + if (ensureAlwaysMsgf(GameMapsSettings, TEXT("Invalid GameMapsSettings!"))) + { + /************************************************************************************************************* + * GameInstanceClass + *************************************************************************************************************/ + + { + SGLOG("Validating if the GameInstanceClass is a SenseGlove GameInstance..."); + + bool bValidGameInstance = false; + const UClass* CurrentGameInstanceClass{GameMapsSettings->GameInstanceClass.TryLoadClass()}; + if (CurrentGameInstanceClass) + { + if (CurrentGameInstanceClass->IsChildOf(USGGameInstance::StaticClass())) + { + bValidGameInstance = true; + SGLOG("The GameInstanceClass is a SenseGlove GameInstance, or a subclass."); + } + else + { + SGLOG("The GameInstanceClass is not a SenseGlove GameInstance, or a subclass."); + } + } + else + { + SGLOG_ERROR("Failed to construct a valid GameInstance from the current settings!"); + } + + if (!bValidGameInstance) + { + SGLOG("Setting the SenseGlove GameInstance as the GameInstanceClass..."); + + static const FSoftClassPath GameInstanceClassPath{TEXT("/Script/SenseGlove.SGGameInstance")}; + GameMapsSettings->GameInstanceClass = GameInstanceClassPath; + + SGLOG("Successfully set the SenseGlove GameInstance as the GameInstanceClass!"); + } + } + + /************************************************************************************************************* + * DefaultGameMode + *************************************************************************************************************/ + + { + SGLOG("Validating if the DefaultGameMode is a SenseGlove GameMode..."); + + bool bValidDefaultGameMode = false; + const FSoftClassPath CurrentDefaultGameModeClassPath{GameMapsSettings->GetGlobalDefaultGameMode()}; + const UClass* CurrentDefaultGameMode{CurrentDefaultGameModeClassPath.TryLoadClass()}; + if (CurrentDefaultGameMode) + { + if (CurrentDefaultGameMode->IsChildOf(ASGGameModeBase::StaticClass())) + { + bValidDefaultGameMode = true; + SGLOG("The DefaultGameMode is a SenseGlove GameMode, or a subclass."); + } + else + { + SGLOG("The DefaultGameMode is not a SenseGlove GameMode, or a subclass."); + } + } + else + { + SGLOG_ERROR("Failed to construct a valid GameMode from the current settings!"); + } + + if (!bValidDefaultGameMode) + { + SGLOG("Setting the SenseGlove GameMode as the DefaultGameMode..."); + + static const FString DefaultGameMode{TEXT("/Script/SenseGlove.SGGameModeBase")}; + GameMapsSettings->SetGlobalDefaultGameMode(DefaultGameMode); + + SGLOG("Successfully set the SenseGlove GameMode as the DefaultGameMode!"); + } + } + + /************************************************************************************************************* + * + *************************************************************************************************************/ + } + else + { + SGLOG_ERROR("Failed to check whether the GameMapsSettings is compliant with SenseGlove, or not!"); + } + + SGLOG("Checking whether the GameUserSettingsClass is compliant with SenseGlove, or not..."); + + if (ensureAlwaysMsgf(GEngine, TEXT("Invalid GEngine!"))) + { + SGLOG("Validating if the GameUserSettingsClass is a SenseGlove GameUserSettings..."); + + bool bValidGameUserSettings = false; + const UClass* CurrentGameUserSettingsClass{GEngine->GameUserSettingsClassName.TryLoadClass()}; + if (CurrentGameUserSettingsClass) + { + if (CurrentGameUserSettingsClass->IsChildOf(USGGameUserSettings::StaticClass())) + { + bValidGameUserSettings = true; + SGLOG("The GameUserSettingsClass is a SenseGlove GameUserSettings, or a subclass."); + } + else + { + SGLOG("The GameUserSettingsClass is not a SenseGlove GameUserSettings, or a subclass."); + } + } + else + { + SGLOG_ERROR("Failed to construct a valid GameUserSettings from the current settings!"); + } + + if (!bValidGameUserSettings) + { + SGLOG("Setting the SenseGlove GameUserSettings as the GameUserSettingsClass..."); + + static const FSoftClassPath GameUserSettingsClassPath{TEXT("/Script/SenseGlove.SGGameUserSettings")}; + GEngine->GameUserSettingsClassName = GameUserSettingsClassPath; + GEngine->GameUserSettingsClass = USGGameUserSettings::StaticClass(); + GEngine->GameUserSettings = NewObject(); + GEngine->GetGameUserSettings()->LoadSettings(true); + + SGLOG("Successfully set the SenseGlove GameInstance as the GameInstanceClass!"); + } + } + else + { + SGLOG_ERROR("Failed to check whether the GameUserSettings is compliant with SenseGlove, or not!"); + } +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGloveModule.h b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGloveModule.h new file mode 100644 index 0000000..63c0e62 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Private/SenseGloveModule.h @@ -0,0 +1,54 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Delegates/IDelegateInstance.h" +#include "Modules/ModuleInterface.h" + +class FSenseGloveModule : public IModuleInterface +{ +private: + FDelegateHandle OnPostEngineInitHandle; + +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; + +private: + void OnPostEngineInit() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Animation/SGVirtualHandAnimInstance.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Animation/SGVirtualHandAnimInstance.h new file mode 100644 index 0000000..9438aa4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Animation/SGVirtualHandAnimInstance.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.h new file mode 100644 index 0000000..39afb44 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Animation/SGVirtualHandAnimInstanceProxy.h @@ -0,0 +1,134 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Containers/Array.h" +#include "HeadMountedDisplayTypes.h" +#include "Math/Quat.h" +#include "Math/Transform.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/UniquePtr.h" +#include "UObject/NameTypes.h" + +#include "SGVirtualHandAnimInstanceProxy.generated.h" + +class USkeletalMesh; +class USkeleton; +class USGVirtualHandComponent; + +USTRUCT() +struct SENSEGLOVE_API FSGVirtualHandAnimInstanceProxy : public FAnimInstanceProxy +{ + GENERATED_USTRUCT_BODY() + +private: + UPROPERTY(Transient) + USGVirtualHandComponent* VirtualHand; + + UPROPERTY(Transient) + USkeletalMesh* HandMeshAsset; + + UPROPERTY(Transient) + USkeleton* HandSkeleton; + + bool bVirtualHandVisible; + bool bMarkRenderStateDirty; + + FXRHandTrackingState HandTrackingState; + + TMap::SizeType, FName> BoneNamesMap; + + FTransform AnimationBoneCorrectionOffsetTransform; + bool bShouldAnimationApplyBoneLocation; + +public: + FSGVirtualHandAnimInstanceProxy(); + FSGVirtualHandAnimInstanceProxy(UAnimInstance* Instance); + +protected: + FORCEINLINE bool IsVirtualHandVisible() const + { + return bVirtualHandVisible; + } + + FORCEINLINE USGVirtualHandComponent* GetVirtualHand() const + { + return VirtualHand; + } + + FORCEINLINE USkeletalMesh* GetHandMeshAsset() const + { + return HandMeshAsset; + } + + FORCEINLINE USkeleton* GetHandSkeleton() const + { + return HandSkeleton; + } + + FORCEINLINE bool IsRenderStateDirty() const + { + return bMarkRenderStateDirty; + } + + FORCEINLINE const FXRHandTrackingState& GetHandTrackingState() const + { + return HandTrackingState; + } + + FORCEINLINE const TMap::SizeType, FName>& GetBoneNamesMap() const + { + return BoneNamesMap; + } + + FORCEINLINE const FTransform& GetAnimationBoneCorrectionOffsetTransform() const + { + return AnimationBoneCorrectionOffsetTransform; + } + + FORCEINLINE bool ShouldAnimationApplyBoneLocation() const + { + return bShouldAnimationApplyBoneLocation; + } + +protected: + virtual void PreEvaluateAnimation(UAnimInstance* InAnimInstance) override; + + virtual bool Evaluate(FPoseContext& Output) override; + + virtual void PostEvaluate(UAnimInstance* InAnimInstance) override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGGrabComponent.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGGrabComponent.h new file mode 100644 index 0000000..56ffeff --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGGrabComponent.h @@ -0,0 +1,205 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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, ClassGroup=(SenseGlove), 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")) + bool bAttachmentWeldSimulatedBodies; + + 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")) + bool bDetachmentCallModify; + + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bAffectPhysicsState; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr 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; + } + +public: + virtual void SimulatePhysics(bool bSimulatePhysics) const; + +public: + virtual void BeginPlay() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGHandTrackerComponent.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGHandTrackerComponent.h new file mode 100644 index 0000000..67a5d2b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGHandTrackerComponent.h @@ -0,0 +1,119 @@ +/** +* @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "Templates/UniquePtr.h" + +#include "SGSettings/SGVirtualHandSettings.h" + +#include "SGHandTrackerComponent.generated.h" + +class AActor; + +UCLASS(Blueprintable, BlueprintType, ClassGroup=(SenseGlove), meta=(BlueprintSpawnableComponent)) +class SENSEGLOVE_API USGHandTrackerComponent : public USceneComponent +{ + GENERATED_UCLASS_BODY() + +private: + /** + * Determines whether this component tracks the right or the left hand. + */ + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bRight; + + /** + * If enabled, visualizes the XR hand-tracking data using debug gizmos. + */ + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bVisualize; + + /** + * XR hand-tracking data will be visualized only if bVisualize is enabled. + */ + UPROPERTY(EditAnywhere, Category="SenseGlove", + meta=(AllowPrivateAccess="false", + EditCondition="bVisualize", EditConditionHides)) + FSGDebugGizmoSettings VisualizationSettings; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FORCEINLINE bool IsLeft() const + { + return !IsRight(); + } + + FORCEINLINE bool IsRight() const + { + return bRight; + } + + void SetRight(const bool bInRight); + + FORCEINLINE bool IsVisualized() const + { + return bVisualize; + } + + FORCEINLINE void SetVisualize(const bool bInVisualize) + { + bVisualize = bInVisualize; + } + +public: + virtual void InitializeComponent() override; + + virtual void BeginPlay() override; + + virtual void TickComponent(float DeltaTime, + enum ELevelTick TickType, + FActorComponentTickFunction* ThisTickFunction) override; + +public: + const FXRHandTrackingState& GetHandTrackingState() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGHapticsComponent.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGHapticsComponent.h new file mode 100644 index 0000000..9f5855c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGHapticsComponent.h @@ -0,0 +1,215 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +#include "SGHapticsComponent.generated.h" + +class AActor; + +class USGCustomWaveform; + +UCLASS(Blueprintable, BlueprintType, ClassGroup=(SenseGlove), meta=(BlueprintSpawnableComponent)) +class SENSEGLOVE_API USGHapticsComponent : public USceneComponent +{ + GENERATED_UCLASS_BODY() + +private: + /** + * Determines whether this component operates on the right or the left hand. + */ + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bRight; + + /** + * If enabled, forces all haptics to stop automatically on the UninitializeComponent or EndPlay events, or when the + * handedness changes. This is useful for situations where the simulation has ended, but ongoing haptic feedback + * might remain active on the glove indefinitely. By default, this setting is enabled. + */ + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bAutoStopAllHaptics; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FORCEINLINE bool IsLeft() const + { + return !IsRight(); + } + + FORCEINLINE bool IsRight() const + { + return bRight; + } + + void SetRight(const bool bInRight); + + FORCEINLINE bool AutoStopsAllHaptics() const + { + return bAutoStopAllHaptics; + } + + void SetAutoStopAllHaptics(const bool bInAutoStopAllHaptics) + { + bAutoStopAllHaptics = bInAutoStopAllHaptics; + } + +public: + virtual void UninitializeComponent() override; + + virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override; + +public: + /** + * Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when restarting the + * level. + */ + void StopHaptics(); + + /** + * Stops only vibrations. + */ + void StopVibrations(); + + /** + * Take all active commands in the device queue, compile them into one and send them to the device. + * + * @return Returns true if the message was successfully sent to SenseCom. + */ + bool SendHaptics(); + + /** + * Returns true if the haptic glove supports vibration feedback at the specified location. + * + * @param AtLocation + */ + bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const; + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param OutWaveform + * @param Location + */ + bool SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param Amplitude + * @param Duration + * @param Location + */ + bool SendCustomWaveform(float Amplitude, float Duration, ESGHapticLocation Location); + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param Amplitude + * @param Duration + * @param Frequency + * @param Location + */ + bool SendCustomWaveform(float Amplitude, float Duration, float Frequency, ESGHapticLocation Location); + + /** + * Queue a list of force-feedback levels, between 0.0f and 1.0f. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the Force-Feedback levels, from 0.0f (no FFB) to 1.0f. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + bool QueueForceFeedbackLevels(const TArray& Levels01); + + /** + * Set the Force-Feedback value of a particular finger to a specific level + * + * @param Level01 Value will be clamped between [0...1], where 0.0f means no Force-Feedback, and 1.0 means full + * force-feedback. + * @param Finger The finger to which to send the command. + */ + bool QueueForceFeedbackLevel(int32 Finger, float Level01); + + /** + * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the vibration levels, from 0.0 (no vibration) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + bool QueueVibroLevels(const TArray& Levels01); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + bool QueueVibroLevel(ESGHapticLocation Location, float Level01); + + /** + * Returns true if the chosen glove supports active contact feedback on the Wrist. + */ + bool SupportsWristSqueeze() const; + + /** + * Queue a command to set the amount of squeeze level (a.k.a. squeeze-feedback) to the desired level + * (0 = no squeeze, 1 = full squeeze) on the wrist, and optionally send it right away. + * + * @param SqueezeLevel01 + * @param bSendImmediate + */ + bool QueueWristSqueeze(float SqueezeLevel01, bool bSendImmediate); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGTouchComponent.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGTouchComponent.h new file mode 100644 index 0000000..ffdb887 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGTouchComponent.h @@ -0,0 +1,123 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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, ClassGroup=(SenseGlove), 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.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0")) + float ForceFeedbackLevel; + + UPROPERTY(EditAnywhere, Category="SenseGlove", + meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0")) + float VibrotactileAmplitude; + + UPROPERTY(EditAnywhere, Category="SenseGlove", + meta=(AllowPrivateAccess="false", ClampMin = "0.0", ClampMax = "1.0", UIMin = "0.0", UIMax = "1.0")) + float VibrotactileDuration; + + UPROPERTY(EditAnywhere, Category="SenseGlove", + meta=(AllowPrivateAccess="false", ClampMin = "10.0", ClampMax = "500.0", UIMin = "10.0", UIMax = "500.0")) + float VibrotactileFrequency; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FORCEINLINE float GetForceFeedbackLevel() const + { + return ForceFeedbackLevel; + } + + FORCEINLINE void SetForceFeedbackLevel(const float Level) + { + ForceFeedbackLevel = Level; + } + + FORCEINLINE float GetVibrotactileAmplitude() const + { + return VibrotactileAmplitude; + } + + FORCEINLINE void SetVibrotactileAmplitude(const float Amplitude) + { + VibrotactileAmplitude = Amplitude; + } + + FORCEINLINE float GetVibrotactileDuration() const + { + return VibrotactileDuration; + } + + FORCEINLINE void SetVibrotactileDuration(const float Duration) + { + VibrotactileDuration = Duration; + } + + FORCEINLINE float GetVibrotactileFrequency() const + { + return VibrotactileFrequency; + } + + FORCEINLINE void SetVibrotactileFrequency(const float Frequency) + { + VibrotactileFrequency = Frequency; + } +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGVirtualHandComponent.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGVirtualHandComponent.h new file mode 100644 index 0000000..93e5465 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGVirtualHandComponent.h @@ -0,0 +1,193 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "Math/Rotator.h" +#include "Math/Transform.h" +#include "Misc/AssertionMacros.h" +#include "ReferenceSkeleton.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/UniquePtr.h" +#include "UObject/NameTypes.h" + +#include "SGSettings/SGVirtualHandSettings.h" +#include "SGSettings/SGVirtualHandSettingsOverrides.h" + +#include "SGVirtualHandComponent.generated.h" + +class USphereComponent; +class USkeletalMesh; + +class USGHapticGlove; +class USGWristTrackerComponent; + +UCLASS(Config=Engine, Blueprintable, ClassGroup=(SenseGlove), hidecategories=(Object, "Mesh|SkeletalAsset"), + editinlinenew, meta=(BlueprintSpawnableComponent)) +class SENSEGLOVE_API USGVirtualHandComponent : public USkeletalMeshComponent +{ + GENERATED_UCLASS_BODY() + +public: + DECLARE_EVENT_OneParam(USGVirtualHandComponent, FHandVisibilityChangedEvent, bool bNewVisibiliy); + + FHandVisibilityChangedEvent& OnHandVisibilityChanged() + { + return HandVisibilityChangedEvent; + }; + +private: + FHandVisibilityChangedEvent HandVisibilityChangedEvent; + +public: + static const TArray& GetLeftHandBoneNames(); + static const TArray& GetRightHandBoneNames(); + + static const FName& GetLeftHandBoneName(int32 Joint); + static const FName& GetRightHandBoneName(int32 Joint); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bRight; + + /** + * Overrides the plugin's virtual hand settings. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", meta=(AllowPrivateAccess="false")) + FSGVirtualHandSettingsOverrides VirtualHandSettingsOverrides; + +private: + UPROPERTY(Transient) + USGWristTrackerComponent* WristTracker; + +protected: + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Components | Virtual Hand Component") + void OnHandVisibilityChanged(bool bNewVisibility); + +public: + FORCEINLINE bool IsLeft() const + { + return !IsRight(); + } + + FORCEINLINE bool IsRight() const + { + return bRight; + } + + void SetRight(const bool bInRight); + + FORCEINLINE bool OverridesPluginVirtualHandSettings() const + { + return VirtualHandSettingsOverrides.bOverridePluginSettings; + } + + FORCEINLINE const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides() const + { + return VirtualHandSettingsOverrides; + } + + void SetVirtualHandSettingsOverrides(const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides); + + FSGVirtualHandSettings GetVirtualHandSettings() const; + +public: + FORCEINLINE void SetWristTracker(USGWristTrackerComponent* InWristTracker) + { + WristTracker = InWristTracker; + } + +public: + virtual void SetAnimInstanceClass(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; + USGHapticGlove* GetConnectedGlove() const; + + const FXRHandTrackingState& GetHandTrackingState() const; + +public: + const TArray& GetHandBoneNames() const; + const FName& GetHandBoneName(int32 Joint) const; + + const FTransform& GetHandBoneRefTransform(const FName& BoneName) const; + const FTransform& GetHandBoneRefTransform(int32 Joint) const; + + const FTransform& GetHandRootBoneRefTransform() const; + + FRotator GetHandBoneRefRotation(const FName& BoneName) const; + FRotator GetHandBoneRefRotation(int32 Joint) const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGWristTrackerComponent.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGWristTrackerComponent.h new file mode 100644 index 0000000..713d9b9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Components/SGWristTrackerComponent.h @@ -0,0 +1,169 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" +#include "MotionControllerComponent.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/UniquePtr.h" + +#include "SGSettings/SGWristTrackingSettings.h" +#include "SGSettings/SGWristTrackingSettingsOverrides.h" + +#include "SGWristTrackerComponent.generated.h" + +UCLASS(Blueprintable, ClassGroup=(SenseGlove), 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 Pimpl; + FImplDeleter PimplDeleter; + +private: + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + bool bRight; + + /** + * Overrides the plugin's wrist tracking settings. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", meta=(AllowPrivateAccess="false")) + FSGWristTrackingSettingsOverrides WristTrackingSettingsOverrides; + +private: + UPROPERTY(Transient) + FVector WristLocation; + + UPROPERTY(Transient) + FRotator WristRotation; + +public: + FORCEINLINE bool IsLeft() const + { + return !IsRight(); + } + + FORCEINLINE bool IsRight() const + { + return bRight; + } + + void SetRight(const bool bInRight); + + FORCEINLINE bool OverridesPluginWristTrackingSettings() const + { + return WristTrackingSettingsOverrides.bOverridePluginSettings; + } + + FORCEINLINE const FSGWristTrackingSettingsOverrides& GetWristTrackingSettingsOverrides() const + { + return WristTrackingSettingsOverrides; + } + + void SetWristTrackingSettingsOverrides(const FSGWristTrackingSettingsOverrides& InWristTrackingSettingsOverrides); + + FSGWristTrackingSettings GetWristTrackingSettings() const; + + 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 BeginPlay() override; + + virtual void TickComponent(float DeltaTime, + enum ELevelTick TickType, + FActorComponentTickFunction* ThisTickFunction) override; + +protected: + virtual void EditorTick(float DeltaTime, + enum ELevelTick TickType, + FActorComponentTickFunction* ThisTickFunction); + +public: + const FXRHandTrackingState& GetHandTrackingState() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Engine/SGGameInstance.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Engine/SGGameInstance.h new file mode 100644 index 0000000..fde4966 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Engine/SGGameInstance.h @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Engine/GameInstance.h" + +#include "SGTypes/SGTypes.h" + +#include "SGGameInstance.generated.h" + +UCLASS(config=Game, Transient, BlueprintType, Blueprintable) +class SENSEGLOVE_API USGGameInstance : public UGameInstance +{ + GENERATED_UCLASS_BODY() + +public: + UFUNCTION(Exec, Category = "Console Command") + static void SG_GetEngineScalabilitySettings(); + + UFUNCTION(Exec, Category = "Console Command") + static void SG_SetEngineScalabilitySettings(ESGEngineScalabilitySettings Scalability); + +public: + virtual void Init() override; + virtual void Shutdown() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h new file mode 100644 index 0000000..c8d61b4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameModeBase.h @@ -0,0 +1,46 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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() +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameUserSettings.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameUserSettings.h new file mode 100644 index 0000000..6a035a1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGGameUserSettings.h @@ -0,0 +1,67 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/GameUserSettings.h" +#include "Templates/UniquePtr.h" + +#include "SGTypes/SGTypes.h" + +#include "SGGameUserSettings.generated.h" + +UCLASS(config=GameUserSettings, configdonotcheckdefaults, BlueprintType, Blueprintable) +class SENSEGLOVE_API USGGameUserSettings : public UGameUserSettings +{ + GENERATED_UCLASS_BODY() + +public: + static USGGameUserSettings* GetInstance(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + ESGEngineScalabilitySettings GetEngineScalabilitySettings() const; + void SetEngineScalabilitySettings(ESGEngineScalabilitySettings Scalability); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h new file mode 100644 index 0000000..6fe93db --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPawn.h @@ -0,0 +1,750 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "GameFramework/Pawn.h" +#include "Runtime/Launch/Resources/Version.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 UXRDeviceVisualizationComponent; + +class USGVirtualHandComponent; +class USGWristTrackerComponent; + +UCLASS(Config=Game, BlueprintType, Blueprintable) +class SENSEGLOVE_API ASGPawn : public APawn +{ + GENERATED_UCLASS_BODY() + +public: + DECLARE_EVENT_OneParam(ASGPawn, FGrabStateUpdatedEvent, const FSGGrabState& GrabState); + + FGrabStateUpdatedEvent& OnGrabStateUpdated() + { + return GrabStateUpdatedEvent; + }; + + DECLARE_EVENT_OneParam(ASGPawn, FTouchStateUpdatedEvent, const FSGTouchState& TouchState) + + FTouchStateUpdatedEvent& OnTouchStateUpdated() + { + return TouchStateUpdatedEvent; + }; + + DECLARE_EVENT_TwoParams(ASGPawn, FActorGrabbedEvent, const USGVirtualHandComponent* Hand, const AActor* Actor); + + FActorGrabbedEvent& OnGrabbed() + { + return ActorGrabbedEvent; + }; + + DECLARE_EVENT_TwoParams(ASGPawn, FActorReleasedEvent, const USGVirtualHandComponent* Hand, const AActor* Actor); + + FActorReleasedEvent& OnReleased() + { + return ActorReleasedEvent; + }; + + DECLARE_EVENT_TwoParams(ASGPawn, FActorBeginTouchEvent, const USGVirtualHandComponent* Hand, const AActor* Actor); + + FActorBeginTouchEvent& OnActorBeginTouch() + { + return ActorBeginTouchEvent; + }; + + DECLARE_EVENT_TwoParams(ASGPawn, FActorEndTouchEvent, const USGVirtualHandComponent* Hand, const AActor* Actor); + + FActorEndTouchEvent& OnActorEndTouch() + { + return ActorEndTouchEvent; + }; + +private: + FGrabStateUpdatedEvent GrabStateUpdatedEvent; + FTouchStateUpdatedEvent TouchStateUpdatedEvent; + FActorGrabbedEvent ActorGrabbedEvent; + FActorReleasedEvent ActorReleasedEvent; + FActorBeginTouchEvent ActorBeginTouchEvent; + FActorEndTouchEvent ActorEndTouchEvent; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr 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")) + UXRDeviceVisualizationComponent* ControllerVisualizerLeft; + + UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + USGVirtualHandComponent* HandLeft; + + UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + USGVirtualHandComponent* RealHandLeft; + + 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")) + UXRDeviceVisualizationComponent* ControllerVisualizerRight; + + UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + USGVirtualHandComponent* HandRight; + + UPROPERTY(VisibleAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + USGVirtualHandComponent* RealHandRight; + + 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; + + UPROPERTY(EditAnywhere, Category="SenseGlove", meta=(AllowPrivateAccess="false")) + int32 MaxNumberOfHandVelocitySamples; + +private: + UPROPERTY(Transient) + FSGGrabState LeftHandGrabState; + + UPROPERTY(Transient) + FSGTouchState LeftHandTouchState; + + UPROPERTY(Transient) + FSGGrabState RightHandGrabState; + + UPROPERTY(Transient) + FSGTouchState RightHandTouchState; + + UPROPERTY(Transient) + TArray LeftHandOverlappedActors; + + UPROPERTY(Transient) + TArray RightHandOverlappedActors; + +protected: + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn") + void OnGrabStateUpdated(const FSGGrabState& GrabState); + + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn") + void OnTouchStateUpdated(const FSGTouchState& TouchState); + + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn") + void OnActorGrabbed(const USGVirtualHandComponent* Hand, const AActor* Actor); + + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn") + void OnActorReleased(const USGVirtualHandComponent* Hand, const AActor* Actor); + + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn") + void OnActorBeginTouch(const USGVirtualHandComponent* Hand, const AActor* Actor); + + UFUNCTION(BlueprintNativeEvent, Category="SenseGlove | Game Framework | Pawn") + void OnActorEndTouch(const USGVirtualHandComponent* Hand, const AActor* Actor); + +public: + FORCEINLINE UCameraComponent* GetCamera() const + { + return Camera; + } + + FORCEINLINE USGWristTrackerComponent* GetWristTrackerLeft() const + { + return WristTrackerLeft; + } + + FORCEINLINE UXRDeviceVisualizationComponent* GetControllerVisualizerLeft() const + { + return ControllerVisualizerLeft; + } + + FORCEINLINE USGVirtualHandComponent* GetHandLeft() const + { + return HandLeft; + } + + FORCEINLINE USGVirtualHandComponent* GetRealHandLeft() const + { + return RealHandLeft; + } + + 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 UXRDeviceVisualizationComponent* GetControllerVisualizerRight() const + { + return ControllerVisualizerLeft; + } + + FORCEINLINE USGVirtualHandComponent* GetHandRight() const + { + return HandRight; + } + + FORCEINLINE USGVirtualHandComponent* GetRealHandRight() const + { + return RealHandRight; + } + + 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; + } + + FORCEINLINE int32 GetMaxNumberOfHandVelocitySamples() const + { + return MaxNumberOfHandVelocitySamples; + } + + FORCEINLINE void SetMaxNumberOfHandVelocitySamples(const int32 InMaxNumberOfHandVelocitySamples) + { + MaxNumberOfHandVelocitySamples = InMaxNumberOfHandVelocitySamples; + } + +public: + virtual void BeginPlay() override; + virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override; + virtual void Tick(float DeltaSeconds) override; + virtual void PreInitializeComponents() override; + virtual void PostInitializeComponents() override; + +protected: + UFUNCTION() + virtual void OnRealLeftHandOverlapBegins( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + int32 OtherBodyIndex, + bool bFromSweep, + const FHitResult& SweepResult); + + UFUNCTION() + virtual void OnRealLeftHandOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + int32 OtherBodyIndex); + + UFUNCTION() + virtual void OnRealRightHandOverlapBegins( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + int32 OtherBodyIndex, + bool bFromSweep, + const FHitResult& SweepResult); + + UFUNCTION() + virtual void OnRealRightHandOverlapEnds( + UPrimitiveComponent* OverlappedComponent, + AActor* OtherActor, + UPrimitiveComponent* OtherComp, + int32 OtherBodyIndex); + + 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 == HandRight ? CanRightHandGrab(Actor) : CanLeftHandGrab(Actor); + } + + FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand, const AActor* Actor) const + { + return Hand == HandRight ? IsRightHandGrabbing(Actor) : IsLeftHandGrabbing(Actor); + } + + bool IsGrabbing(const USGVirtualHandComponent* Hand, AActor*& OutActor) const; + + FORCEINLINE bool IsGrabbing(const USGVirtualHandComponent* Hand) const + { + return Hand == HandRight ? IsRightHandGrabbing() : IsLeftHandGrabbing(); + } + +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 == HandRight ? ReleaseRight() : ReleaseLeft(); + } +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h new file mode 100644 index 0000000..e5d585f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/GameFramework/SGPlayerController.h @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 Pimpl; + FImplDeleter PimplDeleter; + +protected: + virtual void BeginPlay() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h new file mode 100644 index 0000000..26b647c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Haptics/SGGrabState.h @@ -0,0 +1,86 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" +#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") + FVector PreviousHandLocation; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "SenseGlove") + TArray HandVelocityHistory; + + 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, + const FVector& InPreviousHandLocation, + const TArray& InHandVelocityHistory, + AActor* InActorThumbCanGrab, + AActor* InActorIndexCanGrab, + AActor* InActorMiddleCanGrab, + AActor* InGrabbedActor); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Haptics/SGTouchState.h b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Haptics/SGTouchState.h new file mode 100644 index 0000000..737cc09 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/Public/SenseGlove/Haptics/SGTouchState.h @@ -0,0 +1,79 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGlove/SenseGlove.Build.cs b/Plugins/SenseGlove/Source/SenseGlove/SenseGlove.Build.cs new file mode 100644 index 0000000..f28fb12 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGlove/SenseGlove.Build.cs @@ -0,0 +1,80 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "AnimGraphRuntime", + "Core", + "CoreUObject", + "Engine", + "EngineSettings", + "HeadMountedDisplay", + "InputCore", + "InputDevice", + "OpenXRHMD", + "XRBase", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveCore", + "SenseGloveDebug", + "SenseGloveLog", + "SenseGloveSettings", + "SenseGloveTracking", + "SenseGloveTypes", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGAndroidPermissions.cpp b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGAndroidPermissions.cpp new file mode 100644 index 0000000..7ef857f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGAndroidPermissions.cpp @@ -0,0 +1,190 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGAndroidPermissions.h" + +#include "AndroidPermissionCallbackProxy.h" +#include "AndroidPermissionFunctionLibrary.h" +#include "Engine/Engine.h" + +#include "SGLog/SGLog.h" + +struct USGAndroidPermissions::FImpl +{ + /************************ + * Member variables + ************************/ + + TFunction&, const TArray&)> PermissionsGrantedCallback; + + /************************ + * Owner object + ************************/ + + USGAndroidPermissions* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGAndroidPermissions* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGAndroidPermissions* USGAndroidPermissions::GetInstance() +{ + if (!ensureAlwaysMsgf(GEngine, TEXT("The engine has not been initialized!"))) + { + return nullptr; + } + + USGAndroidPermissions* Instance{GEngine->GetEngineSubsystem()}; + return Instance; +} + +USGAndroidPermissions::USGAndroidPermissions() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +void USGAndroidPermissions::Request( + const TFunction&, const TArray&)>& PermissionsGrantedCallback) +{ + TArray Permissions{ + "android.permission.ACCESS_BACKGROUND_LOCATION", + "android.permission.ACCESS_FINE_LOCATION", + "android.permission.BLUETOOTH", + "android.permission.BLUETOOTH_ADMIN", + "android.permission.BLUETOOTH_ADVERTISE", + "android.permission.BLUETOOTH_CONNECT", + "android.permission.BLUETOOTH_SCAN", + }; + + bool bHasAllRequiredPermissions = false; + for (const FString& Permission: Permissions) + { + const bool bHasPermission = UAndroidPermissionFunctionLibrary::CheckPermission(Permission); + bHasAllRequiredPermissions = bHasPermission; + if (!bHasAllRequiredPermissions) + { + break; + } + } + + if (!bHasAllRequiredPermissions) + { + Pimpl->PermissionsGrantedCallback = PermissionsGrantedCallback; + + UAndroidPermissionFunctionLibrary::AcquirePermissions( + MoveTemp(Permissions))->OnPermissionsGrantedDelegate.AddUObject( + this, &USGAndroidPermissions::OnPermissionsGranted); + } + else + { + TArray GrantedResults; + for (int32 i = 0; i < Permissions.Num(); ++i) + { + GrantedResults.Add(true); + } + PermissionsGrantedCallback(MoveTemp(Permissions), MoveTemp(GrantedResults)); + } +} + +void USGAndroidPermissions::OnPermissionsGranted(const TArray& Permissions, const TArray& GrantResults) +{ + if (!ensureAlwaysMsgf(Permissions.Num() == GrantResults.Num(), + TEXT("Mismatched number of Permissions and GrantedResults!"))) + { + return; + } + + for (int32 i = 0; i < Permissions.Num(); ++i) + { + if (GrantResults[i]) + { + SGLOG("Permission Granted", Permissions[i]); + } + else + { + SGLOG("Permission Denied", Permissions[i]); + } + } + + Pimpl->PermissionsGrantedCallback(Permissions, GrantResults); +} + +bool USGAndroidPermissions::ShouldCreateSubsystem(UObject* Outer) const +{ + return true; +} + +void USGAndroidPermissions::Initialize(FSubsystemCollectionBase& Collection) +{ + SGLOG("Initializing the SenseGlove Android permissions singleton with the engine lifetime..."); + + Super::Initialize(Collection); + + SGLOG("The SenseGlove Android permissions singleton has been successfully initialized with the engine lifetime!"); +} + +void USGAndroidPermissions::Deinitialize() +{ + SGLOG("De-initializing the SenseGlove Android permissions singleton due to the engine lifetime expiration..."); + + Super::Deinitialize(); + + (void) Pimpl.Release(); + + SGLOG("The SenseGlove Android permissions singleton has been successfully de-initialized!"); +} + +USGAndroidPermissions::FImpl::FImpl(USGAndroidPermissions* InOwner) + : Owner(InOwner) +{ +} + +USGAndroidPermissions::FImpl::~FImpl() = default; + +void USGAndroidPermissions::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp new file mode 100644 index 0000000..3e3c129 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGConnectJNI.cpp @@ -0,0 +1,128 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 */ + +#include "SGLog/SGLog.h" + +int32 FSGConnectJNI::Initialize() +{ + int32 Result = -1000; + +#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 -1001; + } + 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 -1002; + } + 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 -1003; + } + 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 -1004; + } + 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 -1005; + } + FSGIC_jmethodID InGetLibraryVersionMethodIDContainer{GetLibraryVersionMethodID}; + + FSGIC_FString ProjectSavedDirContainer{FPaths::ProjectSavedDir()}; + + Result = SGConnectImpl_Android_Initialize(&InEnvContainer, &InClassContainer, + &InInitMethodIDContainer, + &InDisposeMethodIDContainer, + &InGetLibraryVersionMethodIDContainer, + &ProjectSavedDirContainer); +#endif /* PLATFORM_ANDROID */ + + return Result; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGCoreJNI.cpp b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGCoreJNI.cpp new file mode 100644 index 0000000..997658f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SGAndroid/SGCoreJNI.cpp @@ -0,0 +1,140 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 = -1000; + +#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 -1001; + } + 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 -1002; + } + 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 -1003; + } + 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 -1004; + } + 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 -1005; + } + FSGIC_jmethodID InGetSensorStringMethodIDContainer{GetSensorStringMethodID}; + + SGLOG("FSGCoreJNI: attempting to find the Android JNI method 'WriteHaptics'..."); + + jmethodID WriteHapticsMethodID = Env->GetStaticMethodID(Class, "WriteHaptics", "(IILjava/lang/String;)I"); + FAndroidApplication::CheckJavaException(); + if (!WriteHapticsMethodID) + { + SGLOG_ERROR("FSGCoreJNI: failed to get the Android JNI method 'WriteHaptics'!"); + return -1006; + } + 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; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp new file mode 100644 index 0000000..5c44fdf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroid.cpp @@ -0,0 +1,41 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroid.h b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroid.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroid.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp new file mode 100644 index 0000000..df60612 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.cpp @@ -0,0 +1,95 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Misc/CoreDelegates.h" + +#include "SGAndroid/SGAndroidPermissions.h" +#include "SGAndroid/SGConnectJNI.h" +#include "SGAndroid/SGCoreJNI.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveAndroidModule" + +void FSenseGloveAndroidModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveAndroid module..."); + + OnPostEngineInitHandle = FCoreDelegates::OnPostEngineInit.AddRaw( + this, &FSenseGloveAndroidModule::OnPostEngineInit); +} + +void FSenseGloveAndroidModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveAndroid module..."); +} + +void FSenseGloveAndroidModule::PostLoadCallback() +{ + SGLOG("Loading the SenseGloveAndroid module has succeeded!"); +} + +void FSenseGloveAndroidModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveAndroid module..."); +} + +void FSenseGloveAndroidModule::OnPostEngineInit() const +{ +#if PLATFORM_ANDROID + USGAndroidPermissions::GetInstance()->Request( + [](const TArray& Permissions, const TArray& GrantResults) + { + const int32 R1 = FSGConnectJNI::Initialize(); + const int32 R2 = FSGCoreJNI::Initialize(); + + SGLOG("FSGConnectJNI::Initialize() return code", R1); + SGLOG("FSGCoreJNI::Initialize() return code", R2); + + 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 */ +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h new file mode 100644 index 0000000..0e3d38d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Private/SenseGloveAndroidModule.h @@ -0,0 +1,58 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Delegates/IDelegateInstance.h" +#include "Modules/ModuleInterface.h" + +#define LOCTEXT_NAMESPACE "SenseGloveAndroid" + +class FSenseGloveAndroidModule : public IModuleInterface +{ +private: + FDelegateHandle OnPostEngineInitHandle; + +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; + +private: + void OnPostEngineInit() const; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGAndroidPermissions.h b/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGAndroidPermissions.h new file mode 100644 index 0000000..59d4506 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGAndroidPermissions.h @@ -0,0 +1,82 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Subsystems/EngineSubsystem.h" +#include "Templates/Function.h" +#include "Templates/SharedPointer.h" +#include "UObject/ObjectMacros.h" + +#include "SGAndroidPermissions.generated.h" + +UCLASS() +class SENSEGLOVEANDROID_API USGAndroidPermissions : public UEngineSubsystem +{ + GENERATED_BODY() + +public: + static USGAndroidPermissions* GetInstance(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + USGAndroidPermissions(); + +public: + void Request( + const TFunction&, const TArray&)>& PermissionsGrantedCallback); + +private: + void OnPermissionsGranted( + const TArray& Permissions, const TArray& GrantResults); + +public: + virtual bool ShouldCreateSubsystem(UObject* Outer) const override; + + virtual void Initialize(FSubsystemCollectionBase& Collection) override; + virtual void Deinitialize() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h b/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h new file mode 100644 index 0000000..11b6143 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGConnectJNI.h @@ -0,0 +1,49 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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(); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGCoreJNI.h b/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGCoreJNI.h new file mode 100644 index 0000000..5a1c7b7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/Public/SGAndroid/SGCoreJNI.h @@ -0,0 +1,49 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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(); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs b/Plugins/SenseGlove/Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs new file mode 100644 index 0000000..2d9d59a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/SenseGloveAndroid.Build.cs @@ -0,0 +1,78 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "AndroidPermission", + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveConnectImpl", + "SenseGloveCoreImpl", + "SenseGloveLog", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveInterop", + } + ); + + if (Target.Platform == UnrealTargetPlatform.Android) + { + AdditionalPropertiesForReceipt.Add("AndroidPlugin", + Path.Combine(ModuleDirectory, "SenseGloveAndroid_UPL.xml")); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml b/Plugins/SenseGlove/Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml new file mode 100644 index 0000000..88621c6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveAndroid/SenseGloveAndroid_UPL.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + kapt.incremental.apt=true + + + + + + + + + + -dontwarn com.senseglove.** + -keep class com.senseglove.** { *; } + -keep interface com.senseglove.** { *; } + -keep public class com.senseglove.sgconnect.** { public protected *; } + + + + + + + + + + + + + + + + + + + + + + + + + + + ext { + android { + buildTypes { + release { + minifyEnabled false + } + } + } + } + + repositories { + mavenCentral() + } + + dependencies { + implementation files('libs/sgconnect.jar') + } + + + + + + + + + allprojects { + def mappings = [ + ] + beforeEvaluate { + } + } + + + + \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp new file mode 100644 index 0000000..37170cc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SGBackend/SGBackend.cpp @@ -0,0 +1,259 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGBackend/SGBackend.h" + +#include "Engine/Engine.h" +#include "Templates/Atomic.h" + +#if PLATFORM_ANDROID +#include "SGConnect/SGConnect.h" +#endif /* PLATFORM_ANDROID */ + +#include "SGCore/SGDeviceList.h" +#include "SGCore/SGHandLayer.h" +#include "SGLog/SGLog.h" + +struct USGBackend::FImpl +{ + /************************ + * Member variables + ************************/ + + TAtomic bInitialized; + + /************************ + * Owner object + ************************/ + + USGBackend* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGBackend* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = delete; + FImpl& operator=(const FImpl& Rhs) = delete; +}; + +USGBackend* USGBackend::GetInstance() +{ + if (!ensureAlwaysMsgf(GEngine, TEXT("The engine has not been initialized!"))) + { + return nullptr; + } + + USGBackend* Instance{GEngine->GetEngineSubsystem()}; + return Instance; +} + +USGBackend::USGBackend() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +bool USGBackend::IsBackendInitialized() const +{ + return Pimpl->bInitialized; +} + +bool USGBackend::InitializeBackend() +{ + if (!IsBackendInitialized()) + { +#if PLATFORM_ANDROID + const int32 Result = FSGConnect::Init(); + switch (Result) + { + case -103: + SGLOG_ERROR("Android JNI-specific Error: Invalid Java method ID!"); + return false; + case -102: + SGLOG_ERROR("Android JNI-specific Error: Invalid Java class!"); + return false; + case -101: + SGLOG_ERROR("Android JNI-specific Error: Invalid Java environment!"); + return false; + case -100: + SGLOG_ERROR("Android JNI-specific Error: Generic Error! Note: you should never see this!"); + return false; + 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: + SGLOG_ERROR("Device Scanning is already running within this program."); + return false; + 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(); + + Pimpl->bInitialized = true; + + return true; + } + + return false; +} + +bool USGBackend::UninitializeBackend() +{ + if (IsBackendInitialized()) + { + FSGDeviceList::Dispose(); + +#if PLATFORM_ANDROID + const int32 Result = FSGConnect::Dispose(); + switch (Result) + { + case -103: + SGLOG_ERROR("Android JNI-specific Error: Invalid Java method ID!"); + return false; + case -102: + SGLOG_ERROR("Android JNI-specific Error: Invalid Java class!"); + return false; + case -101: + SGLOG_ERROR("Android JNI-specific Error: Invalid Java environment!"); + return false; + case -100: + SGLOG_ERROR("Android JNI-specific Error: Generic Error! Note: you should never see this!"); + return false; + 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 */ + + Pimpl->bInitialized = false; + + return true; + } + + return false; +} + +bool USGBackend::ShouldCreateSubsystem(UObject* Outer) const +{ + return true; +} + +void USGBackend::Initialize(FSubsystemCollectionBase& Collection) +{ + SGLOG("Initializing the SenseGlove Backend singleton with the engine lifetime..."); + + Super::Initialize(Collection); + + SGLOG("Initializing the SenseGlove Backend singleton with the engine lifetime..."); + + if (InitializeBackend()) + { + SGLOG("The bridge to the SenseGlove Backend has been initialized successfully!") + } + else + { + SGLOG_ERROR("Failed to initialize the bridge to the SenseGlove Backend!") + } + + SGLOG("The SenseGlove Backend singleton has been successfully initialized with the engine lifetime!"); +} + +void USGBackend::Deinitialize() +{ + SGLOG("De-initializing the SenseGlove Backend singleton due to the engine lifetime expiration..."); + + Super::Deinitialize(); + + if (UninitializeBackend()) + { + SGLOG("The bridge to the SenseGlove Backend has been uninitialized successfully!") + } + else + { + SGLOG_ERROR("Failed to uninitialize the bridge to the SenseGlove Backend!") + } + + (void) Pimpl.Release(); + + SGLOG("The SenseGlove Backend singleton has been successfully de-initialized!"); +} + +USGBackend::FImpl::FImpl(USGBackend* InOwner) + : bInitialized(false), + Owner(InOwner) +{ +} + +USGBackend::FImpl::~FImpl() = default; + +void USGBackend::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackend.cpp b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackend.cpp new file mode 100644 index 0000000..65d88da --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackend.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBackend.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveBackendModule.h" + +IMPLEMENT_MODULE(FSenseGloveBackendModule, SenseGloveBackend) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackend.h b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackend.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackend.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackendModule.cpp b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackendModule.cpp new file mode 100644 index 0000000..da04478 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackendModule.cpp @@ -0,0 +1,63 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBackendModule.h" + +#include "SGLog/SGLog.h" +#include "SGBackend/SGBackend.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveBackendModule" + +void FSenseGloveBackendModule::StartupModule() +{ + SGLOG("Starting up SenseGloveBackend module..."); +} + +void FSenseGloveBackendModule::PreUnloadCallback() +{ + SGLOG("Unloading SenseGloveBackend module..."); +} + +void FSenseGloveBackendModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveBackend module has succeeded!"); +} + +void FSenseGloveBackendModule::ShutdownModule() +{ + SGLOG("Shutting down SenseGloveBackend module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackendModule.h b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackendModule.h new file mode 100644 index 0000000..c32d0f8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/Private/SenseGloveBackendModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBackend" + +class FSenseGloveBackendModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/Public/SGBackend/SGBackend.h b/Plugins/SenseGlove/Source/SenseGloveBackend/Public/SGBackend/SGBackend.h new file mode 100644 index 0000000..63fcefa --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/Public/SGBackend/SGBackend.h @@ -0,0 +1,80 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Color.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" +#include "Subsystems/EngineSubsystem.h" +#include "Templates/UniquePtr.h" +#include "UObject/ObjectMacros.h" + +#include "SGBackend.generated.h" + +UCLASS() +class SENSEGLOVEBACKEND_API USGBackend : public UEngineSubsystem +{ + GENERATED_BODY() + +public: + static USGBackend* GetInstance(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + USGBackend(); + +public: + bool IsBackendInitialized() const; + + bool InitializeBackend(); + bool UninitializeBackend(); + +public: + virtual bool ShouldCreateSubsystem(UObject* Outer) const override; + + virtual void Initialize(FSubsystemCollectionBase& Collection) override; + virtual void Deinitialize() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackend/SenseGloveBackend.Build.cs b/Plugins/SenseGlove/Source/SenseGloveBackend/SenseGloveBackend.Build.cs new file mode 100644 index 0000000..d6a4970 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackend/SenseGloveBackend.Build.cs @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveBackend : ModuleRules +{ + public SenseGloveBackend(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "InputCore", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveConnect", + "SenseGloveCore", + "SenseGloveLog", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SGBackendKismet/SGBackendKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SGBackendKismet/SGBackendKismetLibrary.cpp new file mode 100644 index 0000000..3704ada --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SGBackendKismet/SGBackendKismetLibrary.cpp @@ -0,0 +1,58 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGBackendKismet/SGBackendKismetLibrary.h" + +#include "SGBackend/SGBackend.h" + +USGBackend* USGBackendKismetLibrary::GetInstance() +{ + return USGBackend::GetInstance(); +} + +bool USGBackendKismetLibrary::IsBackendInitialized(const USGBackend* Backend) +{ + return Backend->IsBackendInitialized(); +} + +bool USGBackendKismetLibrary::InitializeBackend(USGBackend* Backend) +{ + return Backend->InitializeBackend(); +} + +bool USGBackendKismetLibrary::UninitializeBackend(USGBackend* Backend) +{ + return Backend->UninitializeBackend(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismet.cpp new file mode 100644 index 0000000..711bf39 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBackendKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveBackendKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveBackendKismetModule, SenseGloveBackendKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismet.h b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismet.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismetModule.cpp new file mode 100644 index 0000000..b35c113 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismetModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBackendKismetModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveBackendKismetModule" + +void FSenseGloveBackendKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveBackendKismet module..."); +} + +void FSenseGloveBackendKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveBackendKismet module..."); +} + +void FSenseGloveBackendKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveBackendKismet module has succeeded!"); +} + +void FSenseGloveBackendKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveBackendKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismetModule.h new file mode 100644 index 0000000..d1dc974 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Private/SenseGloveBackendKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBackendKismet" + +class FSenseGloveBackendKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Public/SGBackendKismet/SGBackendKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Public/SGBackendKismet/SGBackendKismetLibrary.h new file mode 100644 index 0000000..cf807a8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/Public/SGBackendKismet/SGBackendKismetLibrary.h @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGBackendKismetLibrary.generated.h" + +class USGBackend; + +UCLASS(meta=(ScriptName = "SenseGloveBackendKismetLibrary")) +class SENSEGLOVEBACKENDKISMET_API USGBackendKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Backend") + static USGBackend* GetInstance(); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Backend") + static bool IsBackendInitialized(const USGBackend* Backend); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Backend") + bool InitializeBackend(UPARAM(ref) USGBackend* Backend); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Backend") + bool UninitializeBackend(UPARAM(ref) USGBackend* Backend); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBackendKismet/SenseGloveBackendKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/SenseGloveBackendKismet.Build.cs new file mode 100644 index 0000000..09393c7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBackendKismet/SenseGloveBackendKismet.Build.cs @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveBackendKismet : ModuleRules +{ + public SenseGloveBackendKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveBackend", + "SenseGloveLog", + "SenseGloveKismet", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4263.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4263.cpp new file mode 100644 index 0000000..8a88f91 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4263.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4264.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4264.cpp new file mode 100644 index 0000000..330adc9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4264.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4706.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4706.cpp new file mode 100644 index 0000000..d09f0c3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4706.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4800.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4800.cpp new file mode 100644 index 0000000..f3da0ee --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGDisable_C4800.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Connect_Android.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Connect_Android.cpp new file mode 100644 index 0000000..8023405 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Connect_Android.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Connect_SGConnect.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Connect_SGConnect.cpp new file mode 100644 index 0000000..6a8b739 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Connect_SGConnect.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Anatomy.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Anatomy.cpp new file mode 100644 index 0000000..2c5221f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Anatomy.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Android.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Android.cpp new file mode 100644 index 0000000..fe2de45 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Android.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_BasicHandModel.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_BasicHandModel.cpp new file mode 100644 index 0000000..34cb7f0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_BasicHandModel.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_BetaDevice.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_BetaDevice.cpp new file mode 100644 index 0000000..b282f84 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_BetaDevice.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_CustomWaveform.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_CustomWaveform.cpp new file mode 100644 index 0000000..3fe2d73 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_CustomWaveform.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_CustomWaveform.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_DeviceList.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_DeviceList.cpp new file mode 100644 index 0000000..ae36f3c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_DeviceList.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_DeviceModel.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_DeviceModel.cpp new file mode 100644 index 0000000..f2bc54b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_DeviceModel.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Fingers.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Fingers.cpp new file mode 100644 index 0000000..9c4a84e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Fingers.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandInterpolator.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandInterpolator.cpp new file mode 100644 index 0000000..31c94ee --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandInterpolator.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandLayer.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandLayer.cpp new file mode 100644 index 0000000..fba9c91 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandLayer.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_HandLayer.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandPose.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandPose.cpp new file mode 100644 index 0000000..0c7182e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HandPose.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HapticChannelInfo.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HapticChannelInfo.cpp new file mode 100644 index 0000000..2eb35ab --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HapticChannelInfo.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_HapticChannelInfo.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HapticGlove.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HapticGlove.cpp new file mode 100644 index 0000000..f2f0bb0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_HapticGlove.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_InterpolationSet.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_InterpolationSet.cpp new file mode 100644 index 0000000..2eb09b5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_InterpolationSet.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_JointKinematics.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_JointKinematics.cpp new file mode 100644 index 0000000..0463bba --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_JointKinematics.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Library.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Library.cpp new file mode 100644 index 0000000..0eafdcc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Library.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NormalizationState.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NormalizationState.cpp new file mode 100644 index 0000000..7352146 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NormalizationState.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_NormalizationState.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Nova2Glove.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Nova2Glove.cpp new file mode 100644 index 0000000..984ec57 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Nova2Glove.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_Nova2Glove.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.cpp new file mode 100644 index 0000000..1f1742c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_Nova2GloveSensorData.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGlove.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGlove.cpp new file mode 100644 index 0000000..ff9ef06 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGlove.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveInfo.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveInfo.cpp new file mode 100644 index 0000000..63e3630 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveInfo.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveSensorData.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveSensorData.cpp new file mode 100644 index 0000000..203ad79 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveSensorData.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveVars.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveVars.cpp new file mode 100644 index 0000000..d09177a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_NovaGloveVars.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Quat.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Quat.cpp new file mode 100644 index 0000000..563f5cd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Quat.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SGDevice.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SGDevice.cpp new file mode 100644 index 0000000..6896df6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SGDevice.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseCom.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseCom.cpp new file mode 100644 index 0000000..101fdb2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseCom.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGlove.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGlove.cpp new file mode 100644 index 0000000..4d5f13c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGlove.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveInfo.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveInfo.cpp new file mode 100644 index 0000000..e3886a4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveInfo.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGlovePose.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGlovePose.cpp new file mode 100644 index 0000000..e5fa570 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGlovePose.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveSensorData.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveSensorData.cpp new file mode 100644 index 0000000..f2cbcae --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveSensorData.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.cpp new file mode 100644 index 0000000..184dbe8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_SenseGloveSensorNormalizer.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.cpp new file mode 100644 index 0000000..bcee462 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveVars.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveVars.cpp new file mode 100644 index 0000000..ed47f75 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SenseGloveVars.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SensorNormalization.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SensorNormalization.cpp new file mode 100644 index 0000000..bf9f2b0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_SensorNormalization.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_SensorNormalization.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_ThresholdCommand.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_ThresholdCommand.cpp new file mode 100644 index 0000000..9d91033 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_ThresholdCommand.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_ThresholdCommand.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Tracking.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Tracking.cpp new file mode 100644 index 0000000..3292eac --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Tracking.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Vect3D.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Vect3D.cpp new file mode 100644 index 0000000..0ebc601 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Core_Vect3D.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_Vect3D.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Windows.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Windows.cpp new file mode 100644 index 0000000..3cb3c29 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGInclude_Windows.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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_Windows.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGPlatform.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGPlatform.cpp new file mode 100644 index 0000000..54a3546 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGPlatform.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGPlatform.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4263.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4263.cpp new file mode 100644 index 0000000..733b282 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4263.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGRestore_C4263.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4264.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4264.cpp new file mode 100644 index 0000000..e58a9c1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4264.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGRestore_C4264.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4706.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4706.cpp new file mode 100644 index 0000000..7c46b70 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4706.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGRestore_C4706.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4800.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4800.cpp new file mode 100644 index 0000000..2348547 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_C4800.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGRestore_C4800.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_TEXT.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_TEXT.cpp new file mode 100644 index 0000000..d83316e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_TEXT.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_check.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_check.cpp new file mode 100644 index 0000000..b831046 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGRestore_check.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGRestore_check.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGUndef_TEXT.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGUndef_TEXT.cpp new file mode 100644 index 0000000..6c06aa2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGUndef_TEXT.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGUndef_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGUndef_check.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGUndef_check.cpp new file mode 100644 index 0000000..b348b91 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SGBuildHacks/SGUndef_check.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/SGUndef_check.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacks.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacks.cpp new file mode 100644 index 0000000..7445886 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacks.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBuildHacks.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveBuildHacksModule.h" + +IMPLEMENT_MODULE(FSenseGloveBuildHacksModule, SenseGloveBuildHacks) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacks.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacks.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacks.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacksModule.cpp b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacksModule.cpp new file mode 100644 index 0000000..6503576 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacksModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBuildHacksModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveBuildHacksModule" + +void FSenseGloveBuildHacksModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveBuildHacks module..."); +} + +void FSenseGloveBuildHacksModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveBuildHacks module..."); +} + +void FSenseGloveBuildHacksModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveBuildHacks module has succeeded!"); +} + +void FSenseGloveBuildHacksModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveBuildHacks module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacksModule.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacksModule.h new file mode 100644 index 0000000..d6cd433 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Private/SenseGloveBuildHacksModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveBuildHacks" + +class FSenseGloveBuildHacksModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4263.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4263.h new file mode 100644 index 0000000..83637bc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4263.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(disable: 4263) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4264.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4264.h new file mode 100644 index 0000000..4d9b661 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4264.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(disable: 4264) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4706.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4706.h new file mode 100644 index 0000000..d57ea0b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4706.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(disable: 4706) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4800.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4800.h new file mode 100644 index 0000000..c07ad4e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_C4800.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(disable: 4800) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_Woverloaded_virtual.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_Woverloaded_virtual.h new file mode 100644 index 0000000..6eff6d3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGDisable_Woverloaded_virtual.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#if ! PLATFORM_WINDOWS + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Woverloaded-virtual" + +#endif /* ! PLATFORM_WINDOWS */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Connect_Android.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Connect_Android.h new file mode 100644 index 0000000..f176b31 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Connect_Android.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Connect/Android.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Connect_SGConnect.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Connect_SGConnect.h new file mode 100644 index 0000000..33d3cf7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Connect_SGConnect.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Connect/SGConnect.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Anatomy.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Anatomy.h new file mode 100644 index 0000000..be18f61 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Anatomy.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Anatomy.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Android.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Android.h new file mode 100644 index 0000000..9f7ef53 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Android.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Android.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_BasicHandModel.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_BasicHandModel.h new file mode 100644 index 0000000..fa706bf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_BasicHandModel.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/BasicHandModel.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_BetaDevice.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_BetaDevice.h new file mode 100644 index 0000000..20aa4df --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_BetaDevice.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/BetaDevice.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_CustomWaveform.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_CustomWaveform.h new file mode 100644 index 0000000..68acf7a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_CustomWaveform.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/CustomWaveform.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_DeviceList.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_DeviceList.h new file mode 100644 index 0000000..83ffa0f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_DeviceList.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/DeviceList.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_DeviceModel.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_DeviceModel.h new file mode 100644 index 0000000..0ef2004 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_DeviceModel.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/DeviceModel.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Fingers.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Fingers.h new file mode 100644 index 0000000..8ee4c31 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Fingers.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Fingers.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandInterpolator.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandInterpolator.h new file mode 100644 index 0000000..2f5d16f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandInterpolator.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/HandInterpolator.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandLayer.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandLayer.h new file mode 100644 index 0000000..51b14b6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandLayer.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/HandLayer.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandPose.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandPose.h new file mode 100644 index 0000000..f2b68e5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HandPose.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/HandPose.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HapticChannelInfo.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HapticChannelInfo.h new file mode 100644 index 0000000..568d0d7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HapticChannelInfo.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/HapticChannelInfo.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HapticGlove.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HapticGlove.h new file mode 100644 index 0000000..b317fe0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_HapticGlove.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/HapticGlove.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_InterpolationSet.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_InterpolationSet.h new file mode 100644 index 0000000..cb2ea9c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_InterpolationSet.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/InterpolationSet.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_JointKinematics.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_JointKinematics.h new file mode 100644 index 0000000..236db4c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_JointKinematics.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/JointKinematics.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Library.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Library.h new file mode 100644 index 0000000..62be080 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Library.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Library.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NormalizationState.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NormalizationState.h new file mode 100644 index 0000000..327b290 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NormalizationState.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/NormalizationState.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Nova2Glove.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Nova2Glove.h new file mode 100644 index 0000000..cf48469 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Nova2Glove.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Nova2Glove.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h new file mode 100644 index 0000000..9625b8f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Nova2GloveSensorData.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGlove.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGlove.h new file mode 100644 index 0000000..90a0a71 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGlove.h @@ -0,0 +1,52 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +#include "SGBuildHacks/SGDisable_C4263.h" +#include "SGBuildHacks/SGDisable_C4264.h" +#include "SGBuildHacks/SGDisable_Woverloaded_virtual.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/NovaGlove.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_C4263.h" +#include "SGBuildHacks/SGRestore_C4264.h" +#include "SGBuildHacks/SGRestore_Woverloaded_virtual.h" + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveInfo.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveInfo.h new file mode 100644 index 0000000..d51c047 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveInfo.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/NovaGloveInfo.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h new file mode 100644 index 0000000..d2b6da2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/NovaGloveSensorData.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveVars.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveVars.h new file mode 100644 index 0000000..62b5bfd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_NovaGloveVars.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/NovaGloveVars.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Quat.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Quat.h new file mode 100644 index 0000000..782e179 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Quat.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Quat.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SGDevice.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SGDevice.h new file mode 100644 index 0000000..033fa42 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SGDevice.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SGDevice.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseCom.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseCom.h new file mode 100644 index 0000000..13bb71c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseCom.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseCom.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGlove.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGlove.h new file mode 100644 index 0000000..28bb950 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGlove.h @@ -0,0 +1,52 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +#include "SGBuildHacks/SGDisable_C4263.h" +#include "SGBuildHacks/SGDisable_C4264.h" +#include "SGBuildHacks/SGDisable_Woverloaded_virtual.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGlove.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_C4263.h" +#include "SGBuildHacks/SGRestore_C4264.h" +#include "SGBuildHacks/SGRestore_Woverloaded_virtual.h" + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveInfo.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveInfo.h new file mode 100644 index 0000000..83b8f02 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveInfo.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGloveInfo.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGlovePose.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGlovePose.h new file mode 100644 index 0000000..c8f7a03 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGlovePose.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGlovePose.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveSensorData.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveSensorData.h new file mode 100644 index 0000000..97c489e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveSensorData.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGloveSensorData.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.h new file mode 100644 index 0000000..efed8b4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGloveSensorNormalizer.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.h new file mode 100644 index 0000000..194cdc2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGloveThumperCommand.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveVars.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveVars.h new file mode 100644 index 0000000..b13785f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SenseGloveVars.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SenseGloveVars.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SensorNormalization.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SensorNormalization.h new file mode 100644 index 0000000..c1a05d1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_SensorNormalization.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/SensorNormalization.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_ThresholdCommand.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_ThresholdCommand.h new file mode 100644 index 0000000..a5f9987 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_ThresholdCommand.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/ThresholdCommand.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Tracking.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Tracking.h new file mode 100644 index 0000000..9ef7e0a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Tracking.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Tracking.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Vect3D.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Vect3D.h new file mode 100644 index 0000000..c5f2b25 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Core_Vect3D.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGBuildHacks/SGUndef_TEXT.h" + +THIRD_PARTY_INCLUDES_START +#include "SenseGlove/Core/Vect3D.hpp" +THIRD_PARTY_INCLUDES_END + +#include "SGBuildHacks/SGRestore_TEXT.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Windows.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Windows.h new file mode 100644 index 0000000..3bc3ccb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGInclude_Windows.h @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#if PLATFORM_WINDOWS + +#include + +THIRD_PARTY_INCLUDES_START + +#include +#include +#include + +THIRD_PARTY_INCLUDES_END + +#undef CopyFile +#undef CreateDirectory +#undef DeleteFile +#undef DrawText +#undef GetObject +#undef InterlockedAdd +#undef InterlockedDecrement +#undef InterlockedExchange +#undef InterlockedIncrement +#undef MoveFile +#undef TEXT +#undef UpdateResource + +#include + +#endif /* PLATFORM_WINDOWS */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGPlatform.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGPlatform.h new file mode 100644 index 0000000..5d04183 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGPlatform.h @@ -0,0 +1,60 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + +#if ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L ) +#define SG_CPP17 1 +#else /* ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L ) */ +#define SG_CPP17 0 +#endif /* ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 201703L ) || __cplusplus >= 201703L ) */ + +#if ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 202002L ) || __cplusplus >= 202002L ) +#define SG_CPP20 1 +#else /* ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 202002L ) || __cplusplus >= 202002L ) */ +#define SG_CPP20 0 +#endif /* ( ( defined( _MSVC_LANG ) && _MSVC_LANG >= 202002L ) || __cplusplus >= 202002L ) */ + +#if SG_CPP17 || SG_CPP20 +#define SG_NOEXCEPT noexcept +#else /* SG_CPP17 || SG_CPP20 */ +#define SG_NOEXCEPT +#endif /* SG_CPP17 || SG_CPP20 */ + +#if SG_CPP20 +#define SG_CAPTURE_THIS , this +#else /* SG_CPP17 || SG_CPP20 */ +#define SG_CAPTURE_THIS +#endif /* SG_CPP17 || SG_CPP20 */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4263.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4263.h new file mode 100644 index 0000000..4280249 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4263.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(default: 4263) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4264.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4264.h new file mode 100644 index 0000000..bca11f6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4264.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(default: 4264) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4706.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4706.h new file mode 100644 index 0000000..22b7cdb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4706.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(default: 4706) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4800.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4800.h new file mode 100644 index 0000000..5168120 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_C4800.h @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 warning(default: 4800) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_TEXT.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_TEXT.h new file mode 100644 index 0000000..be50411 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_TEXT.h @@ -0,0 +1,39 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * + */ + + +#ifdef SENSEGLOVEBUILDHACKS_RESTORE_TEXT +#pragma pop_macro("TEXT") +#undef SENSEGLOVEBUILDHACKS_RESTORE_TEXT +#endif /* SENSEGLOVEBUILDHACKS_RESTORE_TEXT */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_Woverloaded_virtual.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_Woverloaded_virtual.h new file mode 100644 index 0000000..bfbd7b1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_Woverloaded_virtual.h @@ -0,0 +1,42 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#if ! PLATFORM_WINDOWS + +#pragma clang diagnostic pop + +#endif /* ! PLATFORM_WINDOWS */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_check.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_check.h new file mode 100644 index 0000000..97253ef --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGRestore_check.h @@ -0,0 +1,39 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * + */ + + +#ifdef SENSEGLOVEBUILDHACKS_RESTORE_check +#pragma pop_macro("check") +#undef SENSEGLOVEBUILDHACKS_RESTORE_check +#endif /* SENSEGLOVEBUILDHACKS_RESTORE_check */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGUndef_TEXT.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGUndef_TEXT.h new file mode 100644 index 0000000..b3ea3fe --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGUndef_TEXT.h @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * + */ + + +#ifdef TEXT +#pragma push_macro("TEXT") +#undef TEXT +#define SENSEGLOVEBUILDHACKS_RESTORE_TEXT +#endif /* TEXT */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGUndef_check.h b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGUndef_check.h new file mode 100644 index 0000000..d4e729d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/Public/SGBuildHacks/SGUndef_check.h @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * + */ + + +#ifdef check +#pragma push_macro("check") +#undef check +#define SENSEGLOVEBUILDHACKS_RESTORE_check +#endif /* check */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveBuildHacks/SenseGloveBuildHacks.Build.cs b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/SenseGloveBuildHacks.Build.cs new file mode 100644 index 0000000..6265ba7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveBuildHacks/SenseGloveBuildHacks.Build.cs @@ -0,0 +1,72 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveBuildHacks : ModuleRules +{ + public SenseGloveBuildHacks(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + bEnableExceptions = true; + bUseRTTI = true; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PublicDependencyModuleNames.AddRange( + new string[] + { + "SGConnectThirdPartyHeaders", + "SGCoreThirdPartyHeaders", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp new file mode 100644 index 0000000..d38c2e4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SGConnect/SGConnect.cpp @@ -0,0 +1,56 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGConnect/SGConnect.h" + +#include "SGConnectImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_FString.h" + +int32 FSGConnect::Init() +{ + return SGConnect_Init(); +} + +int32 FSGConnect::Dispose() +{ + return SGConnect_Dispose(); +} + +FString FSGConnect::GetLibraryVersion() +{ + FSGIC_FString Container; + SGConnect_GetLibraryVersion(&Container); + return Container.String; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnect.cpp b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnect.cpp new file mode 100644 index 0000000..da75815 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnect.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnect.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveConnectModule.h" + +IMPLEMENT_MODULE(FSenseGloveConnectModule, SenseGloveConnect) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnect.h b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnect.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnect.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnectModule.cpp b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnectModule.cpp new file mode 100644 index 0000000..3db07cf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnectModule.cpp @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectModule.h" +#include "Containers/UnrealString.h" +#include "SGConnect/SGConnect.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveConnectModule" + +void FSenseGloveConnectModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveConnect module..."); + SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"), + *FSGConnect::GetLibraryVersion())); +} + +void FSenseGloveConnectModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveConnect module..."); +} + +void FSenseGloveConnectModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveConnect module has succeeded!"); +} + +void FSenseGloveConnectModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveConnect module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnectModule.h b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnectModule.h new file mode 100644 index 0000000..1bb278f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/Private/SenseGloveConnectModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnect" + +class FSenseGloveConnectModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h b/Plugins/SenseGlove/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h new file mode 100644 index 0000000..1bbd5aa --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/Public/SGConnect/SGConnect.h @@ -0,0 +1,77 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGConnect.generated.h" + +USTRUCT() +struct SENSEGLOVECONNECT_API FSGConnect +{ + GENERATED_BODY() + +public: + /** + * Begin Scanning for Sense Glove Devices and set up communications with them. + * + * @return + * -3 : An Unexpected error occured. Please try again. + * -2 : Device Scanning is already running within a different program. + * -1 : Device Scanning already being initialized (function called twice in short succession). + * 0 : Device Scanning is already running within this program. + * 1 : Successfully started up DeviceScanning from the current program. + */ + static int32 Init(); + + /** + * Dispose of unmanaged resources and finalize Sense Glove devices. + * + * @return + * -3 : An Unexpected error occured. Please try again. + * -2 : Not allowed to dispose of Device Scanning because this is not the program which started it. + * -1 : Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession). + * 0 : There is no deviceScanner running from any program, so disposing is skipped. + * 1 : Successfully disposed of DeviceScanner resources. + * @remark If the Dispose function returns 1, the resources were neatly disposed of. Only a value of -3 is cause for concern. + */ + static int32 Dispose(); + + /** + * Check which version of SGConnect you are using. + */ + static FString GetLibraryVersion(); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveConnect/SenseGloveConnect.Build.cs b/Plugins/SenseGlove/Source/SenseGloveConnect/SenseGloveConnect.Build.cs new file mode 100644 index 0000000..d5fb6bd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnect/SenseGloveConnect.Build.cs @@ -0,0 +1,80 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveConnect : ModuleRules +{ + public SenseGloveConnect(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveConnectImpl", + "SenseGloveLog", + "SenseGloveTypes", + } + ); + + if (Target.Platform == UnrealTargetPlatform.Android) + { + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveAndroid", + } + ); + } + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveInterop", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp new file mode 100644 index 0000000..adc14dd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGConnectImpl.cpp @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGConnectImpl/SGConnectImpl.h" + +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Connect_SGConnect.h" + +int32 FSGConnectImpl::Init() +{ + return SGConnect::Init(); +} + +int32 FSGConnectImpl::Dispose() +{ + return SGConnect::Dispose(); +} + +FString FSGConnectImpl::GetLibraryVersion() +{ + std::string Version; + SGConnect::GetLibraryVersion(&Version); + return UTF8_TO_TCHAR(Version.c_str()); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGExportedFunctions.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGExportedFunctions.cpp new file mode 100644 index 0000000..ff8c427 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SGConnectImpl/SGExportedFunctions.cpp @@ -0,0 +1,94 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGConnectImpl/SGExportedFunctions.h" + +#include "Containers/StringConv.h" +#include "Templates/UnrealTemplate.h" + +#if PLATFORM_ANDROID +#include "SGBuildHacks/SGInclude_Connect_Android.h" +#endif /* PLATFORM_ANDROID */ + +#include "SGConnectImpl/SGConnectImpl.h" +#include "SGInterop/SGIC_FString.h" + +#if PLATFORM_ANDROID +#include "SGInterop/SGIC_jclass.h" +#include "SGInterop/SGIC_jmethodID.h" +#include "SGInterop/SGIC_JNIEnv_Ptr.h" +#endif /* PLATFORM_ANDROID */ + +/******************************************************************************* + * Exceptional function calls + ******************************************************************************/ + +#if PLATFORM_ANDROID +int32 SGConnectImpl_Android_Initialize( + void* InEnv, + void* InClass, + void* InInitMethodID, + void* InDisposeMethodID, + void* InGetLibraryVersionMethodID, + void* StoragePath) +{ + return SGConnect::Android::Initialize( + StaticCast(InEnv)->Ptr, + StaticCast(InClass)->Class, + StaticCast(InInitMethodID)->MethodID, + StaticCast(InDisposeMethodID)->MethodID, + StaticCast(InGetLibraryVersionMethodID)->MethodID, + std::string{TCHAR_TO_UTF8(*StaticCast(StoragePath)->String)}); +} +#endif /* PLATFORM_ANDROID */ + +/******************************************************************************* + * SGConnectImpl.h + ******************************************************************************/ + +int32 SGConnect_Init() +{ + return FSGConnectImpl::Init(); +} + +int32 SGConnect_Dispose() +{ + return FSGConnectImpl::Dispose(); +} + +void SGConnect_GetLibraryVersion(void* OutVersion) +{ + StaticCast(OutVersion)->String = FSGConnectImpl::GetLibraryVersion(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImpl.cpp new file mode 100644 index 0000000..c8dffbe --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImpl.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectImpl.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveConnectImplModule.h" + +IMPLEMENT_MODULE(FSenseGloveConnectImplModule, SenseGloveConnectImpl) diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImpl.h b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImpl.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImpl.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImplModule.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImplModule.cpp new file mode 100644 index 0000000..9a05858 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImplModule.cpp @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectImplModule.h" +#include "Containers/UnrealString.h" +#include "SGConnectImpl/SGConnectImpl.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveConnectImplModule" + +void FSenseGloveConnectImplModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveConnectImpl module..."); + SGLOG(FString::Printf(TEXT("The low-level implementation of '%s' has been loaded successfully!"), *FSGConnectImpl:: + GetLibraryVersion())); +} + +void FSenseGloveConnectImplModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveConnectImpl module..."); +} + +void FSenseGloveConnectImplModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveConnectImpl module has succeeded!"); +} + +void FSenseGloveConnectImplModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveConnectImpl module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImplModule.h b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImplModule.h new file mode 100644 index 0000000..a065f74 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Private/SenseGloveConnectImplModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectImpl" + +class FSenseGloveConnectImplModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Public/SGConnectImpl/SGConnectImpl.h b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Public/SGConnectImpl/SGConnectImpl.h new file mode 100644 index 0000000..06e8ba7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Public/SGConnectImpl/SGConnectImpl.h @@ -0,0 +1,72 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +class SENSEGLOVECONNECTIMPL_API FSGConnectImpl +{ +public: + /** + * Begin Scanning for Sense Glove Devices and set up communications with them. + * + * @return + * -3 : An Unexpected error occured. Please try again. + * -2 : Device Scanning is already running within a different program. + * -1 : Device Scanning already being initialized (function called twice in short succession). + * 0 : Device Scanning is already running within this program. + * 1 : Successfully started up DeviceScanning from the current program. + */ + static int32 Init(); + + /** + * Dispose of unmanaged resources and finalize Sense Glove devices. + * + * @return + * -3 : An Unexpected error occured. Please try again. + * -2 : Not allowed to dispose of Device Scanning because this is not the program which started it. + * -1 : Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession). + * 0 : There is no deviceScanner running from any program, so disposing is skipped. + * 1 : Successfully disposed of DeviceScanner resources. + * @remark If the Dispose function returns 1, the resources were neatly disposed of. Only a value of -3 is cause for concern. + */ + static int32 Dispose(); + + /** + * Check which version of SGConnect you are using. + */ + static FString GetLibraryVersion(); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Public/SGConnectImpl/SGExportedFunctions.h b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Public/SGConnectImpl/SGExportedFunctions.h new file mode 100644 index 0000000..7783f31 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/Public/SGConnectImpl/SGExportedFunctions.h @@ -0,0 +1,92 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + +/* Defines a C++ like static_assert. */ +#if ! __cplusplus +#include +#endif /* ! __cplusplus */ + +/* Contains __bool_true_false_are_defined macro that can be used in order to + check whether boolean type is supported by the compiler or not. */ +#include + +#include "CoreTypes.h" + +/* Check at compile time whether the C compiler has support for bool, true, + and false macros. */ +static_assert(__bool_true_false_are_defined, "Error: bool, true, and false are not defined!"); + +#if defined ( SENSEGLOVE_BUILDING_CONNECT_IMPL_MODULE ) +#define SENSEGLOVECONNECTIMPL_PUBLIC_API DLLEXPORT +#else +#define SENSEGLOVECONNECTIMPL_PUBLIC_API DLLIMPORT +#endif /* defined ( SENSEGLOVE_BUILDING_CONNECT_IMPL_MODULE ) */ + +/* If C++ is used, switch to C mode in order to prevent the C++ name mangling of + method names. */ +#if __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/******************************************************************************* + * Exceptional function calls + ******************************************************************************/ + +#if PLATFORM_ANDROID +SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnectImpl_Android_Initialize( + void* InEnv, + void* InClass, + void* InInitMethodID, + void* InDisposeMethodID, + void* InGetLibraryVersionMethodID, + void* StoragePath); +#endif /* PLATFORM_ANDROID */ + +/******************************************************************************* + * SGConnectImpl.h + ******************************************************************************/ + +SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnect_Init(); +SENSEGLOVECONNECTIMPL_PUBLIC_API int32 SGConnect_Dispose(); +SENSEGLOVECONNECTIMPL_PUBLIC_API void SGConnect_GetLibraryVersion(void* OutVersion); + +/******************************************************************************* + ******************************************************************************/ + +#if __cplusplus +} +#endif /* __cplusplus */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs new file mode 100644 index 0000000..6eff591 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectImpl/SenseGloveConnectImpl.Build.cs @@ -0,0 +1,91 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveConnectImpl : ModuleRules +{ + public SenseGloveConnectImpl(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + bEnableExceptions = false; + bUseRTTI = false; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SGBleThirdPartyLibs", + "SGCommonThirdPartyLibs", + "SGConnectShmThirdPartyLibs", + "SGConnectThirdPartyLibs", + "SGSerialThirdPartyLibs", + "SGFmtThirdPartyLibs", + "SGLoguruThirdPartyLibs", + "SGWjwwoodSerialThirdPartyLibs", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveUtils", + "SenseGloveTypes", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + "SenseGloveInterop", + } + ); + + PublicDefinitions.Add("SENSEGLOVE_BUILDING_CONNECT_IMPL_MODULE"); + PublicDefinitions.Add("SENSEGLOVE_UNREAL_ENGINE_PLUGIN"); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SGConnectKismet/SGConnectKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SGConnectKismet/SGConnectKismetLibrary.cpp new file mode 100644 index 0000000..6810b21 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SGConnectKismet/SGConnectKismetLibrary.cpp @@ -0,0 +1,53 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGConnectKismet/SGConnectKismetLibrary.h" + +#include "SGConnect/SGConnect.h" + +int32 USGConnectKismetLibrary::Init() +{ + return FSGConnect::Init(); +} + +int32 USGConnectKismetLibrary::Dispose() +{ + return FSGConnect::Dispose(); +} + +FString USGConnectKismetLibrary::GetLibraryVersion() +{ + return FSGConnect::GetLibraryVersion(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismet.cpp new file mode 100644 index 0000000..1edb8b3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveConnectKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveConnectKismetModule, SenseGloveConnectKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismet.h b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismet.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismetModule.cpp new file mode 100644 index 0000000..7090b21 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismetModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectKismetModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveConnectKismetModule" + +void FSenseGloveConnectKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveConnectKismet module..."); +} + +void FSenseGloveConnectKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveConnectKismet module..."); +} + +void FSenseGloveConnectKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveConnectKismet module has succeeded!"); +} + +void FSenseGloveConnectKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveConnectKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismetModule.h new file mode 100644 index 0000000..7ecc214 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Private/SenseGloveConnectKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveConnectKismet" + +class FSenseGloveConnectKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Public/SGConnectKismet/SGConnectKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Public/SGConnectKismet/SGConnectKismetLibrary.h new file mode 100644 index 0000000..0ffce20 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/Public/SGConnectKismet/SGConnectKismetLibrary.h @@ -0,0 +1,84 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGConnectKismetLibrary.generated.h" + +UCLASS(meta=(ScriptName = "SenseGloveConnectKismetLibrary")) +class SENSEGLOVECONNECTKISMET_API USGConnectKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: +public: + /** + * Begin Scanning for Sense Glove Devices and set up communications with them. + * + * @return + * -3 : An Unexpected error occured. Please try again. + * -2 : Device Scanning is already running within a different program. + * -1 : Device Scanning already being initialized (function called twice in short succession). + * 0 : Device Scanning is already running in within this program. + * 1 : Successfully started up DeviceScanning from the current program. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect") + static int32 Init(); + + /** + * Dispose of unmanaged resources and finalize Sense Glove devices. + * + * @return + * -3 : An Unexpected error occured. Please try again. + * -2 : Not allowed to dispose of Device Scanning because this is not the program which started it. + * -1 : Device Scanning is currently being disposed off. This takes a second or two. (function called twice in short succession). + * 0 : There is no deviceScanner running from any program, so disposing is skipped. + * 1 : Successfully disposed of DeviceScanner resources. + * @remark If the Dispose function returns 1, the resources were neatly disposed of. Only a value of -3 is cause for concern. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect") + static int32 Dispose(); + + /** + * Check which version of SGConnect you are using. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Connect") + static FString GetLibraryVersion(); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveConnectKismet/SenseGloveConnectKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/SenseGloveConnectKismet.Build.cs new file mode 100644 index 0000000..4ee28e4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveConnectKismet/SenseGloveConnectKismet.Build.cs @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveConnectKismet : ModuleRules +{ + public SenseGloveConnectKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveConnect", + "SenseGloveKismet", + "SenseGloveLog", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGAnatomy.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGAnatomy.cpp new file mode 100644 index 0000000..bc02ec4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGAnatomy.cpp @@ -0,0 +1,113 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGAnatomy.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" + +float FSGAnatomy::GetTotalFingerFlexion() +{ + return SGCoreImpl_FSGAnatomyImpl_GetTotalFingerFlexion(); +} + +float FSGAnatomy::GetTotalFingerExtension() +{ + return SGCoreImpl_FSGAnatomyImpl_GetTotalFingerExtension(); +} + +float FSGAnatomy::GetTotalThumbFlexion() +{ + return SGCoreImpl_FSGAnatomyImpl_GetTotalThumbFlexion(); +} + +float FSGAnatomy::GetTotalThumbExtension() +{ + return SGCoreImpl_FSGAnatomyImpl_GetTotalThumbExtension(); +} + +float FSGAnatomy::GetFingerJointLimit(const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax) +{ + return SGCoreImpl_FSGAnatomyImpl_GetFingerJointLimit(bRightHanded, Joint, Movement, bMax); +} + +float FSGAnatomy::GetThumbJointLimit(const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax) +{ + return SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit(bRightHanded, Joint, Movement, bMax); +} + +float FSGAnatomy::ClampJointAngle( + const float Value, const int32 Finger, const bool bRightHand, const int32 Joint, const int32 Movement) +{ + return SGCoreImpl_FSGAnatomyImpl_ClampJointAngle(Value, Finger, bRightHand, Joint, Movement); +} + +float FSGAnatomy::NormalizeFingerFlexion(const float FlexionInDegrees) +{ + return SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion(FlexionInDegrees); +} + +float FSGAnatomy::NormalizeThumbFlexion(const float FlexionInDegrees) +{ + return SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlexion(FlexionInDegrees); +} + +TArray> FSGAnatomy::GetDefaultHandAngles(const bool bRightHanded) +{ + FSGIC_TArray_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles(&OutAnglesContainer, bRightHanded); + return OutAnglesContainer.Array; +} + +TArray> FSGAnatomy::GetFlatHandAngles(const bool bRightHanded) +{ + FSGIC_TArray_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles(&OutAnglesContainer, bRightHanded); + return OutAnglesContainer.Array; +} + +TArray> FSGAnatomy::GetThumbsUpHandAngles(const bool bRightHanded) +{ + FSGIC_TArray_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles(&OutAnglesContainer, bRightHanded); + return OutAnglesContainer.Array; +} + +TArray> FSGAnatomy::GetFistHandAngles(const bool bRightHanded) +{ + FSGIC_TArray_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles(&OutAnglesContainer, bRightHanded); + return OutAnglesContainer.Array; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGBasicHandModel.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGBasicHandModel.cpp new file mode 100644 index 0000000..1312d4b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGBasicHandModel.cpp @@ -0,0 +1,568 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGBasicHandModel.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_float.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGBasicHandModel::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGBasicHandModelImpl BasicHandModelImpl; + + /************************ + * Owner object + ************************/ + + USGBasicHandModel* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGBasicHandModel* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const FSGBasicHandModelImpl& BasicHandModelImpl) +{ + USGBasicHandModel* Instance = NewObject(Outer); + Instance->SetBasicHandModelImpl(BasicHandModelImpl); + return Instance; +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + SGCoreImpl_FSGBasicHandModelImpl_ctor(&OutBasicHandModelImplContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded, + const TArray>& Lengths, + const TArray& StartPositions) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{Lengths}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, &StartPositionsContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded, + const TArray& Lengths, + const TArray& StartPositions) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{ + FSGArrayUtils::FromNestedBPArray(Lengths) + }; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, &StartPositionsContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded, + const TArray>& Lengths, + const TArray& StartPositions, + const TArray& StartRotations) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{Lengths}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded, + const TArray>& Lengths, + const TArray& StartPositions, + const TArray& StartRotations) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{Lengths}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded, + const TArray& Lengths, + const TArray& StartPositions, + const TArray& StartRotations) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{ + FSGArrayUtils::FromNestedBPArray(Lengths) + }; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::NewBasicHandModel(UObject* Outer, const bool bRightHanded, + const TArray& Lengths, + const TArray& StartPositions, + const TArray& StartRotations) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{ + FSGArrayUtils::FromNestedBPArray(Lengths) + }; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::Default(UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + SGCoreImpl_FSGBasicHandModelImpl_Default(&OutBasicHandModelImplContainer, bRightHanded); + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl)); +} + +USGBasicHandModel* USGBasicHandModel::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGBasicHandModelImpl_Deserialize(&OutBasicHandModelContainer, &SerializedStringContainer); + return NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelContainer.BasicHandModelImpl));; +} + +TArray> USGBasicHandModel::GetBaseFingerLengths() +{ + FSGIC_TArray_TArray_float OutLengthsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetBaseFingerLengths(&OutLengthsContainer); + return OutLengthsContainer.Array; +} + +TArray USGBasicHandModel::GetBaseJointPositions() +{ + FSGIC_TArray_FVector OutPositionsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions(&OutPositionsContainer); + return OutPositionsContainer.Array; +} + +TArray USGBasicHandModel::GetBaseJointAngles() +{ + FSGIC_TArray_FVector OutRotationsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles(&OutRotationsContainer); + return OutRotationsContainer.Array; +} + +USGBasicHandModel::USGBasicHandModel() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + SGCoreImpl_FSGBasicHandModelImpl_ctor(&OutBasicHandModelImplContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{Lengths}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, &StartPositionsContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{ + FSGArrayUtils::FromNestedBPArray(Lengths) + }; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, &StartPositionsContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{Lengths}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{Lengths}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{ + FSGArrayUtils::FromNestedBPArray(Lengths) + }; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(const bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelImplContainer; + FSGIC_TArray_TArray_float LengthsContainer{ + FSGArrayUtils::FromNestedBPArray(Lengths) + }; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + &OutBasicHandModelImplContainer, bRightHanded, &LengthsContainer, + &StartPositionsContainer, &StartRotationsContainer); + + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelImplContainer.BasicHandModelImpl); +} + +USGBasicHandModel::USGBasicHandModel(const FSGBasicHandModelImpl& BasicHandModelImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetBasicHandModelImpl(BasicHandModelImpl); +} + +USGBasicHandModel::~USGBasicHandModel() = default; + +void USGBasicHandModel::SetBasicHandModelImpl(const FSGBasicHandModelImpl& BasicHandModelImpl) +{ + FSGIC_FSGBasicHandModelImpl OutBasicHandModelContainer; + FSGIC_FSGBasicHandModelImpl RhsContainer{BasicHandModelImpl}; + SGCoreImpl_FSGBasicHandModelImpl_ctor_copy(&OutBasicHandModelContainer, &RhsContainer); + Pimpl->BasicHandModelImpl = MoveTemp(OutBasicHandModelContainer.BasicHandModelImpl); +} + +const FSGBasicHandModelImpl& USGBasicHandModel::ToBasicHandModelImpl() const +{ + return Pimpl->BasicHandModelImpl; +} + +FSGBasicHandModelImpl& USGBasicHandModel::ToBasicHandModelImpl() +{ + return Pimpl->BasicHandModelImpl; +} + +bool USGBasicHandModel::IsRight() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + return SGCoreImpl_FSGBasicHandModelImpl_IsRight(&InstanceContainer); +} + +TArray> USGBasicHandModel::GetFingerLengths() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_TArray_float OutLengthsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths(&InstanceContainer, &OutLengthsContainer); + return OutLengthsContainer.Array; +} + +TArray USGBasicHandModel::GetFingerLengths(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_float OutLengthsContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths_Finger(&InstanceContainer, &OutLengthsContainer, + &FingerContainer); + return OutLengthsContainer.Array; +} + +void USGBasicHandModel::SetFingerLengths(const ESGFinger Finger, const TArray& Lengths) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_TArray_float LengthsContainer{Lengths}; + SGCoreImpl_FSGBasicHandModelImpl_SetFingerLengths_ESGFinger(&InstanceContainer, &FingerContainer, + &LengthsContainer); +} + +void USGBasicHandModel::SetFingerLengths(const uint8 Finger, const TArray& Lengths) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_float LengthsContainer{Lengths}; + SGCoreImpl_FSGBasicHandModelImpl_SetFingerLengths_uint8Finger(&InstanceContainer, Finger, &LengthsContainer); +} + +TArray> USGBasicHandModel::GetFingerRatios() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_TArray_float OutRatiosContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios(&InstanceContainer, &OutRatiosContainer); + return OutRatiosContainer.Array; +} + +TArray USGBasicHandModel::GetFingerRatios(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_TArray_float OutRatiosContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios_Finger(&InstanceContainer, &OutRatiosContainer, + &FingerContainer); + return OutRatiosContainer.Array; +} + +TArray USGBasicHandModel::GetStartJointPositions() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_FVector OutPositionsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetStartJointPositions(&InstanceContainer, &OutPositionsContainer); + return OutPositionsContainer.Array; +} + +void USGBasicHandModel::SetStartJointPosition(const ESGFinger Finger, const FVector& Position) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_FVector PositionContainer{Position}; + SGCoreImpl_FSGBasicHandModelImpl_SetStartJointPosition_ESGFinger(&InstanceContainer, &FingerContainer, + &PositionContainer); +} + +void USGBasicHandModel::SetStartJointPosition(const uint8 Finger, const FVector& Position) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FVector PositionContainer{Position}; + SGCoreImpl_FSGBasicHandModelImpl_SetStartJointPosition_uin8Finger(&InstanceContainer, Finger, &PositionContainer); +} + +TArray USGBasicHandModel::GetStartJointRotationsQ() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer); + return OutRotationsContainer.Array; +} + +TArray USGBasicHandModel::GetStartJointRotations() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations(&InstanceContainer, &OutRotationsContainer); + return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); +} + +FVector USGBasicHandModel::GetJointPosition(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FVector OutPositionContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_GetJointPosition(&InstanceContainer, &OutPositionContainer, &FingerContainer); + return OutPositionContainer.Vector; +} + +void USGBasicHandModel::SetJointPosition(const FVector& NewPosition, const ESGFinger Finger) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FVector NewPositionContainer{NewPosition}; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_SetJointPosition(&InstanceContainer, &NewPositionContainer, &FingerContainer); +} + +FQuat USGBasicHandModel::GetJointRotationQ(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FQuat OutRotationContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer); + return OutRotationContainer.Quat; +} + +FRotator USGBasicHandModel::GetJointRotation(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FQuat OutRotationContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer); + return OutRotationContainer.Quat.Rotator(); +} + +void USGBasicHandModel::SetJointRotation(const FQuat& NewRotation, const ESGFinger Finger) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FQuat NewRotationContainer{NewRotation}; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_SetJointRotation(&InstanceContainer, &NewRotationContainer, &FingerContainer); +} + +void USGBasicHandModel::SetJointRotation(const FRotator& NewRotation, const ESGFinger Finger) +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FQuat NewRotationContainer{NewRotation.Quaternion()}; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_SetJointRotation(&InstanceContainer, &NewRotationContainer, &FingerContainer); +} + +TArray USGBasicHandModel::GetTotalLengths() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_float OutLengthsContainer; + SGCoreImpl_FSGBasicHandModelImpl_GetTotalLengths(&InstanceContainer, &OutLengthsContainer); + return OutLengthsContainer.Array; +} + +float USGBasicHandModel::GetTotalLength(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + return SGCoreImpl_FSGBasicHandModelImpl_GetTotalLength(&InstanceContainer, &FingerContainer); +} + +TArray USGBasicHandModel::Get3DLengths(const ESGFinger Finger) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_TArray_FVector OutLengthsContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGBasicHandModelImpl_Get3DLengths(&InstanceContainer, &OutLengthsContainer, + &FingerContainer); + return OutLengthsContainer.Array; +} + +bool USGBasicHandModel::Equals(const USGBasicHandModel* BasicHandModel) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FSGBasicHandModelImpl BasicHandModelContainer{BasicHandModel->ToBasicHandModelImpl()}; + return SGCoreImpl_FSGBasicHandModelImpl_Equals(&InstanceContainer, &BasicHandModelContainer); +} + +FString USGBasicHandModel::ToString() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGBasicHandModelImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGBasicHandModel::ToString(const bool bLengthsOnly) const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGBasicHandModelImpl_ToString_bLengthsOnly(&InstanceContainer, &OutStringContainer, bLengthsOnly); + return OutStringContainer.String; +} + +FString USGBasicHandModel::SGSerialize() const +{ + FSGIC_FSGBasicHandModelImpl InstanceContainer{ToBasicHandModelImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGBasicHandModelImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGBasicHandModel::FImpl::FImpl(USGBasicHandModel* InOwner) + : Owner(InOwner) +{ +} + +USGBasicHandModel::FImpl::~FImpl() = default; + +void USGBasicHandModel::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGBetaDevice.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGBetaDevice.cpp new file mode 100644 index 0000000..47336f7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGBetaDevice.cpp @@ -0,0 +1,208 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGBetaDevice.h" + +#include "Engine/World.h" + +#include "SGCore/SGDeviceImplCast.h" +#include "SGCoreImpl/SGBetaDeviceImpl.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h" + +USGBetaDevice* USGBetaDevice::NewBetaDevice(UObject* Outer, const FSGBetaDeviceImpl& BetaDeviceImpl) +{ + USGBetaDevice* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(BetaDeviceImpl); + return Instance; +} + +USGBetaDevice* USGBetaDevice::NewBetaDevice(UObject* Outer, TSharedRef BetaDeviceImpl) +{ + USGBetaDevice* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(MoveTemp(BetaDeviceImpl)); + return Instance; +} + +USGBetaDevice* USGBetaDevice::NewBetaDevice(UObject* Outer) +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer); + + return NewBetaDevice(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGBetaDevice* USGBetaDevice::NewBetaDevice(UObject* Outer, const FString& ConstantsString, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + FSGIC_FString ConstantsStringContainer{ConstantsString}; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGBetaDeviceImpl_ctor_ConstantsString_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_MakeShared( + &OutSharedPtrContainer, &ConstantsStringContainer, &DeviceIdContainer, + &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + + return NewBetaDevice(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGBetaDevice* USGBetaDevice::Parse(UObject* Outer, const FString& String) +{ + FSGIC_FString StringContainer{String}; + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + SGCoreImpl_FSGBetaDeviceImpl_Parse(&OutSharedPtrContainer, &StringContainer); + + return NewBetaDevice(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGBetaDevice::USGBetaDevice() + : USGDevice() +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGBetaDevice::USGBetaDevice(const FString& ConstantsString, const FString& DeviceId, + const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion) + : USGDevice() +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + FSGIC_FString ConstantsStringContainer{ConstantsString}; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGBetaDeviceImpl_ctor_ConstantsString_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_MakeShared( + &OutSharedPtrContainer, &ConstantsStringContainer, &DeviceIdContainer, + &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGBetaDevice::USGBetaDevice(const FSGBetaDeviceImpl& BetaDeviceImpl) + : USGDevice(BetaDeviceImpl) +{ +} + +USGBetaDevice::USGBetaDevice(TSharedRef BetaDeviceImpl) + : USGDevice(MoveTemp(BetaDeviceImpl)) +{ +} + +USGBetaDevice::~USGBetaDevice() = default; + +TSharedRef USGBetaDevice::ToBetaDeviceImpl() const +{ + return FSGDeviceImplCast::ToBetaDeviceImpl(ToSGDeviceImpl()); +} + +ESGDeviceType USGBetaDevice::GetDeviceType() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_ESGDeviceType OutTypeContainer; + SGCoreImpl_FSGBetaDeviceImpl_GetDeviceType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +FString USGBetaDevice::GetDeviceId() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGBetaDeviceImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGBetaDevice::GetHardwareVersion() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString VersionContainer; + SGCoreImpl_FSGBetaDeviceImpl_GetHardwareVersion(&InstanceContainer, &VersionContainer); + return VersionContainer.String; +} + +int32 USGBetaDevice::GetFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + return SGCoreImpl_FSGBetaDeviceImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGBetaDevice::GetSubFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + return SGCoreImpl_FSGBetaDeviceImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +FString USGBetaDevice::GetConstantsString() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGBetaDeviceImpl_GetConstantsString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGBetaDevice::GetSensorData() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString OutDataContainer; + SGCoreImpl_FSGBetaDeviceImpl_GetSensorData(&InstanceContainer, &OutDataContainer); + return OutDataContainer.String; +} + +FString USGBetaDevice::GetLastCommand() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString OutCommandContainer; + SGCoreImpl_FSGBetaDeviceImpl_GetLastCommand(&InstanceContainer, &OutCommandContainer); + return OutCommandContainer.String; +} + +bool USGBetaDevice::SendHaptics(const FString& Command) const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString CommandContainer{Command}; + return SGCoreImpl_FSGBetaDeviceImpl_SendHaptics(&InstanceContainer, &CommandContainer); +} + +FString USGBetaDevice::ToString() const +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl InstanceContainer{ToBetaDeviceImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGBetaDeviceImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGCore.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGCore.cpp new file mode 100644 index 0000000..bdb356b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGCore.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGCore.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGCustomWaveform.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGCustomWaveform.cpp new file mode 100644 index 0000000..31f8afd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGCustomWaveform.cpp @@ -0,0 +1,340 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGCustomWaveform.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGWaveformType.h" +#include "SGInterop/SGIC_FSGCustomWaveformImpl.h" +#include "SGInterop/SGIC_FString.h" + +struct USGCustomWaveform::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGCustomWaveformImpl CustomWaveformImpl; + + /************************ + * Owner object + ************************/ + + USGCustomWaveform* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGCustomWaveform* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer, const FSGCustomWaveformImpl& CustomWaveformImpl) +{ + USGCustomWaveform* Instance = NewObject(Outer); + Instance->SetCustomWaveformImpl(CustomWaveformImpl); + return Instance; +} + +USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer; + SGCoreImpl_FSGCustomWaveformImpl_ctor(&OutCustomWaveformImplContainer); + + return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl)); +} + +USGCustomWaveform* USGCustomWaveform::NewCustomWaveform(UObject* Outer, const float Amplitude, const float Duration) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer; + SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration( + &OutCustomWaveformImplContainer, Amplitude, Duration); + + return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl)); +} + +USGCustomWaveform* USGCustomWaveform::NewCustomWaveform( + UObject* Outer, const float Amplitude, const float Duration, const float Frequency) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer; + SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency( + &OutCustomWaveformImplContainer, Amplitude, Duration, Frequency); + + return NewCustomWaveform(Outer, MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl)); +} + +FString USGCustomWaveform::ToString(const ESGWaveformType Type) +{ + FSGIC_ESGWaveformType TypeContainer{Type}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGCustomWaveformImpl_ToString_Type(&OutStringContainer, &TypeContainer); + return OutStringContainer.String; +} + +USGCustomWaveform::USGCustomWaveform() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer; + SGCoreImpl_FSGCustomWaveformImpl_ctor(&OutCustomWaveformImplContainer); + + Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl); +} + +USGCustomWaveform::USGCustomWaveform(const float Amplitude, const float Duration) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer; + SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration( + &OutCustomWaveformImplContainer, Amplitude, Duration); + + Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl); +} + +USGCustomWaveform::USGCustomWaveform(const float Amplitude, const float Duration, const float Frequency) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformImplContainer; + SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency( + &OutCustomWaveformImplContainer, Amplitude, Duration, Frequency); + + Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformImplContainer.CustomWaveformImpl); +} + +USGCustomWaveform::USGCustomWaveform(const FSGCustomWaveformImpl& CustomWaveformImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetCustomWaveformImpl(CustomWaveformImpl); +} + +USGCustomWaveform::~USGCustomWaveform() = default; + +void USGCustomWaveform::SetCustomWaveformImpl(const FSGCustomWaveformImpl& CustomWaveformImpl) +{ + FSGIC_FSGCustomWaveformImpl OutCustomWaveformContainer; + FSGIC_FSGCustomWaveformImpl RhsContainer{CustomWaveformImpl}; + SGCoreImpl_FSGCustomWaveformImpl_ctor_copy(&OutCustomWaveformContainer, &RhsContainer); + Pimpl->CustomWaveformImpl = MoveTemp(OutCustomWaveformContainer.CustomWaveformImpl); +} + +const FSGCustomWaveformImpl& USGCustomWaveform::ToCustomWaveformImpl() const +{ + return Pimpl->CustomWaveformImpl; +} + +float USGCustomWaveform::GetAmplitude() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetAmplitude(&InstanceContainer); +} + +void USGCustomWaveform::SetAmplitude(const float Amplitude) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetAmplitude(&InstanceContainer, Amplitude); +} + +ESGWaveformType USGCustomWaveform::GetWaveType() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + FSGIC_ESGWaveformType OutTypeContainer; + SGCoreImpl_FSGCustomWaveformImpl_GetWaveType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +void USGCustomWaveform::SetWaveType(const ESGWaveformType Type) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + FSGIC_ESGWaveformType TypeContainer{Type}; + SGCoreImpl_FSGCustomWaveformImpl_SetWaveType(&InstanceContainer, &TypeContainer); +} + +bool USGCustomWaveform::IsInfinite() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_IsInfinite(&InstanceContainer); +} + +void USGCustomWaveform::SetInfinite(const bool bInfinite) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetInfinite(&InstanceContainer, bInfinite); +} + +int32 USGCustomWaveform::GetRepeatAmount() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetRepeatAmount(&InstanceContainer); +} + +void USGCustomWaveform::SetRepeatAmount(const int32 Amount) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetRepeatAmount(&InstanceContainer, Amount); +} + +float USGCustomWaveform::GetAttackTime() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetAttackTime(&InstanceContainer); +} + +void USGCustomWaveform::SetAttackTime(const float Time) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetAttackTime(&InstanceContainer, Time); +} + +float USGCustomWaveform::GetSustainTime() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetSustainTime(&InstanceContainer); +} + +void USGCustomWaveform::SetSustainTime(const float Time) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetSustainTime(&InstanceContainer, Time); +} + +float USGCustomWaveform::GetDecayTime() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetDecayTime(&InstanceContainer); +} + +void USGCustomWaveform::SetDecayTime(const float Time) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetDecayTime(&InstanceContainer, Time); +} + +float USGCustomWaveform::GetFrequencyStart() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyStart(&InstanceContainer); +} + +void USGCustomWaveform::SetFrequencyStart(const float Frequency) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyStart(&InstanceContainer, Frequency); +} + +float USGCustomWaveform::GetFrequencyEnd() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyEnd(&InstanceContainer); +} + +void USGCustomWaveform::SetFrequencyEnd(const float Frequency) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyEnd(&InstanceContainer, Frequency); +} + +float USGCustomWaveform::GetFrequencySwitchTime() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchTime(&InstanceContainer); +} + +void USGCustomWaveform::SetFrequencySwitchTime(const float Time) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchTime(&InstanceContainer, Time); +} + +float USGCustomWaveform::GetFrequencySwitchFactor() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchFactor(&InstanceContainer); +} + +void USGCustomWaveform::SetFrequencySwitchFactor(const float Time) +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchFactor(&InstanceContainer, Time); +} + +float USGCustomWaveform::GetEffectTime() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetEffectTime(&InstanceContainer); +} + +float USGCustomWaveform::GetTotalEffectTime() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_GetTotalEffectTime(&InstanceContainer); +} + +bool USGCustomWaveform::FrequencyJumps() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_FrequencyJumps(&InstanceContainer); +} + +bool USGCustomWaveform::Equals(const USGCustomWaveform* CustomWaveform) const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + FSGIC_FSGCustomWaveformImpl CustomWaveformContainer{CustomWaveform->ToCustomWaveformImpl()}; + return SGCoreImpl_FSGCustomWaveformImpl_Equals(&InstanceContainer, &CustomWaveformContainer); +} + +FString USGCustomWaveform::ToString() const +{ + FSGIC_FSGCustomWaveformImpl InstanceContainer{ToCustomWaveformImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGCustomWaveformImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGCustomWaveform::FImpl::FImpl(USGCustomWaveform* InOwner) + : Owner(InOwner) +{ +} + +USGCustomWaveform::FImpl::~FImpl() = default; + +void USGCustomWaveform::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDevice.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDevice.cpp new file mode 100644 index 0000000..b8253fd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDevice.cpp @@ -0,0 +1,556 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGDevice.h" + +#include "SGDeviceImplCast.h" +#include "Engine/Engine.h" + +#include "SGCore/SGBetaDevice.h" +#include "SGCore/SGHapticChannelInfo.h" +#include "SGCore/SGHapticGlove.h" +#include "SGCore/SGNova2Glove.h" +#include "SGCore/SGNovaGlove.h" +#include "SGCore/SGSenseGlove.h" +#include "SGCoreImpl/SGBetaDeviceImpl.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGHapticChannelInfoImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGNova2GloveImpl.h" +#include "SGCoreImpl/SGNovaGloveImpl.h" +#include "SGCoreImpl/SGSenseGloveImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGConnectionType.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGHapticChannelType.h" +#include "SGInterop/SGIC_FSGBetaDeviceImpl.h" +#include "SGInterop/SGIC_FSGDeviceImpl.h" +#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h" +#include "SGInterop/SGIC_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h" + +struct USGDevice::FImpl +{ + /************************ + * Member variables + ************************/ + + TSharedPtr SGDeviceImpl; + + /************************ + * Owner object + ************************/ + + USGDevice* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGDevice* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +void USGDevice::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion) +{ + FSGIC_FString RawFirmwareContainer{RawFirmware}; + SGCoreImpl_FSGDeviceImpl_ParseFirmware(&RawFirmwareContainer, &OutMainVersion, &OutSubVersion); +} + +bool USGDevice::FirmwareNewerThan( + const int32 MyFirmwareMain, const int32 MyFirmwareSub, const int32 ReferenceMain, const int32 ReferenceSub, + const bool bInclusive) +{ + return + SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive( + MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive); +} + +bool USGDevice::FirmwareOlderThan( + const int32 MyFirmwareMain, const int32 MyFirmwareSub, const int32 ReferenceMain, const int32 ReferenceSub, + const bool bInclusive) +{ + return + SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive( + MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive); +} + +FString USGDevice::ToString(const ESGDeviceType DeviceType) +{ + FSGIC_ESGDeviceType DeviceTypeContainer{DeviceType}; + FSGIC_FString OutString; + SGCoreImpl_FSGDeviceImpl_ToString(&DeviceTypeContainer, &OutString); + return OutString.String; +} + +USGDevice::USGDevice() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer; + SGCoreImpl_FSGDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(const FSGDeviceImpl& SGDeviceImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer; + FSGIC_FSGDeviceImpl RhsContainer{SGDeviceImpl}; + SGCoreImpl_FSGDeviceImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(const FSGBetaDeviceImpl& BetaDeviceImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + FSGIC_FSGBetaDeviceImpl RhsContainer{BetaDeviceImpl}; + SGCoreImpl_FSGBetaDeviceImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(const FSGHapticGloveImpl& HapticGloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer; + FSGIC_FSGHapticGloveImpl RhsContainer{HapticGloveImpl}; + SGCoreImpl_FSGHapticGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(const FSGNova2GloveImpl& Nova2GloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + FSGIC_FSGNova2GloveImpl RhsContainer{Nova2GloveImpl}; + SGCoreImpl_FSGNova2GloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(const FSGNovaGloveImpl& NovaGloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + FSGIC_FSGNovaGloveImpl RhsContainer{NovaGloveImpl}; + SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(const FSGSenseGloveImpl& SenseGloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer; + FSGIC_FSGSenseGloveImpl RhsContainer{SenseGloveImpl}; + SGCoreImpl_FSGSenseGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +USGDevice::USGDevice(TSharedRef SGDeviceImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SGDeviceImpl = MoveTemp(SGDeviceImpl); +} + +USGDevice::USGDevice(TSharedRef BetaDeviceImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SGDeviceImpl = MoveTemp(BetaDeviceImpl); +} + +USGDevice::USGDevice(TSharedRef HapticGloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl); +} + +USGDevice::USGDevice(TSharedRef Nova2GloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SGDeviceImpl = MoveTemp(Nova2GloveImpl); +} + +USGDevice::USGDevice(TSharedRef NovaGloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SGDeviceImpl = MoveTemp(NovaGloveImpl); +} + +USGDevice::USGDevice(TSharedRef SenseGloveImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SGDeviceImpl = MoveTemp(SenseGloveImpl); +} + +USGDevice::~USGDevice() = default; + +void USGDevice::SetSGDeviceImpl(const FSGDeviceImpl& SGDeviceImpl) +{ + FSGIC_TSharedPtr_FSGDeviceImpl OutSharedPtrContainer; + FSGIC_FSGDeviceImpl RhsContainer{SGDeviceImpl}; + SGCoreImpl_FSGDeviceImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +void USGDevice::SetSGDeviceImpl(const FSGBetaDeviceImpl& BetaDeviceImpl) +{ + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + FSGIC_FSGBetaDeviceImpl RhsContainer{BetaDeviceImpl}; + SGCoreImpl_FSGBetaDeviceImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +void USGDevice::SetSGDeviceImpl(const FSGHapticGloveImpl& HapticGloveImpl) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer; + FSGIC_FSGHapticGloveImpl RhsContainer{HapticGloveImpl}; + SGCoreImpl_FSGHapticGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +void USGDevice::SetSGDeviceImpl(const FSGNova2GloveImpl& Nova2GloveImpl) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + FSGIC_FSGNova2GloveImpl RhsContainer{Nova2GloveImpl}; + SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +void USGDevice::SetSGDeviceImpl(const FSGNovaGloveImpl& NovaGloveImpl) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + FSGIC_FSGNovaGloveImpl RhsContainer{NovaGloveImpl}; + SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +void USGDevice::SetSGDeviceImpl(const FSGSenseGloveImpl& SenseGloveImpl) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer; + FSGIC_FSGSenseGloveImpl RhsContainer{SenseGloveImpl}; + SGCoreImpl_FSGSenseGloveImpl_ctor_copy_MakeShared(&OutSharedPtrContainer, &RhsContainer); + Pimpl->SGDeviceImpl = MoveTemp(OutSharedPtrContainer.Ptr); +} + +void USGDevice::SetSGDeviceImpl(TSharedRef SGDeviceImpl) +{ + Pimpl->SGDeviceImpl = MoveTemp(SGDeviceImpl); +} + +void USGDevice::SetSGDeviceImpl(TSharedRef BetaDeviceImpl) +{ + Pimpl->SGDeviceImpl = MoveTemp(BetaDeviceImpl); +} + +void USGDevice::SetSGDeviceImpl(TSharedRef HapticGloveImpl) +{ + Pimpl->SGDeviceImpl = MoveTemp(HapticGloveImpl); +} + +void USGDevice::SetSGDeviceImpl(TSharedRef Nova2GloveImpl) +{ + Pimpl->SGDeviceImpl = MoveTemp(Nova2GloveImpl); +} + +void USGDevice::SetSGDeviceImpl(TSharedRef NovaGloveImpl) +{ + Pimpl->SGDeviceImpl = MoveTemp(NovaGloveImpl); +} + +void USGDevice::SetSGDeviceImpl(TSharedRef SenseGloveImpl) +{ + Pimpl->SGDeviceImpl = MoveTemp(SenseGloveImpl); +} + +TSharedRef USGDevice::ToSGDeviceImpl() const +{ + return Pimpl->SGDeviceImpl.ToSharedRef(); +} + +bool USGDevice::IsABetaDevice() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsABetaDevice(&InstanceContainer); +} + +bool USGDevice::IsAHapticGlove() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsAHapticGlove(&InstanceContainer); +} + +bool USGDevice::IsANova2Glove() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsANova2Glove(&InstanceContainer); +} + +bool USGDevice::IsANovaGlove() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsANovaGlove(&InstanceContainer); +} + +bool USGDevice::IsASenseGlove() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsASenseGlove(&InstanceContainer); +} + +USGBetaDevice* USGDevice::AsBetaDevice(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtr; + SGCoreImpl_FSGDeviceImpl_AsBetaDevice(&InstanceContainer, &OutSharedPtr); + + USGBetaDevice* BetaDevice = NewObject(Outer); + BetaDevice->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef()); + return BetaDevice; +} + +USGHapticGlove* USGDevice::AsHapticGlove(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtr; + SGCoreImpl_FSGDeviceImpl_AsHapticGlove(&InstanceContainer, &OutSharedPtr); + + USGHapticGlove* HapticGlove = NewObject(Outer); + HapticGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef()); + return HapticGlove; +} + +USGNova2Glove* USGDevice::AsNova2Glove(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtr; + SGCoreImpl_FSGDeviceImpl_AsNova2Glove(&InstanceContainer, &OutSharedPtr); + + USGNova2Glove* Nova2Glove = NewObject(Outer); + Nova2Glove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef()); + return Nova2Glove; +} + +USGNovaGlove* USGDevice::AsNovaGlove(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtr; + SGCoreImpl_FSGDeviceImpl_AsNovaGlove(&InstanceContainer, &OutSharedPtr); + + USGNovaGlove* NovaGlove = NewObject(Outer); + NovaGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef()); + return NovaGlove; +} + +USGSenseGlove* USGDevice::AsSenseGlove(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtr; + SGCoreImpl_FSGDeviceImpl_AsSenseGlove(&InstanceContainer, &OutSharedPtr); + + USGSenseGlove* SenseGlove = NewObject(Outer); + SenseGlove->SetSGDeviceImpl(OutSharedPtr.Ptr.ToSharedRef()); + return SenseGlove; +} + +ESGDeviceType USGDevice::GetDeviceType() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_ESGDeviceType OutTypeContainer; + SGCoreImpl_FSGDeviceImpl_GetDeviceType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +int32 USGDevice::GetSubFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +FString USGDevice::GetFirmwareString() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGDeviceImpl_GetFirmwareString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +bool USGDevice::FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_bInclusive( + &InstanceContainer, FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGDevice::FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_bInclusive( + &InstanceContainer, FirmwareMain, FirmwareSub, bInclusive); +} + +FString USGDevice::GetAddress() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_FString AddressContainer; + SGCoreImpl_FSGDeviceImpl_GetAddress(&InstanceContainer, &AddressContainer); + return AddressContainer.String; +} + +bool USGDevice::IsConnected() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsConnected(&InstanceContainer); +} + +ESGConnectionType USGDevice::GetConnectionType() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_ESGConnectionType OutTypeContainer; + SGCoreImpl_FSGDeviceImpl_GetConnectionType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +int32 USGDevice::PacketsPerSecondReceived() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_PacketsPerSecondReceived(&InstanceContainer); +} + +int32 USGDevice::PacketsPerSecondSent() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_PacketsPerSecondSent(&InstanceContainer); +} + +int32 USGDevice::GetDeviceIndex() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_GetDeviceIndex(&InstanceContainer); +} + +void USGDevice::SetDeviceIndex(const int32 NewIndex) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + SGCoreImpl_FSGDeviceImpl_SetDeviceIndex(&InstanceContainer, NewIndex); +} + +bool USGDevice::IsWireless() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_IsWireless(&InstanceContainer); +} + +bool USGDevice::HasBattery() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_HasBattery(&InstanceContainer); +} + +bool USGDevice::IsCharging() +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + const bool bResult = SGCoreImpl_FSGDeviceImpl_IsCharging(&InstanceContainer); + + return bResult; +} + +bool USGDevice::GetBatteryLevel(float& OutLevel) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + const bool bResult = SGCoreImpl_FSGDeviceImpl_GetBatteryLevel(&InstanceContainer, &OutLevel); + return bResult; +} + +void USGDevice::SetHapticChannels(const USGHapticChannelInfo* Channels) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_FSGHapticChannelInfoImpl ChannelsContainer{Channels->ToHapticChannelInfoImpl()}; + SGCoreImpl_FSGDeviceImpl_SetHapticChannels(&InstanceContainer, &ChannelsContainer); +} + +int32 USGDevice::GetHapticChannelCount() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + return SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount(&InstanceContainer); +} + +int32 USGDevice::GetHapticChannelCount(ESGHapticChannelType ChannelType) const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_ESGHapticChannelType ChannelTypeContainer{ChannelType}; + return SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount_ChannelType(&InstanceContainer, &ChannelTypeContainer); +} + +FString USGDevice::ToString() const +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{ToSGDeviceImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGDeviceImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGDevice::FImpl::FImpl(USGDevice* InOwner) + : Owner(InOwner) +{ +} + +USGDevice::FImpl::~FImpl() = default; + +void USGDevice::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceImplCast.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceImplCast.cpp new file mode 100644 index 0000000..0e40107 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceImplCast.cpp @@ -0,0 +1,90 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGDeviceImplCast.h" + +#include "SGCoreImpl/SGBetaDeviceImpl.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGNova2GloveImpl.h" +#include "SGCoreImpl/SGNovaGloveImpl.h" +#include "SGCoreImpl/SGSenseGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h" + +TSharedRef FSGDeviceImplCast::ToBetaDeviceImpl(TSharedRef SGDeviceImpl) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)}; + FSGIC_TSharedPtr_FSGBetaDeviceImpl OutSharedPtrContainer; + SGCoreImpl_FSGDeviceImpl_ToBetaDeviceImplRef(&InstanceContainer, &OutSharedPtrContainer); + return OutSharedPtrContainer.Ptr.ToSharedRef(); +} + +TSharedRef FSGDeviceImplCast::ToHapticGloveImpl(TSharedRef SGDeviceImpl) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)}; + FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGDeviceImpl_ToHapticGloveImplRef(&InstanceContainer, &OutSharedPtrContainer); + return OutSharedPtrContainer.Ptr.ToSharedRef(); +} + +TSharedRef FSGDeviceImplCast::ToNova2GloveImpl(TSharedRef SGDeviceImpl) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)}; + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGDeviceImpl_ToNova2GloveImplRef(&InstanceContainer, &OutSharedPtrContainer); + return OutSharedPtrContainer.Ptr.ToSharedRef(); +} + +TSharedRef FSGDeviceImplCast::ToNovaGloveImpl(TSharedRef SGDeviceImpl) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)}; + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGDeviceImpl_ToNovaGloveImplRef(&InstanceContainer, &OutSharedPtrContainer); + return OutSharedPtrContainer.Ptr.ToSharedRef(); +} + +TSharedRef FSGDeviceImplCast::ToSenseGloveImpl(TSharedRef SGDeviceImpl) +{ + FSGIC_TSharedPtr_FSGDeviceImpl InstanceContainer{MoveTemp(SGDeviceImpl)}; + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGDeviceImpl_ToSenseGloveImplRef(&InstanceContainer, &OutSharedPtrContainer); + return OutSharedPtrContainer.Ptr.ToSharedRef(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceImplCast.h b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceImplCast.h new file mode 100644 index 0000000..8e870d9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceImplCast.h @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Templates/SharedPointer.h" + +class FSGBetaDeviceImpl; +class FSGDeviceImpl; +class FSGHapticGloveImpl; +class FSGNova2GloveImpl; +class FSGNovaGloveImpl; +class FSGSenseGloveImpl; + +class SENSEGLOVECORE_API FSGDeviceImplCast +{ +public: + static TSharedRef ToBetaDeviceImpl(TSharedRef SGDeviceImpl); + + static TSharedRef ToHapticGloveImpl(TSharedRef SGDeviceImpl); + + static TSharedRef ToNova2GloveImpl(TSharedRef SGDeviceImpl); + + static TSharedRef ToNovaGloveImpl(TSharedRef SGDeviceImpl); + + static TSharedRef ToSenseGloveImpl(TSharedRef SGDeviceImpl); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceList.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceList.cpp new file mode 100644 index 0000000..18d2771 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceList.cpp @@ -0,0 +1,225 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGDeviceList.h" + +#include "Templates/SubclassOf.h" + +#include "SGCore/SGBetaDevice.h" +#include "SGCore/SGDevice.h" +#include "SGCore/SGDeviceImplCast.h" +#include "SGCore/SGNova2Glove.h" +#include "SGCore/SGNovaGlove.h" +#include "SGCore/SGSenseGlove.h" +#include "SGCoreImpl/SGBetaDeviceImpl.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGNovaGloveImpl.h" +#include "SGCoreImpl/SGSenseGloveImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGConnectionType.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h" + +int32 FSGDeviceList::ActiveDevices() +{ + return SGCoreImpl_FSGDeviceListImpl_ActiveDevices(); +} + +bool FSGDeviceList::SenseComRunning() +{ + return SGCoreImpl_FSGDeviceListImpl_SenseComRunning(); +} + +void FSGDeviceList::Dispose() +{ + SGCoreImpl_FSGDeviceListImpl_Dispose(); +} + +void FSGDeviceList::Reinitialize() +{ + SGCoreImpl_FSGDeviceListImpl_Reinitialize(); +} + +TArray FSGDeviceList::GetDevices(UObject* Outer) +{ + FSGIC_TArray_TSharedRef_FSGDeviceListImpl DeviceImplsArrayContainer; + SGCoreImpl_FSGDeviceListImpl_GetDevices(&DeviceImplsArrayContainer); + + TArray Devices; + + for (TSharedRef DeviceImpl: DeviceImplsArrayContainer.Array) + { + FSGIC_TSharedPtr_FSGDeviceImpl DeviceImplContainer{DeviceImpl}; + FSGIC_ESGDeviceType DeviceTypeContainer; + SGCoreImpl_FSGDeviceImpl_GetDeviceType(&DeviceImplContainer, &DeviceTypeContainer); + switch (DeviceTypeContainer.Type) + { + case ESGDeviceType::BetaDevice: + { + TSharedRef BetaDeviceImpl{FSGDeviceImplCast::ToBetaDeviceImpl(DeviceImpl)}; + USGBetaDevice* BetaDevice = USGBetaDevice::NewBetaDevice(Outer, MoveTemp(BetaDeviceImpl)); + Devices.Push(BetaDevice); + } + break; + case ESGDeviceType::Nova2: + { + TSharedRef Nova2GloveImpl{FSGDeviceImplCast::ToNova2GloveImpl(DeviceImpl)}; + USGNova2Glove* Nova2Glove = USGNova2Glove::NewNova2Glove(Outer, MoveTemp(Nova2GloveImpl)); + Devices.Push(Nova2Glove); + } + case ESGDeviceType::Nova: + { + TSharedRef NovaGloveImpl{FSGDeviceImplCast::ToNovaGloveImpl(DeviceImpl)}; + USGNovaGlove* NovaGlove = USGNovaGlove::NewNovaGlove(Outer, MoveTemp(NovaGloveImpl)); + Devices.Push(NovaGlove); + } + break; + case ESGDeviceType::SenseGlove: + { + TSharedRef SenseGloveImpl{FSGDeviceImplCast::ToSenseGloveImpl(DeviceImpl)}; + USGSenseGlove* SenseGlove = USGSenseGlove::NewSenseGlove(Outer, MoveTemp(SenseGloveImpl)); + Devices.Push(SenseGlove); + } + break; + default: + ensureAlwaysMsgf(false, TEXT("Unknown SenseGlove device!")); + break; + } + } + + return Devices; +} + +TArray FSGDeviceList::GetDevices(UObject* Outer, const TSubclassOf& DeviceType) +{ + ensureAlwaysMsgf(IsValid(DeviceType.GetDefaultObject()), TEXT("Invalid default object!")); + const UClass* ClassFilter = DeviceType->StaticClass(); + + const TArray CurrentDevices = GetDevices(Outer); + TArray Devices; + + for (USGDevice* Device: CurrentDevices) + { + ensureAlwaysMsgf(IsValid(Device), TEXT("Invalid device!")); + + const UClass* DeviceClass = Device->StaticClass(); + if (DeviceClass == ClassFilter) + { + Devices.Push(Device); + } + } + + return Devices; +} + +TArray FSGDeviceList::GetDevices(UObject* Outer, const ESGDeviceType DeviceType) +{ + const TArray CurrentDevices = GetDevices(Outer); + TArray Devices; + + for (USGDevice* Device: CurrentDevices) + { + ensureAlwaysMsgf(IsValid(Device), TEXT("Invalid device!")); + + if (Device->GetDeviceType() == DeviceType) + { + Devices.Push(Device); + } + } + + return Devices; +} + +bool FSGDeviceList::GetSensorDataString(const int32 IpcIndex, const FString& IpcAddress, FString& OutString) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + FSGIC_FString OutStringContainer; + const bool bReturn = SGCoreImpl_FSGDeviceListImpl_GetSensorDataString( + IpcIndex, &IpcAddressContainer, &OutStringContainer); + OutString = OutStringContainer.String; + return bReturn; +} + +bool FSGDeviceList::SendHaptics( + const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + FSGIC_FString CommandsContainer{Commands}; + return SGCoreImpl_FSGDeviceListImpl_SendHaptics(IpcIndex, &IpcAddressContainer, ChannelIndex, &CommandsContainer); +} + +FString FSGDeviceList::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress, const int32 Index) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGDeviceListImpl_GetDeviceStringAt(&OutStringContainer, IpcIndex, &IpcAddressContainer, Index); + return OutStringContainer.String; +} + +FString FSGDeviceList::GetAddress(const int32 IpcIndex, const FString& IpcAddress) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGDeviceListImpl_GetAddress(&OutStringContainer, IpcIndex, &IpcAddressContainer); + return OutStringContainer.String; +} + +ESGConnectionType FSGDeviceList::GetConnectionType(const int32 IpcIndex, const FString& IpcAddress) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + FSGIC_ESGConnectionType OutTypeContainer; + SGCoreImpl_FSGDeviceListImpl_GetConnectionType(&OutTypeContainer, IpcIndex, &IpcAddressContainer); + return OutTypeContainer.Type; +} + +bool FSGDeviceList::IsConnected(const int32 IpcIndex, const FString& IpcAddress) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + return SGCoreImpl_FSGDeviceListImpl_IsConnected(IpcIndex, &IpcAddressContainer); +} + +int32 FSGDeviceList::PacketsPerSecondReceived(const int32 IpcIndex, const FString& IpcAddress) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + return SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondReceived(IpcIndex, &IpcAddressContainer); +} + +int32 FSGDeviceList::PacketsPerSecondSent(const int32 IpcIndex, const FString& IpcAddress) +{ + FSGIC_FString IpcAddressContainer{IpcAddress}; + return SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondSent(IpcIndex, &IpcAddressContainer); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceModel.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceModel.cpp new file mode 100644 index 0000000..3e91620 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGDeviceModel.cpp @@ -0,0 +1,215 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGDeviceModel.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_FSGDeviceModelImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_bool.h" + +struct USGDeviceModel::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGDeviceModelImpl DeviceModelImpl; + + /************************ + * Owner object + ************************/ + + USGDeviceModel* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGDeviceModel* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGDeviceModel* USGDeviceModel::NewDeviceModel(UObject* Outer, const FSGDeviceModelImpl& DeviceModelImpl) +{ + USGDeviceModel* Instance = NewObject(Outer); + Instance->SetDeviceModelImpl(DeviceModelImpl); + return Instance; +} + +USGDeviceModel* USGDeviceModel::NewDeviceModel(UObject* Outer) +{ + FSGIC_FSGDeviceModelImpl OutDeviceModelImplContainer; + SGCoreImpl_FSGDeviceModelImpl_ctor(&OutDeviceModelImplContainer); + + return NewDeviceModel(Outer, MoveTemp(OutDeviceModelImplContainer.DeviceModelImpl)); +} + +USGDeviceModel* USGDeviceModel::NewDeviceModel( + UObject* Outer, + const FString& Id, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + FSGIC_FSGDeviceModelImpl OutDeviceModelImplContainer; + FSGIC_FString IdContainer{Id}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGDeviceModelImpl_ctor_Id_HardwareVersion_FirmwareVersion_SubFirmwareVersion( + &OutDeviceModelImplContainer, &IdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + + return NewDeviceModel(Outer, MoveTemp(OutDeviceModelImplContainer.DeviceModelImpl)); +} + +TArray USGDeviceModel::ParseFunctions(const int32 Value, const int32 Size) +{ + FSGIC_TArray_bool OutParseFunctionsContainer; + SGCoreImpl_FSGDeviceModelImpl_ParseFunctions(&OutParseFunctionsContainer, Value, Size); + return OutParseFunctionsContainer.Array; +} + +void USGDeviceModel::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion) +{ + FSGIC_FString RawFirmwareContainer{RawFirmware}; + SGCoreImpl_FSGDeviceModelImpl_ParseFirmware(&RawFirmwareContainer, &OutMainVersion, &OutSubVersion); +} + +USGDeviceModel::USGDeviceModel() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGDeviceModelImpl OutDeviceModelImplContainer; + SGCoreImpl_FSGDeviceModelImpl_ctor(&OutDeviceModelImplContainer); + + Pimpl->DeviceModelImpl = MoveTemp(OutDeviceModelImplContainer.DeviceModelImpl); +} + +USGDeviceModel::USGDeviceModel(const FString& Id, const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGDeviceModelImpl OutDeviceModelImplContainer; + FSGIC_FString IdContainer{Id}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGDeviceModelImpl_ctor_Id_HardwareVersion_FirmwareVersion_SubFirmwareVersion( + &OutDeviceModelImplContainer, &IdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + + Pimpl->DeviceModelImpl = MoveTemp(OutDeviceModelImplContainer.DeviceModelImpl); +} + +USGDeviceModel::USGDeviceModel(const FSGDeviceModelImpl& DeviceModelImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetDeviceModelImpl(DeviceModelImpl); +} + +USGDeviceModel::~USGDeviceModel() = default; + +void USGDeviceModel::SetDeviceModelImpl(const FSGDeviceModelImpl& DeviceModelImpl) +{ + FSGIC_FSGDeviceModelImpl OutDeviceModelContainer; + FSGIC_FSGDeviceModelImpl RhsContainer{DeviceModelImpl}; + SGCoreImpl_FSGDeviceModelImpl_ctor_copy(&OutDeviceModelContainer, &RhsContainer); + Pimpl->DeviceModelImpl = MoveTemp(OutDeviceModelContainer.DeviceModelImpl); +} + +const FSGDeviceModelImpl& USGDeviceModel::ToDeviceModelImpl() const +{ + return Pimpl->DeviceModelImpl; +} + +FSGDeviceModelImpl& USGDeviceModel::ToDeviceModelImpl() +{ + return Pimpl->DeviceModelImpl; +} + +FString USGDeviceModel::GetDeviceId() const +{ + FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGDeviceModelImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGDeviceModel::GetHardwareVersion() const +{ + FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGDeviceModelImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGDeviceModel::GetFirmwareVersion() const +{ + FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()}; + return SGCoreImpl_FSGDeviceModelImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGDeviceModel::GetSubFirmwareVersion() const +{ + FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()}; + return SGCoreImpl_FSGDeviceModelImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +bool USGDeviceModel::FirmwareNewerThan(const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) const +{ + FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()}; + return SGCoreImpl_FSGDeviceModelImpl_FirmwareNewerThan( + &InstanceContainer, FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGDeviceModel::FirmwareOlderThan(const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) const +{ + FSGIC_FSGDeviceModelImpl InstanceContainer{ToDeviceModelImpl()}; + return SGCoreImpl_FSGDeviceModelImpl_FirmwareOlderThan( + &InstanceContainer, FirmwareMain, FirmwareSub, bInclusive); +} + +USGDeviceModel::FImpl::FImpl(USGDeviceModel* InOwner) + : Owner(InOwner) +{ +} + +USGDeviceModel::FImpl::~FImpl() = default; + +void USGDeviceModel::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandInterpolator.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandInterpolator.cpp new file mode 100644 index 0000000..fb2acc2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandInterpolator.cpp @@ -0,0 +1,220 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGHandInterpolator.h" + +#include "SGCore/SGInterpolationSet.h" +#include "SGCoreImpl/SGInterpolationSetImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGHandInterpolatorImpl.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_ESGFingerMovement.h" +#include "SGInterop/SGIC_ESGThumbMovement.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h" +#include "SGInterop/SGIC_FSGInterpolationSetImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TArray_TArray_float.h" +#include "SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGHandInterpolator::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGHandInterpolatorImpl HandInterpolatorImpl; + + /************************ + * Owner object + ************************/ + + USGHandInterpolator* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGHandInterpolator* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGHandInterpolator* USGHandInterpolator::NewHandInterpolator( + UObject* Outer, const FSGHandInterpolatorImpl& HandInterpolatorImpl) +{ + USGHandInterpolator* Instance = NewObject(Outer); + Instance->SetHandInterpolatorImpl(HandInterpolatorImpl); + return Instance; +} + +USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer) +{ + FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer; + SGCoreImpl_FSGHandInterpolatorImpl_ctor(&OutHandInterpolatorImplContainer); + + return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl)); +} + +USGHandInterpolator* USGHandInterpolator::NewHandInterpolator(UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer; + SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer, + bRightHanded); + + return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl)); +} + +USGHandInterpolator* USGHandInterpolator::Deserialize(UObject* Outer, + const FString& SerializedString, const bool bRightHanded) +{ + FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGHandInterpolatorImpl_Deserialize(&OutHandInterpolatorImplContainer, + &SerializedStringContainer, bRightHanded); + + return NewHandInterpolator(Outer, MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl)); +} + +USGHandInterpolator::USGHandInterpolator() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer; + SGCoreImpl_FSGHandInterpolatorImpl_ctor(&OutHandInterpolatorImplContainer); + + Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl); +} + +USGHandInterpolator::USGHandInterpolator(const bool bRightHanded) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorImplContainer; + SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded(&OutHandInterpolatorImplContainer, + bRightHanded); + + Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorImplContainer.HandInterpolatorImpl); +} + +USGHandInterpolator::USGHandInterpolator(const FSGHandInterpolatorImpl& HandInterpolatorImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetHandInterpolatorImpl(HandInterpolatorImpl); +} + +USGHandInterpolator::~USGHandInterpolator() = default; + +void USGHandInterpolator::SetHandInterpolatorImpl(const FSGHandInterpolatorImpl& HandInterpolatorImpl) +{ + FSGIC_FSGHandInterpolatorImpl OutHandInterpolatorContainer; + FSGIC_FSGHandInterpolatorImpl RhsContainer{HandInterpolatorImpl}; + SGCoreImpl_FSGHandInterpolatorImpl_ctor_copy(&OutHandInterpolatorContainer, &RhsContainer); + Pimpl->HandInterpolatorImpl = MoveTemp(OutHandInterpolatorContainer.HandInterpolatorImpl); +} + +const FSGHandInterpolatorImpl& USGHandInterpolator::ToHandInterpolatorImpl() const +{ + return Pimpl->HandInterpolatorImpl; +} + +float USGHandInterpolator::CalculateAngle( + const ESGFingerMovement Movement, const float Value, const bool bApplyLimits) const +{ + FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()}; + FSGIC_ESGFingerMovement MovementContainer{Movement}; + const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGFingerMovement_Value_bApplyLimits( + &InstanceContainer, &MovementContainer, Value, bApplyLimits); + return Angle; +} + +float USGHandInterpolator::CalculateAngle( + const ESGThumbMovement Movement, const float Value, const bool bApplyLimits) const +{ + FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()}; + FSGIC_ESGThumbMovement MovementContainer{Movement}; + const float Angle = SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGThumbMovement_Value_bApplyLimits( + &InstanceContainer, &MovementContainer, Value, bApplyLimits); + return Angle; +} + +TArray> USGHandInterpolator::InterpolateHandAngles( + const TArray>& Flexions, const TArray& Abductions, const float CmcTwist) const +{ + FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()}; + FSGIC_TArray_TArray_FVector OutAnglesContainer; + FSGIC_TArray_TArray_float FlexionsContainer{Flexions}; + FSGIC_TArray_float AbductionsContainer{Abductions}; + SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles( + &InstanceContainer, &OutAnglesContainer, &FlexionsContainer, &AbductionsContainer, CmcTwist); + return OutAnglesContainer.Array; +} + +bool USGHandInterpolator::Equals(const USGHandInterpolator* HandInterpolator) const +{ + FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()}; + FSGIC_FSGHandInterpolatorImpl HandInterpolatorContainer{HandInterpolator->ToHandInterpolatorImpl()}; + const bool bEquals = SGCoreImpl_FSGHandInterpolatorImpl_Equals(&InstanceContainer, &HandInterpolatorContainer); + return bEquals; +} + +FString USGHandInterpolator::SGSerialize() const +{ + FSGIC_FSGHandInterpolatorImpl InstanceContainer{ToHandInterpolatorImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHandInterpolatorImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGHandInterpolator::FImpl::FImpl(USGHandInterpolator* InOwner) + : Owner(InOwner) +{ +} + +USGHandInterpolator::FImpl::~FImpl() = default; + +void USGHandInterpolator::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandLayer.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandLayer.cpp new file mode 100644 index 0000000..77324b1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandLayer.cpp @@ -0,0 +1,241 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGHandLayer.h" + +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGHapticGlove.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" +#include "SGInterop/SGIC_ESGHapticLocation.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGCustomWaveformImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h" + +bool FSGHandLayer::DeviceConnected(const bool bRightHanded) +{ + return SGCoreImpl_FSGHandLayerImpl_DeviceConnected(bRightHanded); +} + +ESGDeviceType FSGHandLayer::GetDeviceType(const bool bRightHanded) +{ + FSGIC_ESGDeviceType DeviceTypeContainer; + SGCoreImpl_FSGHandLayerImpl_GetDeviceType(&DeviceTypeContainer, bRightHanded); + return DeviceTypeContainer.Type; +} + +bool FSGHandLayer::GetFirstGloveHandedness() +{ + return SGCoreImpl_FSGHandLayerImpl_GetFirstGloveHandedness(); +} + +int32 FSGHandLayer::GlovesConnected() +{ + return SGCoreImpl_FSGHandLayerImpl_GlovesConnected(); +} + +bool FSGHandLayer::GetGloveInstance(UObject* Outer, const bool bRightHanded, USGHapticGlove*& OutGlove) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGHandLayerImpl_GetGloveInstance(bRightHanded, &OutGloveContainer); + OutGlove = USGHapticGlove::NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef()); + return bResult; +} + +ESGHapticGloveCalibrationState FSGHandLayer::GetCalibrationState(const bool bRightHanded) +{ + FSGIC_ESGHapticGloveCalibrationState HapticGloveCalibrationStateContainer; + SGCoreImpl_FSGHandLayerImpl_GetDeviceType(&HapticGloveCalibrationStateContainer, bRightHanded); + return HapticGloveCalibrationStateContainer.State; +} + +FString FSGHandLayer::GetCalibrationInstructions(const bool bRightHanded) +{ + FSGIC_FString CalibrationInstructionsContainer; + SGCoreImpl_FSGHandLayerImpl_GetCalibrationInstructions(&CalibrationInstructionsContainer, bRightHanded); + return CalibrationInstructionsContainer.String; +} + +void FSGHandLayer::ResetCalibration(const bool bRightHanded) +{ + SGCoreImpl_FSGHandLayerImpl_ResetCalibration(bRightHanded); +} + +void FSGHandLayer::EndCalibration(const bool bRightHanded) +{ + SGCoreImpl_FSGHandLayerImpl_EndCalibration(bRightHanded); +} + +bool FSGHandLayer::GetHandPose(UObject* Outer, const bool bRightHanded, USGHandPose*& OutHandPose) +{ + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + const bool bResult = SGCoreImpl_FSGHandLayerImpl_GetHandPose(bRightHanded, &OutHandPoseContainer); + OutHandPose = USGHandPose::NewHandPose(Outer, OutHandPose->ToHandPoseImpl()); + return bResult; +} + +void FSGHandLayer::GetWristLocation( + const bool bRightHanded, const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGHandLayerImpl_GetWristLocation( + bRightHanded, &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void FSGHandLayer::GetWristLocation( + const bool bRightHanded, const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, FVector& OutWristPosition, FRotator& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGHandLayerImpl_GetWristLocation( + bRightHanded, &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +void FSGHandLayer::StopAllHaptics(const bool bRightHanded) +{ + SGCoreImpl_FSGHandLayerImpl_StopAllHaptics(bRightHanded); +} + +bool FSGHandLayer::SendHaptics(const bool bRightHanded) +{ + return SGCoreImpl_FSGHandLayerImpl_SendHaptics(bRightHanded); +} + +bool FSGHandLayer::SupportsCustomWaveform( + const bool bRightHanded, const ESGHapticLocation AtLocation) +{ + FSGIC_ESGHapticLocation AtLocationContainer{AtLocation}; + return SGCoreImpl_FSGHandLayerImpl_SupportsCustomWaveform(bRightHanded, &AtLocationContainer); +} + +bool FSGHandLayer::SendCustomWaveform( + const bool bRightHanded, USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()}; + FSGIC_ESGHapticLocation LocationContainer{Location}; + return SGCoreImpl_FSGHandLayerImpl_SendCustomWaveform(bRightHanded, &OutWaveformContainer, &LocationContainer); +} + +bool FSGHandLayer::QueueCommand_ForceFeedbackLevel( + const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate) +{ + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevel(bRightHanded, Finger, Level01, bSendImmediate); +} + +bool FSGHandLayer::QueueCommand_ForceFeedbackLevels( + const bool bRightHanded, const TArray& Levels01, const bool bSendImmediate) +{ + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevels( + bRightHanded, &Levels01Container, bSendImmediate); +} + +bool FSGHandLayer::QueueCommand_VibroLevels( + const bool bRightHanded, const TArray& Levels01, const bool bSendImmediate) +{ + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevels(bRightHanded, &Levels01Container, bSendImmediate); +} + +bool FSGHandLayer::QueueCommand_VibroLevel( + const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate) +{ + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_Finger_Level0_bSendImmediate( + bRightHanded, Finger, Level01, bSendImmediate); +} + +bool FSGHandLayer::QueueCommand_VibroLevel( + const bool bRightHanded, const ESGHapticLocation AtLocation, const float Level01, const bool bSendImmediate) +{ + FSGIC_ESGHapticLocation AtLocationContainer{AtLocation}; + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_AtLocation_Level01_bSendImmediate( + bRightHanded, &AtLocationContainer, Level01, bSendImmediate); +} + +bool FSGHandLayer::SupportsWristSqueeze(const bool bRightHanded) +{ + return SGCoreImpl_FSGHandLayerImpl_SupportsWristSqueeze(bRightHanded); +} + +bool FSGHandLayer::QueueCommand_WristSqueeze( + const bool bRightHanded, const float SqueezeLevel01, const bool bSendImmediate) +{ + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_WristSqueeze(bRightHanded, SqueezeLevel01, bSendImmediate); +} + +bool FSGHandLayer::SupportsFlexionLocks(const bool bRightHanded) +{ + return SGCoreImpl_FSGHandLayerImpl_SupportsFlexionLocks(bRightHanded); +} + +bool FSGHandLayer::QueueCommand_FlexionLock( + const bool bRightHanded, const int32 Finger, const float Flexion01, const bool bSendImmediate) +{ + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_FlexionLock(bRightHanded, Finger, Flexion01, bSendImmediate); +} + +bool FSGHandLayer::QueueCommand_ClearFlexionLock( + const bool bRightHanded, const int32 Finger, const bool bSendImmediate) +{ + return SGCoreImpl_FSGHandLayerImpl_QueueCommand_ClearFlexionLock(bRightHanded, Finger, bSendImmediate); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandPose.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandPose.cpp new file mode 100644 index 0000000..b56e1cd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHandPose.cpp @@ -0,0 +1,471 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGHandPose.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TArray_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGTypes/SGRotatorArray.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGHandPose::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGHandPoseImpl HandPoseImpl; + + /************************ + * Owner object + ************************/ + + USGHandPose* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGHandPose* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGHandPose* USGHandPose::NewHandPose(UObject* Outer, const FSGHandPoseImpl& HandPoseImpl) +{ + USGHandPose* Instance = NewObject(Outer); + Instance->SetHandPoseImpl(HandPoseImpl); + return Instance; +} + +USGHandPose* USGHandPose::NewHandPose(UObject* Outer) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + SGCoreImpl_FSGHandPoseImpl_ctor(&OutHandPoseImplContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::NewHandPose( + UObject* Outer, + const bool bRightHanded, const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{JointRotations}; + FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles}; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::NewHandPose( + UObject* Outer, + const bool bRightHanded, + const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)}; + FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles}; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::NewHandPose( + UObject* Outer, + const bool bRightHanded, const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::FromNestedBPArray(JointRotations) + }; + FSGIC_TArray_TArray_FVector HandAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(HandAngles) + }; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::NewHandPose( + UObject* Outer, + const bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::RotatorsToQuats(JointRotations) + }; + FSGIC_TArray_TArray_FVector HandAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(HandAngles) + }; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGHandPoseImpl_Deserialize(&OutHandPoseImplContainer, &SerializedStringContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::FromHandAngles(UObject* Outer, + const TArray>& HandAngles, const bool bRightHanded, + const USGBasicHandModel* HandDimensions) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles}; + FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()}; + SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded_HandDimensions( + &OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded, &HandDimensionsContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::FromHandAngles(UObject* Outer, + const TArray>& HandAngles, const bool bRightHanded) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles}; + SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded( + &OutHandPoseImplContainer, &HandAnglesContainer, bRightHanded); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::DefaultIdle(UObject* Outer, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()}; + SGCoreImpl_FSGHandPoseImpl_DefaultIdle_bRightHanded_HandDimensions( + &OutHandPoseImplContainer, bRightHanded, &HandDimensionsContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::DefaultIdle(UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + SGCoreImpl_FSGHandPoseImpl_DefaultIdle_bRightHanded(&OutHandPoseImplContainer, bRightHanded); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::FlatHand(UObject* Outer, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()}; + SGCoreImpl_FSGHandPoseImpl_FlatHand_bRightHanded_HandDimensions( + &OutHandPoseImplContainer, bRightHanded, &HandDimensionsContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::FlatHand(UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + SGCoreImpl_FSGHandPoseImpl_FlatHand_bRightHanded(&OutHandPoseImplContainer, bRightHanded); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::ThumbsUp(UObject* Outer, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()}; + SGCoreImpl_FSGHandPoseImpl_ThumbsUp_bRightHanded_HandDimensions( + &OutHandPoseImplContainer, bRightHanded, &HandDimensionsContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::ThumbsUp(UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + SGCoreImpl_FSGHandPoseImpl_ThumbsUp_bRightHanded(&OutHandPoseImplContainer, bRightHanded); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::Fist(UObject* Outer, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_FSGBasicHandModelImpl HandDimensionsContainer{HandDimensions->ToBasicHandModelImpl()}; + SGCoreImpl_FSGHandPoseImpl_Fist_bRightHanded_HandDimensions( + &OutHandPoseImplContainer, bRightHanded, &HandDimensionsContainer); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose* USGHandPose::Fist(UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + SGCoreImpl_FSGHandPoseImpl_Fist_bRightHanded(&OutHandPoseImplContainer, bRightHanded); + + return NewHandPose(Outer, MoveTemp(OutHandPoseImplContainer.HandPoseImpl)); +} + +USGHandPose::USGHandPose() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + SGCoreImpl_FSGHandPoseImpl_ctor(&OutHandPoseImplContainer); + + Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl); +} + +USGHandPose::USGHandPose(const bool bRightHanded, + const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{JointRotations}; + FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles}; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl); +} + +USGHandPose::USGHandPose(const bool bRightHanded, + const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)}; + FSGIC_TArray_TArray_FVector HandAnglesContainer{HandAngles}; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl); +} + +USGHandPose::USGHandPose(const bool bRightHanded, const + TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::FromNestedBPArray(JointRotations) + }; + FSGIC_TArray_TArray_FVector HandAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(HandAngles) + }; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl); +} + +USGHandPose::USGHandPose(const bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHandPoseImpl OutHandPoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::RotatorsToQuats(JointRotations) + }; + FSGIC_TArray_TArray_FVector HandAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(HandAngles) + }; + SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + &OutHandPoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &HandAnglesContainer); + + Pimpl->HandPoseImpl = MoveTemp(OutHandPoseImplContainer.HandPoseImpl); +} + +USGHandPose::USGHandPose(const FSGHandPoseImpl& HandPoseImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetHandPoseImpl(HandPoseImpl); +} + +USGHandPose::~USGHandPose() = default; + +void USGHandPose::SetHandPoseImpl(const FSGHandPoseImpl& HandPoseImpl) +{ + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + FSGIC_FSGHandPoseImpl RhsContainer{HandPoseImpl}; + SGCoreImpl_FSGHandPoseImpl_ctor_copy(&OutHandPoseContainer, &RhsContainer); + Pimpl->HandPoseImpl = MoveTemp(OutHandPoseContainer.HandPoseImpl); +} + +const FSGHandPoseImpl& USGHandPose::ToHandPoseImpl() const +{ + return Pimpl->HandPoseImpl; +} + +bool USGHandPose::IsRight() const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + return SGCoreImpl_FSGHandPoseImpl_IsRight(&InstanceContainer); +} + +TArray> USGHandPose::GetJointPositions() const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_TArray_TArray_FVector OutPositionsContainer; + SGCoreImpl_FSGHandPoseImpl_GetJointPositions(&InstanceContainer, &OutPositionsContainer); + return OutPositionsContainer.Array; +} + +TArray> USGHandPose::GetJointRotationsQ() const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_TArray_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer); + return OutRotationsContainer.Array; +} + +TArray> USGHandPose::GetJointRotations() const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_TArray_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGHandPoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer); + return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); +} + +TArray> USGHandPose::GetHandAngles() const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_TArray_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGHandPoseImpl_GetHandAngles(&InstanceContainer, &OutAnglesContainer); + return OutAnglesContainer.Array; +} + +bool USGHandPose::Equals(const USGHandPose* HandPose) const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_FSGHandPoseImpl HandPoseContainer{HandPose->ToHandPoseImpl()}; + return SGCoreImpl_FSGHandPoseImpl_Equals(&InstanceContainer, &HandPoseContainer); +} + +float USGHandPose::GetNormalizedFlexion(const ESGFinger Finger, const bool bClamp01) const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + return SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_Finger_bClamp01( + &InstanceContainer, &FingerContainer, bClamp01); +} + +TArray USGHandPose::GetNormalizedFlexion(const bool bClamp01) const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_TArray_float OutFlexionContainer; + SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_bClamp01(&InstanceContainer, &OutFlexionContainer, bClamp01); + return OutFlexionContainer.Array; +} + +FString USGHandPose::ToString(const bool bShortFormat) const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHandPoseImpl_ToString(&InstanceContainer, &OutStringContainer, bShortFormat); + return OutStringContainer.String; +} + +FString USGHandPose::SGSerialize() const +{ + FSGIC_FSGHandPoseImpl InstanceContainer{ToHandPoseImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHandPoseImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGHandPose::FImpl::FImpl(USGHandPose* InOwner) + : Owner(InOwner) +{ +} + +USGHandPose::FImpl::~FImpl() = default; + +void USGHandPose::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHapticChannelInfo.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHapticChannelInfo.cpp new file mode 100644 index 0000000..e5cabe1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHapticChannelInfo.cpp @@ -0,0 +1,236 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGHapticChannelInfo.h" + +#include "SGCoreImpl/SGHapticChannelInfoImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGHapticChannelType.h" +#include "SGInterop/SGIC_ESGWaveformType.h" +#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_FString.h" +#include "SGInterop/SGIC_TArray_int32.h" + +struct USGHapticChannelInfo::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGHapticChannelInfoImpl HapticChannelInfoImpl; + + /************************ + * Owner object + ************************/ + + USGHapticChannelInfo* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGHapticChannelInfo* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(UObject* Outer, + const FSGHapticChannelInfoImpl& HapticChannelInfoImpl) +{ + USGHapticChannelInfo* Instance = NewObject(Outer); + Instance->SetHapticChannelInfoImpl(HapticChannelInfoImpl); + return Instance; +} + +USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo(UObject* Outer) +{ + FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer; + SGCoreImpl_FSGHapticChannelInfoImpl_ctor(&OutHapticChannelInfoImplContainer); + + return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl)); +} + +USGHapticChannelInfo* USGHapticChannelInfo::NewHapticChannelInfo( + UObject* Outer, + const TArray& StreamIndex, const TArray& FireAndForgetIndex) +{ + FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer; + FSGIC_TArray_int32 StreamIndexContainer{StreamIndex}; + FSGIC_TArray_int32 FireAndForgetContainer{FireAndForgetIndex}; + SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex( + &OutHapticChannelInfoImplContainer, &StreamIndexContainer, &FireAndForgetContainer); + + return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl)); +} + +FString USGHapticChannelInfo::GenerateAddress(const int32 DeviceIndex, const int32 ChannelIndex) +{ + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHapticChannelInfoImpl_GenerateAddress(&OutStringContainer, DeviceIndex, ChannelIndex); + return OutStringContainer.String; +} + +USGHapticChannelInfo* USGHapticChannelInfo::Parse(UObject* Outer, const FString& IpcString) +{ + FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer; + FSGIC_FString IpcStringContainer{IpcString}; + SGCoreImpl_FSGHapticChannelInfoImpl_Parse(&OutHapticChannelInfoImplContainer, &IpcStringContainer); + + return NewHapticChannelInfo(Outer, MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl)); +} + +int32 USGHapticChannelInfo::GetStreamingType() +{ + return SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamingType(); +} + +int32 USGHapticChannelInfo::GetFireAndForgetType() +{ + return SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetType(); +} + +USGHapticChannelInfo::USGHapticChannelInfo() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer; + SGCoreImpl_FSGHapticChannelInfoImpl_ctor(&OutHapticChannelInfoImplContainer); + + Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl); +} + +USGHapticChannelInfo::USGHapticChannelInfo(const TArray& StreamIndex, const TArray& FireAndForgetIndex) +{ + FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoImplContainer; + FSGIC_TArray_int32 StreamIndexContainer{StreamIndex}; + FSGIC_TArray_int32 FireAndForgetContainer{FireAndForgetIndex}; + SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex( + &OutHapticChannelInfoImplContainer, &StreamIndexContainer, &FireAndForgetContainer); + + Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoImplContainer.HapticChannelInfoImpl); +} + +USGHapticChannelInfo::USGHapticChannelInfo(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetHapticChannelInfoImpl(HapticChannelInfoImpl); +} + +USGHapticChannelInfo::~USGHapticChannelInfo() = default; + +void USGHapticChannelInfo::SetHapticChannelInfoImpl(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl) +{ + FSGIC_FSGHapticChannelInfoImpl OutHapticChannelInfoContainer; + FSGIC_FSGHapticChannelInfoImpl RhsContainer{HapticChannelInfoImpl}; + SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy(&OutHapticChannelInfoContainer, &RhsContainer); + Pimpl->HapticChannelInfoImpl = MoveTemp(OutHapticChannelInfoContainer.HapticChannelInfoImpl); +} + +const FSGHapticChannelInfoImpl& USGHapticChannelInfo::ToHapticChannelInfoImpl() const +{ + return Pimpl->HapticChannelInfoImpl; +} + +int32 USGHapticChannelInfo::GetStreamChannelCount() const +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + return SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamChannelCount(&InstanceContainer); +} + +int32 USGHapticChannelInfo::GetFireAndForgetChannelCount() const +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + return SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetChannelCount(&InstanceContainer); +} + +int32 USGHapticChannelInfo::GetTotalChannelCount() const +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + return SGCoreImpl_FSGHapticChannelInfoImpl_GetTotalChannelCount(&InstanceContainer); +} + +FString USGHapticChannelInfo::GetAddress_Unguarded(const ESGHapticChannelType Type, const int32 TypeIndex) const +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + FSGIC_FString OutStringContainer; + FSGIC_ESGHapticChannelType TypeContainer{Type}; + SGCoreImpl_FSGHapticChannelInfoImpl_GetAddress_Unguarded( + &InstanceContainer, &OutStringContainer, &TypeContainer, TypeIndex); + return OutStringContainer.String; +} + +void USGHapticChannelInfo::GetIpcParams_Unguarded( + const ESGHapticChannelType Type, const int32 TypeIndex, int32& OutIndex, FString& OutAddressString) const +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + FSGIC_ESGHapticChannelType TypeContainer{Type}; + FSGIC_FString OutAddressStringContainer; + SGCoreImpl_FSGHapticChannelInfoImpl_GetIpcParams_Unguarded( + &InstanceContainer, &TypeContainer, TypeIndex, &OutIndex, &OutAddressString); + + OutAddressString = MoveTemp(OutAddressStringContainer.String); +} + +void USGHapticChannelInfo::RegenerateAddresses(const int32 ForDeviceIndex) +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + SGCoreImpl_FSGHapticChannelInfoImpl_RegenerateAddresses(&InstanceContainer, ForDeviceIndex); +} + +TArray USGHapticChannelInfo::GetAllAddresses() const +{ + FSGIC_FSGHapticChannelInfoImpl InstanceContainer{ToHapticChannelInfoImpl()}; + FSGIC_TArray_FString* OutArrayContainer; + SGCoreImpl_FSGHapticChannelInfoImpl_GetAllAddresses(&InstanceContainer, &OutArrayContainer); + return OutArrayContainer->Array; +} + +USGHapticChannelInfo::FImpl::FImpl(USGHapticChannelInfo* InOwner) + : Owner(InOwner) +{ +} + +USGHapticChannelInfo::FImpl::~FImpl() = default; + +void USGHapticChannelInfo::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHapticGlove.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHapticGlove.cpp new file mode 100644 index 0000000..ffc2e7e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGHapticGlove.cpp @@ -0,0 +1,515 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGHapticGlove.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGDeviceImplCast.h" +#include "SGCore/SGSenseGlove.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCustomWaveformImpl.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" +#include "SGInterop/SGIC_ESGHapticLocation.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FSGCustomWaveformImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h" + +USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer, const FSGHapticGloveImpl& HapticGloveImpl) +{ + USGHapticGlove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(HapticGloveImpl); + return Instance; +} + +USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer, TSharedRef HapticGloveImpl) +{ + USGHapticGlove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(MoveTemp(HapticGloveImpl)); + return Instance; +} + +USGHapticGlove* USGHapticGlove::NewHapticGlove(UObject* Outer) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer); + + return NewHapticGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +TArray USGHapticGlove::GetHapticGloves(UObject* Outer, const bool bConnectedOnly) +{ + FSGIC_TArray_TSharedRef_FSGHapticGloveImpl OutGlovesContainer; + SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves(&OutGlovesContainer, bConnectedOnly); + TArray HapticGloves; + for (TSharedRef HapticGloveImpl: OutGlovesContainer.Array) + { + HapticGloves.Add(NewHapticGlove(Outer, MoveTemp(HapticGloveImpl))); + } + return HapticGloves; +} + +bool USGHapticGlove::GetGlove(UObject* Outer, USGHapticGlove*& OutGlove) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetGlove_OutGlove(&OutGloveContainer); + + if (bResult) + { + OutGlove = NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef()); + } + + return bResult; +} + +bool USGHapticGlove::GetGlove(UObject* Outer, const bool bRightHanded, USGHapticGlove*& OutGlove) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutGloveContainer; + + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove( + bRightHanded, &OutGloveContainer); + if (bResult) + { + OutGlove = NewHapticGlove(Outer, OutGloveContainer.Ptr.ToSharedRef()); + } + + return bResult; +} + +FString USGHapticGlove::ToString(const ESGHapticGloveCalibrationState State) +{ + FSGIC_ESGHapticGloveCalibrationState StateContainer{State}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHapticGloveImpl_ToString_State(&StateContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGHapticGlove::ToString(const ESGHapticLocation Location) +{ + FSGIC_ESGHapticLocation LocationContainer{Location}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHapticGloveImpl_ToString_Location(&LocationContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGHapticGlove::USGHapticGlove() + : USGDevice() +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared(&OutSharedPtrContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGHapticGlove::USGHapticGlove(const FSGDeviceImpl& SGDeviceImpl) + : USGDevice(SGDeviceImpl) +{ +} + +USGHapticGlove::USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl) + : USGDevice(HapticGloveImpl) +{ +} + +USGHapticGlove::USGHapticGlove(const FSGNova2GloveImpl& Nova2GloveImpl) + : USGDevice(Nova2GloveImpl) +{ +} + +USGHapticGlove::USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl) + : USGDevice(NovaGloveImpl) +{ +} + +USGHapticGlove::USGHapticGlove(const FSGSenseGloveImpl& SenseGloveImpl) + : USGDevice(SenseGloveImpl) +{ +} + +USGHapticGlove::USGHapticGlove(TSharedRef SGDeviceImpl) + : USGDevice(MoveTemp(SGDeviceImpl)) +{ +} + +USGHapticGlove::USGHapticGlove(TSharedRef HapticGloveImpl) + : USGDevice(MoveTemp(HapticGloveImpl)) +{ +} + +USGHapticGlove::USGHapticGlove(TSharedRef Nova2GloveImpl) + : USGDevice(MoveTemp(Nova2GloveImpl)) +{ +} + +USGHapticGlove::USGHapticGlove(TSharedRef NovaGloveImpl) + : USGDevice(MoveTemp(NovaGloveImpl)) +{ +} + +USGHapticGlove::USGHapticGlove(TSharedRef SenseGloveImpl) + : USGDevice(MoveTemp(SenseGloveImpl)) +{ +} + +USGHapticGlove::~USGHapticGlove() = default; + +TSharedRef USGHapticGlove::ToHapticGloveImpl() const +{ + return FSGDeviceImplCast::ToHapticGloveImpl(ToSGDeviceImpl()); +} + +ESGDeviceType USGHapticGlove::GetDeviceType() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_ESGDeviceType OutTypeContainer; + SGCoreImpl_FSGHapticGloveImpl_GetDeviceType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +FString USGHapticGlove::GetDeviceId() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGHapticGloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGHapticGlove::GetHardwareVersion() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGHapticGloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGHapticGlove::GetFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + return SGCoreImpl_FSGHapticGloveImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGHapticGlove::GetSubFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + return SGCoreImpl_FSGHapticGloveImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +bool USGHapticGlove::IsRight() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + return SGCoreImpl_FSGHapticGloveImpl_IsRight(&InstanceContainer); +} + +bool USGHapticGlove::GetImuRotation(FQuat& OutImu) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = MoveTemp(OutImuContainer.Quat); + } + + return bResult; +} + +bool USGHapticGlove::GetImuRotation(FRotator& OutImu) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = OutImuContainer.Quat.Rotator(); + } + + return bResult; +} + +bool USGHapticGlove::GetHandPose( + UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()}; + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandGeometry_OutHandPose( + &InstanceContainer, &HandGeometryContainer, &OutHandPoseContainer); + + if (bResult) + { + OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl)); + } + + return bResult; +} + +bool USGHapticGlove::GetHandPose(UObject* Outer, USGHandPose*& OutHandPose) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandPose_OutHandPose( + &InstanceContainer, &OutHandPoseContainer); + + if (bResult) + { + OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl)); + } + + return bResult; +} + +bool USGHapticGlove::GetHandAngles(TArray>& OutHandAngles) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + const bool bResult = SGCoreImpl_FSGHapticGloveImpl_GetHandAngles_OutHandAngles( + &InstanceContainer, &OutHandAnglesContainer); + + if (bResult) + { + OutHandAngles = MoveTemp(OutHandAnglesContainer.Array); + } + + return bResult; +} + +USGBasicHandModel* USGHapticGlove::GetHandGeometry(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FSGBasicHandModelImpl OutBasicHandModelContainer; + SGCoreImpl_FSGHapticGloveImpl_GetHandGeometry(&InstanceContainer, &OutBasicHandModelContainer); + return USGBasicHandModel::NewBasicHandModel(Outer, MoveTemp(OutBasicHandModelContainer.BasicHandModelImpl)); +} + +void USGHapticGlove::SetHandGeometry(const USGBasicHandModel* HandGeometry) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FSGBasicHandModelImpl HandGeometryContainer{HandGeometry->ToBasicHandModelImpl()}; + SGCoreImpl_FSGHapticGloveImpl_SetHandGeometry(&InstanceContainer, &HandGeometryContainer); +} + +ESGHapticGloveCalibrationState USGHapticGlove::GetCalibrationState() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_ESGHapticGloveCalibrationState OutHapticGloveCalibrationStateContainer; + SGCoreImpl_FSGHapticGloveImpl_GetCalibrationState(&InstanceContainer, &OutHapticGloveCalibrationStateContainer); + return OutHapticGloveCalibrationStateContainer.State; +} + +void USGHapticGlove::EndCalibration() +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + SGCoreImpl_FSGHapticGloveImpl_EndCalibration(&InstanceContainer); +} + +void USGHapticGlove::ResetCalibration() +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + SGCoreImpl_FSGHapticGloveImpl_ResetCalibration(&InstanceContainer); +} + +FString USGHapticGlove::GetCalibrationInstruction() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHapticGloveImpl_GetCalibrationInstruction(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +void USGHapticGlove::StopHaptics() +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + SGCoreImpl_FSGHapticGloveImpl_StopHaptics(&InstanceContainer); +} + +void USGHapticGlove::StopVibrations() +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + SGCoreImpl_FSGHapticGloveImpl_StopVibrations(&InstanceContainer); +} + +bool USGHapticGlove::SendHaptics() +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + return SGCoreImpl_FSGHapticGloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGHapticGlove::QueueForceFeedbackLevels(const TArray& Levels01) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container); +} + +bool USGHapticGlove::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + return SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01); +} + +bool USGHapticGlove::QueueVibroLevels(const TArray& Levels01) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevels(&InstanceContainer, &Levels01Container); +} + +bool USGHapticGlove::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_ESGHapticLocation LocationContainer{Location}; + return SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevel(&InstanceContainer, &LocationContainer, Level01); +} + +bool USGHapticGlove::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_ESGHapticLocation AtLocationContainer{AtLocation}; + return SGCoreImpl_FSGHapticGloveImpl_SupportsCustomWaveform(&InstanceContainer, &AtLocationContainer); +} + +bool USGHapticGlove::SendCustomWaveform(USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()}; + FSGIC_ESGHapticLocation LocationContainer{Location}; + return SGCoreImpl_FSGHapticGloveImpl_SendCustomWaveform( + &InstanceContainer, &OutWaveformContainer, &LocationContainer); +} + +void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGHapticGloveImpl_GetWristLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGHapticGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGHapticGloveImpl_GetWristLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGHapticGloveImpl_GetGloveLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGHapticGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGHapticGloveImpl_GetGloveLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +FString USGHapticGlove::ToString() const +{ + FSGIC_TSharedPtr_FSGHapticGloveImpl InstanceContainer{ToHapticGloveImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGHapticGloveImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGInterpolationSet.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGInterpolationSet.cpp new file mode 100644 index 0000000..05e7803 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGInterpolationSet.cpp @@ -0,0 +1,288 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGInterpolationSet.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGInterpolationSetImpl.h" +#include "SGInterop/SGIC_FSGInterpolationSetImpl.h" +#include "SGInterop/SGIC_FString.h" + +struct USGInterpolationSet::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGInterpolationSetImpl InterpolationSetImpl; + + /************************ + * Owner object + ************************/ + + USGInterpolationSet* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGInterpolationSet* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGInterpolationSet* USGInterpolationSet::NewInterpolationSet(UObject* Outer, + const FSGInterpolationSetImpl& InterpolationSetImpl) +{ + USGInterpolationSet* Instance = NewObject(Outer); + Instance->SetInterpolationSetImpl(InterpolationSetImpl); + return Instance; +} + +USGInterpolationSet* USGInterpolationSet::NewInterpolationSet(UObject* Outer) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + SGCoreImpl_FSGInterpolationSetImpl_ctor(&OutInterpolationSetImplContainer); + + return NewInterpolationSet(Outer, MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl)); +} + +USGInterpolationSet* USGInterpolationSet::NewInterpolationSet( + UObject* Outer, const float From1, const float From2, const float To1, const float To2) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2(&OutInterpolationSetImplContainer, + From1, From2, To1, To2); + + return NewInterpolationSet(Outer, MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl)); +} + +USGInterpolationSet* USGInterpolationSet::NewInterpolationSet( + UObject* Outer, + const float From1, const float From2, const float To1, const float To2, const float Min, const float Max) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2_Min_Max(&OutInterpolationSetImplContainer, + From1, From2, To1, To2, Min, Max); + + return NewInterpolationSet(Outer, MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl)); +} + +USGInterpolationSet* USGInterpolationSet::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGInterpolationSetImpl_Deserialize(&OutInterpolationSetImplContainer, &SerializedStringContainer); + + return NewInterpolationSet(Outer, MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl)); +} + +USGInterpolationSet::USGInterpolationSet() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + SGCoreImpl_FSGInterpolationSetImpl_ctor(&OutInterpolationSetImplContainer); + + Pimpl->InterpolationSetImpl = MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl); +} + +USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, const float To1, const float To2) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2(&OutInterpolationSetImplContainer, + From1, From2, To1, To2); + + Pimpl->InterpolationSetImpl = MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl); +} + +USGInterpolationSet::USGInterpolationSet(const float From1, const float From2, const float To1, const float To2, + const float Min, const float Max) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetImplContainer; + SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2_Min_Max(&OutInterpolationSetImplContainer, + From1, From2, To1, To2, Min, Max); + + Pimpl->InterpolationSetImpl = MoveTemp(OutInterpolationSetImplContainer.InterpolationSetImpl); +} + +USGInterpolationSet::USGInterpolationSet(const FSGInterpolationSetImpl& InterpolationSetImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetInterpolationSetImpl(InterpolationSetImpl); +} + +USGInterpolationSet::~USGInterpolationSet() = default; + +void USGInterpolationSet::SetInterpolationSetImpl(const FSGInterpolationSetImpl& InterpolationSetImpl) +{ + FSGIC_FSGInterpolationSetImpl OutInterpolationSetContainer; + FSGIC_FSGInterpolationSetImpl RhsContainer{InterpolationSetImpl}; + SGCoreImpl_FSGInterpolationSetImpl_ctor_copy(&OutInterpolationSetContainer, &RhsContainer); + Pimpl->InterpolationSetImpl = MoveTemp(OutInterpolationSetContainer.InterpolationSetImpl); +} + +const FSGInterpolationSetImpl& USGInterpolationSet::ToInterpolationSetImpl() const +{ + return Pimpl->InterpolationSetImpl; +} + +float USGInterpolationSet::GetX0() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_GetX0(&InstanceContainer); +} + +void USGInterpolationSet::SetX0(const float X0) +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + SGCoreImpl_FSGInterpolationSetImpl_SetX0(&InstanceContainer, X0); +} + +float USGInterpolationSet::GetX1() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_GetX1(&InstanceContainer); +} + +void USGInterpolationSet::SetX1(const float X1) +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + SGCoreImpl_FSGInterpolationSetImpl_SetX1(&InstanceContainer, X1); +} + +float USGInterpolationSet::GetY0() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_GetY0(&InstanceContainer); +} + +void USGInterpolationSet::SetY0(const float Y0) +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + SGCoreImpl_FSGInterpolationSetImpl_SetY0(&InstanceContainer, Y0); +} + +float USGInterpolationSet::GetY1() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_GetY1(&InstanceContainer); +} + +void USGInterpolationSet::SetY1(const float Y1) +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + SGCoreImpl_FSGInterpolationSetImpl_SetY1(&InstanceContainer, Y1); +} + +float USGInterpolationSet::GetMin() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_GetMin(&InstanceContainer); +} + +void USGInterpolationSet::SetMin(const float Min) +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + SGCoreImpl_FSGInterpolationSetImpl_SetMin(&InstanceContainer, Min); +} + +float USGInterpolationSet::GetMax() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_GetMax(&InstanceContainer); +} + +void USGInterpolationSet::SetMax(const float Max) +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + SGCoreImpl_FSGInterpolationSetImpl_SetMax(&InstanceContainer, Max); +} + +float USGInterpolationSet::Get(const float Value, const bool bLimit, const bool bNormalizeAngle) const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_Get(&InstanceContainer, Value, bLimit, bNormalizeAngle); +} + +bool USGInterpolationSet::Equals(const USGInterpolationSet* InterpolationSet) const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + FSGIC_FSGInterpolationSetImpl InterpolationSetContainer{InterpolationSet->ToInterpolationSetImpl()}; + return SGCoreImpl_FSGInterpolationSetImpl_Equals(&InstanceContainer, &InterpolationSetContainer); +} + +FString USGInterpolationSet::ToString() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGInterpolationSetImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGInterpolationSet::ToString(const bool bLimits) const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGInterpolationSetImpl_ToString_bLimits(&InstanceContainer, &OutStringContainer, bLimits); + return OutStringContainer.String; +} + +FString USGInterpolationSet::SGSerialize() const +{ + FSGIC_FSGInterpolationSetImpl InstanceContainer{ToInterpolationSetImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGInterpolationSetImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGInterpolationSet::FImpl::FImpl(USGInterpolationSet* InOwner) + : Owner(InOwner) +{ +} + +USGInterpolationSet::FImpl::~FImpl() = default; + +void USGInterpolationSet::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGInterpolationSetArray.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGInterpolationSetArray.cpp new file mode 100644 index 0000000..216def7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGInterpolationSetArray.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGInterpolationSetArray.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGJointKinematics.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGJointKinematics.cpp new file mode 100644 index 0000000..a6cd376 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGJointKinematics.cpp @@ -0,0 +1,132 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGJointKinematics.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +bool FSGJointKinematics::ForwardKinematics( + const FVector& StartPosition, const FQuat& StartRotation, const TArray& JointLengths, + const TArray& JointAngles, TArray& OutNewPositions, TArray& OutNewRotations) +{ + FSGIC_FVector StartPositionContainer{StartPosition}; + FSGIC_FQuat StartRotationContainer{StartRotation}; + FSGIC_TArray_FVector JointLengthsContainer{JointLengths}; + FSGIC_TArray_FVector JointAnglesContainer{JointAngles}; + FSGIC_TArray_FVector OutNewPositionsContainer; + FSGIC_TArray_FQuat OutNewRotationsContainer; + + const bool bResult = + SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations( + &StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer, + &OutNewPositionsContainer, &OutNewRotationsContainer); + + OutNewPositions = MoveTemp(OutNewPositionsContainer.Array); + OutNewRotations = MoveTemp(OutNewRotationsContainer.Array); + + return bResult; +} + +bool FSGJointKinematics::ForwardKinematics( + const FVector& StartPosition, const FRotator& StartRotation, const TArray& JointLengths, + const TArray& JointAngles, TArray& OutNewPositions, TArray& OutNewRotations) +{ + FSGIC_FVector StartPositionContainer{StartPosition}; + FSGIC_FQuat StartRotationContainer{StartRotation.Quaternion()}; + FSGIC_TArray_FVector JointLengthsContainer{JointLengths}; + FSGIC_TArray_FVector JointAnglesContainer{JointAngles}; + FSGIC_TArray_FVector OutNewPositionsContainer; + FSGIC_TArray_FQuat OutNewRotationsContainer; + + const bool bResult = + SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations( + &StartPositionContainer, &StartRotationContainer, &JointLengthsContainer, &JointAnglesContainer, + &OutNewPositionsContainer, &OutNewRotationsContainer); + + OutNewPositions = MoveTemp(OutNewPositionsContainer.Array); + OutNewRotations = FSGArrayUtils::QuatsToRotators(OutNewRotationsContainer.Array); + + return bResult; +} + +bool FSGJointKinematics::ForwardKinematics( + const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations) +{ + FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_TArray_FVector JointAnglesContainer{JointAngles}; + FSGIC_TArray_FVector OutNewPositionsContainer; + FSGIC_TArray_FQuat OutNewRotationsContainer; + + const bool bResult = + SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations( + &ProfileContainer, &FingerContainer, &JointAnglesContainer, + &OutNewPositionsContainer, &OutNewRotationsContainer); + + OutNewPositions = MoveTemp(OutNewPositionsContainer.Array); + OutNewRotations = MoveTemp(OutNewRotationsContainer.Array); + + return bResult; +} + +bool FSGJointKinematics::ForwardKinematics( + const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations) +{ + FSGIC_FSGBasicHandModelImpl ProfileContainer{Profile->ToBasicHandModelImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_TArray_FVector JointAnglesContainer{JointAngles}; + FSGIC_TArray_FVector OutNewPositionsContainer; + FSGIC_TArray_FQuat OutNewRotationsContainer; + + const bool bResult = + SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations( + &ProfileContainer, &FingerContainer, &JointAnglesContainer, + &OutNewPositionsContainer, &OutNewRotationsContainer); + + OutNewPositions = MoveTemp(OutNewPositionsContainer.Array); + OutNewRotations = FSGArrayUtils::QuatsToRotators(OutNewRotationsContainer.Array); + + return bResult; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGLibrary.cpp new file mode 100644 index 0000000..0a605e2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGLibrary.cpp @@ -0,0 +1,68 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGLibrary.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGBackendType.h" +#include "SGInterop/SGIC_FString.h" + +FString FSGLibrary::GetVersion() +{ + FSGIC_FString Container; + SGCoreImpl_FSGLibraryImpl_Version(&Container); + return Container.String; +} + +ESGBackendType FSGLibrary::GetBackendType() +{ + FSGIC_ESGBackendType Container; + SGCoreImpl_FSGLibraryImpl_GetBackendType(&Container); + return Container.Type; +} + +FString FSGLibrary::GetBackendVersion() +{ + FSGIC_FString Container; + SGCoreImpl_FSGLibraryImpl_BackendVersion(&Container); + return Container.String; +} + +FString FSGLibrary::GetSGConnectVersion() +{ + FSGIC_FString Container; + SGCoreImpl_FSGLibraryImpl_SGConnectVersion(&Container); + return Container.String; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNova2Glove.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNova2Glove.cpp new file mode 100644 index 0000000..b721e81 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNova2Glove.cpp @@ -0,0 +1,742 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGNova2Glove.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGDeviceImplCast.h" +#include "SGCore/SGHandInterpolator.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCore/SGNova2GloveSensorData.h" +#include "SGCore/SGSensorNormalization.h" +#include "SGCore/SGThresholdCommand.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGNova2GloveImpl.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" +#include "SGInterop/SGIC_ESGHapticLocation.h" +#include "SGInterop/SGIC_ESGNova2VibroMotor.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FSGCustomWaveformImpl.h" +#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGSensorNormalizationImpl.h" +#include "SGInterop/SGIC_FSGThresholdCommandImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h" + +USGNova2Glove* USGNova2Glove::NewNova2Glove(UObject* Outer, const FSGNova2GloveImpl& Nova2GloveImpl) +{ + USGNova2Glove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(Nova2GloveImpl); + return Instance; +} + +USGNova2Glove* USGNova2Glove::NewNova2Glove(UObject* Outer, TSharedRef Nova2GloveImpl) +{ + USGNova2Glove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(MoveTemp(Nova2GloveImpl)); + return Instance; +} + +USGNova2Glove* USGNova2Glove::NewNova2Glove(UObject* Outer) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGNova2GloveImpl_ctor_MakeShared(&OutSharedPtrContainer); + + return NewNova2Glove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGNova2Glove* USGNova2Glove::NewNova2Glove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNova2GloveImpl_ctor_DeviceInfo_MakeShared(&OutSharedPtrContainer, &DeviceInfoContainer); + + return NewNova2Glove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGDevice* USGNova2Glove::Parse(UObject* Outer, const FString& ConstantsString) +{ + FSGIC_FSGNova2GloveImpl OutNova2GloveImplContainer; + FSGIC_FString ConstantsStringContainer{ConstantsString}; + SGCoreImpl_FSGNova2GloveImpl_Parse(&OutNova2GloveImplContainer, &ConstantsStringContainer); + + return NewNova2Glove(Outer, MoveTemp(OutNova2GloveImplContainer.Nova2GloveImpl)); +} + +TArray USGNova2Glove::GetNova2Gloves(UObject* Outer) +{ + FSGIC_TArray_FSGNova2GloveImpl OutGlovesContainer; + SGCoreImpl_FSGNova2GloveImpl_GetNova2Gloves(&OutGlovesContainer); + TArray Gloves; + for (const FSGNova2GloveImpl& Nova2GloveImpl: OutGlovesContainer.Array) + { + USGNova2Glove* Nova2Glove = USGNova2Glove::NewNova2Glove(Outer, Nova2GloveImpl); + Gloves.Add(Nova2Glove); + } + return Gloves; +} + +bool USGNova2Glove::GetNova2Glove(UObject* Outer, USGNova2Glove*& OutGlove) +{ + FSGIC_FSGNova2GloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetNova2Glove_OutGlove(&OutGloveContainer); + + if (bResult) + { + OutGlove = NewNova2Glove(Outer, MoveTemp(OutGloveContainer.Nova2GloveImpl)); + } + + return bResult; +} + +bool USGNova2Glove::GetNova2Glove(UObject* Outer, const bool bRightHanded, USGNova2Glove*& OutGlove) +{ + FSGIC_FSGNova2GloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetNova2Glove_bRightHanded_OutGlove( + bRightHanded, &OutGloveContainer); + + if (bResult) + { + OutGlove = NewNova2Glove(Outer, MoveTemp(OutGloveContainer.Nova2GloveImpl)); + } + + return bResult; +} + +void USGNova2Glove::CalculateGloveLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNova2GloveImpl_CalculateGloveLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, &HardwareVersionContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGNova2Glove::CalculateGloveLocation( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNova2GloveImpl_CalculateGloveLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, &HardwareVersionContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGNova2Glove::CalculateWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGNova2GloveImpl_CalculateWristLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, &HardwareVersionContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGNova2Glove::CalculateWristLocation( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGNova2GloveImpl_CalculateWristLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, &HardwareVersionContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +ANSICHAR USGNova2Glove::GetStreamByte() +{ + return SGCoreImpl_FSGNova2GloveImpl_GetStreamByte(); +} + +TArray USGNova2Glove::GetNova2SensorRanges() +{ + FSGIC_TArray_float OutNova2SensorRangesContainer; + SGCoreImpl_FSGNova2GloveImpl_GetNova2SensorRanges(&OutNova2SensorRangesContainer); + return OutNova2SensorRangesContainer.Array; +} + +TArray USGNova2Glove::ToNormalizedValues(const USGNova2GloveSensorData* SensorData) +{ + FSGIC_TArray_float OutNormalizedValuesContainer; + FSGIC_FSGNova2GloveSensorDataImpl SensorDataContainer{SensorData->ToNova2GloveSensorDataImpl()}; + SGCoreImpl_FSGNova2GloveImpl_ToNormalizedValues_SensorData( + &OutNormalizedValuesContainer, &SensorDataContainer); + return OutNormalizedValuesContainer.Array; +} + +TArray USGNova2Glove::ToNormalizedValues( + UObject* Outer, const USGNova2GloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer) +{ + FSGIC_TArray_float OutNormalizedValuesContainer; + FSGIC_FSGNova2GloveSensorDataImpl SensorDataContainer{SensorData->ToNova2GloveSensorDataImpl()}; + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizerContainer; + SGCoreImpl_FSGNova2GloveImpl_ToNormalizedValues_SensorData_OutSensorNormalizer( + &OutNormalizedValuesContainer, &SensorDataContainer, &OutSensorNormalizerContainer); + + OutSensorNormalizer = USGSensorNormalization::NewSensorNormalization( + Outer, MoveTemp(OutSensorNormalizerContainer.SensorNormalizationImpl)); + + return OutNormalizedValuesContainer.Array; +} + +TArray> USGNova2Glove::CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator, const bool bInfluenceIndex) +{ + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + FSGIC_TArray_float NormalizedValuesContainer{NormalizedValues}; + FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()}; + SGCoreImpl_FSGNova2GloveImpl_CalculateHandAngles( + &OutHandAnglesContainer, &NormalizedValuesContainer, &InterpolatorContainer, bInfluenceIndex); + return OutHandAnglesContainer.Array; +} + +TArray> USGNova2Glove::ToNormalizedAngles( + const TArray& NormalizedData, const USGNovaGloveInfo* GloveInfo) +{ + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + FSGIC_TArray_float NormalizedDataContainer{NormalizedData}; + FSGIC_FSGNovaGloveInfoImpl GloveInfoContainer{GloveInfo->ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNova2GloveImpl_ToNormalizedAngles( + &OutHandAnglesContainer, &NormalizedDataContainer, &GloveInfoContainer); + return OutHandAnglesContainer.Array; +} + +USGNova2Glove::USGNova2Glove() + : USGHapticGlove() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGNova2GloveImpl_ctor_MakeShared(&OutSharedPtrContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGNova2Glove::USGNova2Glove(const USGNovaGloveInfo& DeviceInfo) + : USGHapticGlove() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl OutSharedPtrContainer; + FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNova2GloveImpl_ctor_DeviceInfo_MakeShared(&OutSharedPtrContainer, &DeviceInfoContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGNova2Glove::USGNova2Glove(const FSGDeviceImpl& SGDeviceImpl) + : USGHapticGlove(SGDeviceImpl) +{ +} + +USGNova2Glove::USGNova2Glove(const FSGHapticGloveImpl& HapticGloveImpl) + : USGHapticGlove(HapticGloveImpl) +{ +} + +USGNova2Glove::USGNova2Glove(const FSGNova2GloveImpl& Nova2GloveImpl) + : USGHapticGlove(Nova2GloveImpl) +{ +} + +USGNova2Glove::USGNova2Glove(const TSharedRef SGDeviceImpl) + : USGHapticGlove(SGDeviceImpl) +{ +} + +USGNova2Glove::USGNova2Glove(const TSharedRef HapticGloveImpl) + : USGHapticGlove(HapticGloveImpl) +{ +} + +USGNova2Glove::USGNova2Glove(const TSharedRef Nova2GloveImpl) + : USGHapticGlove(Nova2GloveImpl) +{ +} + +USGNova2Glove::~USGNova2Glove() = default; + +TSharedRef USGNova2Glove::ToNova2GloveImpl() const +{ + return FSGDeviceImplCast::ToNova2GloveImpl(ToSGDeviceImpl()); +} + +ESGDeviceType USGNova2Glove::GetDeviceType() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_ESGDeviceType OutTypeContainer; + SGCoreImpl_FSGNova2GloveImpl_GetDeviceType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +FString USGNova2Glove::GetDeviceId() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGNova2GloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGNova2Glove::GetHardwareVersion() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGNova2GloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGNova2Glove::GetFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGNova2Glove::GetSubFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +bool USGNova2Glove::HasBattery() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_HasBattery(&InstanceContainer); +} + +bool USGNova2Glove::IsCharging() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_IsCharging(&InstanceContainer); + return bResult; +} + +bool USGNova2Glove::GetBatteryLevel(float& OutBatteryLevel) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetBatteryLevel(&InstanceContainer, &OutBatteryLevel); + return bResult; +} + +bool USGNova2Glove::IsRight() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_IsRight(&InstanceContainer); +} + + +bool USGNova2Glove::GetImuRotation(FQuat& OutImu) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = MoveTemp(OutImuContainer.Quat); + } + + return bResult; +} + +bool USGNova2Glove::GetImuRotation(FRotator& OutImu) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = OutImuContainer.Quat.Rotator(); + } + + return bResult; +} + +bool USGNova2Glove::GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FSGBasicHandModelImpl HandModelContainer{HandGeometry->ToBasicHandModelImpl()}; + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetHandPose( + &InstanceContainer, &HandModelContainer, &OutHandPoseContainer); + + if (bResult) + { + OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl)); + } + + return bResult; +} + +bool USGNova2Glove::GetHandAngles(TArray>& OutHandAngles) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetHandAngles(&InstanceContainer, &OutHandAnglesContainer); + OutHandAngles = MoveTemp(OutHandAnglesContainer.Array); + return bResult; + +} + +ESGHapticGloveCalibrationState USGNova2Glove::GetCalibrationState() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_ESGHapticGloveCalibrationState OutHapticGloveCalibrationStateContainer; + SGCoreImpl_FSGNova2GloveImpl_GetCalibrationState(&InstanceContainer, &OutHapticGloveCalibrationStateContainer); + return OutHapticGloveCalibrationStateContainer.State; +} + +void USGNova2Glove::EndCalibration() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + SGCoreImpl_FSGNova2GloveImpl_EndCalibration(&InstanceContainer); +} + +void USGNova2Glove::ResetCalibration() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + SGCoreImpl_FSGNova2GloveImpl_ResetCalibration(&InstanceContainer); +} + +void USGNova2Glove::StopHaptics() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + SGCoreImpl_FSGNova2GloveImpl_StopHaptics(&InstanceContainer); +} + +void USGNova2Glove::StopVibrations() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + SGCoreImpl_FSGNova2GloveImpl_StopVibrations(&InstanceContainer); +} + +bool USGNova2Glove::SendHaptics() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGNova2Glove::SupportsCustomWaveform(ESGHapticLocation AtLocation) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGNova2Glove::SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGNova2Glove::QueueForceFeedbackLevels(const TArray& Levels01) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGNova2GloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container); +} + +bool USGNova2Glove::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01); +} + +bool USGNova2Glove::QueueVibroLevels(const TArray& Amplitudes) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_TArray_float AmplitudesContainer{Amplitudes}; + return SGCoreImpl_FSGNova2GloveImpl_QueueVibroLevels(&InstanceContainer, &AmplitudesContainer); +} + +bool USGNova2Glove::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_ESGHapticLocation LocationContainer{Location}; + return SGCoreImpl_FSGNova2GloveImpl_QueueVibroLevel(&InstanceContainer, &LocationContainer, Level01); +} + +bool USGNova2Glove::QueueSqueezeLevel(const float SqueezeLevel01) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_QueueSqueezeLevel(&InstanceContainer, SqueezeLevel01); +} + +void USGNova2Glove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNova2GloveImpl_GetGloveLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGNova2Glove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNova2GloveImpl_GetGloveLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGNova2Glove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGNova2GloveImpl_GetWristLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGNova2Glove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGNova2GloveImpl_GetWristLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +USGNovaGloveInfo* USGNova2Glove::GetGloveInfo(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FSGNovaGloveInfoImpl OutGloveInfoContainer; + SGCoreImpl_FSGNova2GloveImpl_GetGloveInfo(&InstanceContainer, &OutGloveInfoContainer); + return USGNovaGloveInfo::NewNovaGloveInfo(Outer, MoveTemp(OutGloveInfoContainer.NovaGloveInfoImpl)); +} + +bool USGNova2Glove::DoesIndexInfluenceOthers() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_DoesIndexInfluenceOthers(&InstanceContainer); +} + +void USGNova2Glove::SetIndexInfluencesOthers(const bool bInfluenceOthers) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + SGCoreImpl_FSGNova2GloveImpl_SetIndexInfluencesOthers(&InstanceContainer, bInfluenceOthers); +} + +bool USGNova2Glove::SupportsOnBoardNormalization() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_SupportsOnBoardNormalization(&InstanceContainer); +} + +bool USGNova2Glove::GetSensorData(UObject* Outer, USGNova2GloveSensorData*& OutSensorData) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FSGNova2GloveSensorDataImpl OutSensorDataContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetSensorData(&InstanceContainer, &OutSensorDataContainer); + + if (bResult) + { + OutSensorData = USGNova2GloveSensorData::NewNova2GloveSensorData( + Outer, MoveTemp(OutSensorDataContainer.Nova2GloveSensorDataImpl)); + } + + return bResult; +} + +bool USGNova2Glove::GetNormalizedInput(TArray& OutNormalizedValues) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_TArray_float OutNormalizedValuesContainer; + const bool bResult = SGCoreImpl_FSGNova2GloveImpl_GetNormalizedInput( + &InstanceContainer, &OutNormalizedValuesContainer); + + if (bResult) + { + OutNormalizedValues = MoveTemp(OutNormalizedValuesContainer.Array); + } + + return bResult; +} + +bool USGNova2Glove::SendRawData() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_SendRawData(&InstanceContainer); +} + +bool USGNova2Glove::SendNormalizedData() +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + return SGCoreImpl_FSGNova2GloveImpl_SendNormalizedData(&InstanceContainer); +} + +ESGNova2VibroMotor USGNova2Glove::ToNovaMotor(const ESGHapticLocation Location) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_ESGNova2VibroMotor OutVibroMotorContainer; + FSGIC_ESGHapticLocation LocationContainer{Location}; + SGCoreImpl_FSGNova2GloveImpl_ToNovaMotor(&InstanceContainer, &OutVibroMotorContainer, &LocationContainer); + return OutVibroMotorContainer.Motor; +} + +int32 USGNova2Glove::ChannelIndex(const ESGNova2VibroMotor Motor) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_ESGNova2VibroMotor MotorContainer{Motor}; + return SGCoreImpl_FSGNova2GloveImpl_ChannelIndex(&InstanceContainer, &MotorContainer); +} + +void USGNova2Glove::ValidateWaveform(USGCustomWaveform* OutWaveform, const ESGNova2VibroMotor Motor) const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()}; + FSGIC_ESGNova2VibroMotor MotorContainer{Motor}; + SGCoreImpl_FSGNova2GloveImpl_ValidateWaveform(&InstanceContainer, &OutWaveformContainer, &MotorContainer); +} + +bool USGNova2Glove::SendCustomWaveform_Nova2( + USGCustomWaveform* OutWaveform, const ESGNova2VibroMotor Motor, const bool bValidateWaveform) +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()}; + FSGIC_ESGNova2VibroMotor MotorContainer{Motor}; + return SGCoreImpl_FSGNova2GloveImpl_SendCustomWaveform_Nova2( + &InstanceContainer, &OutWaveformContainer, &MotorContainer, bValidateWaveform); +} + +FString USGNova2Glove::ToString() const +{ + FSGIC_TSharedPtr_FSGNova2GloveImpl InstanceContainer{ToNova2GloveImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNova2GloveImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String;; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNova2GloveSensorData.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNova2GloveSensorData.cpp new file mode 100644 index 0000000..4b24795 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNova2GloveSensorData.cpp @@ -0,0 +1,377 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGNova2GloveSensorData.h" + +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGNova2GloveSensorDataImpl.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_ESGNormalizationState.h" +#include "SGInterop/SGIC_ESGNova2SensorLocation.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGNova2GloveSensorData::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGNova2GloveSensorDataImpl Nova2GloveSensorDataImpl; + + /************************ + * Owner object + ************************/ + + USGNova2GloveSensorData* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGNova2GloveSensorData* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGNova2GloveSensorData* USGNova2GloveSensorData::NewNova2GloveSensorData( + UObject* Outer, const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl) +{ + USGNova2GloveSensorData* Instance = NewObject(Outer); + Instance->SetNova2GloveSensorDataImpl(Nova2GloveSensorDataImpl); + return Instance; +} + +USGNova2GloveSensorData* USGNova2GloveSensorData::NewNova2GloveSensorData(UObject* Outer) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor(&OutNova2GloveSensorDataImplContainer); + + return NewNova2GloveSensorData(Outer, MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl)); +} + +USGNova2GloveSensorData* USGNova2GloveSensorData::NewNova2GloveSensorData( + UObject* Outer, const ESGNormalizationState NormalizationState, + const TArray>& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + return NewNova2GloveSensorData(Outer, MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl)); +} + +USGNova2GloveSensorData* USGNova2GloveSensorData::NewNova2GloveSensorData( + UObject* Outer, const ESGNormalizationState NormalizationState, + const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{ + FSGArrayUtils::FromNestedBPArray(Values) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + return NewNova2GloveSensorData(Outer, MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl)); +} + +USGNova2GloveSensorData* USGNova2GloveSensorData::NewNova2GloveSensorData( + UObject* Outer, const ESGNormalizationState NormalizationState, + const TArray>& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + return NewNova2GloveSensorData(Outer, MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl)); +} + +USGNova2GloveSensorData* USGNova2GloveSensorData::NewNova2GloveSensorData( + UObject* Outer, const ESGNormalizationState NormalizationState, + const TArray& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{ + FSGArrayUtils::FromNestedBPArray(Values) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + return NewNova2GloveSensorData(Outer, MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl)); +} + +USGNova2GloveSensorData* USGNova2GloveSensorData::Parse(UObject* Outer, + const FString& RawData, const USGNovaGloveInfo* GloveInfo) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_FString RawDataString{RawData}; + FSGIC_FSGNovaGloveInfoImpl GloveInfoContainer{GloveInfo->ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_Parse(&OutNova2GloveSensorDataImplContainer, + &RawDataString, &GloveInfoContainer); + + return NewNova2GloveSensorData(Outer, MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl)); +} + +USGNova2GloveSensorData::USGNova2GloveSensorData() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor(&OutNova2GloveSensorDataImplContainer); + + Pimpl->Nova2GloveSensorDataImpl = MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl); +} + +USGNova2GloveSensorData::USGNova2GloveSensorData(const ESGNormalizationState NormalizationState, + const TArray>& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + Pimpl->Nova2GloveSensorDataImpl = MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl); +} + +USGNova2GloveSensorData::USGNova2GloveSensorData(const ESGNormalizationState NormalizationState, + const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{ + FSGArrayUtils::FromNestedBPArray(Values) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + Pimpl->Nova2GloveSensorDataImpl = MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl); +} + +USGNova2GloveSensorData::USGNova2GloveSensorData(const ESGNormalizationState NormalizationState, + const TArray>& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + Pimpl->Nova2GloveSensorDataImpl = MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl); +} + +USGNova2GloveSensorData::USGNova2GloveSensorData(const ESGNormalizationState NormalizationState, + const TArray& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataImplContainer; + FSGIC_ESGNormalizationState NormalizationStateContainer{NormalizationState}; + FSGIC_TArray_TArray_FVector ValuesContainer{ + FSGArrayUtils::FromNestedBPArray(Values) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNova2GloveSensorDataImplContainer, &NormalizationStateContainer, + &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + Pimpl->Nova2GloveSensorDataImpl = MoveTemp(OutNova2GloveSensorDataImplContainer.Nova2GloveSensorDataImpl); +} + +USGNova2GloveSensorData::USGNova2GloveSensorData(const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetNova2GloveSensorDataImpl(Nova2GloveSensorDataImpl); +} + +USGNova2GloveSensorData::~USGNova2GloveSensorData() = default; + +void USGNova2GloveSensorData::SetNova2GloveSensorDataImpl(const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl) +{ + FSGIC_FSGNova2GloveSensorDataImpl OutNova2GloveSensorDataContainer; + FSGIC_FSGNova2GloveSensorDataImpl RhsContainer{Nova2GloveSensorDataImpl}; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_copy(&OutNova2GloveSensorDataContainer, &RhsContainer); + Pimpl->Nova2GloveSensorDataImpl = MoveTemp(OutNova2GloveSensorDataContainer.Nova2GloveSensorDataImpl); +} + +const FSGNova2GloveSensorDataImpl& USGNova2GloveSensorData::ToNova2GloveSensorDataImpl() const +{ + return Pimpl->Nova2GloveSensorDataImpl; +} + +ESGNormalizationState USGNova2GloveSensorData::GetSensorState() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_ESGNormalizationState OutNormalizationState; + SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorState(&InstanceContainer, &OutNormalizationState); + return OutNormalizationState.State; +} + +TArray> USGNova2GloveSensorData::GetSensorValues() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_TArray_TArray_FVector OutValuesContainer; + SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorValues(&InstanceContainer, &OutValuesContainer); + return OutValuesContainer.Array; +} + +float USGNova2GloveSensorData::GetSensorValue(const ESGFinger Finger, const ESGNova2SensorLocation Location) const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_ESGNova2SensorLocation LocationContainer{Location}; + return SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorValue( + &InstanceContainer, &FingerContainer, &LocationContainer); +} + +int32 USGNova2GloveSensorData::GetParsedValues() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + return SGCoreImpl_FSGNova2GloveSensorDataImpl_GetParsedValues(&InstanceContainer); +} + +FQuat USGNova2GloveSensorData::GetImuRotationQ() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGNova2GloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator USGNova2GloveSensorData::GetImuRotation() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGNova2GloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +bool USGNova2GloveSensorData::IsImuParsed() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + return SGCoreImpl_FSGNova2GloveSensorDataImpl_IsImuParsed(&InstanceContainer); +} + +float USGNova2GloveSensorData::GetBatteryLevel() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + return SGCoreImpl_FSGNova2GloveSensorDataImpl_GetBatteryLevel(&InstanceContainer); +} + +bool USGNova2GloveSensorData::IsCharging() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + return SGCoreImpl_FSGNova2GloveSensorDataImpl_IsCharging(&InstanceContainer); +} + +bool USGNova2GloveSensorData::Equals(const USGNova2GloveSensorData* Nova2GloveSensorData) const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_FSGNova2GloveSensorDataImpl Nova2GloveSensorDataContainer{Nova2GloveSensorData->ToNova2GloveSensorDataImpl()}; + return SGCoreImpl_FSGNova2GloveSensorDataImpl_Equals(&InstanceContainer, &Nova2GloveSensorDataContainer); +} + +FString USGNova2GloveSensorData::ToString() const +{ + FSGIC_FSGNova2GloveSensorDataImpl InstanceContainer{ToNova2GloveSensorDataImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNova2GloveSensorDataImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGNova2GloveSensorData::FImpl::FImpl(USGNova2GloveSensorData* InOwner) + : Owner(InOwner) +{ +} + +USGNova2GloveSensorData::FImpl::~FImpl() = default; + +void USGNova2GloveSensorData::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGlove.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGlove.cpp new file mode 100644 index 0000000..88d50e2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGlove.cpp @@ -0,0 +1,781 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGNovaGlove.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGDeviceImplCast.h" +#include "SGCore/SGHandInterpolator.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCore/SGNovaGloveSensorData.h" +#include "SGCore/SGSensorNormalization.h" +#include "SGCore/SGThresholdCommand.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGNovaGloveImpl.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" +#include "SGInterop/SGIC_ESGHapticLocation.h" +#include "SGInterop/SGIC_ESGNovaVibroMotor.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FSGCustomWaveformImpl.h" +#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGSensorNormalizationImpl.h" +#include "SGInterop/SGIC_FSGThresholdCommandImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h" + +USGNovaGlove* USGNovaGlove::NewNovaGlove(UObject* Outer, const FSGNovaGloveImpl& NovaGloveImpl) +{ + USGNovaGlove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(NovaGloveImpl); + return Instance; +} + +USGNovaGlove* USGNovaGlove::NewNovaGlove(UObject* Outer, TSharedRef NovaGloveImpl) +{ + USGNovaGlove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(MoveTemp(NovaGloveImpl)); + return Instance; +} + +USGNovaGlove* USGNovaGlove::NewNovaGlove(UObject* Outer) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGNovaGloveImpl_ctor_MakeShared(&OutSharedPtrContainer); + + return NewNovaGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGNovaGlove* USGNovaGlove::NewNovaGlove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNovaGloveImpl_ctor_DeviceInfo_MakeShared(&OutSharedPtrContainer, &DeviceInfoContainer); + + return NewNovaGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGDevice* USGNovaGlove::Parse(UObject* Outer, const FString& ConstantsString) +{ + FSGIC_FSGNovaGloveImpl OutNovaGloveImplContainer; + FSGIC_FString ConstantsStringContainer{ConstantsString}; + SGCoreImpl_FSGNovaGloveImpl_Parse(&OutNovaGloveImplContainer, &ConstantsStringContainer); + + return NewNovaGlove(Outer, MoveTemp(OutNovaGloveImplContainer.NovaGloveImpl)); +} + +TArray USGNovaGlove::GetNovaGloves(UObject* Outer) +{ + FSGIC_TArray_FSGNovaGloveImpl OutGlovesContainer; + SGCoreImpl_FSGNovaGloveImpl_GetNovaGloves(&OutGlovesContainer); + TArray Gloves; + for (const FSGNovaGloveImpl& NovaGloveImpl: OutGlovesContainer.Array) + { + USGNovaGlove* NovaGlove = USGNovaGlove::NewNovaGlove(Outer, NovaGloveImpl); + Gloves.Add(NovaGlove); + } + return Gloves; +} + +bool USGNovaGlove::GetNovaGlove(UObject* Outer, USGNovaGlove*& OutGlove) +{ + FSGIC_FSGNovaGloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetNovaGlove_OutGlove(&OutGloveContainer); + + if (bResult) + { + OutGlove = NewNovaGlove(Outer, MoveTemp(OutGloveContainer.NovaGloveImpl)); + } + + return bResult; +} + +bool USGNovaGlove::GetNovaGlove(UObject* Outer, const bool bRightHanded, USGNovaGlove*& OutGlove) +{ + FSGIC_FSGNovaGloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetNovaGlove_bRightHanded_OutGlove( + bRightHanded, &OutGloveContainer); + + if (bResult) + { + OutGlove = NewNovaGlove(Outer, MoveTemp(OutGloveContainer.NovaGloveImpl)); + } + + return bResult; +} + +void USGNovaGlove::CalculateGloveLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNovaGloveImpl_CalculateGloveLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGNovaGlove::CalculateGloveLocation( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNovaGloveImpl_CalculateGloveLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGNovaGlove::CalculateWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGNovaGloveImpl_CalculateWristLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGNovaGlove::CalculateWristLocation( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGNovaGloveImpl_CalculateWristLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, bRightHanded, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +ANSICHAR USGNovaGlove::GetHapticsByte() +{ + return SGCoreImpl_FSGNovaGloveImpl_GetHapticsByte(); +} + +ANSICHAR USGNovaGlove::GetThresholdsByte() +{ + return SGCoreImpl_FSGNovaGloveImpl_GetThresholdsByte(); +} + +ANSICHAR USGNovaGlove::GetIgnoreThresholdsByte() +{ + return SGCoreImpl_FSGNovaGloveImpl_GetIgnoreThresholdsByte(); +} + +TArray USGNovaGlove::GetNovaSensorRanges() +{ + FSGIC_TArray_float OutNovaSensorRangesContainer; + SGCoreImpl_FSGNovaGloveImpl_GetNovaSensorRanges(&OutNovaSensorRangesContainer); + return OutNovaSensorRangesContainer.Array; +} + +TArray USGNovaGlove::ToNormalizedValues(const USGNovaGloveSensorData* SensorData) +{ + FSGIC_TArray_float OutNormalizedValuesContainer; + FSGIC_FSGNovaGloveSensorDataImpl SensorDataContainer{SensorData->ToNovaGloveSensorDataImpl()}; + SGCoreImpl_FSGNovaGloveImpl_ToNormalizedValues_SensorData( + &OutNormalizedValuesContainer, &SensorDataContainer); + return OutNormalizedValuesContainer.Array; +} + +TArray USGNovaGlove::ToNormalizedValues( + UObject* Outer, const USGNovaGloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer) +{ + FSGIC_TArray_float OutNormalizedValuesContainer; + FSGIC_FSGNovaGloveSensorDataImpl SensorDataContainer{SensorData->ToNovaGloveSensorDataImpl()}; + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizerContainer; + SGCoreImpl_FSGNovaGloveImpl_ToNormalizedValues_SensorData_OutSensorNormalizer( + &OutNormalizedValuesContainer, &SensorDataContainer, &OutSensorNormalizerContainer); + + OutSensorNormalizer = USGSensorNormalization::NewSensorNormalization( + Outer, MoveTemp(OutSensorNormalizerContainer.SensorNormalizationImpl)); + + return OutNormalizedValuesContainer.Array; +} + +TArray> USGNovaGlove::CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator) +{ + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + FSGIC_TArray_float NormalizedValuesContainer{NormalizedValues}; + FSGIC_FSGHandInterpolatorImpl InterpolatorContainer{Interpolator->ToHandInterpolatorImpl()}; + SGCoreImpl_FSGNovaGloveImpl_CalculateHandAngles( + &OutHandAnglesContainer, &NormalizedValuesContainer, &InterpolatorContainer); + return OutHandAnglesContainer.Array; +} + +FString USGNovaGlove::ToNovaCommandAsFlexion(const USGThresholdCommand* Thresholds) +{ + FSGIC_FString OutStringContainer; + FSGIC_FSGThresholdCommandImpl ThresholdsContainer{Thresholds->ToThresholdCommandImpl()}; + SGCoreImpl_FSGNovaGloveImpl_ToNovaCommandAsFlexion(&OutStringContainer, &ThresholdsContainer); + return OutStringContainer.String; +} + +FString USGNovaGlove::ToNovaCommandAsRaw( + const USGThresholdCommand* Thresholds, const USGSensorNormalization* Interpolator) +{ + FSGIC_FString OutStringContainer; + FSGIC_FSGThresholdCommandImpl ThresholdsContainer{Thresholds->ToThresholdCommandImpl()}; + FSGIC_FSGSensorNormalizationImpl InterpolatorContainer{Interpolator->ToSensorNormalizationImpl()}; + SGCoreImpl_FSGNovaGloveImpl_ToNovaCommandAsRaw( + &OutStringContainer, &ThresholdsContainer, &InterpolatorContainer); + return OutStringContainer.String; +} + +USGNovaGlove::USGNovaGlove() + : USGHapticGlove() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGNovaGloveImpl_ctor_MakeShared(&OutSharedPtrContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGNovaGlove::USGNovaGlove(const USGNovaGloveInfo& DeviceInfo) + : USGHapticGlove() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl OutSharedPtrContainer; + FSGIC_FSGNovaGloveInfoImpl DeviceInfoContainer{DeviceInfo.ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNovaGloveImpl_ctor_DeviceInfo_MakeShared(&OutSharedPtrContainer, &DeviceInfoContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGNovaGlove::USGNovaGlove(const FSGDeviceImpl& SGDeviceImpl) + : USGHapticGlove(SGDeviceImpl) +{ +} + +USGNovaGlove::USGNovaGlove(const FSGHapticGloveImpl& HapticGloveImpl) + : USGHapticGlove(HapticGloveImpl) +{ +} + +USGNovaGlove::USGNovaGlove(const FSGNovaGloveImpl& NovaGloveImpl) + : USGHapticGlove(NovaGloveImpl) +{ +} + +USGNovaGlove::USGNovaGlove(const TSharedRef SGDeviceImpl) + : USGHapticGlove(SGDeviceImpl) +{ +} + +USGNovaGlove::USGNovaGlove(const TSharedRef HapticGloveImpl) + : USGHapticGlove(HapticGloveImpl) +{ +} + +USGNovaGlove::USGNovaGlove(const TSharedRef NovaGloveImpl) + : USGHapticGlove(NovaGloveImpl) +{ +} + +USGNovaGlove::~USGNovaGlove() = default; + +TSharedRef USGNovaGlove::ToNovaGloveImpl() const +{ + return FSGDeviceImplCast::ToNovaGloveImpl(ToSGDeviceImpl()); +} + +ESGDeviceType USGNovaGlove::GetDeviceType() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_ESGDeviceType OutTypeContainer; + SGCoreImpl_FSGNovaGloveImpl_GetDeviceType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +FString USGNovaGlove::GetDeviceId() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGNovaGloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGNovaGlove::GetHardwareVersion() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGNovaGloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGNovaGlove::GetFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGNovaGlove::GetSubFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +void USGNovaGlove::SetDeviceIndex(int32 NewIndex) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SetDeviceIndex(&InstanceContainer, NewIndex); +} + +bool USGNovaGlove::HasBattery() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_HasBattery(&InstanceContainer); +} + +bool USGNovaGlove::IsCharging() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_IsCharging(&InstanceContainer); + return bResult; +} + +bool USGNovaGlove::GetBatteryLevel(float& OutBatteryLevel) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetBatteryLevel(&InstanceContainer, &OutBatteryLevel); + return bResult; +} + +bool USGNovaGlove::IsRight() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_IsRight(&InstanceContainer); +} + + +bool USGNovaGlove::GetImuRotation(FQuat& OutImu) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = MoveTemp(OutImuContainer.Quat); + } + + return bResult; +} + +bool USGNovaGlove::GetImuRotation(FRotator& OutImu) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = OutImuContainer.Quat.Rotator(); + } + + return bResult; +} + +bool USGNovaGlove::GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FSGBasicHandModelImpl HandModelContainer{HandGeometry->ToBasicHandModelImpl()}; + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetHandPose( + &InstanceContainer, &HandModelContainer, &OutHandPoseContainer); + + if (bResult) + { + OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl)); + } + + return bResult; +} + +bool USGNovaGlove::GetHandAngles(TArray>& OutHandAngles) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetHandAngles(&InstanceContainer, &OutHandAnglesContainer); + OutHandAngles = MoveTemp(OutHandAnglesContainer.Array); + return bResult; + +} + +ESGHapticGloveCalibrationState USGNovaGlove::GetCalibrationState() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_ESGHapticGloveCalibrationState OutHapticGloveCalibrationStateContainer; + SGCoreImpl_FSGNovaGloveImpl_GetCalibrationState(&InstanceContainer, &OutHapticGloveCalibrationStateContainer); + return OutHapticGloveCalibrationStateContainer.State; +} + +void USGNovaGlove::EndCalibration() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + SGCoreImpl_FSGNovaGloveImpl_EndCalibration(&InstanceContainer); +} + +void USGNovaGlove::ResetCalibration() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + SGCoreImpl_FSGNovaGloveImpl_ResetCalibration(&InstanceContainer); +} + +void USGNovaGlove::StopHaptics() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + SGCoreImpl_FSGNovaGloveImpl_StopHaptics(&InstanceContainer); +} + +void USGNovaGlove::StopVibrations() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + SGCoreImpl_FSGNovaGloveImpl_StopVibrations(&InstanceContainer); +} + +bool USGNovaGlove::SendHaptics() +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGNovaGlove::SupportsCustomWaveform(ESGHapticLocation AtLocation) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGNovaGlove::SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGNovaGlove::QueueForceFeedbackLevels(const TArray& Levels01) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGNovaGloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container); +} + +bool USGNovaGlove::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01); +} + +bool USGNovaGlove::QueueVibroLevels(const TArray& Amplitudes) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_TArray_float AmplitudesContainer{Amplitudes}; + return SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevels(&InstanceContainer, &AmplitudesContainer); +} + +bool USGNovaGlove::QueueVibroLevel(ESGHapticLocation Location, float Level01) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_ESGHapticLocation LocationContainer{Location}; + return SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevel_Localtion_Level01( + &InstanceContainer, &LocationContainer, Level01); +} + +void USGNovaGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNovaGloveImpl_GetGloveLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGNovaGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGNovaGloveImpl_GetGloveLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGNovaGloveImpl_GetWristLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGNovaGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGNovaGloveImpl_GetWristLocation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +USGNovaGloveInfo* USGNovaGlove::GetGloveInfo(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FSGNovaGloveInfoImpl OutGloveInfoContainer; + SGCoreImpl_FSGNovaGloveImpl_GetGloveInfo(&InstanceContainer, &OutGloveInfoContainer); + return USGNovaGloveInfo::NewNovaGloveInfo(Outer, MoveTemp(OutGloveInfoContainer.NovaGloveInfoImpl)); +} + +bool USGNovaGlove::SupportsThresholds() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SupportsThresholds(&InstanceContainer); +} + +bool USGNovaGlove::SupportsCustomWaveforms() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SupportsCustomWaveforms(&InstanceContainer); +} + +bool USGNovaGlove::SupportsOnBoardNormalization() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_SupportsOnBoardNormalization(&InstanceContainer); +} + +bool USGNovaGlove::GetSensorData(UObject* Outer, USGNovaGloveSensorData*& OutSensorData) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FSGNovaGloveSensorDataImpl OutSensorDataContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetSensorData(&InstanceContainer, &OutSensorDataContainer); + + if (bResult) + { + OutSensorData = USGNovaGloveSensorData::NewNovaGloveSensorData( + Outer, MoveTemp(OutSensorDataContainer.NovaGloveSensorDataImpl)); + } + + return bResult; +} + +bool USGNovaGlove::GetNormalizedInput(TArray& OutNormalizedValues) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_TArray_float OutNormalizedValuesContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveImpl_GetNormalizedInput( + &InstanceContainer, &OutNormalizedValuesContainer); + + if (bResult) + { + OutNormalizedValues = MoveTemp(OutNormalizedValuesContainer.Array); + } + + return bResult; +} + +FString USGNovaGlove::ToNovaCommand( + const TArray& ForceFeedbackLevels, const TArray& BuzzLevels, float WristLevel) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FString OutStringContainer; + FSGIC_TArray_float ForceFeedbackLevelsContainer{ForceFeedbackLevels}; + FSGIC_TArray_float BuzzLevelsContainer{BuzzLevels}; + SGCoreImpl_FSGNovaGloveImpl_ToNovaCommand(&InstanceContainer, &OutStringContainer, + &ForceFeedbackLevelsContainer, &BuzzLevelsContainer, WristLevel); + return OutStringContainer.String; +} + +bool USGNovaGlove::QueueVibroLevel(const int32 Finger, const float Amplitude) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevel_Finger_Amplitude(&InstanceContainer, Finger, Amplitude); +} + +bool USGNovaGlove::QueueWristLevel(const float Amplitude) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_QueueWristLevel(&InstanceContainer, Amplitude); +} + +ESGNovaVibroMotor USGNovaGlove::ToNovaMotor(const ESGHapticLocation Location) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_ESGNovaVibroMotor OutVibroMotorContainer; + FSGIC_ESGHapticLocation LocationContainer{Location}; + SGCoreImpl_FSGNovaGloveImpl_ToNovaMotor(&InstanceContainer, &OutVibroMotorContainer, &LocationContainer); + return OutVibroMotorContainer.Motor; +} + +int32 USGNovaGlove::ChannelIndex(const ESGNovaVibroMotor Motor) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_ESGNovaVibroMotor MotorContainer{Motor}; + return SGCoreImpl_FSGNovaGloveImpl_ChannelIndex(&InstanceContainer, &MotorContainer); +} + +void USGNovaGlove::ValidateWaveform(USGCustomWaveform* OutWaveform, const ESGNovaVibroMotor Motor) const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()}; + FSGIC_ESGNovaVibroMotor MotorContainer{Motor}; + SGCoreImpl_FSGNovaGloveImpl_ValidateWaveform(&InstanceContainer, &OutWaveformContainer, &MotorContainer); +} + +bool USGNovaGlove::SendCustomWaveform_Nova( + USGCustomWaveform* OutWaveform, const ESGNovaVibroMotor Motor, const bool bValidateWaveform) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FSGCustomWaveformImpl OutWaveformContainer{OutWaveform->ToCustomWaveformImpl()}; + FSGIC_ESGNovaVibroMotor MotorContainer{Motor}; + return SGCoreImpl_FSGNovaGloveImpl_SendCustomWaveform_Nova( + &InstanceContainer, &OutWaveformContainer, &MotorContainer, bValidateWaveform); +} + +bool USGNovaGlove::QueueThresholdCommand_Flexion(const int32 Finger, const float FlexionThreshold) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_QueueThresholdCommand_Flexion(&InstanceContainer, Finger, FlexionThreshold); +} + +bool USGNovaGlove::QueueClearThreshold(const int32 Finger) +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + return SGCoreImpl_FSGNovaGloveImpl_QueueClearThreshold(&InstanceContainer, Finger); +} + +FString USGNovaGlove::ToString() const +{ + FSGIC_TSharedPtr_FSGNovaGloveImpl InstanceContainer{ToNovaGloveImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNovaGloveImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String;; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGloveInfo.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGloveInfo.cpp new file mode 100644 index 0000000..21beece --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGloveInfo.cpp @@ -0,0 +1,285 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGNovaGloveInfo.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" +#include "SGInterop/SGIC_FString.h" + +struct USGNovaGloveInfo::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGNovaGloveInfoImpl NovaGloveInfoImpl; + + /************************ + * Owner object + ************************/ + + USGNovaGloveInfo* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGNovaGloveInfo* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGNovaGloveInfo* USGNovaGloveInfo::NewNovaGloveInfo(UObject* Outer, const FSGNovaGloveInfoImpl& NovaGloveInfoImpl) +{ + USGNovaGloveInfo* Instance = NewObject(Outer); + Instance->SetNovaGloveInfoImpl(NovaGloveInfoImpl); + return Instance; +} + +USGNovaGloveInfo* USGNovaGloveInfo::NewNovaGloveInfo(UObject* Outer) +{ + FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_ctor(&OutNovaGloveInfoImplContainer); + + return NewNovaGloveInfo(Outer, MoveTemp(OutNovaGloveInfoImplContainer.NovaGloveInfoImpl)); +} + +USGNovaGloveInfo* USGNovaGloveInfo::NewNovaGloveInfo(UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, + int32 SubFirmwareVersion, bool bRightHanded, + const FQuat& ImuCorrection, int32 NumberOfSensors) +{ + FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; + SGCoreImpl_FSGNovaGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_ImuCorrection_NumberOfSensors( + &OutNovaGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, &ImuCorrectionContainer, NumberOfSensors); + + return NewNovaGloveInfo(Outer, MoveTemp(OutNovaGloveInfoImplContainer.NovaGloveInfoImpl)); +} + +bool USGNovaGloveInfo::Parse(UObject* Outer, const FString& ConstantsString, USGNovaGloveInfo*& OutGloveInfo) +{ + FSGIC_FString ConstantsStringContainer{ConstantsString}; + FSGIC_FSGNovaGloveInfoImpl OutGloveInfoImplContainer; + const bool bResult = SGCoreImpl_FSGNovaGloveInfoImpl_Parse(&ConstantsStringContainer, &OutGloveInfoImplContainer); + + if (bResult) + { + OutGloveInfo = NewNovaGloveInfo(Outer, MoveTemp(OutGloveInfoImplContainer.NovaGloveInfoImpl)); + } + + return bResult; +} + +USGNovaGloveInfo* USGNovaGloveInfo::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FString SerializedStringContainer{SerializedString}; + FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_Deserialize(&OutNovaGloveInfoImplContainer, &SerializedStringContainer); + + return NewNovaGloveInfo(Outer, MoveTemp(OutNovaGloveInfoImplContainer.NovaGloveInfoImpl)); +} + +USGNovaGloveInfo::USGNovaGloveInfo() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_ctor(&OutNovaGloveInfoImplContainer); + + Pimpl->NovaGloveInfoImpl = MoveTemp(OutNovaGloveInfoImplContainer.NovaGloveInfoImpl); +} + +USGNovaGloveInfo::USGNovaGloveInfo( + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const FQuat& ImuCorrection, const int32 NumberOfSensors) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; + SGCoreImpl_FSGNovaGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_ImuCorrection_NumberOfSensors( + &OutNovaGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, &ImuCorrectionContainer, NumberOfSensors); + + Pimpl->NovaGloveInfoImpl = MoveTemp(OutNovaGloveInfoImplContainer.NovaGloveInfoImpl); +} + +USGNovaGloveInfo::USGNovaGloveInfo(const FSGNovaGloveInfoImpl& NovaGloveInfoImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetNovaGloveInfoImpl(NovaGloveInfoImpl); +} + +USGNovaGloveInfo::~USGNovaGloveInfo() = default; + +void USGNovaGloveInfo::SetNovaGloveInfoImpl(const FSGNovaGloveInfoImpl& NovaGloveInfoImpl) +{ + FSGIC_FSGNovaGloveInfoImpl OutNovaGloveInfoContainer; + FSGIC_FSGNovaGloveInfoImpl RhsContainer{NovaGloveInfoImpl}; + SGCoreImpl_FSGNovaGloveInfoImpl_ctor_copy(&OutNovaGloveInfoContainer, &RhsContainer); + Pimpl->NovaGloveInfoImpl = MoveTemp(OutNovaGloveInfoContainer.NovaGloveInfoImpl); +} + +const FSGNovaGloveInfoImpl& USGNovaGloveInfo::ToNovaGloveInfoImpl() const +{ + return Pimpl->NovaGloveInfoImpl; +} + +FSGNovaGloveInfoImpl& USGNovaGloveInfo::ToNovaGloveInfoImpl() +{ + return Pimpl->NovaGloveInfoImpl; +} + +FString USGNovaGloveInfo::GetDeviceId() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGNovaGloveInfo::GetHardwareVersion() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGNovaGloveInfo::GetFirmwareVersion() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGNovaGloveInfo::GetSubFirmwareVersion() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +bool USGNovaGloveInfo::IsRight() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_IsRight(&InstanceContainer); +} + +FQuat USGNovaGloveInfo::GetImuCorrectionQ() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FQuat OutCorrectionContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer); + return OutCorrectionContainer.Quat; +} + +FRotator USGNovaGloveInfo::GetImuCorrection() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FQuat OutCorrectionContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer); + return OutCorrectionContainer.Quat.Rotator(); +} + +int32 USGNovaGloveInfo::GetNumberOfSensors() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_GetNumberOfSensors(&InstanceContainer); +} + +bool USGNovaGloveInfo::FirmwareNewerThan( + const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_FirmwareNewerThan(&InstanceContainer, + FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGNovaGloveInfo::FirmwareOlderThan( + const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_FirmwareOlderThan(&InstanceContainer, + FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGNovaGloveInfo::Equals(const USGNovaGloveInfo* NovaGloveInfo) const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FSGNovaGloveInfoImpl NovaGloveInfoImplContainer{NovaGloveInfo->ToNovaGloveInfoImpl()}; + return SGCoreImpl_FSGNovaGloveInfoImpl_Equals(&InstanceContainer, &NovaGloveInfoImplContainer); +} + +FString USGNovaGloveInfo::ToString() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGNovaGloveInfo::SGSerialize() const +{ + FSGIC_FSGNovaGloveInfoImpl InstanceContainer{ToNovaGloveInfoImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNovaGloveInfoImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGNovaGloveInfo::FImpl::FImpl(USGNovaGloveInfo* InOwner) + : Owner(InOwner) +{ +} + +USGNovaGloveInfo::FImpl::~FImpl() = default; + +void USGNovaGloveInfo::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGloveSensorData.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGloveSensorData.cpp new file mode 100644 index 0000000..314cd1a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGNovaGloveSensorData.cpp @@ -0,0 +1,301 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGNovaGloveSensorData.h" + +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGNovaGloveSensorDataImpl.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_ESGNovaSensorLocation.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_FVector.h" + +struct USGNovaGloveSensorData::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGNovaGloveSensorDataImpl NovaGloveSensorDataImpl; + + /************************ + * Owner object + ************************/ + + USGNovaGloveSensorData* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGNovaGloveSensorData* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData( + UObject* Outer, const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl) +{ + USGNovaGloveSensorData* Instance = NewObject(Outer); + Instance->SetNovaGloveSensorDataImpl(NovaGloveSensorDataImpl); + return Instance; +} + +USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData(UObject* Outer) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor(&OutNovaGloveSensorDataImplContainer); + + return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl)); +} + +USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData( + UObject* Outer, const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + FSGIC_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl)); +} + +USGNovaGloveSensorData* USGNovaGloveSensorData::NewNovaGloveSensorData( + UObject* Outer, const TArray& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + FSGIC_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl)); +} + +USGNovaGloveSensorData* USGNovaGloveSensorData::Empty(UObject* Outer) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_Empty(&OutNovaGloveSensorDataImplContainer); + + return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl)); +} + +USGNovaGloveSensorData* USGNovaGloveSensorData::Parse(UObject* Outer, + const FString& RawData, const USGNovaGloveInfo* GloveInfo) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + FSGIC_FString RawDataString{RawData}; + FSGIC_FSGNovaGloveInfoImpl GloveInfoContainer{GloveInfo->ToNovaGloveInfoImpl()}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_Parse(&OutNovaGloveSensorDataImplContainer, + &RawDataString, &GloveInfoContainer); + + return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl)); +} + +USGNovaGloveSensorData* USGNovaGloveSensorData::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_Deserialize(&OutNovaGloveSensorDataImplContainer, &SerializedStringContainer); + + return NewNovaGloveSensorData(Outer, MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl)); +} + +USGNovaGloveSensorData::USGNovaGloveSensorData() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor(&OutNovaGloveSensorDataImplContainer); + + Pimpl->NovaGloveSensorDataImpl = MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl); +} + +USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + FSGIC_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + Pimpl->NovaGloveSensorDataImpl = MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl); +} + +USGNovaGloveSensorData::USGNovaGloveSensorData(const TArray& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataImplContainer; + FSGIC_TArray_FVector ValuesContainer{Values}; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + &OutNovaGloveSensorDataImplContainer, &ValuesContainer, ParsedValues, + &ImuRotationContainer, bImuParsed, BatteryLevel, bCharging); + + Pimpl->NovaGloveSensorDataImpl = MoveTemp(OutNovaGloveSensorDataImplContainer.NovaGloveSensorDataImpl); +} + +USGNovaGloveSensorData::USGNovaGloveSensorData(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetNovaGloveSensorDataImpl(NovaGloveSensorDataImpl); +} + +USGNovaGloveSensorData::~USGNovaGloveSensorData() = default; + +void USGNovaGloveSensorData::SetNovaGloveSensorDataImpl(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl) +{ + FSGIC_FSGNovaGloveSensorDataImpl OutNovaGloveSensorDataContainer; + FSGIC_FSGNovaGloveSensorDataImpl RhsContainer{NovaGloveSensorDataImpl}; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_copy(&OutNovaGloveSensorDataContainer, &RhsContainer); + Pimpl->NovaGloveSensorDataImpl = MoveTemp(OutNovaGloveSensorDataContainer.NovaGloveSensorDataImpl); +} + +const FSGNovaGloveSensorDataImpl& USGNovaGloveSensorData::ToNovaGloveSensorDataImpl() const +{ + return Pimpl->NovaGloveSensorDataImpl; +} + +TArray USGNovaGloveSensorData::GetSensorValues() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_TArray_FVector OutValuesContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_GetSensorValues(&InstanceContainer, &OutValuesContainer); + return OutValuesContainer.Array; +} + +float USGNovaGloveSensorData::GetSensorValue(const ESGFinger Finger, const ESGNovaSensorLocation Location) const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_ESGFinger FingerContainer{Finger}; + FSGIC_ESGNovaSensorLocation LocationContainer{Location}; + return SGCoreImpl_FSGNovaGloveSensorDataImpl_GetSensorValue( + &InstanceContainer, &FingerContainer, &LocationContainer); +} + +int32 USGNovaGloveSensorData::GetParsedValues() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + return SGCoreImpl_FSGNovaGloveSensorDataImpl_GetParsedValues(&InstanceContainer); +} + +FQuat USGNovaGloveSensorData::GetImuRotationQ() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator USGNovaGloveSensorData::GetImuRotation() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +bool USGNovaGloveSensorData::IsImuParsed() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + return SGCoreImpl_FSGNovaGloveSensorDataImpl_IsImuParsed(&InstanceContainer); +} + +float USGNovaGloveSensorData::GetBatteryLevel() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + return SGCoreImpl_FSGNovaGloveSensorDataImpl_GetBatteryLevel(&InstanceContainer); +} + +bool USGNovaGloveSensorData::IsCharging() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + return SGCoreImpl_FSGNovaGloveSensorDataImpl_IsCharging(&InstanceContainer); +} + +bool USGNovaGloveSensorData::Equals(const USGNovaGloveSensorData* NovaGloveSensorData) const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_FSGNovaGloveSensorDataImpl NovaGloveSensorDataContainer{NovaGloveSensorData->ToNovaGloveSensorDataImpl()}; + return SGCoreImpl_FSGNovaGloveSensorDataImpl_Equals(&InstanceContainer, &NovaGloveSensorDataContainer); +} + +FString USGNovaGloveSensorData::ToString() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGNovaGloveSensorData::SGSerialize() const +{ + FSGIC_FSGNovaGloveSensorDataImpl InstanceContainer{ToNovaGloveSensorDataImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGNovaGloveSensorDataImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGNovaGloveSensorData::FImpl::FImpl(USGNovaGloveSensorData* InOwner) + : Owner(InOwner) +{ +} + +USGNovaGloveSensorData::FImpl::~FImpl() = default; + +void USGNovaGloveSensorData::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseCom.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseCom.cpp new file mode 100644 index 0000000..5550796 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseCom.cpp @@ -0,0 +1,86 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseCom.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_FString.h" + +bool FSGSenseCom::RegisterExe() +{ + return SGCoreImpl_FSGSenseComImpl_RegisterExe(); +} + +bool FSGSenseCom::RegisterExe(const FString& ExePath) +{ + FSGIC_FString ExePathContainer{ExePath}; + return SGCoreImpl_FSGSenseComImpl_RegisterExe_ExePath(&ExePathContainer); +} + +bool FSGSenseCom::GetExePath(FString& OutExePath) +{ + FSGIC_FString OutExePathContainer; + const bool bResult = SGCoreImpl_FSGSenseComImpl_GetExePath(&OutExePathContainer); + + if (bResult) + { + OutExePath = MoveTemp(OutExePathContainer.String); + } + + return bResult; +} + +bool FSGSenseCom::ScanningActive() +{ + return SGCoreImpl_FSGSenseComImpl_ScanningActive(); +} + +bool FSGSenseCom::GetCurrentExeDirectory(FString& OutDirectory) +{ + FSGIC_FString OutDirectoryContainer; + const bool bResult = SGCoreImpl_FSGSenseComImpl_GetCurrentExeDirectory(&OutDirectoryContainer); + + if (bResult) + { + OutDirectory = MoveTemp(OutDirectoryContainer.String); + } + + return bResult; +} + +bool FSGSenseCom::StartupSenseCom() +{ + return SGCoreImpl_FSGSenseComImpl_StartupSenseCom(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp new file mode 100644 index 0000000..578d67f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGlove.cpp @@ -0,0 +1,826 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseGlove.h" + +#include "SGCore/SGDeviceImplCast.h" +#include "SGCore/SGHandInterpolator.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGSenseGloveSensorNormalizer.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGCoreImpl/SGHandInterpolatorImpl.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGSenseGloveImpl.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" +#include "SGInterop/SGIC_ESGHapticLocation.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_ESGSenseGloveThumperCommand.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGSenseGlovePoseImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_FSGSenseGloveImpl.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h" + +USGSenseGlove* USGSenseGlove::NewSenseGlove(UObject* Outer, const FSGSenseGloveImpl& SenseGloveImpl) +{ + USGSenseGlove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(SenseGloveImpl); + return Instance; +} + +USGSenseGlove* USGSenseGlove::NewSenseGlove(UObject* Outer, TSharedRef SenseGloveImpl) +{ + USGSenseGlove* Instance = NewObject(Outer); + Instance->SetSGDeviceImpl(MoveTemp(SenseGloveImpl)); + return Instance; +} + +USGSenseGlove* USGSenseGlove::NewSenseGlove(UObject* Outer) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer); + + return NewSenseGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGSenseGlove* USGSenseGlove::NewSenseGlove(UObject* Outer, const USGSenseGloveInfo& Model) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer; + FSGIC_FSGSenseGloveInfoImpl ModelContainer{Model.ToSenseGloveInfoImpl()}; + SGCoreImpl_FSGSenseGloveImpl_ctor_Model_MakeShared(&OutSharedPtrContainer, &ModelContainer); + + return NewSenseGlove(Outer, OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGDevice* USGSenseGlove::Parse(UObject* Outer, const FString& ConstantsString) +{ + FSGIC_FSGSenseGloveImpl OutSenseGloveImplContainer; + FSGIC_FString ConstantsStringContainer{ConstantsString}; + SGCoreImpl_FSGSenseGloveImpl_Parse(&OutSenseGloveImplContainer, &ConstantsStringContainer); + + return NewSenseGlove(Outer, MoveTemp(OutSenseGloveImplContainer.SenseGloveImpl)); +} + +TArray USGSenseGlove::GetSenseGloves(UObject* Outer) +{ + FSGIC_TArray_FSGSenseGloveImpl OutGlovesContainer; + SGCoreImpl_FSGSenseGloveImpl_GetSenseGloves(&OutGlovesContainer); + TArray Gloves; + for (const FSGSenseGloveImpl& SenseGloveImpl: OutGlovesContainer.Array) + { + USGSenseGlove* SenseGlove = USGSenseGlove::NewSenseGlove(Outer, SenseGloveImpl); + Gloves.Add(SenseGlove); + } + return Gloves; +} + +bool USGSenseGlove::GetSenseGlove(UObject* Outer, USGSenseGlove*& OutGlove) +{ + FSGIC_FSGSenseGloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetSenseGlove_OutGlove(&OutGloveContainer); + + if (bResult) + { + OutGlove = NewSenseGlove(Outer, MoveTemp(OutGloveContainer.SenseGloveImpl)); + } + + return bResult; +} + +bool USGSenseGlove::GetSenseGlove(UObject* Outer, const bool bRightHanded, USGSenseGlove*& OutGlove) +{ + FSGIC_FSGSenseGloveImpl OutGloveContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetSenseGlove_bRightHanded_OutGlove( + bRightHanded, &OutGloveContainer); + + if (bResult) + { + OutGlove = NewSenseGlove(Outer, MoveTemp(OutGloveContainer.SenseGloveImpl)); + } + + return bResult; +} + +void USGSenseGlove::CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const bool bRightHanded, const ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_ESGFinger MountedOnContainer{MountedOn}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_CalculateGloveLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + bRightHanded, &MountedOnContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGSenseGlove::CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const bool bRightHanded, const ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_ESGFinger MountedOnContainer{MountedOn}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_CalculateGloveLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + bRightHanded, &MountedOnContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const bool bRightHanded, const ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_ESGFinger MountedOnContainer{MountedOn}; + FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset}; + FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_CalculateWristLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + bRightHanded, &MountedOnContainer, + &GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGSenseGlove::CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const bool bRightHanded, const ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, + const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_ESGFinger MountedOnContainer{MountedOn}; + FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset}; + FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset.Quaternion()}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_CalculateWristLocation( + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + bRightHanded, &MountedOnContainer, + &GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +ANSICHAR USGSenseGlove::GetHapticsByte() +{ + return SGCoreImpl_FSGSenseGloveImpl_GetHapticsByte(); +} + +ANSICHAR USGSenseGlove::GetThumperByte() +{ + return SGCoreImpl_FSGSenseGloveImpl_GetThumperByte(); +} + +FVector USGSenseGlove::GetDefaultThimbleOffset() +{ + FSGIC_FVector OutOffsetContainer; + SGCoreImpl_FSGSenseGloveImpl_GetDefaultThimbleOffset(&OutOffsetContainer); + return OutOffsetContainer.Vector; +} + +USGSenseGlovePose* USGSenseGlove::CalculateGlovePose(UObject* Outer, + const USGSenseGloveSensorData* SensorData, + const USGSenseGloveInfo* GloveModel) +{ + FSGIC_FSGSenseGlovePoseImpl OutPoseContainer; + FSGIC_FSGSenseGloveSensorDataImpl SensorDataContainer{SensorData->ToSenseGloveSensorDataImpl()}; + FSGIC_FSGSenseGloveInfoImpl GloveModelContainer{GloveModel->ToSenseGloveInfoImpl()}; + SGCoreImpl_FSGSenseGloveImpl_CalculateGlovePose_SensorData_GloveModel( + &OutPoseContainer, &SensorDataContainer, &GloveModelContainer); + + return USGSenseGlovePose::NewSenseGlovePose(Outer, MoveTemp(OutPoseContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlove::CalculateGlovePose(UObject* Outer, + const TArray>& GloveAngles, + const USGSenseGloveInfo* GloveModel) +{ + FSGIC_FSGSenseGlovePoseImpl OutPoseContainer; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles}; + FSGIC_FSGSenseGloveInfoImpl GloveModelContainer{GloveModel->ToSenseGloveInfoImpl()}; + SGCoreImpl_FSGSenseGloveImpl_CalculateGlovePose_GloveAngles_GloveModel( + &OutPoseContainer, &GloveAnglesContainer, &GloveModelContainer); + + return USGSenseGlovePose::NewSenseGlovePose(Outer, MoveTemp(OutPoseContainer.SenseGlovePoseImpl)); +} + +void USGSenseGlove::NormalizeValues( + const TArray& SumAngles, const USGSenseGloveSensorNormalizer* Normalizer, + TArray& OutFlexions, TArray& OutAbductions) +{ + FSGIC_TArray_FVector SumAnglesContainer{SumAngles}; + FSGIC_FSGSenseGloveSensorNormalizerImpl NormalizerContainer{Normalizer->ToSenseGloveSensorNormalizerImpl()}; + FSGIC_TArray_float OutFlexionsContainer; + FSGIC_TArray_float OutAbductionsContainer; + SGCoreImpl_FSGSenseGloveImpl_NormalizeValues( + &SumAnglesContainer, &NormalizerContainer, &OutFlexionsContainer, &OutAbductionsContainer); + + OutFlexions = MoveTemp(OutFlexionsContainer.Array); + OutAbductions = MoveTemp(OutAbductionsContainer.Array); +} + +void USGSenseGlove::CalculateHandAngles( + const USGSenseGlovePose* GlovePose, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + TArray>& OutHandAngles) +{ + FSGIC_FSGSenseGlovePoseImpl GlovePoseContainer{GlovePose->ToSenseGlovePoseImpl()}; + FSGIC_FSGSenseGloveSensorNormalizerImpl NormalizerContainer{Normalizer->ToSenseGloveSensorNormalizerImpl()}; + FSGIC_FSGHandInterpolatorImpl NormalizedToAnglesContainer{NormalizedToAngles->ToHandInterpolatorImpl()}; + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + SGCoreImpl_FSGSenseGloveImpl_CalculateHandAngles( + &GlovePoseContainer, &NormalizerContainer, &NormalizedToAnglesContainer, &OutHandAnglesContainer); + + OutHandAngles = MoveTemp(OutHandAnglesContainer.Array); +} + +void USGSenseGlove::CalculateHandPose( + UObject* Outer, + const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + USGHandPose*& OutHandPose) +{ + FSGIC_FSGSenseGlovePoseImpl GlovePoseContainer{GlovePose->ToSenseGlovePoseImpl()}; + FSGIC_FSGSenseGloveSensorNormalizerImpl NormalizerContainer{Normalizer->ToSenseGloveSensorNormalizerImpl()}; + FSGIC_FSGHandInterpolatorImpl NormalizedToAnglesContainer{NormalizedToAngles->ToHandInterpolatorImpl()}; + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + SGCoreImpl_FSGSenseGloveImpl_CalculateHandAngles( + &GlovePoseContainer, &NormalizerContainer, &NormalizedToAnglesContainer, &OutHandPoseContainer); + + OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl)); +} + +USGSenseGlove::USGSenseGlove() + : USGHapticGlove() +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl OutSharedPtrContainer; + SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared(&OutSharedPtrContainer); + + SetSGDeviceImpl(OutSharedPtrContainer.Ptr.ToSharedRef()); +} + +USGSenseGlove::USGSenseGlove(const USGSenseGloveInfo& Model) + : USGHapticGlove() +{ +} + +USGSenseGlove::USGSenseGlove(const FSGDeviceImpl& SGDeviceImpl) + : USGHapticGlove(SGDeviceImpl) +{ +} + +USGSenseGlove::USGSenseGlove(const FSGHapticGloveImpl& HapticGloveImpl) + : USGHapticGlove(HapticGloveImpl) +{ +} + +USGSenseGlove::USGSenseGlove(const FSGSenseGloveImpl& SenseGloveImpl) + : USGHapticGlove(SenseGloveImpl) +{ +} + +USGSenseGlove::USGSenseGlove(TSharedRef SGDeviceImpl) + : USGHapticGlove(MoveTemp(SGDeviceImpl)) +{ +} + +USGSenseGlove::USGSenseGlove(TSharedRef HapticGloveImpl) + : USGHapticGlove(MoveTemp(HapticGloveImpl)) +{ +} + +USGSenseGlove::USGSenseGlove(TSharedRef SenseGloveImpl) + : USGHapticGlove(MoveTemp(SenseGloveImpl)) +{ +} + +USGSenseGlove::~USGSenseGlove() = default; + +TSharedRef USGSenseGlove::ToSenseGloveImpl() const +{ + return FSGDeviceImplCast::ToSenseGloveImpl(ToSGDeviceImpl()); +} + +ESGDeviceType USGSenseGlove::GetDeviceType() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_ESGDeviceType OutTypeContainer; + SGCoreImpl_FSGSenseGloveImpl_GetDeviceType(&InstanceContainer, &OutTypeContainer); + return OutTypeContainer.Type; +} + +FString USGSenseGlove::GetDeviceId() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGSenseGloveImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGSenseGlove::GetHardwareVersion() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGSenseGloveImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGSenseGlove::GetFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGSenseGlove::GetSubFirmwareVersion() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +bool USGSenseGlove::IsRight() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_IsRight(&InstanceContainer); +} + +bool USGSenseGlove::GetImuRotation(FQuat& OutImu) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = MoveTemp(OutImuContainer.Quat); + } + + return bResult; +} + +bool USGSenseGlove::GetImuRotation(FRotator& OutImu) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FQuat OutImuContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetImuRotation(&InstanceContainer, &OutImuContainer); + + if (bResult) + { + OutImu = OutImuContainer.Quat.Rotator(); + } + + return bResult; +} + +bool USGSenseGlove::GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FSGBasicHandModelImpl HandModelContainer{HandGeometry->ToBasicHandModelImpl()}; + FSGIC_FSGHandPoseImpl OutHandPoseContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetHandPose( + &InstanceContainer, &HandModelContainer, &OutHandPoseContainer); + + if (bResult) + { + OutHandPose = USGHandPose::NewHandPose(Outer, MoveTemp(OutHandPoseContainer.HandPoseImpl)); + } + + return bResult; +} + +bool USGSenseGlove::GetHandAngles(TArray>& OutHandAngles) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_TArray_TArray_FVector OutHandAnglesContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetHandAngles(&InstanceContainer, &OutHandAnglesContainer); + OutHandAngles = MoveTemp(OutHandAnglesContainer.Array); + return bResult; +} + +ESGHapticGloveCalibrationState USGSenseGlove::GetCalibrationState() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_ESGHapticGloveCalibrationState OutHapticGloveCalibrationStateContainer; + SGCoreImpl_FSGSenseGloveImpl_GetCalibrationState(&InstanceContainer, &OutHapticGloveCalibrationStateContainer); + return OutHapticGloveCalibrationStateContainer.State; +} + +void USGSenseGlove::EndCalibration() +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + SGCoreImpl_FSGSenseGloveImpl_EndCalibration(&InstanceContainer); +} + +void USGSenseGlove::ResetCalibration() +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + SGCoreImpl_FSGSenseGloveImpl_ResetCalibration(&InstanceContainer); +} + +void USGSenseGlove::StopHaptics() +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + SGCoreImpl_FSGSenseGloveImpl_StopHaptics(&InstanceContainer); +} + +void USGSenseGlove::StopVibrations() +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + SGCoreImpl_FSGSenseGloveImpl_StopVibrations(&InstanceContainer); +} + +bool USGSenseGlove::SendHaptics() +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_SendHaptics(&InstanceContainer); +} + +bool USGSenseGlove::QueueForceFeedbackLevels(const TArray& Levels01) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_TArray_float Levels01Container{Levels01}; + return SGCoreImpl_FSGSenseGloveImpl_QueueForceFeedbackLevels(&InstanceContainer, &Levels01Container); +} + +bool USGSenseGlove::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_QueueForceFeedbackLevel(&InstanceContainer, Finger, Level01); +} + +bool USGSenseGlove::QueueVibroLevels(const TArray& Amplitudes) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_TArray_float AmplitudesContainer{Amplitudes}; + return SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevels(&InstanceContainer, &AmplitudesContainer); +} + +bool USGSenseGlove::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_ESGHapticLocation LocationContainer{Location}; + return SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevel_Location_Level01( + &InstanceContainer, &LocationContainer, Level01); +} + +void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_ESGFinger MountedOnContainer{MountedOn}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, &MountedOnContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = MoveTemp(OutGloveRotationContainer.Quat); +} + +void USGSenseGlove::GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_ESGFinger MountedOnContainer{MountedOn}; + FSGIC_FVector OutGlovePositionContainer; + FSGIC_FQuat OutGloveRotationContainer; + + SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, &MountedOnContainer, + &OutGlovePositionContainer, &OutGloveRotationContainer); + + OutGlovePosition = MoveTemp(OutGlovePositionContainer.Vector); + OutGloveRotation = OutGloveRotationContainer.Quat.Rotator(); +} + +void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset}; + FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = MoveTemp(OutWristRotationContainer.Quat); +} + +void USGSenseGlove::GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector ReferencePositionContainer{ReferencePosition}; + FSGIC_FQuat ReferenceRotationContainer{ReferenceRotation.Quaternion()}; + FSGIC_ESGPositionalTrackingHardware TrackingHardwareContainer{TrackingHardware}; + FSGIC_FVector GloveWristPositionOffsetContainer{GloveWristPositionOffset}; + FSGIC_FQuat GloveWristRotationOffsetContainer{GloveWristRotationOffset.Quaternion()}; + FSGIC_FVector OutWristPositionContainer; + FSGIC_FQuat OutWristRotationContainer; + SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation( + &InstanceContainer, + &ReferencePositionContainer, &ReferenceRotationContainer, + &TrackingHardwareContainer, + &GloveWristPositionOffsetContainer, &GloveWristRotationOffsetContainer, + &OutWristPositionContainer, &OutWristRotationContainer); + + OutWristPosition = MoveTemp(OutWristPositionContainer.Vector); + OutWristRotation = OutWristRotationContainer.Quat.Rotator(); +} + +USGSenseGloveInfo* USGSenseGlove::GetGloveInfo(UObject* Outer) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FSGSenseGloveInfoImpl OutGloveInfoContainer; + SGCoreImpl_FSGSenseGloveImpl_GetGloveInfo(&InstanceContainer, &OutGloveInfoContainer); + + return USGSenseGloveInfo::NewSenseGloveInfo(Outer, MoveTemp(OutGloveInfoContainer.SenseGloveInfoImpl)); +} + +TArray USGSenseGlove::GetFingerThimbleOffsets() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_TArray_FVector OutFingerThimbleOffsetsContainer; + SGCoreImpl_FSGSenseGloveImpl_GetFingerThimbleOffsets(&InstanceContainer, &OutFingerThimbleOffsetsContainer); + return OutFingerThimbleOffsetsContainer.Array; +} + +void USGSenseGlove::SetFingerThimbleOffset(const int32 Finger, const FVector& Offset) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FVector OffsetContainer{Offset}; + SGCoreImpl_FSGSenseGloveImpl_SetFingerThimbleOffset(&InstanceContainer, Finger, &OffsetContainer); +} + +bool USGSenseGlove::SupportsWristActuator() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_SupportsWristActuator(&InstanceContainer); +} + +bool USGSenseGlove::GetSensorData(UObject* Outer, USGSenseGloveSensorData*& OutSensorData) const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FSGSenseGloveSensorDataImpl OutSensorDataContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetSensorData(&InstanceContainer, &OutSensorDataContainer); + + if (bResult) + { + OutSensorData = USGSenseGloveSensorData::NewSenseGloveSensorData( + Outer, MoveTemp(OutSensorDataContainer.SenseGloveSensorDataImpl)); + } + + return bResult; +} + +bool USGSenseGlove::GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FSGSenseGlovePoseImpl OutGlovePoseContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_OutGlovePose( + &InstanceContainer, &OutGlovePoseContainer); + + if (bResult) + { + OutGlovePose = USGSenseGlovePose::NewSenseGlovePose( + Outer, MoveTemp(OutGlovePoseContainer.SenseGlovePoseImpl)); + } + + return bResult; +} + +bool USGSenseGlove::GetGlovePose( + UObject* Outer, const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FSGSenseGloveSensorDataImpl SensorDataContainer{SensorData->ToSenseGloveSensorDataImpl()}; + FSGIC_FSGSenseGlovePoseImpl OutGlovePoseContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_SensorData_OutGlovePose( + &InstanceContainer, &SensorDataContainer, &OutGlovePoseContainer); + + if (bResult) + { + OutGlovePose = USGSenseGlovePose::NewSenseGlovePose( + Outer, MoveTemp(OutGlovePoseContainer.SenseGlovePoseImpl)); + } + + return bResult; +} + +bool USGSenseGlove::QueueVibroLevel(const int32 Finger, const float Amplitude) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + return SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevel_Finger_Amplitude(&InstanceContainer, Finger, Amplitude); +} + +bool USGSenseGlove::QueueThumperCommand(ESGSenseGloveThumperCommand Command) +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_ESGSenseGloveThumperCommand CommandContainer{Command}; + return SGCoreImpl_FSGSenseGloveImpl_QueueThumperCommand(&InstanceContainer, &CommandContainer); +} + +FString USGSenseGlove::ToString() const +{ + FSGIC_TSharedPtr_FSGSenseGloveImpl InstanceContainer{ToSenseGloveImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGloveImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String;; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveInfo.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveInfo.cpp new file mode 100644 index 0000000..a437c8c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveInfo.cpp @@ -0,0 +1,555 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseGloveInfo.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_bool.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_float.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGSenseGloveInfo::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGSenseGloveInfoImpl SenseGloveInfoImpl; + + /************************ + * Owner object + ************************/ + + USGSenseGloveInfo* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGSenseGloveInfo* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FSGSenseGloveInfoImpl& SenseGloveInfoImpl) +{ + USGSenseGloveInfo* Instance = NewObject(Outer); + Instance->SetSenseGloveInfoImpl(SenseGloveInfoImpl); + return Instance; +} + +USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer); + + return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); +} + +USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, + const int32 SubFirmwareVersion, const bool bRightHanded, + const int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, + const TArray& StartRotations, + const TArray>& GloveLengths, + const TArray& Functions) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); +} + +USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, + const int32 SubFirmwareVersion, const bool bRightHanded, + const int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, + const TArray& StartRotations, + const TArray>& GloveLengths, + const TArray& Functions) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); +} + +USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, + const int32 SubFirmwareVersion, const bool bRightHanded, + const int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, + const TArray& StartRotations, + const TArray& GloveLengths, + const TArray& Functions) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{ + FSGArrayUtils::FromNestedBPArray(GloveLengths) + }; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); +} + +USGSenseGloveInfo* USGSenseGloveInfo::NewSenseGloveInfo(UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, + const int32 SubFirmwareVersion, const bool bRightHanded, + const int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, + const TArray& StartRotations, + const TArray& GloveLengths, + const TArray& Functions) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{ + FSGArrayUtils::FromNestedBPArray(GloveLengths) + }; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); +} + +bool USGSenseGloveInfo::Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo, + const bool bUpdateOldModels) +{ + FSGIC_FString ConstantsStringContainer{ConstantsString}; + FSGIC_FSGSenseGloveInfoImpl OutGloveInfoImplContainer; + const bool bResult = SGCoreImpl_FSGSenseGloveInfoImpl_Parse(&ConstantsStringContainer, &OutGloveInfoImplContainer, + bUpdateOldModels); + + if (bResult) + { + OutGloveInfo = NewSenseGloveInfo(Outer, MoveTemp(OutGloveInfoImplContainer.SenseGloveInfoImpl)); + } + + return bResult; +} + +USGSenseGloveInfo* USGSenseGloveInfo::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FString SerializedStringContainer{SerializedString}; + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_Deserialize(&OutSenseGloveInfoImplContainer, &SerializedStringContainer); + + return NewSenseGloveInfo(Outer, MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl)); +} + +USGSenseGloveInfo::USGSenseGloveInfo() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor(&OutSenseGloveInfoImplContainer); + + Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); +} + +USGSenseGloveInfo::USGSenseGloveInfo( + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray>& GloveLengths, const TArray& Functions) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); +} + +USGSenseGloveInfo::USGSenseGloveInfo( + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray>& GloveLengths, const TArray& Functions) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{GloveLengths}; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); +} + +USGSenseGloveInfo::USGSenseGloveInfo( + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{StartRotations}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{ + FSGArrayUtils::FromNestedBPArray(GloveLengths) + }; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); +} + +USGSenseGloveInfo::USGSenseGloveInfo( + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoImplContainer; + FSGIC_FString DeviceIdContainer{DeviceId}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FQuat ImuCorrectionContainer{ImuCorrection.Quaternion()}; + FSGIC_TArray_FVector StartPositionsContainer{StartPositions}; + FSGIC_TArray_FQuat StartRotationsContainer{FSGArrayUtils::RotatorsToQuats(StartRotations)}; + FSGIC_TArray_TArray_FVector GloveLengthsContainer{ + FSGArrayUtils::FromNestedBPArray(GloveLengths) + }; + FSGIC_TArray_bool FunctionsContainer{Functions}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + &OutSenseGloveInfoImplContainer, + &DeviceIdContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, &ImuCorrectionContainer, + &StartPositionsContainer, &StartRotationsContainer, + &GloveLengthsContainer, &FunctionsContainer); + + Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoImplContainer.SenseGloveInfoImpl); +} + +USGSenseGloveInfo::USGSenseGloveInfo(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetSenseGloveInfoImpl(SenseGloveInfoImpl); +} + +USGSenseGloveInfo::~USGSenseGloveInfo() = default; + +void USGSenseGloveInfo::SetSenseGloveInfoImpl(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl) +{ + FSGIC_FSGSenseGloveInfoImpl OutSenseGloveInfoContainer; + FSGIC_FSGSenseGloveInfoImpl RhsContainer{SenseGloveInfoImpl}; + SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy(&OutSenseGloveInfoContainer, &RhsContainer); + Pimpl->SenseGloveInfoImpl = MoveTemp(OutSenseGloveInfoContainer.SenseGloveInfoImpl); +} + +const FSGSenseGloveInfoImpl& USGSenseGloveInfo::ToSenseGloveInfoImpl() const +{ + return Pimpl->SenseGloveInfoImpl; +} + +FSGSenseGloveInfoImpl& USGSenseGloveInfo::ToSenseGloveInfoImpl() +{ + return Pimpl->SenseGloveInfoImpl; +} + +FString USGSenseGloveInfo::GetDeviceId() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FString OutIdContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetDeviceId(&InstanceContainer, &OutIdContainer); + return OutIdContainer.String; +} + +FString USGSenseGloveInfo::GetHardwareVersion() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FString OutVersionContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetHardwareVersion(&InstanceContainer, &OutVersionContainer); + return OutVersionContainer.String; +} + +int32 USGSenseGloveInfo::GetFirmwareVersion() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + return SGCoreImpl_FSGSenseGloveInfoImpl_GetFirmwareVersion(&InstanceContainer); +} + +int32 USGSenseGloveInfo::GetSubFirmwareVersion() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + return SGCoreImpl_FSGSenseGloveInfoImpl_GetSubFirmwareVersion(&InstanceContainer); +} + +bool USGSenseGloveInfo::IsRight() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + return SGCoreImpl_FSGSenseGloveInfoImpl_IsRight(&InstanceContainer); +} + +int32 USGSenseGloveInfo::GetNumberOfSensors() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + return SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors(&InstanceContainer); +} + +FQuat USGSenseGloveInfo::GetImuCorrectionQ() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FQuat OutCorrectionContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer); + return OutCorrectionContainer.Quat; +} + +FRotator USGSenseGloveInfo::GetImuCorrection() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FQuat OutCorrectionContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection(&InstanceContainer, &OutCorrectionContainer); + return OutCorrectionContainer.Quat.Rotator(); +} + +TArray USGSenseGloveInfo::GetStartPositions() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_FVector OutPositionsContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPositions(&InstanceContainer, &OutPositionsContainer); + return OutPositionsContainer.Array; +} + +TArray USGSenseGloveInfo::GetStartRotationsQ() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations(&InstanceContainer, &OutRotationsContainer); + return OutRotationsContainer.Array; +} + +TArray USGSenseGloveInfo::GetStartRotations() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations(&InstanceContainer, &OutRotationsContainer); + return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); +} + +TArray> USGSenseGloveInfo::GetGloveLengths() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_TArray_FVector OutLengthsContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths(&InstanceContainer, &OutLengthsContainer); + return OutLengthsContainer.Array; +} + +TArray USGSenseGloveInfo::GetFunctions() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_bool OutFunctionsContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_GetFunctions(&InstanceContainer, &OutFunctionsContainer); + return OutFunctionsContainer.Array; +} + +FVector USGSenseGloveInfo::GetStartPosition(const ESGFinger Finger) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FVector OutPositionContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPosition(&InstanceContainer, &OutPositionContainer, &FingerContainer); + return OutPositionContainer.Vector; +} + +FQuat USGSenseGloveInfo::GetStartRotationQ(const ESGFinger Finger) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FQuat OutRotationContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer); + return OutRotationContainer.Quat; +} + +FRotator USGSenseGloveInfo::GetStartRotation(const ESGFinger Finger) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FQuat OutRotationContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation(&InstanceContainer, &OutRotationContainer, &FingerContainer); + return OutRotationContainer.Quat.Rotator(); +} + +TArray USGSenseGloveInfo::GetGloveLengths(const ESGFinger Finger) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_FVector OutLengths; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths_Finger(&InstanceContainer, &OutLengths, &FingerContainer); + return OutLengths.Array; +} + +TArray> USGSenseGloveInfo::ToGloveAngles(const TArray>& SensorAngles) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_TArray_TArray_FVector OutAnglesContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles}; + SGCoreImpl_FSGSenseGloveInfoImpl_ToGloveAngles(&InstanceContainer, &OutAnglesContainer, &SensorAnglesContainer); + return OutAnglesContainer.Array; +} + +bool USGSenseGloveInfo::Equals(const USGSenseGloveInfo* SenseGloveInfo) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FSGSenseGloveInfoImpl SenseGloveInfoImplContainer{SenseGloveInfo->ToSenseGloveInfoImpl()}; + return SGCoreImpl_FSGSenseGloveInfoImpl_Equals(&InstanceContainer, &SenseGloveInfoImplContainer); +} + +FString USGSenseGloveInfo::ToString(const bool bShortNotation) const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_ToString_bShortNotation(&InstanceContainer, &OutStringContainer, bShortNotation); + return OutStringContainer.String; +} + +FString USGSenseGloveInfo::ToString() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGSenseGloveInfo::SGSerialize() const +{ + FSGIC_FSGSenseGloveInfoImpl InstanceContainer{ToSenseGloveInfoImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGloveInfoImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGSenseGloveInfo::FImpl::FImpl(USGSenseGloveInfo* InOwner) + : Owner(InOwner) +{ +} + +USGSenseGloveInfo::FImpl::~FImpl() = default; + +void USGSenseGloveInfo::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGlovePose.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGlovePose.cpp new file mode 100644 index 0000000..5271c09 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGlovePose.cpp @@ -0,0 +1,409 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseGlovePose.h" + +#include "SGCore/SGSenseGloveInfo.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGSenseGlovePoseImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGSenseGlovePoseImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGSenseGlovePose::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGSenseGlovePoseImpl SenseGlovePoseImpl; + + /************************ + * Owner object + ************************/ + + USGSenseGlovePose* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGSenseGlovePose* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const FSGSenseGlovePoseImpl& SenseGlovePoseImpl) +{ + USGSenseGlovePose* Instance = NewObject(Outer); + Instance->SetSenseGlovePoseImpl(SenseGlovePoseImpl); + return Instance; +} + +USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor(&OutSenseGlovePoseImplContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{JointRotations}; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles}; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)}; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles}; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::FromNestedBPArray(JointRotations) + }; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(GloveAngles) + }; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlovePose::NewSenseGlovePose(UObject* Outer, const bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::RotatorsToQuats(JointRotations) + }; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(GloveAngles) + }; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlovePose::IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_FSGSenseGloveInfoImpl SenseGloveInfoContainer{GloveInfo->ToSenseGloveInfoImpl()}; + SGCoreImpl_FSGSenseGlovePoseImpl_IdlePose(&OutSenseGlovePoseImplContainer, &SenseGloveInfoContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose* USGSenseGlovePose::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGSenseGlovePoseImpl_Deserialize(&OutSenseGlovePoseImplContainer, &SerializedStringContainer); + + return NewSenseGlovePose(Outer, MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl)); +} + +USGSenseGlovePose::USGSenseGlovePose() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor(&OutSenseGlovePoseImplContainer); + + Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl); +} + +USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{JointRotations}; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles}; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl); +} + +USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{JointPositions}; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{FSGArrayUtils::RotatorsToQuats(JointRotations)}; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{GloveAngles}; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl); +} + +USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::FromNestedBPArray(JointRotations) + }; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(GloveAngles) + }; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl); +} + +USGSenseGlovePose::USGSenseGlovePose(const bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseImplContainer; + FSGIC_TArray_TArray_FVector JointPositionsContainer{ + FSGArrayUtils::FromNestedBPArray(JointPositions) + }; + FSGIC_TArray_TArray_FQuat JointRotationsContainer{ + FSGArrayUtils::RotatorsToQuats(JointRotations) + }; + FSGIC_TArray_TArray_FVector GloveAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(GloveAngles) + }; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + &OutSenseGlovePoseImplContainer, bRightHanded, &JointPositionsContainer, + &JointRotationsContainer, &GloveAnglesContainer); + + Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseImplContainer.SenseGlovePoseImpl); +} + +USGSenseGlovePose::USGSenseGlovePose(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetSenseGlovePoseImpl(SenseGlovePoseImpl); +} + +USGSenseGlovePose::~USGSenseGlovePose() = default; + +void USGSenseGlovePose::SetSenseGlovePoseImpl(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl) +{ + FSGIC_FSGSenseGlovePoseImpl OutSenseGlovePoseContainer; + FSGIC_FSGSenseGlovePoseImpl RhsContainer{SenseGlovePoseImpl}; + SGCoreImpl_FSGSenseGlovePoseImpl_ctor_copy(&OutSenseGlovePoseContainer, &RhsContainer); + Pimpl->SenseGlovePoseImpl = MoveTemp(OutSenseGlovePoseContainer.SenseGlovePoseImpl); +} + +const FSGSenseGlovePoseImpl& USGSenseGlovePose::ToSenseGlovePoseImpl() const +{ + return Pimpl->SenseGlovePoseImpl; +} + +bool USGSenseGlovePose::IsRight() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + return SGCoreImpl_FSGSenseGlovePoseImpl_IsRight(&InstanceContainer); +} + +TArray> USGSenseGlovePose::GetJointPositions() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_TArray_FVector OutPositionsContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetJointPositions(&InstanceContainer, &OutPositionsContainer); + return OutPositionsContainer.Array; +} + +TArray> USGSenseGlovePose::GetJointRotationsQ() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer); + return OutRotationsContainer.Array; +} + +TArray> USGSenseGlovePose::GetJointRotations() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetJointRotations(&InstanceContainer, &OutRotationsContainer); + return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); +} + +TArray> USGSenseGlovePose::GetGloveAngles() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetGloveAngles(&InstanceContainer, &OutAnglesContainer); + return OutAnglesContainer.Array; +} + +TArray USGSenseGlovePose::GetThimblePositions() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_FVector OutPositionsContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetThimblePositions(&InstanceContainer, &OutPositionsContainer); + return OutPositionsContainer.Array; +} + +TArray USGSenseGlovePose::GetThimbleRotationsQ() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRotations(&InstanceContainer, &OutRotationsContainer); + return OutRotationsContainer.Array; +} + +TArray USGSenseGlovePose::GetThimbleRotations() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_FQuat OutRotationsContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRotations(&InstanceContainer, &OutRotationsContainer); + return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); +} + +TArray USGSenseGlovePose::GetTotalGloveAngles() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_FVector OutAnglesContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_GetTotalGloveAngles(&InstanceContainer, &OutAnglesContainer); + return OutAnglesContainer.Array; +} + +TArray USGSenseGlovePose::CalculateFingertips(const TArray& FingerOffsets) const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_TArray_FVector OutFingertipsContainer; + FSGIC_TArray_FVector FingerOffsetsContainer{FingerOffsets}; + SGCoreImpl_FSGSenseGlovePoseImpl_CalculateFingertips(&InstanceContainer, &OutFingertipsContainer, + &FingerOffsetsContainer); + return OutFingertipsContainer.Array; +} + +bool USGSenseGlovePose::Equals(const USGSenseGlovePose* SenseGlovePose) const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_FSGSenseGlovePoseImpl SenseGlovePoseContainer{SenseGlovePose->ToSenseGlovePoseImpl()}; + return SGCoreImpl_FSGSenseGlovePoseImpl_Equals(&InstanceContainer, &SenseGlovePoseContainer); +} + +FString USGSenseGlovePose::ToString(const bool bShortFormat) const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_ToString(&InstanceContainer, &OutStringContainer, bShortFormat); + return OutStringContainer.String; +} + +FString USGSenseGlovePose::SGSerialize() const +{ + FSGIC_FSGSenseGlovePoseImpl InstanceContainer{ToSenseGlovePoseImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGlovePoseImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGSenseGlovePose::FImpl::FImpl(USGSenseGlovePose* InOwner) + : Owner(InOwner) +{ +} + +USGSenseGlovePose::FImpl::~FImpl() = default; + +void USGSenseGlovePose::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveSensorData.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveSensorData.cpp new file mode 100644 index 0000000..e97afbc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveSensorData.cpp @@ -0,0 +1,351 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseGloveSensorData.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGSenseGloveSensorDataImpl.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TArray_TArray_float.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGSenseGloveSensorData::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGSenseGloveSensorDataImpl SenseGloveSensorDataImpl; + + /************************ + * Owner object + ************************/ + + USGSenseGloveSensorData* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGSenseGloveSensorData* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData( + UObject* Outer, const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl) +{ + USGSenseGloveSensorData* Instance = NewObject(Outer); + Instance->SetSenseGloveSensorDataImpl(SenseGloveSensorDataImpl); + return Instance; +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData(UObject* Outer) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor(&OutSenseGloveSensorDataImplContainer); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData( + UObject* Outer, const TArray>& SensorAngles, + const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles}; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData( + UObject* Outer, const TArray>& SensorAngles, + const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles}; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData( + UObject* Outer, const TArray& SensorAngles, + const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(SensorAngles) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::NewSenseGloveSensorData( + UObject* Outer, const TArray& SensorAngles, + const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(SensorAngles) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::Empty(UObject* Outer) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_Empty(&OutSenseGloveSensorDataImplContainer); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::Parse(UObject* Outer, + const FString& RawData, const USGSenseGloveInfo* GloveInfo) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_FString RawDataString{RawData}; + FSGIC_FSGSenseGloveInfoImpl GloveInfoContainer{GloveInfo->ToSenseGloveInfoImpl()}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_Parse(&OutSenseGloveSensorDataImplContainer, + &RawDataString, &GloveInfoContainer); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData* USGSenseGloveSensorData::Deserialize(UObject* Outer, const FString& SerializedString) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_FString SerializedStringContainer{SerializedString}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_Deserialize(&OutSenseGloveSensorDataImplContainer, + &SerializedStringContainer); + + return NewSenseGloveSensorData(Outer, MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl)); +} + +USGSenseGloveSensorData::USGSenseGloveSensorData() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor(&OutSenseGloveSensorDataImplContainer); + + Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl); +} + +USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray>& SensorAngles, const FQuat& ImuRotation, + const int32 ParsedValues, const bool bImuParsed) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles}; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl); +} + +USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray>& SensorAngles, const FRotator& ImuRotation, + const int32 ParsedValues, const bool bImuParsed) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{SensorAngles}; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl); +} + +USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray& SensorAngles, const FQuat& ImuRotation, + const int32 ParsedValues, const bool bImuParsed) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(SensorAngles) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl); +} + +USGSenseGloveSensorData::USGSenseGloveSensorData(const TArray& SensorAngles, const FRotator& ImuRotation, + const int32 ParsedValues, const bool bImuParsed) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataImplContainer; + FSGIC_TArray_TArray_float SensorAnglesContainer{ + FSGArrayUtils::FromNestedBPArray(SensorAngles) + }; + FSGIC_FQuat ImuRotationContainer{ImuRotation.Quaternion()}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + &OutSenseGloveSensorDataImplContainer, &SensorAnglesContainer, &ImuRotationContainer, ParsedValues, bImuParsed); + + Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataImplContainer.SenseGloveSensorDataImpl); +} + +USGSenseGloveSensorData::USGSenseGloveSensorData(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetSenseGloveSensorDataImpl(SenseGloveSensorDataImpl); +} + +USGSenseGloveSensorData::~USGSenseGloveSensorData() = default; + +void USGSenseGloveSensorData::SetSenseGloveSensorDataImpl(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl) +{ + FSGIC_FSGSenseGloveSensorDataImpl OutSenseGloveSensorDataContainer; + FSGIC_FSGSenseGloveSensorDataImpl RhsContainer{SenseGloveSensorDataImpl}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_copy(&OutSenseGloveSensorDataContainer, &RhsContainer); + Pimpl->SenseGloveSensorDataImpl = MoveTemp(OutSenseGloveSensorDataContainer.SenseGloveSensorDataImpl); +} + +const FSGSenseGloveSensorDataImpl& USGSenseGloveSensorData::ToSenseGloveSensorDataImpl() const +{ + return Pimpl->SenseGloveSensorDataImpl; +} + +TArray> USGSenseGloveSensorData::GetSensorAngles() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_TArray_TArray_float OutAnglesContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_GetSensorAngles(&InstanceContainer, &OutAnglesContainer); + return OutAnglesContainer.Array; +} + +TArray USGSenseGloveSensorData::GetSensorAngles(const ESGFinger Finger) const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_TArray_float OutAnglesContainer; + FSGIC_ESGFinger FingerContainer{Finger}; + SGCoreImpl_FSGSenseGloveSensorDataImpl_GetSensorAngles_Finger(&InstanceContainer, &OutAnglesContainer, + &FingerContainer); + return OutAnglesContainer.Array; +} + +TArray USGSenseGloveSensorData::GetAngleSequence() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_TArray_float OutSequenceContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_GetAngleSequence(&InstanceContainer, &OutSequenceContainer); + return OutSequenceContainer.Array; +} + +FQuat USGSenseGloveSensorData::GetImuRotationQ() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator USGSenseGloveSensorData::GetImuRotation() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_GetImuRotation(&InstanceContainer, &OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +int32 USGSenseGloveSensorData::GetParsedValues() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + return SGCoreImpl_FSGSenseGloveSensorDataImpl_GetParsedValues(&InstanceContainer); +} + +bool USGSenseGloveSensorData::IsImuParsed() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + return SGCoreImpl_FSGSenseGloveSensorDataImpl_IsImuParsed(&InstanceContainer); +} + +bool USGSenseGloveSensorData::Equals(const USGSenseGloveSensorData* SenseGloveSensorData) const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_FSGSenseGloveSensorDataImpl SenseGloveSensorDataContainer{SenseGloveSensorData->ToSenseGloveSensorDataImpl()}; + return SGCoreImpl_FSGSenseGloveSensorDataImpl_Equals(&InstanceContainer, &SenseGloveSensorDataContainer); +} + +FString USGSenseGloveSensorData::ToString() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +FString USGSenseGloveSensorData::SGSerialize() const +{ + FSGIC_FSGSenseGloveSensorDataImpl InstanceContainer{ToSenseGloveSensorDataImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGSenseGloveSensorDataImpl_Serialize(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGSenseGloveSensorData::FImpl::FImpl(USGSenseGloveSensorData* InOwner) + : Owner(InOwner) +{ +} + +USGSenseGloveSensorData::FImpl::~FImpl() = default; + +void USGSenseGloveSensorData::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveSensorNormalizer.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveSensorNormalizer.cpp new file mode 100644 index 0000000..f2663c2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveSensorNormalizer.cpp @@ -0,0 +1,172 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseGloveSensorNormalizer.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_bool.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGSenseGloveSensorNormalizer::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGSenseGloveSensorNormalizerImpl SenseGloveSensorNormalizerImpl; + + /************************ + * Owner object + ************************/ + + USGSenseGloveSensorNormalizer* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGSenseGloveSensorNormalizer* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer( + UObject* Outer, const FSGSenseGloveSensorNormalizerImpl& SenseGloveSensorNormalizerImpl) +{ + USGSenseGloveSensorNormalizer* Instance = NewObject(Outer); + Instance->SetSenseGloveSensorNormalizerImpl(SenseGloveSensorNormalizerImpl); + return Instance; +} + +USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer(UObject* Outer) +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl OutSenseGloveSensorNormalizerImplContainer; + SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor(&OutSenseGloveSensorNormalizerImplContainer); + + return NewSenseGloveSensorNormalizer( + Outer, MoveTemp(OutSenseGloveSensorNormalizerImplContainer.SenseGloveSensorNormalizerImpl)); +} + +USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer( + UObject* Outer, const bool bRightHanded) +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl OutSenseGloveSensorNormalizerImplContainer; + SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_bRightHanded( + &OutSenseGloveSensorNormalizerImplContainer, bRightHanded); + + return NewSenseGloveSensorNormalizer( + Outer, MoveTemp(OutSenseGloveSensorNormalizerImplContainer.SenseGloveSensorNormalizerImpl)); +} + +USGSenseGloveSensorNormalizer::USGSenseGloveSensorNormalizer() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl OutSenseGloveSensorNormalizerImplContainer; + SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor(&OutSenseGloveSensorNormalizerImplContainer); + + Pimpl->SenseGloveSensorNormalizerImpl = MoveTemp( + OutSenseGloveSensorNormalizerImplContainer.SenseGloveSensorNormalizerImpl); +} + +USGSenseGloveSensorNormalizer::USGSenseGloveSensorNormalizer(bool bRightHanded) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl OutSenseGloveSensorNormalizerImplContainer; + SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_bRightHanded( + &OutSenseGloveSensorNormalizerImplContainer, bRightHanded); + + Pimpl->SenseGloveSensorNormalizerImpl = + MoveTemp(OutSenseGloveSensorNormalizerImplContainer.SenseGloveSensorNormalizerImpl); +} + +USGSenseGloveSensorNormalizer::USGSenseGloveSensorNormalizer( + const FSGSenseGloveSensorNormalizerImpl& SenseGloveSensorNormalizerImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetSenseGloveSensorNormalizerImpl(SenseGloveSensorNormalizerImpl); +} + +USGSenseGloveSensorNormalizer::~USGSenseGloveSensorNormalizer() = default; + +void USGSenseGloveSensorNormalizer::SetSenseGloveSensorNormalizerImpl( + const FSGSenseGloveSensorNormalizerImpl& SenseGloveSensorNormalizerImpl) +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl OutSenseGloveSensorNormalizerContainer; + FSGIC_FSGSenseGloveSensorNormalizerImpl RhsContainer{SenseGloveSensorNormalizerImpl}; + SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_copy(&OutSenseGloveSensorNormalizerContainer, &RhsContainer); + Pimpl->SenseGloveSensorNormalizerImpl = MoveTemp( + OutSenseGloveSensorNormalizerContainer.SenseGloveSensorNormalizerImpl); +} + +const FSGSenseGloveSensorNormalizerImpl& USGSenseGloveSensorNormalizer::ToSenseGloveSensorNormalizerImpl() const +{ + return Pimpl->SenseGloveSensorNormalizerImpl; +} + +float USGSenseGloveSensorNormalizer::NormalizeFlexion(const int32 Finger, const float SumFlexionAngles) const +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl InstanceContainer{ToSenseGloveSensorNormalizerImpl()}; + return SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_NormalizeFlexion( + &InstanceContainer, Finger, SumFlexionAngles); +} + +float USGSenseGloveSensorNormalizer::NormalizeAbduction(const int32 Finger, const float SumAbductionAngles) const +{ + FSGIC_FSGSenseGloveSensorNormalizerImpl InstanceContainer{ToSenseGloveSensorNormalizerImpl()}; + return SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_NormalizeAbduction( + &InstanceContainer, Finger, SumAbductionAngles); +} + +USGSenseGloveSensorNormalizer::FImpl::FImpl(USGSenseGloveSensorNormalizer* InOwner) + : Owner(InOwner) +{ +} + +USGSenseGloveSensorNormalizer::FImpl::~FImpl() = default; + +void USGSenseGloveSensorNormalizer::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveVars.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveVars.cpp new file mode 100644 index 0000000..b2d925c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSenseGloveVars.cpp @@ -0,0 +1,166 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSenseGloveVars.h" + +#include "SGCore/SGSenseGloveInfo.h" +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_bool.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +FString FSGSenseGloveVars::GetStandardConstantsString(const FString& HardwareVersion, const float FirmwareVersion, + const bool bRightHanded) +{ + FSGIC_FString OutStringContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetStandardConstantsString(&OutStringContainer, + &HardwareVersionContainer, FirmwareVersion, + bRightHanded); + return OutStringContainer.String; +} + +FString FSGSenseGloveVars::GetSensorString(const FString& HardwareVersion, const float FirmwareVersion) +{ + FSGIC_FString OutStringContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetSensorString(&OutStringContainer, &HardwareVersionContainer, FirmwareVersion); + return OutStringContainer.String; +} + +TArray FSGSenseGloveVars::GetStartPositions(const FString& HardwareVersion, const bool bRightHanded) +{ + FSGIC_TArray_FVector OutPositionsContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetStartPositions(&OutPositionsContainer, &HardwareVersionContainer, bRightHanded); + return OutPositionsContainer.Array; +} + +TArray FSGSenseGloveVars::GetStartRotationsQ(const FString& HardwareVersion, const bool bRightHanded) +{ + FSGIC_TArray_FQuat OutRotationsContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetStartRotations(&OutRotationsContainer, &HardwareVersionContainer, bRightHanded); + return OutRotationsContainer.Array; +} + +TArray FSGSenseGloveVars::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded) +{ + FSGIC_TArray_FQuat OutRotationsContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetStartRotations(&OutRotationsContainer, &HardwareVersionContainer, bRightHanded); + return FSGArrayUtils::QuatsToRotators(OutRotationsContainer.Array); +} + +TArray> FSGSenseGloveVars::GetGloveLengths(const FString& HardwareVersion) +{ + FSGIC_TArray_TArray_FVector OutLengthsContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetGloveLengths(&OutLengthsContainer, &HardwareVersionContainer); + return OutLengthsContainer.Array; +} + +/* +TArray FSGSenseGloveVars::GetGloveLengths_BP(const FString& HardwareVersion) +{ + return FSGArrayUtils::ToNestedBPArray(GetGloveLengths(HardwareVersion)); +} +*/ +int32 FSGSenseGloveVars::GetSensors(const FString& HardwareVersion) +{ + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + return SGCoreImpl_FSGSenseGloveVarsImpl_GetSensors(&HardwareVersionContainer); +} + +FQuat FSGSenseGloveVars::GetImuCorrectionQ(const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + FSGIC_FQuat OutCorrectionContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetImuCorrection(&OutCorrectionContainer, + &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + return OutCorrectionContainer.Quat; +} + +FRotator FSGSenseGloveVars::GetImuCorrection(const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + FSGIC_FQuat OutCorrectionContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetImuCorrection(&OutCorrectionContainer, + &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + return OutCorrectionContainer.Quat.Rotator(); +} + +TArray FSGSenseGloveVars::GetFunctions(const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + FSGIC_TArray_bool OutFunctionsContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GetFunctions(&OutFunctionsContainer, + &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion); + return OutFunctionsContainer.Array; +} + +USGSenseGloveInfo* FSGSenseGloveVars::GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded) +{ + FSGIC_FSGSenseGloveInfoImpl OutModelContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + SGCoreImpl_FSGSenseGloveVarsImpl_GenerateGloveModel_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded( + &OutModelContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded); + + return USGSenseGloveInfo::NewSenseGloveInfo(Outer, MoveTemp(OutModelContainer.SenseGloveInfoImpl)); +} + +USGSenseGloveInfo* FSGSenseGloveVars::GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const FString& CustomId) +{ + FSGIC_FSGSenseGloveInfoImpl OutModelContainer; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FString CustomIdContainer{CustomId}; + SGCoreImpl_FSGSenseGloveVarsImpl_GenerateGloveModel_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_CustomId( + &OutModelContainer, &HardwareVersionContainer, FirmwareVersion, SubFirmwareVersion, bRightHanded, + &CustomIdContainer); + + return USGSenseGloveInfo::NewSenseGloveInfo(Outer, MoveTemp(OutModelContainer.SenseGloveInfoImpl)); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSensorNormalization.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSensorNormalization.cpp new file mode 100644 index 0000000..3b0b383 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGSensorNormalization.cpp @@ -0,0 +1,228 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGSensorNormalization.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGSensorNormalizationImpl.h" +#include "SGInterop/SGIC_FSGSensorNormalizationImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_bool.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGSensorNormalization::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGSensorNormalizationImpl SensorNormalizationImpl; + + /************************ + * Owner object + ************************/ + + USGSensorNormalization* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGSensorNormalization* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGSensorNormalization* USGSensorNormalization::NewSensorNormalization( + UObject* Outer, const FSGSensorNormalizationImpl& SensorNormalizationImpl) +{ + USGSensorNormalization* Instance = NewObject(Outer); + Instance->SetSensorNormalizationImpl(SensorNormalizationImpl); + return Instance; +} + +USGSensorNormalization* USGSensorNormalization::NewSensorNormalization(UObject* Outer) +{ + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizationImplContainer; + SGCoreImpl_FSGSensorNormalizationImpl_ctor(&OutSensorNormalizationImplContainer); + + return NewSensorNormalization(Outer, MoveTemp(OutSensorNormalizationImplContainer.SensorNormalizationImpl)); +} + +USGSensorNormalization* USGSensorNormalization::NewSensorNormalization( + UObject* Outer, const TArray& MovementRanges) +{ + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizationImplContainer; + FSGIC_TArray_float MovementRangesContainer{MovementRanges}; + SGCoreImpl_FSGSensorNormalizationImpl_ctor_MovementRanges( + &OutSensorNormalizationImplContainer, &MovementRangesContainer); + + return NewSensorNormalization(Outer, MoveTemp(OutSensorNormalizationImplContainer.SensorNormalizationImpl)); +} + +USGSensorNormalization::USGSensorNormalization() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizationImplContainer; + SGCoreImpl_FSGSensorNormalizationImpl_ctor(&OutSensorNormalizationImplContainer); + + Pimpl->SensorNormalizationImpl = MoveTemp(OutSensorNormalizationImplContainer.SensorNormalizationImpl); +} + +USGSensorNormalization::USGSensorNormalization(const TArray& MovementRanges) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizationImplContainer; + FSGIC_TArray_float MovementRangesContainer{MovementRanges}; + SGCoreImpl_FSGSensorNormalizationImpl_ctor_MovementRanges( + &OutSensorNormalizationImplContainer, &MovementRangesContainer); + + Pimpl->SensorNormalizationImpl = MoveTemp(OutSensorNormalizationImplContainer.SensorNormalizationImpl); +} + +USGSensorNormalization::USGSensorNormalization(const FSGSensorNormalizationImpl& SensorNormalizationImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetSensorNormalizationImpl(SensorNormalizationImpl); +} + +USGSensorNormalization::~USGSensorNormalization() = default; + +void USGSensorNormalization::SetSensorNormalizationImpl(const FSGSensorNormalizationImpl& SensorNormalizationImpl) +{ + FSGIC_FSGSensorNormalizationImpl OutSensorNormalizationContainer; + FSGIC_FSGSensorNormalizationImpl RhsContainer{SensorNormalizationImpl}; + SGCoreImpl_FSGSensorNormalizationImpl_ctor_copy(&OutSensorNormalizationContainer, &RhsContainer); + Pimpl->SensorNormalizationImpl = MoveTemp(OutSensorNormalizationContainer.SensorNormalizationImpl); +} + +const FSGSensorNormalizationImpl& USGSensorNormalization::ToSensorNormalizationImpl() const +{ + return Pimpl->SensorNormalizationImpl; +} + +bool USGSensorNormalization::CollectsNormalization() const +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_CollectsNormalization(&InstanceContainer); +} + +void USGSensorNormalization::SetCollectNormalization(const bool bCollectNormalization) +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + SGCoreImpl_FSGSensorNormalizationImpl_SetCollectNormalization( + &InstanceContainer, bCollectNormalization); +} + +int32 USGSensorNormalization::GetLength() const +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_GetLength(&InstanceContainer); +} + +int32 USGSensorNormalization::GetMoveCount() const +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_GetMoveCount(&InstanceContainer); +} + +bool USGSensorNormalization::AllSensorsMoving() const +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_AllSensorsMoving(&InstanceContainer); +} + +void USGSensorNormalization::ResetNormalization() +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_ResetNormalization(&InstanceContainer); +} + +void USGSensorNormalization::UpdateNormalization(const float Value, const int32 Index) +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_UpdateNormalization( + &InstanceContainer, Value, Index); +} + +float USGSensorNormalization::NormalizeValue(const float Value, const int32 Index) +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_NormalizeValue( + &InstanceContainer, Value, Index); +} + +TArray USGSensorNormalization::NormalizeValues(const TArray& Values) +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + FSGIC_TArray_float ValuesContainer{Values}; + FSGIC_TArray_float OutNormalizedValuesContainer; + SGCoreImpl_FSGSensorNormalizationImpl_NormalizeValues( + &InstanceContainer, &ValuesContainer, &OutNormalizedValuesContainer); + + return OutNormalizedValuesContainer.Array; +} + +bool USGSensorNormalization::MovedEnough(const int32 Index) const +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_MovedEnough(&InstanceContainer, Index); +} + +float USGSensorNormalization::Denormalize(const float Value01, const int32 Index, const float FallbackValue) const +{ + FSGIC_FSGSensorNormalizationImpl InstanceContainer{ToSensorNormalizationImpl()}; + return SGCoreImpl_FSGSensorNormalizationImpl_Denormalize( + &InstanceContainer, Value01, Index, FallbackValue); +} + +USGSensorNormalization::FImpl::FImpl(USGSensorNormalization* InOwner) + : Owner(InOwner) +{ +} + +USGSensorNormalization::FImpl::~FImpl() = default; + +void USGSensorNormalization::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGThresholdCommand.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGThresholdCommand.cpp new file mode 100644 index 0000000..72c8e84 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGThresholdCommand.cpp @@ -0,0 +1,225 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGThresholdCommand.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGCoreImpl/SGThresholdCommandImpl.h" +#include "SGInterop/SGIC_FSGThresholdCommandImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_TArray_bool.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGUtils/SGArrayUtils.h" + +struct USGThresholdCommand::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGThresholdCommandImpl ThresholdCommandImpl; + + /************************ + * Owner object + ************************/ + + USGThresholdCommand* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGThresholdCommand* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +USGThresholdCommand* USGThresholdCommand::NewThresholdCommand( + UObject* Outer, const FSGThresholdCommandImpl& ThresholdCommandImpl) +{ + USGThresholdCommand* Instance = NewObject(Outer); + Instance->SetThresholdCommandImpl(ThresholdCommandImpl); + return Instance; +} + +USGThresholdCommand* USGThresholdCommand::NewThresholdCommand(UObject* Outer) +{ + FSGIC_FSGThresholdCommandImpl OutThresholdCommandImplContainer; + SGCoreImpl_FSGThresholdCommandImpl_ctor(&OutThresholdCommandImplContainer); + + return NewThresholdCommand(Outer, MoveTemp(OutThresholdCommandImplContainer.ThresholdCommandImpl)); +} + +USGThresholdCommand* USGThresholdCommand::NewThresholdCommand( + UObject* Outer, const TArray& AffectedFingers, const TArray& ThresholdValues) +{ + FSGIC_FSGThresholdCommandImpl OutThresholdCommandImplContainer; + FSGIC_TArray_bool AffectedFingersContainer{AffectedFingers}; + FSGIC_TArray_float ThresholdValuesContainer{ThresholdValues}; + SGCoreImpl_FSGThresholdCommandImpl_ctor_AffectedFingers_ThresholdValues( + &OutThresholdCommandImplContainer, &AffectedFingersContainer, &ThresholdValuesContainer); + + return NewThresholdCommand(Outer, MoveTemp(OutThresholdCommandImplContainer.ThresholdCommandImpl)); +} + +USGThresholdCommand::USGThresholdCommand() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGThresholdCommandImpl OutThresholdCommandImplContainer; + SGCoreImpl_FSGThresholdCommandImpl_ctor(&OutThresholdCommandImplContainer); + + Pimpl->ThresholdCommandImpl = MoveTemp(OutThresholdCommandImplContainer.ThresholdCommandImpl); +} + +USGThresholdCommand::USGThresholdCommand(const TArray& AffectedFingers, const TArray& ThresholdValues) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + FSGIC_FSGThresholdCommandImpl OutThresholdCommandImplContainer; + FSGIC_TArray_bool AffectedFingersContainer{AffectedFingers}; + FSGIC_TArray_float ThresholdValuesContainer{ThresholdValues}; + SGCoreImpl_FSGThresholdCommandImpl_ctor_AffectedFingers_ThresholdValues( + &OutThresholdCommandImplContainer, &AffectedFingersContainer, &ThresholdValuesContainer); + + Pimpl->ThresholdCommandImpl = MoveTemp(OutThresholdCommandImplContainer.ThresholdCommandImpl); +} + +USGThresholdCommand::USGThresholdCommand(const FSGThresholdCommandImpl& ThresholdCommandImpl) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + SetThresholdCommandImpl(ThresholdCommandImpl); +} + +USGThresholdCommand::~USGThresholdCommand() = default; + +void USGThresholdCommand::SetThresholdCommandImpl(const FSGThresholdCommandImpl& ThresholdCommandImpl) +{ + FSGIC_FSGThresholdCommandImpl OutThresholdCommandContainer; + FSGIC_FSGThresholdCommandImpl RhsContainer{ThresholdCommandImpl}; + SGCoreImpl_FSGThresholdCommandImpl_ctor_copy(&OutThresholdCommandContainer, &RhsContainer); + Pimpl->ThresholdCommandImpl = MoveTemp(OutThresholdCommandContainer.ThresholdCommandImpl); +} + +const FSGThresholdCommandImpl& USGThresholdCommand::ToThresholdCommandImpl() const +{ + return Pimpl->ThresholdCommandImpl; +} + +float USGThresholdCommand::GetThreshold(const int32 Finger) const +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + return SGCoreImpl_FSGThresholdCommandImpl_GetThreshold(&InstanceContainer, Finger); +} + +void USGThresholdCommand::SetThreshold(const int32 Finger, const float ThresholdValue) +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + return SGCoreImpl_FSGThresholdCommandImpl_SetThreshold(&InstanceContainer, Finger, ThresholdValue); +} + +TArray USGThresholdCommand::GetThresholds() const +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + FSGIC_TArray_float ThresholdsContainer; + SGCoreImpl_FSGThresholdCommandImpl_GetThresholds(&InstanceContainer, &ThresholdsContainer); + return ThresholdsContainer.Array; +} + +void USGThresholdCommand::SetThresholds(const TArray& AffectedFingers, const TArray& ThresholdValues) +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + FSGIC_TArray_bool AffectedFingersContainer{AffectedFingers}; + FSGIC_TArray_float ThresholdValuesContainer{ThresholdValues}; + SGCoreImpl_FSGThresholdCommandImpl_SetThresholds( + &InstanceContainer, &AffectedFingersContainer, &ThresholdValuesContainer); +} + +bool USGThresholdCommand::GetFingerActive(const int32 Finger) const +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + return SGCoreImpl_FSGThresholdCommandImpl_GetFingerActive(&InstanceContainer, Finger); +} + +TArray USGThresholdCommand::GetActiveFingers() const +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + FSGIC_TArray_bool OutActiveFingersContainer; + SGCoreImpl_FSGThresholdCommandImpl_GetActiveFingers(&InstanceContainer, &OutActiveFingersContainer); + return OutActiveFingersContainer.Array; +} + +void USGThresholdCommand::ClearThreshold(const int32 Finger) +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + SGCoreImpl_FSGThresholdCommandImpl_ClearThreshold(&InstanceContainer, Finger); +} + +void USGThresholdCommand::ClearThresholds() +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + SGCoreImpl_FSGThresholdCommandImpl_ClearThresholds(&InstanceContainer); +} + +bool USGThresholdCommand::Equals(const USGThresholdCommand* ThresholdCommand) const +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + FSGIC_FSGThresholdCommandImpl ThresholdCommandContainer{ThresholdCommand->ToThresholdCommandImpl()}; + return SGCoreImpl_FSGThresholdCommandImpl_Equals(&InstanceContainer, &ThresholdCommandContainer); +} + +FString USGThresholdCommand::ToString() const +{ + FSGIC_FSGThresholdCommandImpl InstanceContainer{ToThresholdCommandImpl()}; + FSGIC_FString OutStringContainer; + SGCoreImpl_FSGThresholdCommandImpl_ToString(&InstanceContainer, &OutStringContainer); + return OutStringContainer.String; +} + +USGThresholdCommand::FImpl::FImpl(USGThresholdCommand* InOwner) + : Owner(InOwner) +{ +} + +USGThresholdCommand::FImpl::~FImpl() = default; + +void USGThresholdCommand::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGTracking.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGTracking.cpp new file mode 100644 index 0000000..41c6da8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SGCore/SGTracking.cpp @@ -0,0 +1,867 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGTracking.h" + +#include "SGCoreImpl/SGExportedFunctions.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGUtils/SGArrayUtils.h" + +void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FQuat& TrackedRotation, + const FVector& PositionOffset, const FQuat& RotationOffset, + FVector& OutNewPosition, FQuat& OutNewRotation) +{ + FSGIC_FVector TrackedPositionContainer{TrackedPosition}; + FSGIC_FQuat TrackedRotationContainer{TrackedRotation}; + FSGIC_FVector PositionOffsetContainer{PositionOffset}; + FSGIC_FQuat RotationOffsetContainer{RotationOffset}; + FSGIC_FVector OutNewPositionContainer; + FSGIC_FQuat OutNewRotationContainer; + + SGCoreImpl_FSGTrackingImpl_CalculateLocation( + &TrackedPositionContainer, &TrackedRotationContainer, + &PositionOffsetContainer, &RotationOffsetContainer, + &OutNewPositionContainer, &OutNewRotationContainer); + + OutNewPosition = MoveTemp(OutNewPositionContainer.Vector); + OutNewRotation = MoveTemp(OutNewRotationContainer.Quat); +} + +void FSGTracking::CalculateLocation(const FVector& TrackedPosition, const FRotator& TrackedRotation, + const FVector& PositionOffset, const FRotator& RotationOffset, + FVector& OutNewPosition, FRotator& OutNewRotation) +{ + FSGIC_FVector TrackedPositionContainer{TrackedPosition}; + FSGIC_FQuat TrackedRotationContainer{TrackedRotation.Quaternion()}; + FSGIC_FVector PositionOffsetContainer{PositionOffset}; + FSGIC_FQuat RotationOffsetContainer{RotationOffset.Quaternion()}; + FSGIC_FVector OutNewPositionContainer; + FSGIC_FQuat OutNewRotationContainer; + + SGCoreImpl_FSGTrackingImpl_CalculateLocation( + &TrackedPositionContainer, &TrackedRotationContainer, + &PositionOffsetContainer, &RotationOffsetContainer, + &OutNewPositionContainer, &OutNewRotationContainer); + + OutNewPosition = MoveTemp(OutNewPositionContainer.Vector); + OutNewRotation = OutNewRotationContainer.Quat.Rotator(); +} + +TArray FSGTracking::GetSenseGloveFingerToGlovePositionOrigin() +{ + FSGIC_TArray_FVector OutOriginContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGlovePositionOrigin(&OutOriginContainer); + return OutOriginContainer.Array; +} + +TArray FSGTracking::GetSenseGloveFingerToGloveRotationOriginQ() +{ + FSGIC_TArray_FQuat OutOriginContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer); + return OutOriginContainer.Array; +} + +TArray FSGTracking::GetSenseGloveFingerToGloveRotationOrigin() +{ + FSGIC_TArray_FQuat OutOriginContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin(&OutOriginContainer); + return FSGArrayUtils::QuatsToRotators(OutOriginContainer.Array); +} + +FVector FSGTracking::GetSenseGloveWristPositionOffset() +{ + FSGIC_FVector OutOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristPositionOffset(&OutOffsetContainer); + return OutOffsetContainer.Vector; +} + +FQuat FSGTracking::GetSenseGloveWristRotationOffsetQ() +{ + FSGIC_FQuat OutOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer); + return OutOffsetContainer.Quat; +} + +FRotator FSGTracking::GetSenseGloveWristRotationOffset() +{ + FSGIC_FQuat OutOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset(&OutOffsetContainer); + return OutOffsetContainer.Quat.Rotator(); +} + +void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger, + FVector& OutIPosition, FQuat& OutIRotation) +{ + FSGIC_ESGFinger ToFingerContainer{ToFinger}; + FSGIC_FVector OutIPositionContainer; + FSGIC_FQuat OutIRotationContainer; + + SGCoreImpl_FSGTrackingImpl_GetSenseGloveMountOffset(bRightHanded, &ToFingerContainer, + &OutIPositionContainer, &OutIRotationContainer); + + OutIPosition = MoveTemp(OutIPositionContainer.Vector); + OutIRotation = MoveTemp(OutIRotationContainer.Quat); +} + +void FSGTracking::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger, + FVector& OutIPosition, FRotator& OutIRotation) +{ + FSGIC_ESGFinger ToFingerContainer{ToFinger}; + FSGIC_FVector OutIPositionContainer; + FSGIC_FQuat OutIRotationContainer; + + SGCoreImpl_FSGTrackingImpl_GetSenseGloveMountOffset(bRightHanded, &ToFingerContainer, + &OutIPositionContainer, &OutIRotationContainer); + + OutIPosition = MoveTemp(OutIPositionContainer.Vector); + OutIRotation = OutIRotationContainer.Quat.Rotator(); +} + +void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGIC_ESGPositionalTrackingHardware HardwareContainer; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + + SGCoreImpl_FSGTrackingImpl_GetSenseGloveTrackerMountOffset(&HardwareContainer, bRightHanded, + &OutPositionOffsetContainer, + &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat); +} + +void FSGTracking::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + FSGIC_ESGPositionalTrackingHardware HardwareContainer; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + + SGCoreImpl_FSGTrackingImpl_GetSenseGloveTrackerMountOffset(&HardwareContainer, bRightHanded, + &OutPositionOffsetContainer, + &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetSenseGloveViveToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetSenseGloveViveToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetSenseGloveViveToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetSenseGloveOculusTouchToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetSenseGloveOculusTouchToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetSenseGloveOculusTouchToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetNovaToWristPositionOffset() +{ + FSGIC_FVector OutOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNovaToWristPositionOffset(&OutOffsetContainer); + return OutOffsetContainer.Vector; +} + +FQuat FSGTracking::GetNovaToWristRotationOffsetQ() +{ + FSGIC_FQuat OutOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer); + return OutOffsetContainer.Quat; +} + +FRotator FSGTracking::GetNovaToWristRotationOffset() +{ + FSGIC_FQuat OutOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset(&OutOffsetContainer); + return OutOffsetContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNovaViveToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNovaViveToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNovaViveToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNovaViveToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNovaViveToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNovaViveToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNovaQuest2ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNovaQuest2ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNovaQuest2ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNovaQuest2ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNovaQuest2ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNovaQuest2ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNovaPico2ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNovaPico2ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNovaPico2ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FQuat FSGTracking::GetLeftNovaPico2ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNovaPico2ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNovaQuestProToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNovaQuestProToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNovaQuestProToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNovaQuestProToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNovaQuestProToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNovaQuestProToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNovaViveFocus3ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNovaViveFocus3ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNovaViveFocus3ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNovaViveFocus3ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNovaViveFocus3ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNovaViveFocus3ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNovaQuest3ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNovaQuest3ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNovaQuest3ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNovaQuest3ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNovaQuest3ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNovaQuest3ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + + SGCoreImpl_FSGTrackingImpl_GetNovaGloveWristOffset(bRightHanded, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat); +} + +void FSGTracking::GetNovaGloveWristOffset(const bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + + SGCoreImpl_FSGTrackingImpl_GetNovaGloveWristOffset(bRightHanded, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator(); +} + +void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware}; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + + SGCoreImpl_FSGTrackingImpl_GetNovaGloveTrackerOffset(&HardwareContainer, bRightHanded, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat); +} + +void FSGTracking::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware}; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + + SGCoreImpl_FSGTrackingImpl_GetNovaGloveTrackerOffset(&HardwareContainer, bRightHanded, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNova2ToWristPositionOffset() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristPositionOffset(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNova2ToWristRotationOffsetQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristRotationOffset(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNova2ToWristRotationOffset() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristRotationOffset(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNova2ToWristPositionOffset() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristPositionOffset(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNova2ToWristRotationOffsetQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristRotationOffset(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNova2ToWristRotationOffset() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristRotationOffset(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNova2Quest2ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNova2Quest2ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNova2Quest2ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNova2Quest2ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNova2Quest2ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNova2Quest2ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNova2QuestProToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNova2QuestProToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2QuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNova2QuestProToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2QuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNova2QuestProToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNova2QuestProToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2QuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNova2QuestProToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2QuestProToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNova2ViveTrackerToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNova2ViveTrackerToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNova2ViveTrackerToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNova2ViveTrackerToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNova2ViveTrackerToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNova2ViveTrackerToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetRightNova2ViveWristTrackerToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNova2ViveWristTrackerToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FVector FSGTracking::GetRightNova2Quest3ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetRightNova2Quest3ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetRightNova2Quest3ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNova2Quest3ToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNova2Quest3ToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNova2Quest3ToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FRotator FSGTracking::GetRightNova2ViveWristTrackerToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +FVector FSGTracking::GetLeftNova2ViveWristTrackerToAttachPosition() +{ + FSGIC_FVector OutPositionContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachPosition(&OutPositionContainer); + return OutPositionContainer.Vector; +} + +FQuat FSGTracking::GetLeftNova2ViveWristTrackerToAttachRotationQ() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat; +} + +FRotator FSGTracking::GetLeftNova2ViveWristTrackerToAttachRotation() +{ + FSGIC_FQuat OutRotationContainer; + SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachRotation(&OutRotationContainer); + return OutRotationContainer.Quat.Rotator(); +} + +void FSGTracking::GetNova2GloveWristOffset(const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNova2GloveWristOffset( + bRightHanded, &HardwareVersionContainer, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat); +} + +void FSGTracking::GetNova2GloveWristOffset(const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNova2GloveWristOffset( + bRightHanded, &HardwareVersionContainer, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator(); +} + +void FSGTracking::GetNova2GloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNova2GloveTrackerOffset( + &HardwareContainer, bRightHanded, &HardwareVersionContainer, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = MoveTemp(OutRotationOffsetContainer.Quat); +} + +void FSGTracking::GetNova2GloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware}; + FSGIC_FString HardwareVersionContainer{HardwareVersion}; + FSGIC_FVector OutPositionOffsetContainer; + FSGIC_FQuat OutRotationOffsetContainer; + SGCoreImpl_FSGTrackingImpl_GetNova2GloveTrackerOffset( + &HardwareContainer, bRightHanded, &HardwareVersionContainer, + &OutPositionOffsetContainer, &OutRotationOffsetContainer); + + OutPositionOffset = MoveTemp(OutPositionOffsetContainer.Vector); + OutRotationOffset = OutRotationOffsetContainer.Quat.Rotator(); +} + +FString FSGTracking::ToString(const ESGPositionalTrackingHardware Hardware) +{ + FSGIC_FString OutStringContainer; + FSGIC_ESGPositionalTrackingHardware HardwareContainer{Hardware}; + SGCoreImpl_FSGTrackingImpl_ToString(&OutStringContainer, &HardwareContainer); + return OutStringContainer.String; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCore.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCore.cpp new file mode 100644 index 0000000..de2b93c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCore.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCore.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveCoreModule.h" + +IMPLEMENT_MODULE(FSenseGloveCoreModule, SenseGloveCore) diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCore.h b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCore.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCore.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCoreModule.cpp b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCoreModule.cpp new file mode 100644 index 0000000..3162ac8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCoreModule.cpp @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreModule.h" +#include "Containers/UnrealString.h" +#include "SGCore/SGLibrary.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveCoreModule" + +void FSenseGloveCoreModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveCore module..."); + SGLOG(FString::Printf(TEXT("The Unreal Engine implementation of '%s' has been loaded successfully!"), + *FSGLibrary::GetVersion())); +} + +void FSenseGloveCoreModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveCore module..."); +} + +void FSenseGloveCoreModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveCore module has succeeded!"); +} + +void FSenseGloveCoreModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveCore module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCoreModule.h b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCoreModule.h new file mode 100644 index 0000000..5fbaba8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Private/SenseGloveCoreModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCore" + +class FSenseGloveCoreModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGAnatomy.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGAnatomy.h new file mode 100644 index 0000000..8fc19c9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGAnatomy.h @@ -0,0 +1,118 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Hard-Coded Database that is used in calibration and in solving. + * Values herein are used to limit outputs within 'natural' ranges. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "HAL/Platform.h" +#include "Math/Vector.h" + +#include "SGAnatomy.generated.h" + +/** + * "Database" of anatomical values, such as joint limits. + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGAnatomy +{ + GENERATED_BODY() + +public: + /** + * Total sum of all finger flexion that would be considered "total flexion". + */ + static float GetTotalFingerFlexion(); + + /** + * Total sum of all finger flexion that would be considered "total extension". + */ + static float GetTotalFingerExtension(); + + /** + * Total sum of all thumb flexion that would be considered "total flexion". + */ + static float GetTotalThumbFlexion(); + + /** + * Total sum of all thumb flexion that would be considered "total extension". + */ + static float GetTotalThumbExtension(); + + /** + * Retrieve one of the limits of a finger joint's movement. + */ + static float GetFingerJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax); + + /** + * Retrieve one of the limits of a thumb joint's movement. + */ + static float GetThumbJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax); + + /* + * Limit a value between specific joint angles. + */ + static float ClampJointAngle(float Value, int32 Finger, bool bRightHand, int32 Joint, int32 Movement); + + /** + * Convert a total finger flexion in degrees into a 0..1 representation. + */ + static float NormalizeFingerFlexion(float FlexionInDegrees); + + /** + * Convert a total thumb flexion in degrees into a 0..1 representation. + */ + static float NormalizeThumbFlexion(float FlexionInDegrees); + + /** + * Get Hand Angles that would make a Default (Idle) Pose. + */ + static TArray> GetDefaultHandAngles(bool bRightHanded); + + /** + * Get Hand Angles that would make a flat hand. + */ + static TArray> GetFlatHandAngles(bool bRightHanded); + + /** + * Get hand angles that would make a thumbs up. + */ + static TArray> GetThumbsUpHandAngles(bool bRightHanded); + + /** + * Get Hand Angles that would make a fist. + */ + static TArray> GetFistHandAngles(bool bRightHanded); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGBasicHandModel.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGBasicHandModel.h new file mode 100644 index 0000000..0fa89d7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGBasicHandModel.h @@ -0,0 +1,366 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A data class containing the minimum required data for a hand's forward + * kinematics. + * Used in both kinematics and calibration. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGFloatArray.h" + +#include "SGBasicHandModel.generated.h" + +class FSGBasicHandModelImpl; + +/** + * Represents data of a user's hand required for forward kinematics. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGBasicHandModel final : public UObject +{ + GENERATED_BODY() + +public: + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, const FSGBasicHandModelImpl& BasicHandModelImpl); + +public: + /** + * The basic class constructor. + */ + static USGBasicHandModel* NewBasicHandModel(UObject* Outer); + + /** + * Create a new BasicHandModel with no starting rotations. + */ + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, + bool bRightHanded, const TArray>& Lengths, const TArray& StartPositions); + + /** + * Create a new BasicHandModel with no starting rotations. + */ + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, + bool bRightHanded, const TArray& Lengths, const TArray& StartPositions); + + /** + * Create a new BasicHandModel. + */ + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, + bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, + bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, + bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + static USGBasicHandModel* NewBasicHandModel( + UObject* Outer, + bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + +public: + /** + * Retrieve a default left or right hand model. + */ + static USGBasicHandModel* Default(UObject* Outer, bool bRightHanded); + + /** + * Convert a serialized HandModel back into its class representation. + */ + static USGBasicHandModel* Deserialize(UObject* Outer, const FString& SerializedString); + +public: + /** + * Default finger lengths (based on right hand). + * + * @remarks Any missing fingers are replaced with their respective value. + */ + static TArray> GetBaseFingerLengths(); + + /** + * Default joint positions (based on right hand). + * + * @remarks Any missing positions are replaced with their respective value. + */ + static TArray GetBaseJointPositions(); + + /** + * Default joint angles (based on right hand). + * + * @remarks Any missing angles are replaced with their respective value. + */ + static TArray GetBaseJointAngles(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The basic class constructor. + */ + USGBasicHandModel(); + + /** + * Create a new BasicHandModel with no starting rotations. + */ + USGBasicHandModel(bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions); + + /** + * Create a new BasicHandModel with no starting rotations. + */ + USGBasicHandModel(bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions); + + /** + * Create a new BasicHandModel. + */ + USGBasicHandModel(bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + USGBasicHandModel(bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + USGBasicHandModel(bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + USGBasicHandModel(bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGBasicHandModel(const FSGBasicHandModelImpl& BasicHandModelImpl); + +public: + /** + * The destructor. + */ + virtual ~USGBasicHandModel() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetBasicHandModelImpl(const FSGBasicHandModelImpl& BasicHandModelImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGBasicHandModelImpl& ToBasicHandModelImpl() const; + +protected: + /** + * The non-const cast to underlying type method. + */ + FSGBasicHandModelImpl& ToBasicHandModelImpl(); + +public: + /** + * Whether or not this BasicHandModel was created for a left- or right hand. Used for validation. + */ + bool IsRight() const; + + /** + * The length of individual finger phalangers in mm, sorted per finger. Generally 5x3. + */ + TArray> GetFingerLengths() const; + + /** + * Retrieve the finger lengths of a specific finger in cm. + */ + TArray GetFingerLengths(ESGFinger Finger) const; + + /** + * Set the finger lengths of a specific finger in cm. + */ + void SetFingerLengths(ESGFinger Finger, const TArray& Lengths); + + /** + * Set the finger lengths of a specific finger in cm. + */ + void SetFingerLengths(uint8 Finger, const TArray& Lengths); + + /** + * Get the finger ratios of all fingers. + */ + TArray> GetFingerRatios() const; + + /** + * Get the finger ratios of a specific finger. + */ + TArray GetFingerRatios(ESGFinger Finger) const; + + /** + * Starting joint positions relative to the device Origin. + */ + TArray GetStartJointPositions() const; + + /** + * + */ + void SetStartJointPosition(ESGFinger Finger, const FVector& Position); + + /** + * + */ + void SetStartJointPosition(uint8 Finger, const FVector& Position); + + /** + * Starting joint rotations relative to the device Origin. + */ + TArray GetStartJointRotationsQ() const; + + /** + * Starting joint rotations relative to the device Origin. + */ + TArray GetStartJointRotations() const; + + /** + * Retrieve the start position of a specific finger. + */ + FVector GetJointPosition(ESGFinger Finger) const; + + /** + * Set the start position of a specific finger. + */ + void SetJointPosition(const FVector& NewPosition, ESGFinger Finger); + + /** + * Retrieve the start rotation of a specific finger. + */ + FQuat GetJointRotationQ(ESGFinger Finger) const; + + /** + * Retrieve the start rotation of a specific finger. + */ + FRotator GetJointRotation(ESGFinger Finger) const; + + /** + * Set the start rotation of a specific finger. + */ + void SetJointRotation(const FQuat& NewRotation, ESGFinger Finger); + + /** + * Set the start rotation of a specific finger. + */ + void SetJointRotation(const FRotator& NewRotation, ESGFinger Finger); + + /** + * Get the total lengths of fingers, in cm. + */ + TArray GetTotalLengths() const; + + /** + * Get the total length of a specific finger, in mm. + */ + float GetTotalLength(ESGFinger Finger) const; + +public: + /** + * Retrieve the lengths of a specific finger, as BasicHandModel representation (L, 0, 0). + * + * @remarks Used for forwards kinematics. + */ + TArray Get3DLengths(ESGFinger Finger) const; + +public: + /** + * Check if this BasicHandModel has the same values as another BasicHandModel. + */ + bool Equals(const USGBasicHandModel* BasicHandModel) const; + +public: + /** + * Convert this handModel into a string notation, readable for humans. Does not include starting positions / rotations. + */ + FString ToString() const; + + /** + * Convert this handModel into a string notation, readable for humans. Optionally includes starting positions / rotations. + */ + FString ToString(bool bLengthsOnly) const; + + /** + * Serialize this HandModel into a string representation. + */ + FString SGSerialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGBetaDevice.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGBetaDevice.h new file mode 100644 index 0000000..8c16b8f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGBetaDevice.h @@ -0,0 +1,177 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Represents a Sense Glove Device that has no specific class within the API. + * Used to test different iterations of the same product before integrating it + * into the Core API. + * Allows access to raw sensor values and commands of such a device. + */ + + +#pragma once + +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGDevice.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGBetaDevice.generated.h" + +class FSGDeviceImpl; +class FSGBetaDeviceImpl; + +/** + * A Device that adheres to the SenseGlove communications protocol, but which has no implementation in this API. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGBetaDevice final : public USGDevice +{ + GENERATED_BODY() + +public: + static USGBetaDevice* NewBetaDevice(UObject* Outer, const FSGBetaDeviceImpl& BetaDeviceImpl); + + static USGBetaDevice* NewBetaDevice(UObject* Outer, TSharedRef BetaDeviceImpl); + +public: + /** + * The basic class constructor. + */ + static USGBetaDevice* NewBetaDevice(UObject* Outer); + + /** + * Creates a new instance of a Beta Device. + */ + static USGBetaDevice* NewBetaDevice( + UObject* Outer, + const FString& ConstantsString, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + +public: + /** + * Deserialize a beta device from its basic constants string. Returns nullptr is unsuccessful. + */ + static USGBetaDevice* Parse(UObject* Outer, const FString& String); + +public: + /** + * The basic class constructor. + */ + USGBetaDevice(); + + /** + * Creates a new instance of a Beta Device. + */ + USGBetaDevice(const FString& ConstantsString, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGBetaDevice(const FSGBetaDeviceImpl& BetaDeviceImpl); + +protected: + /** + * The cast from underlying pointer type constructor. + */ + explicit USGBetaDevice(TSharedRef BetaDeviceImpl); + +public: + /** + * The destructor. + */ + virtual ~USGBetaDevice() override; + +protected: + /** + * The cast to underlying type method. + */ + TSharedRef ToBetaDeviceImpl() const; + +public: + /** + * Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration. + */ + virtual ESGDeviceType GetDeviceType() const override; + + /** + * Get the unique identifier of this device. + */ + virtual FString GetDeviceId() const override; + + /** + * Retrieve this device's hardware version. + */ + virtual FString GetHardwareVersion() const override; + + /** + * Retrieve this device's firmware version. + */ + virtual int32 GetFirmwareVersion() const override; + + /** + * Retrieve this device's sub-firmware version. + */ + virtual int32 GetSubFirmwareVersion() const override; + +public: + /** + * Retrieve the constants string for additional processing. + */ + FString GetConstantsString() const; + + /** + * Retrieve a raw sensor string from this Beta Device. + */ + FString GetSensorData() const; + + /** + * Retrieve the last command retrieved from this Beta Device. + */ + FString GetLastCommand() const; + +public: + /** + * Send a raw string command to this device. + */ + bool SendHaptics(const FString& Command) const; + +public: + /** + * Create a string representation of this device for reporting purposes. + */ + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGCore.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGCore.h new file mode 100644 index 0000000..72edc2e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGCore.h @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGAnatomy.h" +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGBetaDevice.h" +#include "SGCore/SGDevice.h" +#include "SGCore/SGDeviceList.h" +#include "SGCore/SGDeviceModel.h" +#include "SGCore/SGHandInterpolator.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGHapticGlove.h" +#include "SGCore/SGInterpolationSet.h" +#include "SGCore/SGJointKinematics.h" +#include "SGCore/SGLibrary.h" +#include "SGCore/SGNovaGlove.h" +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCore/SGNovaGloveSensorData.h" +#include "SGCore/SGSenseCom.h" +#include "SGCore/SGSenseGlove.h" +#include "SGCore/SGSenseGloveInfo.h" +#include "SGCore/SGSenseGlovePose.h" +#include "SGCore/SGSenseGloveSensorData.h" +#include "SGCore/SGSenseGloveVars.h" +#include "SGCore/SGTracking.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGCustomWaveform.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGCustomWaveform.h new file mode 100644 index 0000000..bcb583f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGCustomWaveform.h @@ -0,0 +1,305 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Describes a vibration based on a number of parameters. Is sent to Nova Gloves + * to be generated on the hardware and played. + */ + + +#pragma once + +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGCustomWaveform.generated.h" + +class FSGCustomWaveformImpl; + +/* + * A single vibration pulse for Nova Gloves. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGCustomWaveform final : public UObject +{ + GENERATED_BODY() + +public: + static USGCustomWaveform* NewCustomWaveform( + UObject* Outer, const FSGCustomWaveformImpl& CustomWaveformImpl); + +public: + /** + * The default constructor. + */ + static USGCustomWaveform* NewCustomWaveform(UObject* Outer); + + /** + * Create a new instance of CustomWaveform. + */ + static USGCustomWaveform* NewCustomWaveform( + UObject* Outer, + float Amplitude, float Duration); + + /** + * Create a new instance of CustomWaveform. + */ + static USGCustomWaveform* NewCustomWaveform( + UObject* Outer, + float Amplitude, float Duration, float Frequency); + +public: + /** + * Creates a string representation of the ESGWaveformType. + * + * @param Type + */ + static FString ToString(ESGWaveformType Type); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGCustomWaveform(); + + /** + * Create a new instance of CustomWaveform. + */ + USGCustomWaveform(float Amplitude, float Duration); + + /** + * Create a new instance of CustomWaveform. + */ + USGCustomWaveform(float Amplitude, float Duration, float Frequency); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGCustomWaveform(const FSGCustomWaveformImpl& CustomWaveformImpl); + +public: + /** + * The destructor. + */ + virtual ~USGCustomWaveform() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetCustomWaveformImpl(const FSGCustomWaveformImpl& CustomWaveformImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGCustomWaveformImpl& ToCustomWaveformImpl() const; + +public: + /** + * Get the total amplitude of the wave-from, represented by 0 (off) or 1 (maximum value). + */ + float GetAmplitude() const; + + /** + * Set the total amplitude of the wave-from, represented by 0 (off) or 1 (maximum value). + * + * @param Amplitude + */ + void SetAmplitude(float Amplitude); + + /** + * Get the Type of waveform pattern that is used. + */ + ESGWaveformType GetWaveType() const; + + /** + * Set the Type of waveform pattern that is used. + * + * @param Type + */ + void SetWaveType(ESGWaveformType Type); + + /** + * Get whether or not this Waveform is infinitely repeating. + */ + bool IsInfinite() const; + + /** + * Set whether or not this Waveform is infinitely repeating. + * + * @param bInfinite + */ + void SetInfinite(bool bInfinite); + + /** + * Get the amount of times to repeat this waveform. 1 is the default. If set to 0, repeats indefinitely. + */ + int32 GetRepeatAmount() const; + + /** + * Set the amount of times to repeat this waveform. 1 is the default. If set to 0, repeats indefinitely. + * + * @param Amount + */ + void SetRepeatAmount(int32 Amount); + + /** + * Get time, in seconds, before the signal reaches its maximum amplitude. Limited to 0.01 - 1s. Set to 0 for an + * instant start. Linear only. + */ + float GetAttackTime() const; + + /** + * Set time, in seconds, before the signal reaches its maximum amplitude. Limited to 0.01 - 1s. Set to 0 for an + * instant start. Linear only. + * + * @param Time + */ + void SetAttackTime(float Time); + + /** + * Get time, in seconds, to keep the signal at one Amplitude. Limited to 0.01 - 1s. + */ + float GetSustainTime() const; + + /** + * Set time, in seconds, to keep the signal at one Amplitude. Limited to 0.01 - 1s. + * + * @param Time + */ + void SetSustainTime(float Time); + + /** + * Get time it takes for the effect to fade out after AttackTime+SustainTime has passed. Limited to 0.01 - 1s. Set + * to 0 for instant stop. Linear only. + */ + float GetDecayTime() const; + + /** + * Set time it takes for the effect to fade out after AttackTime+SustainTime has passed. Limited to 0.01 - 1s. Set + * to 0 for instant stop. Linear only. + * + * @param Time + */ + void SetDecayTime(float Time); + + /** + * Get the Wave-from Frequency at the start of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + */ + float GetFrequencyStart() const; + + /** + * Set the Wave-from Frequency at the start of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + * + * @param Frequency + */ + void SetFrequencyStart(float Frequency); + + /** + * Get the Wave-from Frequency at the end of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + */ + float GetFrequencyEnd() const; + + /** + * Set the Wave-from Frequency at the end of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + * + * @param Frequency + */ + void SetFrequencyEnd(float Frequency); + + /** + * Get value of [0..1], representing a percentage of total time (attack+sustain+decay). After that moment passes, + * we increase the frequency by FrequencySwitch factor. + */ + float GetFrequencySwitchTime() const; + + /** + * Set value of [0..1], representing a percentage of total time (attack+sustain+decay). After that moment passes, + * we increase the frequency by FrequencySwitch factor. + * + * @param Time + */ + void SetFrequencySwitchTime(float Time); + + /** + * After a certain % of the waveform (FrequencySwitchTime) plays, multiply the frequency by this factor [1x .. 3x]. + */ + float GetFrequencySwitchFactor() const; + + /** + * After a certain % of the waveform (FrequencySwitchTime) plays, multiply the frequency by this factor [1x .. 3x]. + * param Time + */ + void SetFrequencySwitchFactor(float Time); + +public: + /** + * The total command time of a single play of this pattern (not taking into account the RepeatAmount). + */ + float GetEffectTime() const; + + /** + * Total time for the entire effect (effect time multiplied by the repeat amount). + */ + float GetTotalEffectTime() const; + + /** + * If true, the frequency of this waveform jumps at any time during its playtime by FrequencySwitchFactor. + */ + bool FrequencyJumps() const; + +public: + /** + * Check if this CustomWaveform is roughly equal to another. + */ + bool Equals(const USGCustomWaveform* CustomWaveform) const; + +public: + /** + * Create a string representation of this CustomWaveform. + */ + FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDevice.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDevice.h new file mode 100644 index 0000000..5d89196 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDevice.h @@ -0,0 +1,407 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Represents a Device built by the Sense Glove company that is compatible with + * our Communications Protocol. All such devices derive from this abstract + * class. + */ + + +#pragma once + +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGDevice.generated.h" + +class FSGBetaDeviceImpl; +class FSGDeviceImpl; +class FSGHapticGloveImpl; +class FSGNovaGloveImpl; +class FSGNova2GloveImpl; +class FSGSenseGloveImpl; +class USGHapticChannelInfo; +class USGBetaDevice; +class USGHapticGlove; +class USGNova2Glove; +class USGNovaGlove; +class USGSenseGlove; + +/** + * + */ +UCLASS(Abstract, BlueprintType) +class SENSEGLOVECORE_API USGDevice : public UObject +{ + GENERATED_BODY() + +public: + /** + * Parse a main and sub firmware version from its raw (v4.12) notation + */ + static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion); + + /** + * If true, my firmware is newer than the reference firmware. + * + * @param MyFirmwareMain + * @param MyFirmwareSub + * @param ReferenceMain + * @param ReferenceSub + * @param bInclusive + */ + static bool FirmwareNewerThan(int32 MyFirmwareMain, int32 MyFirmwareSub, + int32 ReferenceMain, int32 ReferenceSub, + bool bInclusive); + + /** + * If true, my firmware is older than the reference firmware. + * + * @param MyFirmwareMain + * @param MyFirmwareSub + * @param ReferenceMain + * @param ReferenceSub + * @param bInclusive + */ + static bool FirmwareOlderThan(int32 MyFirmwareMain, int32 MyFirmwareSub, + int32 ReferenceMain, int32 ReferenceSub, + bool bInclusive); + + /** + * + */ + static FString ToString(ESGDeviceType DeviceType); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +protected: + /** + * The basic constructor. + */ + USGDevice(); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGDevice(const FSGDeviceImpl& SGDeviceImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGDevice(const FSGBetaDeviceImpl& BetaDeviceImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGDevice(const FSGHapticGloveImpl& HapticGloveImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGDevice(const FSGNova2GloveImpl& Nova2GloveImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGDevice(const FSGNovaGloveImpl& NovaGloveImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGDevice(const FSGSenseGloveImpl& SenseGloveImpl); + +protected: + /** + * The cast from underlying pointer type constructor. + */ + explicit USGDevice(TSharedRef SGDeviceImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGDevice(TSharedRef BetaDeviceImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGDevice(TSharedRef HapticGloveImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGDevice(TSharedRef Nova2GloveImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGDevice(TSharedRef NovaGloveImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGDevice(TSharedRef SenseGloveImpl); + +public: + /** + * The destructor. + */ + virtual ~USGDevice() override; + +protected: + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(const FSGDeviceImpl& SGDeviceImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(const FSGBetaDeviceImpl& BetaDeviceImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(const FSGHapticGloveImpl& HapticGloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(const FSGNova2GloveImpl& Nova2GloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(const FSGNovaGloveImpl& NovaGloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(const FSGSenseGloveImpl& SenseGloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(TSharedRef SGDeviceImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(TSharedRef BetaDeviceImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(TSharedRef HapticGloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(TSharedRef Nova2GloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(TSharedRef NovaGloveImpl); + + /** + * Allows the child classes to set the underlying object after construction. + */ + void SetSGDeviceImpl(TSharedRef SenseGloveImpl); + +public: + /** + * The cast to underlying type method. + */ + TSharedRef ToSGDeviceImpl() const; + +public: + bool IsABetaDevice() const; + bool IsAHapticGlove() const; + bool IsANova2Glove() const; + bool IsANovaGlove() const; + bool IsASenseGlove() const; + +public: + USGBetaDevice* AsBetaDevice(UObject* Outer) const; + + USGHapticGlove* AsHapticGlove(UObject* Outer) const; + + USGNova2Glove* AsNova2Glove(UObject* Outer) const; + + USGNovaGlove* AsNovaGlove(UObject* Outer) const; + + USGSenseGlove* AsSenseGlove(UObject* Outer) const; + +public: + /** + * Check which DeviceType this class belongs to. + */ + virtual ESGDeviceType GetDeviceType() const; + + /** + * Retrieve this device's unique identifier. + */ + virtual FString GetDeviceId() const PURE_VIRTUAL(FSGDevice::GetDeviceId, return FString();); + + /** + * Retrieve this device's hardware version. + */ + virtual FString GetHardwareVersion() const PURE_VIRTUAL(FSGDevice::GetHardwareVersion, return FString();); + + /** + * Retrieve this device's main firmware version. v4.12 returns 4. + */ + virtual int32 GetFirmwareVersion() const PURE_VIRTUAL(FSGDevice::FirmwareVersion, return -1;); + + /** + * Retrieve this device's sub firmware version. v4.12 returns 12. + */ + virtual int32 GetSubFirmwareVersion() const; + + /** + * + */ + virtual FString GetFirmwareString() const; + + /** + * Returns true if this glove's firmware is newer than certain version. + * + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + bool FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + /** + * Returns true if this glove's firmware is older than certain version. + * + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + bool FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + /** + * Retrieve this Device's Serial/Bluetooth address. + */ + FString GetAddress() const; + + /** + * Check if this device is currently connected to the system. + */ + bool IsConnected() const; + + /** + * Retrieve the connection type of this Sense Glove. + */ + ESGConnectionType GetConnectionType() const; + + /** + * Retrieve the device's Packets per Second Variable. + */ + int32 PacketsPerSecondReceived() const; + + /** + * Retrieve the device's Packets per Second Variable. + */ + int32 PacketsPerSecondSent() const; + + /** + * Retrieve the index of this device within SenseCom. + */ + int32 GetDeviceIndex() const; + + /** + * Change this device's index within the SenseCom. Warning: Can cause errors. + */ + virtual void SetDeviceIndex(int32 NewIndex); + + /** + * Returns true if this device is connected over a connection other than usb cable. + */ + virtual bool IsWireless() const; + + /** + * Returns true if this device operates on a battery. + */ + virtual bool HasBattery() const; + + /** + * Returns true if this device is currently charging. + */ + virtual bool IsCharging(); + + /** + * Returns the device's battery level, as a value between 0 (empty) and 1 (full). + */ + virtual bool GetBatteryLevel(float& OutLevel); + +public: + /** + * Assign this Device's Haptic Channels. Should not be done outside the API unless you know what you're doing. + * + * @param Channels + */ + virtual void SetHapticChannels(const USGHapticChannelInfo* Channels); + + /** + * The number of haptic channels this device can support. + */ + int32 GetHapticChannelCount() const; + + /** + * How many channels of a specific type this SGDevice possesses. + * + * @param ChannelType + */ + int32 GetHapticChannelCount(ESGHapticChannelType ChannelType) const; + +public: + /** + * Get a string representation of this SGDevice, used for debugging. + */ + virtual FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDeviceList.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDeviceList.h new file mode 100644 index 0000000..f2e20b6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDeviceList.h @@ -0,0 +1,137 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Interface for SenseCom, allows the retrieval of Devices and Data, but only + * as. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGDeviceList.generated.h" + +class USGDevice; + +/** + * Interface for SenseCom, allows the retrieval of Devices and Data. + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGDeviceList +{ + GENERATED_BODY() + +public: + /** + * Retrieve the number of devices that have been detected by the SenseCom executable. + */ + static int32 ActiveDevices(); + + /** + * Returns true if the SenseCom program is running. + */ + static bool SenseComRunning(); + + /** + * Clear the device list, and block any further attempt to add to it until ReInitialize is called. + * + * @remarks Useful if your IDE has troubles unloading dlls (cough, Unity, Cough). + */ + static void Dispose(); + + /** + * When you've accidentally disposed of the list before you meant to. + */ + static void Reinitialize(); + + /** + * Retrieve all Sense Glove Devices connected to this system. + */ + static TArray GetDevices(UObject* Outer); + + /// TODO + // THIS PROBABLY SHOULD BE REMOVED! + /** + * Retrieve a list of SGDevices of a specific class. + */ + static TArray GetDevices(UObject* Outer, const TSubclassOf& DeviceType); + + /** + * Retrieve a list of SGDevices of a specific type. + */ + static TArray GetDevices(UObject* Outer, ESGDeviceType DeviceType); + + /** + * Retrieve the latest (raw) sensor data from a specific device in our list. + */ + static bool GetSensorDataString(int32 IpcIndex, const FString& IpcAddress, FString& OutString); + + /** + * Send a (raw) command to a specific device in the list. + */ + static bool SendHaptics(int32 IpcIndex, const FString& IpcAddress, int32 ChannelIndex, const FString& Commands); + + /** + * + */ + static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index); + + /** + * Retrieve Device Address. + */ + static FString GetAddress(int32 IpcIndex, const FString& IpcAddress); + + /** + * Retieve this device's connectionType. + */ + static ESGConnectionType GetConnectionType(int32 IpcIndex, const FString& IpcAddress); + + /** + * Returns true if the device at this connection side is properly connected. + */ + static bool IsConnected(int32 IpcIndex, const FString& IpcAddress); + + /** + * Retrieve the device's Packets per Second Variable. + */ + static int32 PacketsPerSecondReceived(int32 IpcIndex, const FString& IpcAddress); + + /** + * Retrieve the device's Packets per Second sent Variable. + */ + static int32 PacketsPerSecondSent(int32 IpcIndex, const FString& IpcAddress); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDeviceModel.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDeviceModel.h new file mode 100644 index 0000000..ffef385 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGDeviceModel.h @@ -0,0 +1,177 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Base class for Device Models containing the minimum amount of data gathered + * through Communications Protocol. Used for shared functionality. + */ + + +#pragma once + +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGDeviceModel.generated.h" + +class FSGDeviceModelImpl; + +/** + * Base class containing the minimum amount of data for device models. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGDeviceModel final : public UObject +{ + GENERATED_BODY() + +public: + static USGDeviceModel* NewDeviceModel( + UObject* Outer, const FSGDeviceModelImpl& DeviceModelImpl); + +public: + /** + * + */ + static USGDeviceModel* NewDeviceModel(UObject* Outer); + + /** + * + */ + static USGDeviceModel* NewDeviceModel( + UObject* Outer, + const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + +public: + /** + * Parse a 32-bit integer value into a set of booleans (010010011) that indicate which (optional) functions this + * device has. + */ + static TArray ParseFunctions(int32 Value, int32 Size); + + /** + * + */ + static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * Empty constructor to be used by child classes. + */ + USGDeviceModel(); + + /** + * + */ + USGDeviceModel(const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGDeviceModel(const FSGDeviceModelImpl& DeviceModelImpl); + +public: + /** + * The destructor. + */ + virtual ~USGDeviceModel() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetDeviceModelImpl(const FSGDeviceModelImpl& DeviceModelImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGDeviceModelImpl& ToDeviceModelImpl() const; + +protected: + /** + * The non-const cast to underlying type method. + */ + FSGDeviceModelImpl& ToDeviceModelImpl(); + +public: + /** + * Retrieve the Unique identifier of this device. + */ + FString GetDeviceId() const; + + /** + * Retrieve the Hardware (sub) version of this Sense Glove Device. + */ + FString GetHardwareVersion() const; + + /** + * Firmware version running on the device's MicroController. (as of v4.12, this is the 4). + */ + int32 GetFirmwareVersion() const; + + /** + * Sub firmware version running on the device's microcontroller (as of v4.12, this is the 12). + */ + int32 GetSubFirmwareVersion() const; + +public: + /** + * Returns true if this glove's firmware is newer than certain version. + * + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + bool FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + /** + * Returns true if this glove's firmware is older than certain version. + * + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + bool FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandInterpolator.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandInterpolator.h new file mode 100644 index 0000000..1201822 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandInterpolator.h @@ -0,0 +1,164 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains interpolation sets for all hand joint movements that can be + * calculated using the Sense Glove. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGInterpolationSetArray.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGHandInterpolator.generated.h" + +class FSGHandInterpolatorImpl; +class USGHandInterpolator; + +/** + * Contains interpolation sets of all joint movements that can be calculated into a HandPose. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGHandInterpolator final : public UObject +{ + GENERATED_BODY() + +public: + static USGHandInterpolator* NewHandInterpolator( + UObject* Outer, const FSGHandInterpolatorImpl& HandInterpolatorImpl); + +public: + /** + * The basic constructor. + */ + static USGHandInterpolator* NewHandInterpolator(UObject* Outer); + + /** + * Create a new basic HandInterpolator. + */ + static USGHandInterpolator* NewHandInterpolator(UObject* Outer, bool bRightHanded); + +public: + /** + * Convert a serialized HandInterpolator back into a class representation. + * + * @param SerializedString + * @param bRightHanded + */ + static USGHandInterpolator* Deserialize(UObject* Outer, const FString& SerializedString, bool bRightHanded = true); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The basic constructor. + */ + USGHandInterpolator(); + + /** + * Create a new basic HandInterpolator. + */ + explicit USGHandInterpolator(bool bRightHanded); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGHandInterpolator(const FSGHandInterpolatorImpl& HandInterpolatorImpl); + +public: + /** + * The destructor. + */ + virtual ~USGHandInterpolator() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetHandInterpolatorImpl(const FSGHandInterpolatorImpl& HandInterpolatorImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGHandInterpolatorImpl& ToHandInterpolatorImpl() const; + +public: + /** + * Calculate a finger movement's rotation, using an input value. + */ + float CalculateAngle(ESGFingerMovement Movement, float Value, bool bApplyLimits = true) const; + + /** + * Calculate a thumb movement's rotation, using an input value. + */ + float CalculateAngle(ESGThumbMovement Movement, float Value, bool bApplyLimits = true) const; + +public: + /** + * Calculate all hand angles based on an interpolator and normalized input. + */ + TArray> InterpolateHandAngles( + const TArray>& Flexions, const TArray& Abductions, float CmcTwist) const; + +public: + /** + * Check if this handInterpolator matches another. + * + * @param HandInterpolator + */ + bool Equals(const USGHandInterpolator* HandInterpolator) const; + +public: + /** + * Serialize this HandInterpolator into a string representation. + */ + FString SGSerialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandLayer.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandLayer.h new file mode 100644 index 0000000..a534871 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandLayer.h @@ -0,0 +1,284 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A way to access all sorts of Hand Tracking and -Haptics without needing to + * cache any device instances. + * Use this layer if you don't care where a HandPose is coming from, and are + * fine with calling generic haptic functions. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGHandLayer.generated.h" + +class USGCustomWaveform; +class USGHandPose; +class USGHapticGlove; + +/** + * A way to access all sorts of Hand Tracking and -Haptics without needing to cache any device instances. + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGHandLayer +{ + GENERATED_BODY() + +public: + /** + * Returns true if there is a HapticGlove Device connected that corresponds to the chosen hand. + * + * @param bRightHanded + */ + static bool DeviceConnected(bool bRightHanded); + + /** + * Returns the Device Type of the right / left hand. + * + * @param bRightHanded + */ + static ESGDeviceType GetDeviceType(bool bRightHanded); + + /** + * Returns the handedness of the first device you can find; true for right, false for left. Use this for testing a + * single glove. + */ + static bool GetFirstGloveHandedness(); + + /** + * Returns the number of Haptic Gloves connected to the system. + */ + static int32 GlovesConnected(); + + /** + * Retrieve a Glove Instance for the right- or left hand to do more complicated, device-specific stuff. + * + * @param bRightHanded + * @param OutGlove + */ + static bool GetGloveInstance(UObject* Outer, bool bRightHanded, USGHapticGlove*& OutGlove); + + /** + * Returns the calibration state of the chosen hand. + * + * @param bRightHanded + */ + static ESGHapticGloveCalibrationState GetCalibrationState(bool bRightHanded); + + /** + * Returns the Calibration Instructions for the chosen hand. + * + * @param bRightHanded + */ + static FString GetCalibrationInstructions(bool bRightHanded); + + /** + * Reset the calibration of the left/right hand. + * + * @param bRightHanded + */ + static void ResetCalibration(bool bRightHanded); + + /** + * Reset the calibration of the left/right hand. + * + * @param bRightHanded + */ + static void EndCalibration(bool bRightHanded); + + /** + * Attempt to get the HandPose through any of our gloves. You don't care which one is on the other side, as long as + * you get one. + * + * @param bRightHanded + * @param OutHandPose + */ + static bool GetHandPose(UObject* Outer, bool bRightHanded, USGHandPose*& OutHandPose); + + /** + * Calculate the Wrist Location of the chosen hand, based on a reference location and tracking hardware. + * + * @param bRightHanded + * @param ReferencePosition + * @param ReferenceRotation + * @param TrackingHardware + * @param OutWristPosition + * @param OutWristRotation + */ + static void GetWristLocation( + bool bRightHanded, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Calculate the Wrist Location of the chosen hand, based on a reference location and tracking hardware. + * + * @param bRightHanded + * @param ReferencePosition + * @param ReferenceRotation + * @param TrackingHardware + * @param OutWristPosition + * @param OutWristRotation + */ + static void GetWristLocation( + bool bRightHanded, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Stop all haptics on the chosen hand. + * + * @param bRightHanded + */ + static void StopAllHaptics(bool bRightHanded); + + /** + * Sends all haptics in the queue for the Left / Right hand. + * @param bRightHanded + */ + static bool SendHaptics(bool bRightHanded); + + /** + * Returns true if the glove for this hand supports a custom waveform vibration on said location. + * + * @param bRightHanded + * @param AtLocation + */ + static bool SupportsCustomWaveform(bool bRightHanded, ESGHapticLocation AtLocation); + + /** + * Send a Custom Waveform to a glove at a specific location. + * + * @param bRightHanded + * @param OutWaveform + * @param Location + */ + static bool SendCustomWaveform(bool bRightHanded, USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Tell a specific hand to hold the force-feedback at a certain level. + * + * @param bRightHanded + * @param Finger + * @param Level01 + * @param bSendImmediate + */ + static bool QueueCommand_ForceFeedbackLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate); + + /** + * Queue Force Feedback for multiple fingers. Up to 5. Make sure the value is not NULL. + * + * @param bRightHanded + * @param Levels01 + * @param bSendImmediate + */ + static bool QueueCommand_ForceFeedbackLevels( + bool bRightHanded, const TArray& Levels01, bool bSendImmediate); + + /** + * Queue a command to set the vibration level(s) of a Haptic Glove's finger. Note: This is only for Nova 1.0 and + * DK1.0. + * + * @param bRightHanded + * @param Levels01 + * @param bSendImmediate + */ + static bool QueueCommand_VibroLevels(bool bRightHanded, const TArray& Levels01, bool bSendImmediate); + + /** + * Queue a command to set the vibration level(s) of a Haptic Glove's finger. Note: This is only for Nova 1.0 and + * DK1.0. + * + * @param bRightHanded + * @param Finger + * @param Level01 + * @param bSendImmediate + */ + static bool QueueCommand_VibroLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate); + + /** + * Queue a vibration level command for a specific HapticLocation. If the gloves has this vibration motor installed. + * Cross-compatible with Nova 2.0. + * + * @param bRightHanded + * @param AtLocation + * @param Level01 + * @param bSendImmediate + */ + static bool QueueCommand_VibroLevel( + bool bRightHanded, ESGHapticLocation AtLocation, float Level01, bool bSendImmediate); + + /** + * Returns true if the chosen glove supports active contact feedback on the Wrist. + * + * @param bRightHanded + */ + static bool SupportsWristSqueeze(bool bRightHanded); + + /** + * Queue a command to set a squeeze level on the wrist, and optionally send it right away. + * + * @param bRightHanded + * @param SqueezeLevel01 + * @param bSendImmediate + */ + static bool QueueCommand_WristSqueeze(bool bRightHanded, float SqueezeLevel01, bool bSendImmediate); + + /** + * Returns true is the chosen hand supports flexion locking; automatic locking of FFB when flexed beyond a specific + * point. + * + * @param bRightHanded + */ + static bool SupportsFlexionLocks(bool bRightHanded); + + /** + * If the flexion exceeds a particular value, turn on the Force-Feedback. + */ + static bool QueueCommand_FlexionLock(bool bRightHanded, int32 Finger, float Flexion01, bool bSendImmediate); + + /** + * Stop any Flexion Threshold active on the chosen finger. + */ + static bool QueueCommand_ClearFlexionLock(bool bRightHanded, int32 Finger, bool bSendImmediate); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandPose.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandPose.h new file mode 100644 index 0000000..2da53b7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHandPose.h @@ -0,0 +1,291 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Data class containing all variables to draw or analyze a virtual hand + * in different formats. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGQuatArray.h" +#include "SGTypes/SGRotatorArray.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGHandPose.generated.h" + +class FSGHandPoseImpl; +class USGBasicHandModel; +class USGHandPose; + +/** + * Contains all variables required to draw or analyze a virtual hand. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGHandPose final : public UObject +{ + GENERATED_BODY() + +public: + static USGHandPose* NewHandPose( + UObject* Outer, const FSGHandPoseImpl& HandPoseImpl); + +public: + /** + * The default constructor. + */ + static USGHandPose* NewHandPose(UObject* Outer); + + static USGHandPose* NewHandPose( + UObject* Outer, + bool bRightHanded, const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles); + + /** + * Create a new instance of HandPose. + */ + static USGHandPose* NewHandPose( + UObject* Outer, + bool bRightHanded, + const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles); + + /** + * Create a new instance of HandPose. + */ + static USGHandPose* NewHandPose( + UObject* Outer, + bool bRightHanded, const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles); + + /** + * Create a new instance of HandPose. + */ + static USGHandPose* NewHandPose( + UObject* Outer, + bool bRightHanded, const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles); + +public: + /** + * Deserialize a HandPose back into usable values. + */ + static USGHandPose* Deserialize(UObject* Outer, const FString& SerializedString); + + /** + * Generate a HandPose based on articulation angles (handAngles). + */ + static USGHandPose* FromHandAngles(UObject* Outer, + const TArray>& HandAngles, bool bRightHanded, + const USGBasicHandModel* HandDimensions); + + /** + * Generate a HandPose based on articulation angles (handAngles), with a default HandModel. + */ + static USGHandPose* FromHandAngles(UObject* Outer, const TArray>& HandAngles, bool bRightHanded); + + /** + * Create a new instance of a left or right handed Pose that is "idle"; in a neutral position. + */ + static USGHandPose* DefaultIdle(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Create a new instance of a left or right handed Pose that is "idle"; in a neutral position. + */ + static USGHandPose* DefaultIdle(UObject* Outer, bool bRightHanded); + + /** + * Generates a HandPose representing an 'open hand', used in calibration to determine finger extension. + */ + static USGHandPose* FlatHand(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Generates a HandPose representing an 'open hand', used in calibration to determine finger extension. + */ + static USGHandPose* FlatHand(UObject* Outer, bool bRightHanded); + + /** + * Generates a HandPose representing a 'thumbs up', used in calibration to determine finger flexion, thumb + * extension and adduction. + */ + static USGHandPose* ThumbsUp(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Generates a HandPose representing a 'thumbs up', used in calibration to determine finger flexion, thumb + * extension and adduction. + */ + static USGHandPose* ThumbsUp(UObject* Outer, bool bRightHanded); + + /** + * Generates a HandPose representing a 'fist', used in calibration to determine, thumb flexion and abduction. + */ + static USGHandPose* Fist(UObject* Outer, bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Generates a HandPose representing a 'fist', used in calibration to determine, thumb flexion and abduction. + */ + static USGHandPose* Fist(UObject* Outer, bool bRightHanded); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGHandPose(); + + /** + * Create a new instance of HandPose. + */ + USGHandPose(bool bRightHanded, + const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles); + + /** + * Create a new instance of HandPose. + */ + USGHandPose(bool bRightHanded, + const TArray>& JointPositions, const TArray>& JointRotations, + const TArray>& HandAngles); + + /** + * Create a new instance of HandPose. + */ + USGHandPose(bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles); + + /** + * Create a new instance of HandPose. + */ + USGHandPose(bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGHandPose(const FSGHandPoseImpl& HandPoseImpl); + +public: + /** + * The destructor. + */ + virtual ~USGHandPose() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetHandPoseImpl(const FSGHandPoseImpl& HandPoseImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGHandPoseImpl& ToHandPoseImpl() const; + +public: + /** + * Whether this HandPose was created to be a right- or left hand. + */ + bool IsRight() const; + + /** + * Positions of all hand joints relative to the Sense Glove origin. From thumb to pinky, proximal to distal. + */ + TArray> GetJointPositions() const; + + /** + * Quaternion rotations of all hand joints. From thumb to pinky, proximal to distal. + */ + TArray> GetJointRotationsQ() const; + + /** + * Rotations of all hand joints. From thumb to pinky, proximal to distal. + */ + TArray> GetJointRotations() const; + + /** + * Euler representations of all possible hand angles. From thumb to pinky, proximal to distal. + */ + TArray> GetHandAngles() const; + +public: + /** + * Returns true of these two hand poses are roughly equal. + */ + bool Equals(const USGHandPose* HandPose) const; + + /** + * Returns the total flexion of a specific finger as a value between 0 (fully extended) and 1 (fully flexed). + * + * @remarks Useful for animation or for detecting gestures. + */ + float GetNormalizedFlexion(ESGFinger Finger, bool bClamp01 = true) const; + + /** + * Returns the total flexion of a specific finger as a value between 0 (fully extended) and 1 (fully flexed). + * + * @remarks Useful for animation or for detecting gestures. + */ + TArray GetNormalizedFlexion(bool bClamp01 = true) const; + +public: + /** + * + */ + FString ToString(bool bShortFormat = false) const; + + /** + * Serialize this HandPose into a string representation. + */ + FString SGSerialize() const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHapticChannelInfo.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHapticChannelInfo.h new file mode 100644 index 0000000..0dad222 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHapticChannelInfo.h @@ -0,0 +1,199 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains information on Haptic channels available to this device for IPC. + * Some devices have different "Haptic Channels". This info is exposed via IPC + * to SGCore. + */ + + +#pragma once + +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGHapticChannelInfo.generated.h" + +class FSGHapticChannelInfoImpl; + +/* + * Contains information on Haptic channels available to this device for IPC. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGHapticChannelInfo final : public UObject +{ + GENERATED_BODY() + +public: + static USGHapticChannelInfo* NewHapticChannelInfo( + UObject* Outer, const FSGHapticChannelInfoImpl& HapticChannelInfoImpl); + +public: + /** + * The default constructor. + */ + static USGHapticChannelInfo* NewHapticChannelInfo(UObject* Outer); + + /** + * Create a new instance of HapticChannelInfo. + */ + static USGHapticChannelInfo* NewHapticChannelInfo( + UObject* Outer, + const TArray& StreamIndex, const TArray& FireAndForgetIndex); + +public: + /** + * Generate a single IPCAddress for an address. + * + * @param DeviceIndex + * @param ChannelIndex + */ + static FString GenerateAddress(int32 DeviceIndex, int32 ChannelIndex); + + /** + * Parse HapticChannelInfo received through IPC into usable data. + * + * @param IpcString + */ + static USGHapticChannelInfo* Parse(UObject* Outer, const FString& IpcString); + +public: + /** + * Byte used to identify streaming channels. + */ + static int32 GetStreamingType(); + + /** + * Byte used to indicate fire-and-forget channels. + */ + static int32 GetFireAndForgetType(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * Creates a default HapticChannelInfo, with solely a single streaming haptic Channel. + */ + USGHapticChannelInfo(); + + /** + * Create a new instance of HapticChannelInfo. + */ + USGHapticChannelInfo(const TArray& StreamIndex, const TArray& FireAndForgetIndex); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGHapticChannelInfo(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl); + +public: + /** + * The destructor. + */ + virtual ~USGHapticChannelInfo() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetHapticChannelInfoImpl(const FSGHapticChannelInfoImpl& HapticChannelInfoImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGHapticChannelInfoImpl& ToHapticChannelInfoImpl() const; + +public: + /** + * Returns the amount of streaming channels available for haptics. Will indicate if a device can support the + * haptics you're trying to send through it. + */ + int32 GetStreamChannelCount() const; + + /** + * Returns the amount of fire-and-forget channels available for haptics. Will indicate if a device can support the + * haptics you're trying to send through it. + */ + int32 GetFireAndForgetChannelCount() const; + + /** + * Retrieve the total amount of channels for this device. + */ + int32 GetTotalChannelCount() const; + + /** + * Returns the address that corresponds to the nth channel of a specific type. It's unguarded, which means I don't + * check the validity of index - could result in an exception. Optimized piece of code for for loops. + * + * @param Type + * @param TypeIndex + */ + FString GetAddress_Unguarded(ESGHapticChannelType Type, int32 TypeIndex) const; + + /** + * Returns the address that corresponds to the nth channel of a specific type. It's unguarded, which means I don't + * check the validity of index - could result in an exception. Optimized piece of code for for loops. + * Used for Internals. + * + * @param Type + * @param TypeIndex + * @param OutIndex + * @param OutAddressString + */ + void GetIpcParams_Unguarded(ESGHapticChannelType Type, int32 TypeIndex, + int32& OutIndex, FString& OutAddressString) const; + + /** + * Regenerate the channel names for a specific device Index in shared memory. + * + * @param ForDeviceIndex + */ + void RegenerateAddresses(int32 ForDeviceIndex); + + /** + * Returns an array of all the haptic addresses stored for this info channel. + */ + TArray GetAllAddresses() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHapticGlove.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHapticGlove.h new file mode 100644 index 0000000..2a0bdef --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGHapticGlove.h @@ -0,0 +1,390 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * An interface for any of our gloves that can track hand motion and/or send + * force / vibrotactile feedback. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGDevice.h" +#include "SGCore/SGHandPose.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGHapticGlove.generated.h" + +class FSGHapticGloveImpl; +class FSGNovaGloveImpl; +class FSGNova2GloveImpl; +class FSGSenseGloveImpl; +class USGBasicHandModel; +class USGCustomWaveform; + +/** + * A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGHapticGlove : public USGDevice +{ + GENERATED_BODY() + +private: + friend class USGHapticGloveCalibrationSequence; + friend struct FSGHandLayer; + +protected: + static USGHapticGlove* NewHapticGlove(UObject* Outer, const FSGHapticGloveImpl& HapticGloveImpl); + + static USGHapticGlove* NewHapticGlove(UObject* Outer, TSharedRef HapticGloveImpl); + +protected: + /** + * + */ + static USGHapticGlove* NewHapticGlove(UObject* Outer); + +public: + /** + * Get all Haptic Gloves detected on this system. + * + * @param bConnectedOnly + */ + static TArray GetHapticGloves(UObject* Outer, bool bConnectedOnly = true); + + /** + * Get the first Haptic Glove detected on this system. + * + * @param OutGlove + */ + static bool GetGlove(UObject* Outer, USGHapticGlove*& OutGlove); + + /** + * Get the first left/right Haptic Glove detected on this system. + * + * @param bRightHanded + * @param OutGlove + */ + static bool GetGlove(UObject* Outer, bool bRightHanded, USGHapticGlove*& OutGlove); + +public: + /** + * + */ + static FString ToString(ESGHapticGloveCalibrationState State); + + /** + * + */ + static FString ToString(ESGHapticLocation Location); + +protected: + /** + * The basic constructor. + */ + USGHapticGlove(); + +public: + /** + * The cast from underlying parent type constructor. + */ + explicit USGHapticGlove(const FSGDeviceImpl& SGDeviceImpl); + + /** + * The cast from underlying type constructor. + */ + explicit USGHapticGlove(const FSGHapticGloveImpl& HapticGloveImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGHapticGlove(const FSGNova2GloveImpl& NovaGloveImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGHapticGlove(const FSGNovaGloveImpl& NovaGloveImpl); + + /** + * The cast from underlying child type constructor. + */ + explicit USGHapticGlove(const FSGSenseGloveImpl& SenseGloveImpl); + +protected: + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGHapticGlove(TSharedRef SGDeviceImpl); + + /** + * The cast from underlying pointer type constructor. + */ + explicit USGHapticGlove(TSharedRef HapticGloveImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGHapticGlove(TSharedRef NovaGloveImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGHapticGlove(TSharedRef NovaGloveImpl); + + /** + * The cast from underlying child pointer type constructor. + */ + explicit USGHapticGlove(TSharedRef SenseGloveImpl); + +public: + /** + * The destructor. + */ + virtual ~USGHapticGlove() override; + +public: + /** + * The cast to underlying type method. + */ + TSharedRef ToHapticGloveImpl() const; + +public: + /** + * Get the DeviceType enumerator of this device; used to check if its a SenseGlove/Nova/etc. + */ + virtual ESGDeviceType GetDeviceType() const override; + + /** + * Retrieve this glove's unique identifier. + */ + virtual FString GetDeviceId() const override; + + /** + * Retrieve this glove's hardware (sub) version. "DK1", "DK2", etc. + */ + virtual FString GetHardwareVersion() const override; + + /** + * Retrieve this device's main firmware version. v4.12 returns 4. + */ + virtual int32 GetFirmwareVersion() const override; + + /** + * Retrieve this device's sub firmware version. v4.12 returns 12. + */ + virtual int32 GetSubFirmwareVersion() const override; + + /** + * Returns true if this glove is made for a right hand. If false, it's a left hand. + */ + virtual bool IsRight() const; + + /** + * Retrieve this glove's IMU rotation, if if has any. + */ + virtual bool GetImuRotation(FQuat& OutImu); + + /** + * Retrieve this glove's IMU rotation, if if has any. + */ + virtual bool GetImuRotation(FRotator& OutImu); + + /** + * Retrieve a HandPose based on the latest profile, but with a specific hand geometry. + */ + virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) const; + + /** + * Retrieve a HandPose based on the latest profile and default hand Geometry. + */ + virtual bool GetHandPose(UObject* Outer, USGHandPose*& OutHandPose); + + /** + * Returns the Hand Angles calculated by this Nova 2 Glove. Used for input for HandPoses, but can be used in and of + * itself. + * + * @param OutHandAngles + */ + virtual bool GetHandAngles(TArray>& OutHandAngles) const; + + /** + * + */ + USGBasicHandModel* GetHandGeometry(UObject* Outer) const; + + /** + * + */ + void SetHandGeometry(const USGBasicHandModel* HandGeometry); + +public: + /** + * Returns the HapticGlove's state of calibration for its on-board sensors. + */ + virtual ESGHapticGloveCalibrationState GetCalibrationState() const; + + /** + * Resets internal calibration of the Haptic Glove. + */ + virtual void EndCalibration(); + + /** + * Force-End any form of calibration manually, if any is still running. + */ + virtual void ResetCalibration(); + + /** + * Retrieve the current calibration instruction. + */ + virtual FString GetCalibrationInstruction() const; + +public: + /** + * Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when resetting. + */ + virtual void StopHaptics(); + + /** + * Stops only vibrations. + */ + virtual void StopVibrations(); + + /** + * Take all active commands in the device queue, compile them into one and send them to the device. + * + * @return Returns true if the message was successfully sent to SenseCom. + */ + virtual bool SendHaptics(); + +public: + /** + * Returns true if the HapticGlove supports vibration feedback on the specified location. + * + * @param AtLocation + */ + virtual bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const; + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param OutWaveform + * @param Location + */ + virtual bool SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Queue a list of force-feedback levels, between 0.0f and 1.0f. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the Force-Feedback levels, from 0.0f (no FFB) to 1.0f. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + virtual bool QueueForceFeedbackLevels(const TArray& Levels01); + + /** + * Set the Force-Feedback value of a particular finger to a specific level + * + * @param Level01 Value will be clamped between [0...1], where 0.0f means no Force-Feedback, and 1.0 means full + * force-feedback. + * @param Finger The finger to which to send the command. + */ + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01); + + /** + * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the vibration levels, from 0.0 (no vibration) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + virtual bool QueueVibroLevels(const TArray& Levels01); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01); + +public: + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const; + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const; + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const; + +public: + /** + * Create a String Representation of this Haptic Glove. + */ + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGInterpolationSet.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGInterpolationSet.h new file mode 100644 index 0000000..86e657a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGInterpolationSet.h @@ -0,0 +1,225 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Data class containing all variables to map an input value from one range to + * another. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGInterpolationSet.generated.h" + +class FSGInterpolationSetImpl; + +/** + * Set of variables to map a value from one range to the next. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGInterpolationSet final : public UObject +{ + GENERATED_BODY() + +public: + static USGInterpolationSet* NewInterpolationSet( + UObject* Outer, const FSGInterpolationSetImpl& InterpolationSetImpl); + +public: + /** + * Creates a basic interpolation set, without limits. + */ + static USGInterpolationSet* NewInterpolationSet(UObject* Outer); + + /** + * Create a new interpolation set without limits. + */ + static USGInterpolationSet* NewInterpolationSet(UObject* Outer, float From1, float From2, float To1, float To2); + + /** + * Create a new interpolation set with limits. + */ + static USGInterpolationSet* NewInterpolationSet( + UObject* Outer, float From1, float From2, float To1, float To2, float Min, float Max); + +public: + /** + * Convert a string notation of an InterpolationSet into a new class instance. + */ + static USGInterpolationSet* Deserialize(UObject* Outer, const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * Creates a basic interpolation set, without limits. + */ + USGInterpolationSet(); + + /** + * Create a new interpolation set without limits. + */ + USGInterpolationSet(float From1, float From2, float To1, float To2); + + /** + * Create a new interpolation set with limits. + */ + USGInterpolationSet(float From1, float From2, float To1, float To2, float Min, float Max); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGInterpolationSet(const FSGInterpolationSetImpl& InterpolationSetImpl); + +public: + /** + * The destructor. + */ + virtual ~USGInterpolationSet() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetInterpolationSetImpl(const FSGInterpolationSetImpl& InterpolationSetImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGInterpolationSetImpl& ToInterpolationSetImpl() const; + +public: + /** + * First value of input range. + */ + float GetX0() const; + + /** + * + */ + void SetX0(float X0); + + /** + * Second value of input range. + */ + float GetX1() const; + + /** + * + */ + void SetX1(float X1); + + /** + * First value of output range. + */ + float GetY0() const; + + /** + * + */ + void SetY0(float Y0); + + /** + * Second value of output range. + */ + float GetY1() const; + + /** + * + */ + void SetY1(float Y1); + + /** + * Minimum range of the output value. + */ + float GetMin() const; + + /** + * + */ + void SetMin(float Min); + + /** + * Maximum range of the output value. + */ + float GetMax() const; + + /** + * + */ + void SetMax(float Max); + +public: + /** + * Calculate an output value in range [x0...x1] to [y0..y1] + */ + float Get(float Value, bool bLimit, bool bNormalizeAngle = false) const; + +public: + /** + * Returns true if this InterpolationSet has the same values as another set. + */ + bool Equals(const USGInterpolationSet* InterpolationSet) const; + +public: + /** + * + */ + FString ToString() const; + + /** + * + */ + FString ToString(bool bLimits) const; + + /** + * Convert this InterpolationSet into a string notation so it can be stored on disk. + */ + FString SGSerialize() const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGInterpolationSetArray.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGInterpolationSetArray.h new file mode 100644 index 0000000..9e6f11a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGInterpolationSetArray.h @@ -0,0 +1,50 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCore/SGInterpolationSet.h" + +#include "SGInterpolationSetArray.generated.h" + +USTRUCT(BlueprintType) +struct SENSEGLOVECORE_API FSGInterpolationSetArray +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, Category="SenseGlove | Types | Nested Arrays", BlueprintReadWrite) + TArray InterpolationSetArray; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGJointKinematics.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGJointKinematics.h new file mode 100644 index 0000000..0cfc8c6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGJointKinematics.h @@ -0,0 +1,89 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains kinematic formulae and wrappers for Sense Glove mathematics. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGJointKinematics.generated.h" + +class USGBasicHandModel; + +/** + * + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGJointKinematics +{ + GENERATED_BODY() + +public: + /** + * Perform forward Kinematics on a set of joints, defined by a start position- and rotation, + * joint angles and the lengths in between. Outputs the calculated positions and rotations. + */ + static bool ForwardKinematics( + const FVector& StartPosition, const FQuat& StartRotation, + const TArray& JointLengths, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + /** + * Perform forward Kinematics on a set of joints, defined by a start position- and rotation, + * joint angles and the lengths in between. Outputs the calculated positions and rotations. + */ + static bool ForwardKinematics( + const FVector& StartPosition, const FRotator& StartRotation, + const TArray& JointLengths, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + /** + * Calculate positions and rotations of a finger based on input angles and profile. + */ + static bool ForwardKinematics( + const USGBasicHandModel* Profile, ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + /** + * Calculate positions and rotations of a finger based on input angles and profile. + */ + static bool ForwardKinematics( + const USGBasicHandModel* Profile, ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGLibrary.h new file mode 100644 index 0000000..2a10aa5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGLibrary.h @@ -0,0 +1,73 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Information about the SGCore C++ Library. + */ + + +#pragma once + +#include "Containers/UnrealString.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGLibrary.generated.h" + +/** + * Provides information about this C++ Library. + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGLibrary +{ + GENERATED_BODY() + +public: + /** + * The version of this C++ Library in string representation. + */ + static FString GetVersion(); + + /** + * Check what back-end connections are used for this version of SGConnect. + */ + static ESGBackendType GetBackendType(); + + /** + * Back-End version in string notation. + */ + static FString GetBackendVersion(); + + /** + * If possible, check what version of SGConnect is paired with this API. + */ + static FString GetSGConnectVersion(); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNova2Glove.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNova2Glove.h new file mode 100644 index 0000000..6f07973 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNova2Glove.h @@ -0,0 +1,593 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback + * and sensor module, and active contact feedback in the front strap. + * Since the Nova 2.0 is significantly different from the Nova 1 Glove, it gets + * its own separate device interface. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGHapticGlove.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGNova2Glove.generated.h" + +class FSGNova2GloveImpl; +class USGHandInterpolator; +class USGNovaGloveInfo; +class USGNova2GloveSensorData; +class USGSensorNormalization; +class USGThresholdCommand; + +/** + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact + * feedback in the front strap. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGNova2Glove final : public USGHapticGlove +{ + GENERATED_BODY() + +public: + static USGNova2Glove* NewNova2Glove(UObject* Outer, const FSGNova2GloveImpl& Nova2GloveImpl); + + static USGNova2Glove* NewNova2Glove(UObject* Outer, TSharedRef Nova2GloveImpl); + +public: + /** + * Default constructor for Nova2Glove. + */ + static USGNova2Glove* NewNova2Glove(UObject* Outer); + + /** + * Creates a new instance of a Nova Glove. + */ + static USGNova2Glove* NewNova2Glove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo); + +public: + /** + * Deserializes a Nova 2.0 from its ConstantsString. Returns a nullptr if unsuccessful. + * + * @param ConstantsString + */ + static USGDevice* Parse(UObject* Outer, const FString& ConstantsString); + + /** + * Retrieve all Nova 2.0's. + */ + static TArray GetNova2Gloves(UObject* Outer); + + /** + * Retrieve the first connected Nova 2.0 there is. + */ + static bool GetNova2Glove(UObject* Outer, USGNova2Glove*& OutGlove); + + /** + * Retrieve the first (connected) right or left handed Nova 2.0. + */ + static bool GetNova2Glove(UObject* Outer, bool bRightHanded, USGNova2Glove*& OutGlove); + +public: + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is a left or right-handed glove. + * @param HardwareVersion + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + static void CalculateGloveLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is a left or right-handed glove. + * @param HardwareVersion + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + static void CalculateGloveLocation( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is right or left hand. + * @param HardwareVersion + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + static void CalculateWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is right or left hand. + * @param HardwareVersion + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + static void CalculateWristLocation( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FRotator& OutWristRotation); + +public: + /** + * Special Byte to identify the command as a Streaming Byte. + */ + static ANSICHAR GetStreamByte(); + + /** + * Ranges before a Nova 2.0 Sensor is allowed to move. + */ + static TArray GetNova2SensorRanges(); + +public: + /** + * Converts Nova 2.0 Sensor Data into floating point inputs for normalization. + * + * @param SensorData + */ + static TArray ToNormalizedValues(const USGNova2GloveSensorData* SensorData); + + /** + * Convert Sensor Data into a series of normalized values. + * + * @param Outer + * @param SensorData + * @param OutSensorNormalizer + */ + static TArray ToNormalizedValues( + UObject* Outer, + const USGNova2GloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer); + +public: + /** + * Calculate Hand Angles for a Nova 2.0 Glove, based on normalized input. + * + * @param NormalizedValues + * @param Interpolator + */ + static TArray> CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator, bool bInfluenceIndex); + + /** + * Convert normalized inputs (5-6 sensors) to input for an Interpolator. + * + * @param NormalizedData + * @param GloveInfo + */ + static TArray> ToNormalizedAngles( + const TArray& NormalizedData, const USGNovaGloveInfo* GloveInfo); + +protected: + USGNova2Glove(); + + explicit USGNova2Glove(const USGNovaGloveInfo& DeviceInfo); + +public: + /** + * The cast from underlying parent type constructor. + */ + explicit USGNova2Glove(const FSGDeviceImpl& SGDeviceImpl); + + /** + * The cast from underlying parent type constructor. + */ + explicit USGNova2Glove(const FSGHapticGloveImpl& HapticGloveImpl); + + /** + * The cast from underlying type constructor. + */ + explicit USGNova2Glove(const FSGNova2GloveImpl& Nova2GloveImpl); + +protected: + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGNova2Glove(TSharedRef SGDeviceImpl); + + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGNova2Glove(TSharedRef HapticGloveImpl); + + /** + * The cast from underlying pointer type constructor. + */ + explicit USGNova2Glove(TSharedRef Nova2GloveImpl); + +public: + /** + * The destructor. + */ + virtual ~USGNova2Glove() override; + +public: + /** + * The cast to underlying type method. + */ + TSharedRef ToNova2GloveImpl() const; + +public: + /** + * Return the DeviceType of this Nova. + */ + virtual ESGDeviceType GetDeviceType() const override; + + /** + * Returns this device's unique identifier. + */ + virtual FString GetDeviceId() const override; + + /** + * Access this device's hardware designation. + */ + virtual FString GetHardwareVersion() const override; + + /** + * Access this device's main firmware version. (ex: v3.2 -> 3). + */ + virtual int32 GetFirmwareVersion() const override; + + /** + * Access this device's sub-firmware version. (ex: v3.2 -> 2). + */ + virtual int32 GetSubFirmwareVersion() const override; + +public: + /** + * Returns true if this device operates on a battery. + */ + virtual bool HasBattery() const override; + + /** + * Returns true if this device is currently charging. + */ + virtual bool IsCharging() override; + + /** + * Returns the device's battery level, as a value between 0 (empty) and 1 (full). + */ + virtual bool GetBatteryLevel(float& OutBatteryLevel) override; + +public: + /** + * Returns true if this glove is meant for right hands. + */ + virtual bool IsRight() const override; + + /** + * Retrieve this glove's latest IMU rotation, if one is present. + * + * @param OutImu + */ + virtual bool GetImuRotation(FQuat& OutImu) override; + + /** + * Retrieve this glove's latest IMU rotation, if one is present. + * + * @param OutImu + */ + virtual bool GetImuRotation(FRotator& OutImu) override; + + /* + * Calculate a HandPose from this glove's latest Sensor Data. + */ + virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, + USGHandPose*& OutHandPose) const override; + + /** + * Returns the Hand Angles calculated by this Nova 2 Glove. Used for input for HandPoses, but can be used in and + * of itself. + * + * @param OutHandAngles + */ + virtual bool GetHandAngles(TArray>& OutHandAngles) const override; + +public: + /* + * Retrieve the calibration status of this Nova 2.0 Glove. + */ + virtual ESGHapticGloveCalibrationState GetCalibrationState() const override; + + /* + * Completes sensor Normalization on the Nova 2.0's end. + */ + virtual void EndCalibration() override; + + /* + * Completes sensor Normalization on the Nova 2.0's end. + */ + virtual void ResetCalibration() override; + +public: + /* + * Stop all haptic feedback effects playing on this device. + */ + virtual void StopHaptics() override; + + /** + * Stop only all vibrotactile feedback. + */ + virtual void StopVibrations() override; + + /** + * Flush all streaming haptic effects on the different fingers to the Nova 2.0 Glove. + */ + virtual bool SendHaptics() override; + +public: + /** + * Returns true if this Glove supports the chosen haptic location. + * + * @param AtLocation + */ + virtual bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const override; + + /** + * Send a custom waveform to the Nova 2.0. + * + * @param OutWaveform + * @param Location + */ + virtual bool SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location) override; + +public: + /** + * Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the Force-Feedback levels, from 0.0 (no FFB) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + virtual bool QueueForceFeedbackLevels(const TArray& Levels01) override; + + /** + * Set the Force-Feedback value of a particular finger to a specific level. + * + * @param Finger The finger to which to send the command. + * @param Level01 Value will be clamped between [0...1], where 0.0 means no Force-Feedback, and 1.0 means full + * force-feedback. + */ + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01) override; + + /** + * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Amplitudes Array containing the vibration levels, from 0.0 (no vibration) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + virtual bool QueueVibroLevels(const TArray& Amplitudes) override; + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. This is to + * support backwards compatibility for older plugins. Use of Customwaveforms is encouraged. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01) override; + + /** + * Set the amount of squeeze-feedback to the desired level (0 = no squeeze, 1 = full squeeze). + * + * @param SqueezeLevel01 + */ + virtual bool QueueSqueezeLevel(float SqueezeLevel01); + +public: + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the Nova2. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the Nova2. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const override; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const override; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const override; + +public: + /** + * Access DeviceInfo of this Nova. + */ + USGNovaGloveInfo* GetGloveInfo(UObject* Outer) const; + + /** + * If true, the Index Finger sensors will influence the tracking of the other fingers. + */ + bool DoesIndexInfluenceOthers() const; + + /** + * + * + * @param bInfluenceOthers + */ + void SetIndexInfluencesOthers(bool bInfluenceOthers); + + /** + * If true, the sensors of this Nova Glove are normalized on-board the device. Otherwise, sensor normalization runs + * inside the library. + */ + bool SupportsOnBoardNormalization() const; + +public: + /** + * Get the latest Sensor Data from this Glove. + */ + bool GetSensorData(UObject* Outer, USGNova2GloveSensorData*& OutSensorData); + + /** + * Returns the normalized Sensor Data of this Nova2 Glove. If no normalization is running on the glove(s), then + * it's done on the PC side. + * + * @param OutNormalizedValues + */ + bool GetNormalizedInput(TArray& OutNormalizedValues) const; + + /** + * Tell the Nova Glove to send Raw Data instead of normalized data. + */ + virtual bool SendRawData(); + + /** + * Tell the Nova Glove to send normalized data. + */ + virtual bool SendNormalizedData(); + +public: + /** + * Convert a HapticLocation into a Nova 2.0 Motor location. + * + * @param Location + */ + virtual ESGNova2VibroMotor ToNovaMotor(ESGHapticLocation Location) const; + + /** + * Returns the channel index for a particular motor. Can make this as complex as I want for the Nova2 GLove(s). + * + * @param Motor + */ + virtual int32 ChannelIndex(ESGNova2VibroMotor Motor) const; + + /** + * Ensures the waveform that is to be sent to this Nova 2.0 Glove has the appropriate parameters. + * + * @param OutWaveform + * @param Motor + */ + virtual void ValidateWaveform(USGCustomWaveform* OutWaveform, ESGNova2VibroMotor Motor) const; + + /** + * Directly sends a custom waveform to the Nova2 Glove motors, as opposed to specifying a Haptic Location. + * + * @param OutWaveform + * @param Motor + * @param bValidateWaveform + */ + virtual bool SendCustomWaveform_Nova2( + USGCustomWaveform* OutWaveform, ESGNova2VibroMotor Motor, bool bValidateWaveform = true); + +public: + /** + * Get a string representation of this Nova 2.0 Glove. + */ + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNova2GloveSensorData.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNova2GloveSensorData.h new file mode 100644 index 0000000..097fb57 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNova2GloveSensorData.h @@ -0,0 +1,280 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Sensor Data coming off the Nova 2.0 Glove. + * Has certain features the Nova 1.0 Glove does not have, such as multiple + * flexion sensors, normalization states and Active Strap info. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGNova2GloveSensorData.generated.h" + +class FSGNova2GloveSensorDataImpl; +class USGNovaGloveInfo; + +/** + * Nova Glove 2.0 Sensor data, which had additional feedback and calibration parameters. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGNova2GloveSensorData final : public UObject +{ + GENERATED_BODY() + +public: + static USGNova2GloveSensorData* NewNova2GloveSensorData( + UObject* Outer, const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl); + +public: + /** + * Default constructor for Nova2GloveSensorData. + */ + static USGNova2GloveSensorData* NewNova2GloveSensorData(UObject* Outer); + + /** + * Create a new instance of a Nova2GloveSensorData. + */ + static USGNova2GloveSensorData* NewNova2GloveSensorData( + UObject* Outer, ESGNormalizationState NormalizationState, + const TArray>& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + */ + static USGNova2GloveSensorData* NewNova2GloveSensorData( + UObject* Outer, ESGNormalizationState NormalizationState, + const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + */ + static USGNova2GloveSensorData* NewNova2GloveSensorData( + UObject* Outer, ESGNormalizationState NormalizationState, + const TArray>& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + */ + static USGNova2GloveSensorData* NewNova2GloveSensorData( + UObject* Outer, ESGNormalizationState NormalizationState, + const TArray& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + +public: + /** + * Parse the bytes as they come in from the device into usable values. + * + * @param RawData + * @param GloveInfo + */ + static USGNova2GloveSensorData* Parse(UObject* Outer, const FString& RawData, const USGNovaGloveInfo* GloveInfo); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * Default constructor for Nova2GloveSensorData. + */ + USGNova2GloveSensorData(); + + /** + * Create a new instance of a Nova2GloveSensorData. + * + * @param NormalizationState + * @param Values + * @param ParsedValues + * @param ImuRotation + * @param bImuParsed + * @param BatteryLevel + * @param bCharging + */ + USGNova2GloveSensorData(ESGNormalizationState NormalizationState, + const TArray>& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + * + * @param NormalizationState + * @param Values + * @param ParsedValues + * @param ImuRotation + * @param bImuParsed + * @param BatteryLevel + * @param bCharging + */ + USGNova2GloveSensorData(ESGNormalizationState NormalizationState, + const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + * + * @param NormalizationState + * @param Values + * @param ParsedValues + * @param ImuRotation + * @param bImuParsed + * @param BatteryLevel + * @param bCharging + */ + USGNova2GloveSensorData(ESGNormalizationState NormalizationState, + const TArray>& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + * + * @param NormalizationState + * @param Values + * @param ParsedValues + * @param ImuRotation + * @param bImuParsed + * @param BatteryLevel + * @param bCharging + */ + USGNova2GloveSensorData(ESGNormalizationState NormalizationState, + const TArray& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGNova2GloveSensorData(const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl); + +public: + /** + * The destructor. + */ + virtual ~USGNova2GloveSensorData() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetNova2GloveSensorDataImpl(const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGNova2GloveSensorDataImpl& ToNova2GloveSensorDataImpl() const; + +public: + /** + * Sensor Data State based on the internal data. + */ + ESGNormalizationState GetSensorState() const; + + /** + * Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger. + */ + TArray> GetSensorValues() const; + + /** + * Returns the sensor movement of a specific finger. + * + * @param Finger + * @param Location If a Nova glove has only one flexion sensor, it will return the same value for FlexionProximal + * and FlexionDistal. + */ + float GetSensorValue(ESGFinger Finger, ESGNova2SensorLocation Location) const; + + /** + * The number of values that were parsed from the sensor string. + */ + int32 GetParsedValues() const; + +public: + /** + * Quaternion rotation relative to magnetic north. + */ + FQuat GetImuRotationQ() const; + + /** + * Rotation relative to magnetic north. + */ + FRotator GetImuRotation() const; + + /** + * Whether the IMU values were all successfully parsed, or not. + */ + bool IsImuParsed() const; + +public: + /** + * A value between 0..1 that represents the battery level of this Nova2 Glove (0 .. 100%). Returns -1 if the value + * wasn't received. + */ + float GetBatteryLevel() const; + + /** + * Returns true if this NovaGlove is connected to a power source. + */ + bool IsCharging() const; + +public: + /** + * Returns true if this sensor data contains the same values as another. + */ + bool Equals(const USGNova2GloveSensorData* Nova2GloveSensorData) const; + +public: + /** + * Create a readable string representation of this Sensor Data. + */ + FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGlove.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGlove.h new file mode 100644 index 0000000..0401bc1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGlove.h @@ -0,0 +1,640 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * An interface for the "Nova" - a soft glove. + * Contains methods for Kinematics, Haptics and Serialization. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGHapticGlove.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGNovaGlove.generated.h" + +class FSGNovaGloveImpl; +class USGHandInterpolator; +class USGNovaGloveInfo; +class USGNovaGloveSensorData; +class USGSensorNormalization; +class USGThresholdCommand; + +/** + * A soft glove with Force- and Vibrotactile Feedback and limited tracking. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGNovaGlove final : public USGHapticGlove +{ + GENERATED_BODY() + +public: + static USGNovaGlove* NewNovaGlove(UObject* Outer, const FSGNovaGloveImpl& NovaGloveImpl); + + static USGNovaGlove* NewNovaGlove(UObject* Outer, TSharedRef NovaGloveImpl); + +public: + /** + * Default constructor for NovaGlove. + */ + static USGNovaGlove* NewNovaGlove(UObject* Outer); + + /** + * Creates a new instance of a Nova Glove. + */ + static USGNovaGlove* NewNovaGlove(UObject* Outer, const USGNovaGloveInfo& DeviceInfo); + +public: + /** + * Deserializes a Nova from its ConstantsString. Returns a nullptr if unsuccessful. + * + * @param ConstantsString + */ + static USGDevice* Parse(UObject* Outer, const FString& ConstantsString); + + /** + * Retrieve all Nova's. + */ + static TArray GetNovaGloves(UObject* Outer); + + /** + * Retrieve the first connected Nova there is. + */ + static bool GetNovaGlove(UObject* Outer, USGNovaGlove*& OutGlove); + + /** + * Retrieve the first (connected) right or left handed Nova. + */ + static bool GetNovaGlove(UObject* Outer, bool bRightHanded, USGNovaGlove*& OutGlove); + +public: + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is a left or right-handed glove. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is a left or right-handed glove. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is right or left hand. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether this is right or left hand. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutWristPosition, FRotator& OutWristRotation); + +public: + /** + * Byte indicating a new Nova haptic command. + */ + static ANSICHAR GetHapticsByte(); + + /** + * Byte indicating a new Nova thresholds command. + */ + static ANSICHAR GetThresholdsByte(); + + /** + * Byte to ignore Thresholds. + */ + static ANSICHAR GetIgnoreThresholdsByte(); + + /** + * Ranges before a Nova 1.0 Sensor is allowed to move. + */ + static TArray GetNovaSensorRanges(); + +public: + /** + * Converts Nova Sensor Data into floating point inputs for normalization. + * + * @param SensorData + */ + static TArray ToNormalizedValues(const USGNovaGloveSensorData* SensorData); + + /** + * Convert Sensor Data into a series of normalized values. + * + * @param Outer + * @param SensorData + * @param OutSensorNormalizer + */ + static TArray ToNormalizedValues( + UObject* Outer, + const USGNovaGloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer); + +public: + /** + * Calculate Hand Angles for a Nova Glove, based on normalized input. + * + * @param NormalizedValues + * @param Interpolator + */ + static TArray> CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator); + +public: + /** + * Converts a Threshold command into a Nova Glove command. + * + * @param Thresholds + */ + static FString ToNovaCommandAsFlexion(const USGThresholdCommand* Thresholds); + + /** + * Converts a Threshold command into a Nova Glove command. + * + * @param Thresholds + * @param Interpolator + */ + static FString ToNovaCommandAsRaw( + const USGThresholdCommand* Thresholds, const USGSensorNormalization* Interpolator); + +protected: + USGNovaGlove(); + + explicit USGNovaGlove(const USGNovaGloveInfo& DeviceInfo); + +public: + /** + * The cast from underlying parent type constructor. + */ + explicit USGNovaGlove(const FSGDeviceImpl& SGDeviceImpl); + + /** + * The cast from underlying parent type constructor. + */ + explicit USGNovaGlove(const FSGHapticGloveImpl& HapticGloveImpl); + + /** + * The cast from underlying type constructor. + */ + explicit USGNovaGlove(const FSGNovaGloveImpl& NovaGloveImpl); + +protected: + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGNovaGlove(TSharedRef SGDeviceImpl); + + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGNovaGlove(TSharedRef HapticGloveImpl); + + /** + * The cast from underlying pointer type constructor. + */ + explicit USGNovaGlove(TSharedRef NovaGloveImpl); + +public: + /** + * The destructor. + */ + virtual ~USGNovaGlove() override; + +public: + /** + * The cast to underlying type method. + */ + TSharedRef ToNovaGloveImpl() const; + +public: + /** + * Return the DeviceType of this Nova. + */ + virtual ESGDeviceType GetDeviceType() const override; + + /** + * Returns this device's unique identifier. + */ + virtual FString GetDeviceId() const override; + + /** + * Access this device's hardware designation. + */ + virtual FString GetHardwareVersion() const override; + + /** + * Access this device's main firmware version. (ex: v3.2 -> 3). + */ + virtual int32 GetFirmwareVersion() const override; + + /** + * Access this device's sub-firmware version. (ex: v3.2 -> 2). + */ + virtual int32 GetSubFirmwareVersion() const override; + +public: + /** + * Change this device's index within the SenseCom. Warning: Can cause errors. + * + * @param NewIndex + */ + virtual void SetDeviceIndex(int32 NewIndex) override; + +public: + /** + * Returns true if this device operates on a battery. + */ + virtual bool HasBattery() const override; + + /** + * Returns true if this device is currently charging. + */ + virtual bool IsCharging() override; + + /** + * Returns the device's battery level, as a value between 0 (empty) and 1 (full). + */ + virtual bool GetBatteryLevel(float& OutBatteryLevel) override; + +public: + /** + * Returns true if this glove is meant for right hands. + */ + virtual bool IsRight() const override; + + /** + * Retrieve Nova rotation. + * + * @param OutImu + */ + virtual bool GetImuRotation(FQuat& OutImu) override; + + /** + * Retrieve Nova rotation. + * + * @param OutImu + */ + virtual bool GetImuRotation(FRotator& OutImu) override; + + /* + * Calculate a HandPose from this glove's latest Sensor Data. + */ + virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, + USGHandPose*& OutHandPose) const override; + + /** + * Returns the Hand Angles calculated by this Nova Glove. Used for input for HandPoses, but can be used in and of + * itself. + * + * @param OutHandAngles + */ + virtual bool GetHandAngles(TArray>& OutHandAngles) const override; + +public: + /* + * Retrieve the calibration status of this Nova Glove. + */ + virtual ESGHapticGloveCalibrationState GetCalibrationState() const override; + + /* + * Completes sensor Normalization on the Nova's end. + */ + virtual void EndCalibration() override; + + /* + * Completes sensor Normalization on the Nova's end. + */ + virtual void ResetCalibration() override; + +public: + /* + * Stop all haptic feedback effects playing on this device. + */ + virtual void StopHaptics() override; + + /** + * Stop only all vibrotactile feedback. + */ + virtual void StopVibrations() override; + + /** + * Take all active commands in the device queue, compile them into one and send them to the device. + * + * @returns Returns true if the message was successfully sent to SenseCom. Returns false if no changes to commands + * were detected. + * + * @remarks Generic function across any Haptic Interface in SGCore. + */ + virtual bool SendHaptics() override; + +public: + /** + * Returns true if this Glove supports the chosen haptic location. + * + * @param AtLocation + */ + virtual bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const override; + + /** + * Send a custom waveform to the Nova. + * + * @param OutWaveform + * @param Location + */ + virtual bool SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location) override; + +public: + /** + * Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the Force-Feedback levels, from 0.0 (no FFB) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + virtual bool QueueForceFeedbackLevels(const TArray& Levels01) override; + + /** + * Set the Force-Feedback value of a particular finger to a specific level. + * + * @param Finger The finger to which to send the command. + * @param Level01 Value will be clamped between [0...1], where 0.0 means no Force-Feedback, and 1.0 means full + * force-feedback. + */ + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01) override; + + /** + * Queue a vibrotactile level for each finger. + * + * @param Amplitudes + */ + virtual bool QueueVibroLevels(const TArray& Amplitudes) override; + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01) override; + +public: + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the Nova. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the Nova. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const override; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const override; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const override; + +public: + /** + * Access all sorts of device info specific to this Nova. + */ + USGNovaGloveInfo* GetGloveInfo(UObject* Outer) const; + + /** + * If true, this Nova Glove supports sending special firmware commands to lock brakes at specific sensor values. + */ + bool SupportsThresholds() const; + + /** + * If true, this Nova Glove supports sending custom 'fire-and-forget' waveforms. + */ + bool SupportsCustomWaveforms() const; + + /** + * If true, this glove's sensor calibration runs on board the device. + */ + bool SupportsOnBoardNormalization() const; + +public: + /** + * Get the latest Sensor Data from this Glove. + */ + bool GetSensorData(UObject* Outer, USGNovaGloveSensorData*& OutSensorData); + + /** + * Returns the normalized Sensor Data of this Nova Glove. If no normalization is running on the glove(s), then it's + * done on the PC side. + * + * @param OutNormalizedValues + */ + bool GetNormalizedInput(TArray& OutNormalizedValues) const; + +public: + /** + * Converts a set of commands into a series of bytes (string) this glove can understand. + * + * @param ForceFeedbackLevels Force-Feedback levels for each finger. + * @param BuzzLevels Vibration levels for each finger. + * @param WristLevel Value between 0 and 1 for the wrist amplitude to set. + */ + virtual FString ToNovaCommand( + const TArray& ForceFeedbackLevels, const TArray& BuzzLevels, float WristLevel) const; + + /** + * Queue a vibrotactle level for a specific finger. + * + * @param Finger + * @param Amplitude + */ + virtual bool QueueVibroLevel(int32 Finger, float Amplitude); + + /** + * Queue a command to the vibration amplitude of a general wrist actuator to a set level. + * + * @param Amplitude The amplitude of the wrist vibration, where 0.0 means no vibration, and 1.0 means full + * vibration. + * + * @returns Returns true if the wrist command has been successfully queued. If false, the device might not support + * direct wrist control or have the appropriate firmware. + * + * @remarks This one isn't contained in an interface as it's not used outside of the NovaGlove class. + */ + virtual bool QueueWristLevel(float Amplitude); + +public: + /** + * Convert a HapticLocation into a Nova Motor location. + * + * @param Location + */ + virtual ESGNovaVibroMotor ToNovaMotor(ESGHapticLocation Location) const; + + /** + * Returns the channel index for a particular motor. Can make this as complex as I want for the Nova GLove(s). + * + * @param Motor + */ + virtual int32 ChannelIndex(ESGNovaVibroMotor Motor) const; + + /** + * Ensures the waveform that is to be sent to this Nova Glove has the appropriate parameters. + * + * @param OutWaveform + * @param Motor + */ + virtual void ValidateWaveform(USGCustomWaveform* OutWaveform, ESGNovaVibroMotor Motor) const; + + /** + * Directly sends a custom waveform to the Nova Glove motors, as opposed to specifying a Haptic Location. + * + * @param OutWaveform + * @param Motor + * @param bValidateWaveform + */ + virtual bool SendCustomWaveform_Nova( + USGCustomWaveform* OutWaveform, ESGNovaVibroMotor Motor, bool bValidateWaveform = true); + +public: + /** + * Stops the glove when flexing pas this point. + * + * @param Finger + * @param FlexionThreshold + */ + bool QueueThresholdCommand_Flexion(int32 Finger, float FlexionThreshold); + + /** + * Queue a command to clear the threshold for a specific finger. + * + * @param Finger + * + * @returns Returns true if the command was queued. If false, the device does not have the required firmware for + * these commands. + */ + virtual bool QueueClearThreshold(int32 Finger); + +public: + /** + * Create a string representation of this device for reporting purposes. + */ + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGloveInfo.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGloveInfo.h new file mode 100644 index 0000000..adf00e3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGloveInfo.h @@ -0,0 +1,215 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains information on Nova's hardware, extracted from the device. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGNovaGloveInfo.generated.h" + +class FSGNovaGloveInfoImpl; + +/** + * Device information extracted from a Nova Glove. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGNovaGloveInfo final : public UObject +{ + GENERATED_BODY() + +public: + static USGNovaGloveInfo* NewNovaGloveInfo( + UObject* Outer, const FSGNovaGloveInfoImpl& NovaGloveInfoImpl); + +public: + /** + * The default constructor. + */ + static USGNovaGloveInfo* NewNovaGloveInfo(UObject* Outer); + + /** + * Create a new instance of a NovaGloveInfo. + */ + static USGNovaGloveInfo* NewNovaGloveInfo( + UObject* Outer, + const FString& DeviceId, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors); + +public: + /** + * Parse a constants string into a NovaGloveInfo class. + */ + static bool Parse(UObject* Outer, const FString& ConstantsString, USGNovaGloveInfo*& OutGloveInfo); + + /** + * Convert a string representation back into a NovaGloveInfo class. + */ + static USGNovaGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGNovaGloveInfo(); + + /** + * Create a new instance of a NovaGloveInfo. + */ + USGNovaGloveInfo(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGNovaGloveInfo(const FSGNovaGloveInfoImpl& NovaGloveInfoImpl); + +public: + /** + * The destructor. + */ + virtual ~USGNovaGloveInfo() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetNovaGloveInfoImpl(const FSGNovaGloveInfoImpl& NovaGloveInfoImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGNovaGloveInfoImpl& ToNovaGloveInfoImpl() const; + +protected: + /** + * The non-const cast to underlying type method. + */ + FSGNovaGloveInfoImpl& ToNovaGloveInfoImpl(); + +public: + /** + * Unique identifier of this device. + */ + FString GetDeviceId() const; + + /** + * Hardware (sub) version of this Sense Glove Device. + */ + FString GetHardwareVersion() const; + + /** + * Firmware version running on the device's MicroController. (as v4.12, this is the 4). + */ + int32 GetFirmwareVersion() const; + + /** + * Sub firmware version running on the device's microcontroller (as v4.12, this is the .12). + */ + int32 GetSubFirmwareVersion() const; + + /** + * Determines if this is a right-handed Nova. + */ + bool IsRight() const; + + /** + * The IMU correction of this Nova. + */ + FQuat GetImuCorrectionQ() const; + + /** + * The IMU correction of this Nova. + */ + FRotator GetImuCorrection() const; + + /** + * The number of sensors in this device. + */ + int32 GetNumberOfSensors() const; + +public: + /** + * Returns true if this glove's firmware is newer than certain version. + * + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + bool FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + /** + * Returns true if this glove's firmware is older than certain version. + * + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + bool FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + +public: + /** + * Returns true if this GloveInfo contains the same information as another. + */ + bool Equals(const USGNovaGloveInfo* NovaGloveInfo) const; + +public: + /** + * Create a string representation of this Glove Info. + */ + FString ToString() const; + + /** + * Convert this class into a string representation so it can be unpacked later. + */ + FString SGSerialize() const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGloveSensorData.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGloveSensorData.h new file mode 100644 index 0000000..73b117f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGNovaGloveSensorData.h @@ -0,0 +1,238 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Nova SensorData, parsed from rae string representations. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGNovaGloveSensorData.generated.h" + +class FSGNovaGloveSensorDataImpl; +class USGNovaGloveInfo; + +/** + * Sensor Data coming from a Nova, converted into useful values. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGNovaGloveSensorData final : public UObject +{ + GENERATED_BODY() + +public: + static USGNovaGloveSensorData* NewNovaGloveSensorData( + UObject* Outer, const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl); + +public: + /** + * Default constructor for NovaGloveSensorData. + */ + static USGNovaGloveSensorData* NewNovaGloveSensorData(UObject* Outer); + + /** + * Create a new instance of a NovaGloveSensorData. + */ + static USGNovaGloveSensorData* NewNovaGloveSensorData( + UObject* Outer, const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a NovaGloveSensorData. + */ + static USGNovaGloveSensorData* NewNovaGloveSensorData( + UObject* Outer, const TArray& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + +public: + /** + * Returns a NovaGloveSensorData without any values. + */ + static USGNovaGloveSensorData* Empty(UObject* Outer); + + /** + * Parse the bytes as they come in from the device into usable values. + * + * @param RawData + * @param GloveInfo + * @return + */ + static USGNovaGloveSensorData* Parse(UObject* Outer, const FString& RawData, const USGNovaGloveInfo* GloveInfo); + + /** + * Convert this sensor data into ta string representation. + * + * @param SerializedString + */ + static USGNovaGloveSensorData* Deserialize(UObject* Outer, const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * Default constructor for NovaGloveSensorData. + */ + USGNovaGloveSensorData(); + + /** + * Create a new instance of a NovaGloveSensorData. + * + * @param Values + * @param ParsedValues + * @param ImuRotation + * @param bImuParsed + * @param BatteryLevel + * @param bCharging + */ + USGNovaGloveSensorData(const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a NovaGloveSensorData. + * + * @param Values + * @param ParsedValues + * @param ImuRotation + * @param bImuParsed + * @param BatteryLevel + * @param bCharging + */ + USGNovaGloveSensorData(const TArray& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGNovaGloveSensorData(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl); + +public: + /** + * The destructor. + */ + virtual ~USGNovaGloveSensorData() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetNovaGloveSensorDataImpl(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGNovaGloveSensorDataImpl& ToNovaGloveSensorDataImpl() const; + +public: + /** + * Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger. + */ + TArray GetSensorValues() const; + + /** + * Returns the sensor movement of a specific finger. + * + * @param Finger + * @param Location If a Nova glove has only one flexion sensor, it will return the same value for FlexionProximal + * and FlexionDistal. + */ + float GetSensorValue(ESGFinger Finger, ESGNovaSensorLocation Location) const; + + /** + * The number of values that were parsed from the sensor string. + */ + int32 GetParsedValues() const; + +public: + /** + * Quaternion rotation relative to magnetic north. + */ + FQuat GetImuRotationQ() const; + + /** + * Rotation relative to magnetic north. + */ + FRotator GetImuRotation() const; + + /** + * Whether the IMU values were all successfully parsed, or not. + */ + bool IsImuParsed() const; + +public: + /** + * A value between 0..1 that represents the battery level of this Nova Glove (0 .. 100%). Returns -1 if the value + * wasn't received. + */ + float GetBatteryLevel() const; + + /** + * Returns true if this NovaGlove is connected to a power source. + */ + bool IsCharging() const; + +public: + /** + * Returns true if this sensor data contains the same values as another. + */ + bool Equals(const USGNovaGloveSensorData* NovaGloveSensorData) const; + +public: + /** + * Create a readable string representation of this Sensor Data. + */ + FString ToString() const; + + /** + * Convert this sensor data into a string so it can be stored on disk. + */ + FString SGSerialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseCom.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseCom.h new file mode 100644 index 0000000..4be2172 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseCom.h @@ -0,0 +1,81 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "UObject/Object.h" + +#include "SGSenseCom.generated.h" + +/** + * + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGSenseCom +{ + GENERATED_BODY() + +public: + /** + * Registers current process as the latest SenseCom build. + */ + static bool RegisterExe(); + + /** + * Register a particular path as the SenseGlove executable location. + */ + static bool RegisterExe(const FString& ExePath); + + /** + * Retrieve the location of SenseGlove executable. + */ + static bool GetExePath(FString& OutExePath); + + /** + * Returns true if SenseCom scanning is active. + */ + static bool ScanningActive(); + + /** + * Returns the directory of the current process. + */ + static bool GetCurrentExeDirectory(FString& OutDirectory); + + /** + * Force-starts the SenseCom application if it is active on the system. + */ + static bool StartupSenseCom(); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h new file mode 100644 index 0000000..8642747 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGlove.h @@ -0,0 +1,621 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * An interface for the Sense Glove exoskeleton glove. + * Contains methods for Kinematics, Haptics and Serialization. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGHapticGlove.h" +#include "SGCore/SGSenseGlovePose.h" +#include "SGCore/SGSenseGloveSensorData.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGSenseGlove.generated.h" + +class FSGSenseGloveImpl; +class USGHandInterpolator; +class USGHandPose; +class USGSenseGloveSensorNormalizer; + +/** + * Interface for the Sense Glove; and exoskeleton Force-Feedback glove. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGSenseGlove final : public USGHapticGlove +{ + GENERATED_BODY() + +public: + static USGSenseGlove* NewSenseGlove(UObject* Outer, const FSGSenseGloveImpl& SenseGloveImpl); + + static USGSenseGlove* NewSenseGlove(UObject* Outer, TSharedRef SenseGloveImpl); + +public: + /** + * Default constructor for SenseGlove. + */ + static USGSenseGlove* NewSenseGlove(UObject* Outer); + + /** + * Create a new instance of a Sense Glove. + */ + static USGSenseGlove* NewSenseGlove(UObject* Outer, const USGSenseGloveInfo& Model); + +public: + /** + * Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful. + */ + static USGDevice* Parse(UObject* Outer, const FString& ConstantsString); + + /** + * Retrieve all Sense Gloves connected to this system. + */ + static TArray GetSenseGloves(UObject* Outer); + + /** + * Retrieve the first connected Sense Glove there is. + */ + static bool GetSenseGlove(UObject* Outer, USGSenseGlove*& OutGlove); + + /** + * Retrieve the first (connected) right or left handed sense glove. + */ + static bool GetSenseGlove(UObject* Outer, bool bRightHanded, USGSenseGlove*& OutGlove); + +public: + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether or not this is a left or right handed glove. + * @param MountedOn Which finger module the hardware is mounted on. Default is Middle finger. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + bool bRightHanded, ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param bRightHanded Whether or not this is a left or right handed glove. + * @param MountedOn Which finger module the hardware is mounted on. Default is Middle finger. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + static void CalculateGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + bool bRightHanded, ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Calculates the full wrist location. + * + * @param ReferencePosition + * @param ReferenceRotation + * @param TrackingHardware + * @param bRightHanded + * @param MountedOn + * @param GloveWristPositionOffset + * @param GloveWristRotationOffset + * @param OutWristPosition + * @param OutWristRotation + */ + static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + bool bRightHanded, ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Calculates the full wrist location. + * + * @param ReferencePosition + * @param ReferenceRotation + * @param TrackingHardware + * @param bRightHanded + * @param MountedOn + * @param GloveWristPositionOffset + * @param GloveWristRotationOffset + * @param OutWristPosition + * @param OutWristRotation + */ + static void CalculateWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + bool bRightHanded, ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, + const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation); + +public: + /** + * Byte indicating a new Sense Glove haptic command. + */ + static ANSICHAR GetHapticsByte(); + + /** + * Byte indicating a new Thumper command. + */ + static ANSICHAR GetThumperByte(); + + /** + * Default offset from thimble to fingertip. + */ + static FVector GetDefaultThimbleOffset(); + +public: + /** + * Calculates a GlovePose based on sensor angles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ + static USGSenseGlovePose* CalculateGlovePose(UObject* Outer, + const USGSenseGloveSensorData* SensorData, + const USGSenseGloveInfo* GloveModel); + + /** + * Calculates a GlovePose based on gloveAngles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ + static USGSenseGlovePose* CalculateGlovePose(UObject* Outer, + const TArray>& GloveAngles, + const USGSenseGloveInfo* GloveModel); + + /** + * Returns normalized flexions and abductions. + * + * @param SumAngles + * @param Normalizer + * @param OutFlexions + * @param OutAbductions + */ + static void NormalizeValues(const TArray& SumAngles, + const USGSenseGloveSensorNormalizer* Normalizer, + TArray& OutFlexions, TArray& OutAbductions); + +public: + /** + * Calculate Hand Angles from a GlovePose and relevant normalizers. + * + * @param GlovePose + * @param Normalizer + * @param NormalizedToAngles + * @param OutHandAngles + */ + static void CalculateHandAngles( + const USGSenseGlovePose* GlovePose, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + TArray>& OutHandAngles); + + /** + * Calculate a HandPose based on a glovePose and a solver. + * + * @remarks Use this when you already have a GlovePose. + * + * @param GlovePose + * @param HandModel + * @param Normalizer + * @param NormalizedToAngles + * @param OutHandPose + */ + static void CalculateHandPose( + UObject* Outer, + const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + USGHandPose*& OutHandPose); + +protected: + /** + * + */ + USGSenseGlove(); + + /** + * Create a new instance of a Sense Glove. + */ + explicit USGSenseGlove(const USGSenseGloveInfo& Model); + +public: + /** + * The cast from underlying parent type constructor. + */ + explicit USGSenseGlove(const FSGDeviceImpl& SGDeviceImpl); + + /** + * The cast from underlying parent type constructor. + */ + explicit USGSenseGlove(const FSGHapticGloveImpl& HapticGloveImpl); + + /** + * The cast from underlying type constructor. + */ + explicit USGSenseGlove(const FSGSenseGloveImpl& SenseGloveImpl); + +protected: + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGSenseGlove(TSharedRef SGDeviceImpl); + + /** + * The cast from underlying parent pointer type constructor. + */ + explicit USGSenseGlove(TSharedRef HapticGloveImpl); + + /** + * The cast from underlying pointer type constructor. + */ + explicit USGSenseGlove(TSharedRef SenseGloveImpl); + +public: + /** + * The destructor. + */ + virtual ~USGSenseGlove() override; + +public: + /** + * The cast to underlying type method. + */ + TSharedRef ToSenseGloveImpl() const; + +public: + /** + * Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration. + */ + virtual ESGDeviceType GetDeviceType() const override; + + /** + * Retrieve this Sense Glove's unique identifier. + */ + virtual FString GetDeviceId() const override; + + /** + * Retrieve this glove's hardware (sub) version. + */ + virtual FString GetHardwareVersion() const override; + + /** + * Retrieve this device's firmware version. + */ + virtual int32 GetFirmwareVersion() const override; + + /** + * Retrieve this device's sub-firmware version. + */ + virtual int32 GetSubFirmwareVersion() const override; + +public: + /** + * Check if this Sense Glove is right handed. + * + * @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used. + */ + virtual bool IsRight() const override; + + /** + * + */ + virtual bool GetImuRotation(FQuat& OutImu) override; + + /** + * + */ + virtual bool GetImuRotation(FRotator& OutImu) override; + + /* + * Calculate a HandPose from this glove's latest Sensor Data. + * + * @param HandGeometry + * @param OutHandPose + */ + virtual bool GetHandPose(UObject* Outer, const USGBasicHandModel* HandGeometry, + USGHandPose*& OutHandPose) const override; + + /** + * Returns the Hand Angles calculated by this Sense Glove. Used for input for HandPoses, but can be used in and of + * itself. + * + * @param OutHandAngles + */ + virtual bool GetHandAngles(TArray>& OutHandAngles) const; + +public: + /* + * Retrieve the calibration status of this Sense Glove. + */ + virtual ESGHapticGloveCalibrationState GetCalibrationState() const override; + + /* + * Completes sensor Normalization on the Glove's end. + */ + virtual void EndCalibration() override; + + /* + * Completes sensor Normalization on the Glove's end. + */ + virtual void ResetCalibration() override; + +public: + /* + * Stop all haptic feedback effects playing on this device. + */ + virtual void StopHaptics() override; + + /** + * Stop only all vibrotactile feedback. + */ + virtual void StopVibrations() override; + + /** + * Flush all streaming haptic effects on the different fingers to the Glove. + */ + virtual bool SendHaptics() override; + +public: + /** + * Set the Force-Feedback value of a particular finger to a specific level. + * + * @param Levels01 Array containing the Force-Feedback levels, from 0.0 (no FFB) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + virtual bool QueueForceFeedbackLevels(const TArray& Levels01) override; + + /** + * Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Finger Value will be clamped between [0...1], where 0.0 means no Force-Feedback, and 1.0 means + * full force-feedback. + * @param Level01 The finger to which to send the command. + */ + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01) override; + + /** + * Queue a vibrotactile level for each finger. + * + * @param Amplitudes + */ + virtual bool QueueVibroLevels(const TArray& Amplitudes) override; + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01) override; + +public: + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + virtual void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const override; + + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param MountedOn Which finger module the hardware is mounted on. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const; + + /** + * Retrieve the location of the glove origin, based on a reference location. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param MountedOn Which finger module the hardware is mounted on. + * @param OutGlovePosition The 3D Position of the glove, in mm, relative to your origin. + * @param OutGloveRotation The 3D Rotation of the glove, relative to your origin. + */ + void GetGloveLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation) const; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const override; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition Position of the tracked object, in mm, relative to your origin. + * @param ReferenceRotation Rotation of the tracked object relative to your origin. + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + * + * @remarks The simplest interface, using default offsets. + */ + virtual void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) const override; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition + * @param ReferenceRotation + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param GloveWristPositionOffset Position offset, in mm, from the glove origin to wrist (default = 0,0,-30 mm). + * @param GloveWristRotationOffset Rotation offset from the glove origin to wrist (default = 0,-5,0 degrees). + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + */ + void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) const; + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @param ReferencePosition + * @param ReferenceRotation + * @param TrackingHardware The hardware mounted on the SenseGlove. + * @param GloveWristPositionOffset Position offset, in mm, from the glove origin to wrist (default = 0,0,-30 mm). + * @param GloveWristRotationOffset Rotation offset from the glove origin to wrist (default = 0,-5,0 degrees). + * @param OutWristPosition The 3D Position of the wrist, in mm, relative to your origin. + * @param OutWristRotation The 3D Rotation of the wrist, relative to your origin. + */ + void GetWristLocation(const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation) const; + +public: + /** + * Retrieve this glove's hardware model, which contains its hardware data. + */ + USGSenseGloveInfo* GetGloveInfo(UObject* Outer) const; + + /** + * Offset from thimble to fingertip, used for Inverse Kinematics. + */ + TArray GetFingerThimbleOffsets() const; + + /** + * + * @param Finger + * @param Offset + */ + void SetFingerThimbleOffset(int32 Finger, const FVector& Offset); + + /** + * + */ + bool SupportsWristActuator() const; + +public: + /** + * Get the latest Sensor Data from this Sense Glove. + */ + bool GetSensorData(UObject* Outer, USGSenseGloveSensorData*& OutSensorData) const; + + /** + * Get the pose of this Sense Glove's hardware, based on its latest Sensor Data. + */ + bool GetGlovePose(UObject* Outer, USGSenseGlovePose*& OutGlovePose); + + /** + * Get the pose of this Sense Glove's hardware based on a set of Sensor Data. + */ + bool GetGlovePose(UObject* Outer, const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose); + +public: + /** + * Queue a vibrotactle level for a specific finger. + * + * @param Finger + * @param Amplitude + */ + virtual bool QueueVibroLevel(int32 Finger, float Amplitude); + + /** + * Queue a command for the SenseGlove Thumper actuator. + * + * @param Command + */ + virtual bool QueueThumperCommand(ESGSenseGloveThumperCommand Command); + +public: + /** + * Create a string representation of this device for reporting purposes. + */ + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveInfo.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveInfo.h new file mode 100644 index 0000000..e57882a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveInfo.h @@ -0,0 +1,317 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Glove information taken from the Sense Glove. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseGloveInfo.generated.h" + +class FSGSenseGloveInfoImpl; + +/** + * Glove Information taken from a SenseGlove. Contains everything from unique ID, firmware version, etc. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGSenseGloveInfo final : public UObject +{ + GENERATED_BODY() + +public: + static USGSenseGloveInfo* NewSenseGloveInfo( + UObject* Outer, const FSGSenseGloveInfoImpl& SenseGloveInfoImpl); + +public: + /** + * The default constructor. + */ + static USGSenseGloveInfo* NewSenseGloveInfo(UObject* Outer); + + /** + * Create a new Sense Glove device model. + */ + static USGSenseGloveInfo* NewSenseGloveInfo( + UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray>& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + static USGSenseGloveInfo* NewSenseGloveInfo( + UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray>& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + static USGSenseGloveInfo* NewSenseGloveInfo( + UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + static USGSenseGloveInfo* NewSenseGloveInfo( + UObject* Outer, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions); + +public: + /** + * Create an instance of the SGModel from its string representation. + */ + static bool Parse(UObject* Outer, const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo, + bool bUpdateOldModels = true); + + /** + * Deserialize a HandProfile back into usable values. + */ + static USGSenseGloveInfo* Deserialize(UObject* Outer, const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGSenseGloveInfo(); + + /** + * Create a new Sense Glove device model. + */ + USGSenseGloveInfo(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray>& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + USGSenseGloveInfo(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray>& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + USGSenseGloveInfo(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + USGSenseGloveInfo(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGSenseGloveInfo(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl); + +public: + /** + * The destructor. + */ + virtual ~USGSenseGloveInfo() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetSenseGloveInfoImpl(const FSGSenseGloveInfoImpl& SenseGloveInfoImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGSenseGloveInfoImpl& ToSenseGloveInfoImpl() const; + +protected: + /** + * The non-const cast to underlying type method. + */ + FSGSenseGloveInfoImpl& ToSenseGloveInfoImpl(); + +public: + /** + * Unique identifier of this device. + */ + FString GetDeviceId() const; + + /** + * Hardware (sub) version of this Sense Glove Device. + */ + FString GetHardwareVersion() const; + + /** + * Firmware version running on the device's MicroController. + */ + int32 GetFirmwareVersion() const; + + /** + * Sub-Firmware version running on the device's MicroController. + */ + int32 GetSubFirmwareVersion() const; + + /** + * Check if this Sense Glove belongs to a left or right hand. + */ + bool IsRight() const; + + /** + * The number of Sensors in this SenseGlove. + */ + int32 GetNumberOfSensors() const; + + /** + * The IMU correction of this Sense Glove. + */ + FQuat GetImuCorrectionQ() const; + + /** + * The IMU correction of this Sense Glove. + */ + FRotator GetImuCorrection() const; + + /** + * The starting positions of each Sense Glove finger, relative to the glove origin. + */ + TArray GetStartPositions() const; + + /** + * The starting rotations of each Sense Glove finger, relative to the glove origin. + */ + TArray GetStartRotationsQ() const; + + /** + * The starting rotations of each Sense Glove finger, relative to the glove origin. + */ + TArray GetStartRotations() const; + + /** + * The lengths of each Sense Glove finger section, in cm. + */ + TArray> GetGloveLengths() const; + + /** + * Whether this device has a specific function (T/F). + */ + TArray GetFunctions() const; + +public: + /** + * The starting position of one Sense Glove finger, relative to the glove origin. + */ + FVector GetStartPosition(ESGFinger Finger) const; + + /** + * The starting rotation of one Sense Glove finger, relative to the glove origin. + */ + FQuat GetStartRotationQ(ESGFinger Finger) const; + + /** + * The starting rotation of one Sense Glove finger, relative to the glove origin. + */ + FRotator GetStartRotation(ESGFinger Finger) const; + + /** + * The lengths of one Sense Glove finger's sections, in cm. + */ + TArray GetGloveLengths(ESGFinger Finger) const; + +public: + /** + * Place incoming sensor data into the right format, according to this glove's model. + */ + TArray> ToGloveAngles(const TArray>& SensorAngles) const; + + /** + * Returns true if this SG_Model has the same values as another. + */ + bool Equals(const USGSenseGloveInfo* SenseGloveInfo) const; + +public: + /** + * Create a string representation for fast logging. + */ + FString ToString(bool bShortNotation) const; + + /** + * Create a string representation for logging. If shortNotation is false, all values are reported. + */ + FString ToString() const; + + /** + * Serialize this HandProfile into a string representation. + */ + FString SGSerialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGlovePose.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGlovePose.h new file mode 100644 index 0000000..bc16e6c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGlovePose.h @@ -0,0 +1,259 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains position and rotation data of a SenseGlove's exoskeleton, along + * with accessors for relevant variables. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGQuatArray.h" +#include "SGTypes/SGRotatorArray.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseGlovePose.generated.h" + +class FSGSenseGlovePoseImpl; +class USGSenseGloveInfo; + +/** + * Represents a pose of a Sense Glove exoskeleton. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGSenseGlovePose final : public UObject +{ + GENERATED_BODY() + +public: + static USGSenseGlovePose* NewSenseGlovePose( + UObject* Outer, const FSGSenseGlovePoseImpl& SenseGlovePoseImpl); + +public: + /** + * The basic constructor. + */ + static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer); + + /** + * Creates a new instance of a SenseGlovePose. + */ + static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + static USGSenseGlovePose* NewSenseGlovePose(UObject* Outer, bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles); + +public: + /** + * Returns an idle pose for the Sense Glove if no data can be found. + */ + static USGSenseGlovePose* IdlePose(UObject* Outer, const USGSenseGloveInfo* GloveInfo); + + /** + * Deserialize a GlovePose back into usable values. + */ + static USGSenseGlovePose* Deserialize(UObject* Outer, const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The basic constructor. + */ + USGSenseGlovePose(); + + /** + * Creates a new instance of a SenseGlovePose. + */ + USGSenseGlovePose(bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + USGSenseGlovePose(bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + USGSenseGlovePose(bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + USGSenseGlovePose(bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGSenseGlovePose(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl); + +public: + /** + * The destructor. + */ + virtual ~USGSenseGlovePose() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetSenseGlovePoseImpl(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGSenseGlovePoseImpl& ToSenseGlovePoseImpl() const; + +public: + /** + * Whether this Glove Pose was created for be a right- or left hand, or not. + */ + bool IsRight() const; + + /** + * Positions of each glove joint, relative to the Glove's Origin. + */ + TArray> GetJointPositions() const; + + /** + * Quaternion rotation of each glove joint, relative to the Glove Origin. + */ + TArray> GetJointRotationsQ() const; + + /** + * Rotation of each glove joint, relative to the Glove Origin. + */ + TArray> GetJointRotations() const; + + /** + * Glove joint angles in euler notation, relative to the last segment. + * + * @remarks Essentially sensor angles, though placed in their proper xyz notation. + */ + TArray> GetGloveAngles() const; + +public: + /** + * The position of the tip of the 'thimbles', the furthest link on each glove link. + */ + TArray GetThimblePositions() const; + + /** + * The (quaternion) rotation of the 'thimbles', the furthest link on each link. + */ + TArray GetThimbleRotationsQ() const; + + /** + * The rotation of the 'thimbles', the furthest link on each link. + */ + TArray GetThimbleRotations() const; + + /** + * Sum of the Sensor angles in each (xyz) direction. "Total Pronation / Flexion / Abduction". + */ + TArray GetTotalGloveAngles() const; + + /** + * Calculate fingertip positions, knowing the offset between thimble and fingertips. + */ + TArray CalculateFingertips(const TArray& FingerOffsets) const; + + /** + * Returns true if this glove pose equals another. + */ + bool Equals(const USGSenseGlovePose* SenseGlovePose) const; + +public: + /** + * Returns a user-friendly string representation of this GlovePose for reporting. + */ + FString ToString(bool bShortFormat = false) const; + + /** + * Serialize this GlovePose into a string representation. + */ + FString SGSerialize() const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveSensorData.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveSensorData.h new file mode 100644 index 0000000..e5bece8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveSensorData.h @@ -0,0 +1,232 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Parsed sensor data coming form a Sense Glove. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGSenseGloveInfo.h" +#include "SGTypes/SGFloatArray.h" + +#include "SGSenseGloveSensorData.generated.h" + +class FSGSenseGloveSensorDataImpl; + +/** + * Sense Glove Sensor Data, parsed from a sensor string. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGSenseGloveSensorData final : public UObject +{ + GENERATED_BODY() + +public: + static USGSenseGloveSensorData* NewSenseGloveSensorData( + UObject* Outer, const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl); + +public: + /** + * The basic constructor. + */ + static USGSenseGloveSensorData* NewSenseGloveSensorData(UObject* Outer); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + static USGSenseGloveSensorData* NewSenseGloveSensorData( + UObject* Outer, const TArray>& SensorAngles, + const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + static USGSenseGloveSensorData* NewSenseGloveSensorData( + UObject* Outer, const TArray>& SensorAngles, + const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + static USGSenseGloveSensorData* NewSenseGloveSensorData( + UObject* Outer, const TArray& SensorAngles, + const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + static USGSenseGloveSensorData* NewSenseGloveSensorData( + UObject* Outer, const TArray& SensorAngles, + const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed); + +public: + /** + * Returns sensor data with no values. + */ + static USGSenseGloveSensorData* Empty(UObject* Outer); + + /** + * Deserialize Sense Glove sensor data from a raw char[] received through IPC. + */ + static USGSenseGloveSensorData* Parse(UObject* Outer, const FString& RawData, const USGSenseGloveInfo* GloveInfo); + + /** + * Deserialize a HandProfile back into usable values. + */ + static USGSenseGloveSensorData* Deserialize(UObject* Outer, const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The basic constructor. + */ + USGSenseGloveSensorData(); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + USGSenseGloveSensorData(const TArray>& SensorAngles, + const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + USGSenseGloveSensorData(const TArray>& SensorAngles, + const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + USGSenseGloveSensorData(const TArray& SensorAngles, + const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + USGSenseGloveSensorData(const TArray& SensorAngles, + const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGSenseGloveSensorData(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl); + +public: + /** + * The destructor. + */ + virtual ~USGSenseGloveSensorData() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetSenseGloveSensorDataImpl(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGSenseGloveSensorDataImpl& ToSenseGloveSensorDataImpl() const; + +public: + /** + * Glove angles in degrees, sorted by finger, from proximal to distal. + */ + TArray> GetSensorAngles() const; + + /** + * Get the glove angles of a specific finger segment. + */ + TArray GetSensorAngles(ESGFinger Finger) const; + + /** + * Returns all glove angles in a sequence, without splitting them per finger. + */ + TArray GetAngleSequence() const; + + /** + * + */ + FQuat GetImuRotationQ() const; + + /** + * + */ + FRotator GetImuRotation() const; + + /** + * Check how many values have been parsed from the Sensor String. + */ + int32 GetParsedValues() const; + +public: + /** + * Check if the IMU was properly parsed. + */ + bool IsImuParsed() const; + +public: + /** + * Returns true if the values of both data are equal. + */ + bool Equals(const USGSenseGloveSensorData* SenseGloveSensorData) const; + +public: + /** + * Retrieve a simple representation of this sensor data for debugging purposes. + */ + FString ToString() const; + + /** + * Serialize this HandProfile into a string representation. + */ + FString SGSerialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveSensorNormalizer.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveSensorNormalizer.h new file mode 100644 index 0000000..55670f6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveSensorNormalizer.h @@ -0,0 +1,137 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Internal class that acts as a sort of 'in between' handProfile. This class + * converts SG Dk1 Angles into 'normalized data' - between 0 .. 1. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGSenseGloveSensorNormalizer.generated.h" + +class FSGSenseGloveSensorNormalizerImpl; + +/** + * Internal class to hold 'Threshold Commands' for specific fingers. Can be sent to a Device, or used internally. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGSenseGloveSensorNormalizer final : public UObject +{ + GENERATED_BODY() + +public: + static USGSenseGloveSensorNormalizer* NewSenseGloveSensorNormalizer( + UObject* Outer, const FSGSenseGloveSensorNormalizerImpl& SenseGloveSensorNormalizerImpl); + +public: + /** + * The default constructor. + */ + static USGSenseGloveSensorNormalizer* NewSenseGloveSensorNormalizer(UObject* Outer); + + /** + * Create a new instance of SenseGloveSensorNormalizer. + */ + static USGSenseGloveSensorNormalizer* NewSenseGloveSensorNormalizer( + UObject* Outer, bool bRightHanded); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGSenseGloveSensorNormalizer(); + + /** + * Creates a new SenseGlove Sensor Normalizer based off the device's sensor angles. + * + * @param bRightHanded + */ + explicit USGSenseGloveSensorNormalizer(bool bRightHanded); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGSenseGloveSensorNormalizer(const FSGSenseGloveSensorNormalizerImpl& SenseGloveSensorNormalizerImpl); + +public: + /** + * The destructor. + */ + virtual ~USGSenseGloveSensorNormalizer() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetSenseGloveSensorNormalizerImpl(const FSGSenseGloveSensorNormalizerImpl& SenseGloveSensorNormalizerImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGSenseGloveSensorNormalizerImpl& ToSenseGloveSensorNormalizerImpl() const; + +public: + /** + * Normalize a finger's flexion, based on the total flexion of the exoskeleton. + * + * @param Finger + * @param SumFlexionAngles + */ + float NormalizeFlexion(int32 Finger, float SumFlexionAngles) const; + + /** + * Normalize a finger's abduction, based on the total abduction of the exoskeleton. + * + * @param Finger + * @param SumAbductionAngles + */ + float NormalizeAbduction(int32 Finger, float SumAbductionAngles) const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveVars.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveVars.h new file mode 100644 index 0000000..3cfd5a2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSenseGloveVars.h @@ -0,0 +1,121 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains enumerators and classes to aid in Sense Glove Deserialization. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" + +#include "SGSenseGloveVars.generated.h" + +class USGSenseGloveInfo; + +/** + * "Database" class containing Sense Glove internal variables. + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGSenseGloveVars +{ + GENERATED_BODY() + +public: + /** + * Retrieve a basic ConstantsString for a Sense Glove of a specific Hardware Version. Used for debugging / unit + * tests. + * + * @returns Returns an empty string when an invalid glove version is requested. + */ + static FString GetStandardConstantsString(const FString& HardwareVersion, float FirmwareVersion, bool bRightHanded); + + /** + * Retrieve an example sensor string of a Sense Glove with a particular hardware- and firmware version. + */ + static FString GetSensorString(const FString& HardwareVersion, float FirmwareVersion); + + /** + * Retrieve the starting positions of a particular Sense Glove. + */ + static TArray GetStartPositions(const FString& HardwareVersion, bool bRightHanded); + + /** + * Retrieve the starting rotations of a particular Sense Glove. + */ + static TArray GetStartRotationsQ(const FString& HardwareVersion, bool bRightHanded); + + /** + * Retrieve the starting rotations of a particular Sense Glove. + */ + static TArray GetStartRotations(const FString& HardwareVersion, bool bRightHanded); + + /** + * Retrieve the glove finger lengths of a particular Sense Glove. + */ + static TArray> GetGloveLengths(const FString& HardwareVersion); + + /** + * Get the number of sensors of a SenseGlove. + */ + static int32 GetSensors(const FString& HardwareVersion); + + /** + * Get the default IMUCorrection for the SenseGlove. + */ + static FQuat GetImuCorrectionQ(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Get the default IMUCorrection for the SenseGlove. + */ + static FRotator GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Check all functionality of a SenseGlove. + */ + static TArray GetFunctions(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Generate a custom glove info. + */ + static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion, + int32 SubFirmwareVersion, bool bRightHanded); + + /** + * Generate a custom glove info. + */ + static USGSenseGloveInfo* GenerateGloveModel(UObject* Outer, const FString& HardwareVersion, int32 FirmwareVersion, + int32 SubFirmwareVersion, bool bRightHanded, const FString& CustomId); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSensorNormalization.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSensorNormalization.h new file mode 100644 index 0000000..1c3a25b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGSensorNormalization.h @@ -0,0 +1,189 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A script to normalize any set of floating point values by looking at their + * minimum and maximum values. Used for automagical calibration. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGSensorNormalization.generated.h" + +class FSGSensorNormalizationImpl; + +/** + * Internal class to hold 'Threshold Commands' for specific fingers. Can be sent to a Device, or used internally. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGSensorNormalization final : public UObject +{ + GENERATED_BODY() + +public: + static USGSensorNormalization* NewSensorNormalization( + UObject* Outer, const FSGSensorNormalizationImpl& SensorNormalizationImpl); + +public: + /** + * The default constructor. + */ + static USGSensorNormalization* NewSensorNormalization(UObject* Outer); + + /** + * Create a new instance of SensorNormalization. + */ + static USGSensorNormalization* NewSensorNormalization( + UObject* Outer, const TArray& MovementRanges); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGSensorNormalization(); + + /** + * Create a new instance of SensorNormalization. + */ + explicit USGSensorNormalization(const TArray& MovementRanges); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGSensorNormalization(const FSGSensorNormalizationImpl& SensorNormalizationImpl); + +public: + /** + * The destructor. + */ + virtual ~USGSensorNormalization() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetSensorNormalizationImpl(const FSGSensorNormalizationImpl& SensorNormalizationImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGSensorNormalizationImpl& ToSensorNormalizationImpl() const; + +public: + /** + * If true, the normalization collection is active. If false, we're no longer collecting min / max values. + */ + bool CollectsNormalization() const; + + /** + * + * @param bCollectNormalization + */ + void SetCollectNormalization(bool bCollectNormalization); + +public: + /** + * The amount of items in this collector Useful for FOR loops. + */ + int32 GetLength() const; + + /** + * The amount of values that have moved the appropriate amount. + */ + int32 GetMoveCount() const; + + /** + * Returns true if all sensors are allowed to move. + */ + bool AllSensorsMoving() const; + + /** + * Reset the normalization of values. + */ + void ResetNormalization(); + + /** + * + * @param Value + * @param Index + */ + void UpdateNormalization(float Value, int32 Index); + + /** + * Normalize a value on a specific index, and update Normalization while you're at it. + * + * @param Value + * @param Index + */ + float NormalizeValue(float Value, int32 Index); + + /** + * Update and Normalize a set of values, provided this is the same length. + * + * @param Values + */ + TArray NormalizeValues(const TArray& Values); + + /** + * Returns true if a sensor on this index has moved enough. + * + * @param Index + */ + bool MovedEnough(int32 Index) const; + + /** + * Turn a value from 0 .. 1 back into [minValue ... maxValue] range for the Nova Glove. + * + * @param Value01 + * @param Index + * @param FallbackValue + */ + float Denormalize(float Value01, int32 Index, float FallbackValue = 1.0f) const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGThresholdCommand.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGThresholdCommand.h new file mode 100644 index 0000000..02dfa29 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGThresholdCommand.h @@ -0,0 +1,183 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Internal class to hold 'Threshold Commands' for specific fingers. Can be sent + * to a Device, or used internally. + * Threshold Commands tell our device "When your sensor data is higher than this + * threshold, lock FFB. Otherwise, turn it back off". + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGThresholdCommand.generated.h" + +class FSGThresholdCommandImpl; + +/** + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact + * feedback in the front strap. + */ +UCLASS(BlueprintType) +class SENSEGLOVECORE_API USGThresholdCommand final : public UObject +{ + GENERATED_BODY() + +public: + static USGThresholdCommand* NewThresholdCommand( + UObject* Outer, const FSGThresholdCommandImpl& ThresholdCommandImpl); + +public: + /** + * The default constructor. + */ + static USGThresholdCommand* NewThresholdCommand(UObject* Outer); + + /** + * Create a new instance of ThresholdCommand. + */ + static USGThresholdCommand* NewThresholdCommand( + UObject* Outer, + const TArray& AffectedFingers, const TArray& ThresholdValues); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + USGThresholdCommand(); + + /** + * Create a new instance of ThresholdCommand. + */ + USGThresholdCommand( + const TArray& AffectedFingers, const TArray& ThresholdValues); + +public: + /** + * The cast from underlying type constructor. + */ + explicit USGThresholdCommand(const FSGThresholdCommandImpl& ThresholdCommandImpl); + +public: + /** + * The destructor. + */ + virtual ~USGThresholdCommand() override; + +protected: + /** + * Allows to set the underlying object after construction. + */ + void SetThresholdCommandImpl(const FSGThresholdCommandImpl& ThresholdCommandImpl); + +public: + /** + * The cast to underlying type method. + */ + const FSGThresholdCommandImpl& ToThresholdCommandImpl() const; + +public: + /** + * Retrieve the threshold of a particular finger. + * + * @param Finger + */ + float GetThreshold(int32 Finger) const; + + /** + * Activates the threshold for a finger at a particular value. + * + * @param Finger + * @param ThresholdValue + */ + void SetThreshold(int32 Finger, float ThresholdValue); + + TArray GetThresholds() const; + + /** + * Activates the threshold for a finger at a particular value. + * + * @param AffectedFingers + * @param ThresholdValues + */ + void SetThresholds(const TArray& AffectedFingers, const TArray& ThresholdValues); + + /** + * If true, the threshold on a finger should be active. + * + * @param Finger + */ + bool GetFingerActive(int32 Finger) const; + + TArray GetActiveFingers() const; + + /** + * Deactivates Threshold Mode for a particular finger. + * + * @param Finger + */ + void ClearThreshold(int32 Finger); + + /** + * Disables Threshold mode for all fingers. Clears the ActiveFingers, but keeps the Thresholds value for now, in + * case you want to re-apply them later. + */ + void ClearThresholds(); + +public: + /** + * Returns true if both values are exactly equal. + */ + bool Equals(const USGThresholdCommand* ThresholdCommand) const; + +public: + /** + * Print the contents of this Threshold Command. If inactive, a '-' is shown. + */ + FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGTracking.h b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGTracking.h new file mode 100644 index 0000000..3b1d277 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/Public/SGCore/SGTracking.h @@ -0,0 +1,618 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" + +#include "SGTypes/SGCoreTypes.h" + +#include "SGTracking.generated.h" + +/** + * + */ +USTRUCT() +struct SENSEGLOVECORE_API FSGTracking +{ + GENERATED_BODY() + +public: + /** + * Knowing a position & rotation in 3D space, calculate a relative location based on offsets. + */ + static void CalculateLocation( + const FVector& TrackedPosition, const FQuat& TrackedRotation, + const FVector& PositionOffset, const FQuat& RotationOffset, + FVector& OutNewPosition, FQuat& OutNewRotation); + + /** + * Knowing a position & rotation in 3D space, calculate a relative location based on offsets. + */ + static void CalculateLocation( + const FVector& TrackedPosition, const FRotator& TrackedRotation, + const FVector& PositionOffset, const FRotator& RotationOffset, + FVector& OutNewPosition, FRotator& OutNewRotation); + + /** + * Positional offset from each finger to the glove origin. + */ + static TArray GetSenseGloveFingerToGlovePositionOrigin(); + + /** + * + */ + static TArray GetSenseGloveFingerToGloveRotationOriginQ(); + + /** + * + */ + static TArray GetSenseGloveFingerToGloveRotationOrigin(); + + /** + * Default position offset from glove origin to wrist location, in cm. + */ + static FVector GetSenseGloveWristPositionOffset(); + + /** + * Default rotation offset from glove origin to wrist location. + */ + static FQuat GetSenseGloveWristRotationOffsetQ(); + + /** + * Default rotation offset from glove origin to wrist location. + */ + static FRotator GetSenseGloveWristRotationOffset(); + + /** + * Get the position and rotation offsets to go from the glove origin to the mounted position. + * + * @remarks Based on CAD. needs to be inverted when going from tracker to glove origin. + */ + static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger, + FVector& OutIPosition, FQuat& OutIRotation); + + /** + * Get the position and rotation offsets to go from the glove origin to the mounted position. + * + * @remarks Based on CAD. needs to be inverted when going from tracker to glove origin. + */ + static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger, + FVector& OutIPosition, FRotator& OutIRotation); + + /** + * Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount + * offset to get the glove location. + */ + static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount + * offset to get the glove location. + */ + static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * Vive Tracker origin to Finger rotational offset. + */ + static FVector GetSenseGloveViveToAttachPosition(); + + /** + * Vive Tracker origin to Finger rotational offset. + */ + static FQuat GetSenseGloveViveToAttachRotationQ(); + + /** + * Vive Tracker origin to Finger rotational offset. + */ + static FRotator GetSenseGloveViveToAttachRotation(); + + /** + * Oculus Touch origin to Finger rotational offset. + */ + static FVector GetSenseGloveOculusTouchToAttachPosition(); + + /** + * Oculus Touch origin to Finger rotational offset. + */ + static FQuat GetSenseGloveOculusTouchToAttachRotationQ(); + + /** + * Oculus Touch origin to Finger rotational offset. + */ + static FRotator GetSenseGloveOculusTouchToAttachRotation(); + + /** + * Positional offset between Nova Glove Origin and Wrist. + */ + static FVector GetNovaToWristPositionOffset(); + + /** + * Rotational offset between Nova Glove Origin and Wrist. + */ + static FQuat GetNovaToWristRotationOffsetQ(); + + /** + * Rotational offset between Nova Glove Origin and Wrist. + */ + static FRotator GetNovaToWristRotationOffset(); + + /** + * + */ + static FVector GetRightNovaViveToAttachPosition(); + + /** + * + */ + static FQuat GetRightNovaViveToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNovaViveToAttachRotation(); + + /** + * + */ + static FVector GetLeftNovaViveToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNovaViveToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNovaViveToAttachRotation(); + + /** + * + */ + static FVector GetRightNovaQuest2ToAttachPosition(); + + /** + * + */ + static FQuat GetRightNovaQuest2ToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNovaQuest2ToAttachRotation(); + + /** + * + */ + static FVector GetLeftNovaQuest2ToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNovaQuest2ToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNovaQuest2ToAttachRotation(); + + /** + * @remarks Left is a mirror, so we only need R pos. + */ + static FVector GetRightNovaPico2ToAttachPosition(); + + /** + * + */ + static FQuat GetRightNovaPico2ToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNovaPico2ToAttachRotation(); + + /** + * + */ + static FQuat GetLeftNovaPico2ToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNovaPico2ToAttachRotation(); + + /** + * + */ + static FVector GetRightNovaQuestProToAttachPosition(); + + /** + * + */ + static FQuat GetRightNovaQuestProToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNovaQuestProToAttachRotation(); + + /** + * + */ + static FVector GetLeftNovaQuestProToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNovaQuestProToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNovaQuestProToAttachRotation(); + + /** + * + */ + static FVector GetRightNovaViveFocus3ToAttachPosition(); + + /** + * + */ + static FQuat GetRightNovaViveFocus3ToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNovaViveFocus3ToAttachRotation(); + + /** + * + */ + static FVector GetLeftNovaViveFocus3ToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNovaViveFocus3ToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNovaViveFocus3ToAttachRotation(); + + /** + * + */ + static FVector GetRightNovaQuest3ToAttachPosition(); + + /** + * + */ + static FQuat GetRightNovaQuest3ToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNovaQuest3ToAttachRotation(); + + /** + * + */ + static FVector GetLeftNovaQuest3ToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNovaQuest3ToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNovaQuest3ToAttachRotation(); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + */ + static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + */ + static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + * + * @param Hardware + * @param bRightHanded + * @param OutPositionOffset + * @param OutRotationOffset + */ + static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + * + * @param Hardware + * @param bRightHanded + * @param OutPositionOffset + * @param OutRotationOffset + */ + static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * + */ + static FVector GetRightNova2ToWristPositionOffset(); + + /** + * + */ + static FQuat GetRightNova2ToWristRotationOffsetQ(); + + /** + * + */ + static FRotator GetRightNova2ToWristRotationOffset(); + + /** + * + */ + + static FVector GetLeftNova2ToWristPositionOffset(); + + /** + * + */ + static FQuat GetLeftNova2ToWristRotationOffsetQ(); + + /** + * + */ + static FRotator GetLeftNova2ToWristRotationOffset(); + + /** + * + */ + static FVector GetRightNova2Quest2ToAttachPosition(); + + /** + * + */ + static FQuat GetRightNova2Quest2ToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNova2Quest2ToAttachRotation(); + + /** + * + */ + static FVector GetLeftNova2Quest2ToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNova2Quest2ToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNova2Quest2ToAttachRotation(); + + /** + * + */ + static FVector GetRightNova2QuestProToAttachPosition(); + + /** + * + */ + static FQuat GetRightNova2QuestProToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNova2QuestProToAttachRotation(); + + /** + * + */ + static FVector GetLeftNova2QuestProToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNova2QuestProToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNova2QuestProToAttachRotation(); + + /** + * + */ + static FVector GetRightNova2ViveTrackerToAttachPosition(); + + /** + * + */ + static FQuat GetRightNova2ViveTrackerToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNova2ViveTrackerToAttachRotation(); + + /** + * + */ + static FVector GetLeftNova2ViveTrackerToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNova2ViveTrackerToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNova2ViveTrackerToAttachRotation(); + + + /** + * + */ + static FVector GetRightNova2ViveWristTrackerToAttachPosition(); + + /** + * + */ + static FQuat GetRightNova2ViveWristTrackerToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNova2ViveWristTrackerToAttachRotation(); + + /** + * + */ + static FVector GetLeftNova2ViveWristTrackerToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNova2ViveWristTrackerToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNova2ViveWristTrackerToAttachRotation(); + + /** + * + */ + static FVector GetRightNova2Quest3ToAttachPosition(); + + /** + * + */ + static FQuat GetRightNova2Quest3ToAttachRotationQ(); + + /** + * + */ + static FRotator GetRightNova2Quest3ToAttachRotation(); + + /** + * + */ + static FVector GetLeftNova2Quest3ToAttachPosition(); + + /** + * + */ + static FQuat GetLeftNova2Quest3ToAttachRotationQ(); + + /** + * + */ + static FRotator GetLeftNova2Quest3ToAttachRotation(); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + * + * @param bRightHanded + * @param HardwareVersion + * @param OutPositionOffset + * @param OutRotationOffset + */ + static void GetNova2GloveWristOffset(bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + * + * @param bRightHanded + * @param HardwareVersion + * @param OutPositionOffset + * @param OutRotationOffset + */ + static void GetNova2GloveWristOffset(bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + * + * @param Hardware + * @param bRightHanded + * @param HardwareVersion + * @param OutPositionOffset + * @param OutRotationOffset + */ + static void GetNova2GloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + * + * @param Hardware + * @param bRightHanded + * @param HardwareVersion + * @param OutPositionOffset + * @param OutRotationOffset + */ + static void GetNova2GloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * + */ + static FString ToString(ESGPositionalTrackingHardware Hardware); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCore/SenseGloveCore.Build.cs b/Plugins/SenseGlove/Source/SenseGloveCore/SenseGloveCore.Build.cs new file mode 100644 index 0000000..848c517 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCore/SenseGloveCore.Build.cs @@ -0,0 +1,73 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveCore : ModuleRules +{ + public SenseGloveCore(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveAndroid", + "SenseGloveCoreImpl", + "SenseGloveLog", + "SenseGloveTypes", + "SenseGloveUtils", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + "SenseGloveInterop", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGAnatomyImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGAnatomyImpl.cpp new file mode 100644 index 0000000..a5d84d8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGAnatomyImpl.cpp @@ -0,0 +1,134 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGAnatomyImpl.h" + +#include "SGBuildHacks/SGInclude_Core_Anatomy.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGAngles.h" +#include "SGUtils/SGArrayUtils.h" + +float FSGAnatomyImpl::GetTotalFingerFlexion() +{ + return FAnatomyType::GetTotalFingerFlexion(); +} + +float FSGAnatomyImpl::GetTotalFingerExtension() +{ + return FAnatomyType::GetTotalFingerExtension(); +} + +float FSGAnatomyImpl::GetTotalThumbFlexion() +{ + return FAnatomyType::GetTotalThumbFlexion(); +} + +float FSGAnatomyImpl::GetTotalThumbExtension() +{ + return FAnatomyType::GetTotalThumbExtension(); +} + +float FSGAnatomyImpl::GetFingerJointLimit( + const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax) +{ + return FSGAngles::TransformToUnreal( + Movement, FAnatomyType::GetFingerJointLimit(bRightHanded, Joint, Movement, bMax)); +} + +float FSGAnatomyImpl::GetThumbJointLimit( + const bool bRightHanded, const int32 Joint, const int32 Movement, const bool bMax) +{ + return FSGAngles::TransformToUnreal( + Movement, FAnatomyType::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax)); +} + +float FSGAnatomyImpl::ClampJointAngle( + const float Value, const int32 Finger, const bool bRightHand, const int32 Joint, const int32 Movement) +{ + return FAnatomyType::ClampJointAngle(Value, Finger, bRightHand, Joint, Movement); +} + +float FSGAnatomyImpl::NormalizeFingerFlexion(const float FlexionInDegrees) +{ + return FSGAngles::TransformToUnreal( + FAnatomyType::NormalizeFingerFlexion( + FSGAngles::TransformToSenseGlove( + FlexionInDegrees))); +} + +float FSGAnatomyImpl::NormalizeThumbFlexion(const float FlexionInDegrees) +{ + return FSGAngles::TransformToUnreal( + FAnatomyType::NormalizeThumbFlexion( + FSGAngles::TransformToSenseGlove( + FlexionInDegrees))); +} + +TArray> FSGAnatomyImpl::GetDefaultHandAngles(const bool bRightHanded) +{ + const TArray> DefaultHandAngles{ + FSGArrayUtils::FromSenseGloveAngles( + FAnatomyType::GetDefaultHandAngles(bRightHanded)) + }; + return DefaultHandAngles; +} + +TArray> FSGAnatomyImpl::GetFlatHandAngles(const bool bRightHanded) +{ + const TArray> FlatHandAngles{ + FSGArrayUtils::FromSenseGloveAngles( + FAnatomyType::GetFlatHandAngles(bRightHanded)) + }; + return FlatHandAngles; +} + +TArray> FSGAnatomyImpl::GetThumbsUpHandAngles(const bool bRightHanded) +{ + const TArray> ThumbsUpHandAngles{ + FSGArrayUtils::FromSenseGloveAngles( + FAnatomyType::GetThumbsUpHandAngles(bRightHanded)) + }; + return ThumbsUpHandAngles; +} + +TArray> FSGAnatomyImpl::GetFistHandAngles(const bool bRightHanded) +{ + const TArray> FistHandAngles{ + FSGArrayUtils::FromSenseGloveAngles( + FAnatomyType::GetFistHandAngles(bRightHanded)) + }; + return FistHandAngles; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGBasicHandModelImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGBasicHandModelImpl.cpp new file mode 100644 index 0000000..82065d3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGBasicHandModelImpl.cpp @@ -0,0 +1,356 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGBasicHandModelImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_BasicHandModel.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" +#include "SGUtils/SGUnits.h" + +struct FSGBasicHandModelImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FBasicHandModelType BasicHandModel; + + /************************ + * Owner object + ************************/ + + FSGBasicHandModelImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGBasicHandModelImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGBasicHandModelImpl FSGBasicHandModelImpl::Default(const bool bRightHanded) +{ + return FSGBasicHandModelImpl(FSGBasicHandModelImpl::FBasicHandModelType::Default(bRightHanded)); +} + +FSGBasicHandModelImpl FSGBasicHandModelImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGBasicHandModelImpl BasicHandModel(FBasicHandModelType::Deserialize(MoveTemp(Serialized))); + return BasicHandModel; +} + +const TArray>& FSGBasicHandModelImpl::GetBaseFingerLengths() +{ + static const TArray> BaseFingerLengths{ + FSGArrayUtils::FromMillimeters( + FSGBasicHandModelImpl::FBasicHandModelType::GetBaseFingerLengths()) + }; + return BaseFingerLengths; +} + +const TArray& FSGBasicHandModelImpl::GetBaseJointPositions() +{ + static const TArray BaseJointPositions{ + FSGArrayUtils::FromMillimeters( + FBasicHandModelType::GetBaseJointPositions()) + }; + return BaseJointPositions; +} + +const TArray& FSGBasicHandModelImpl::GetBaseJointAngles() +{ + static const TArray BaseJointAngles{ + FSGArrayUtils::FromStdVector( + FBasicHandModelType::GetBaseJointAngles()) + }; + return BaseJointAngles; +} + +FSGBasicHandModelImpl::FSGBasicHandModelImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGBasicHandModelImpl::FSGBasicHandModelImpl(const bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector> LengthsVector{ + FSGArrayUtils::ToMillimeters(Lengths) + }; + + std::vector StartPositionsVector{ + FSGArrayUtils::ToMillimeters(StartPositions) + }; + + Pimpl->BasicHandModel = FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector), MoveTemp(StartPositionsVector)); +} + +FSGBasicHandModelImpl::FSGBasicHandModelImpl(const bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector> LengthsVector{ + FSGArrayUtils::ToMillimeters(Lengths) + }; + + std::vector StartPositionsVector{ + FSGArrayUtils::ToMillimeters(StartPositions) + }; + + std::vector StartRotationsVector{ + FSGArrayUtils::ToStdVector(StartRotations) + }; + + Pimpl->BasicHandModel = FBasicHandModelType(bRightHanded, MoveTemp(LengthsVector), + MoveTemp(StartPositionsVector), MoveTemp(StartRotationsVector)); +} + +FSGBasicHandModelImpl::FSGBasicHandModelImpl(const FBasicHandModelType& BasicHandModel) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->BasicHandModel = BasicHandModel; +} + +FSGBasicHandModelImpl::FSGBasicHandModelImpl(const FSGBasicHandModelImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGBasicHandModelImpl::FSGBasicHandModelImpl(FSGBasicHandModelImpl&& Rhs) SG_NOEXCEPT = default; + +FSGBasicHandModelImpl::~FSGBasicHandModelImpl() = default; + +FSGBasicHandModelImpl& FSGBasicHandModelImpl::operator=(const FSGBasicHandModelImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGBasicHandModelImpl& FSGBasicHandModelImpl::operator=(FSGBasicHandModelImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGBasicHandModelImpl::FBasicHandModelType& FSGBasicHandModelImpl::ToBasicHandModel() const +{ + return Pimpl->BasicHandModel; +} + +bool FSGBasicHandModelImpl::IsRight() const +{ + return Pimpl->BasicHandModel.IsRight(); +} + +TArray> FSGBasicHandModelImpl::GetFingerLengths() const +{ + const TArray> FingerLengths{ + FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetFingerLengths()) + }; + return FingerLengths; +} + +TArray FSGBasicHandModelImpl::GetFingerLengths(const ESGFinger Finger) const +{ + const TArray FingerLengths{ + FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger))) + }; + return FingerLengths; +} + +void FSGBasicHandModelImpl::SetFingerLengths(const ESGFinger Finger, const TArray& Lengths) +{ + std::vector LengthsVector{ + FSGArrayUtils::ToMillimeters(Lengths) + }; + Pimpl->BasicHandModel.SetFingerLengths(FSGCoreEnumCast::ToEFinger(Finger), MoveTemp(LengthsVector)); +} + +void FSGBasicHandModelImpl::SetFingerLengths(const uint8 Finger, const TArray& Lengths) +{ + std::vector LengthsVector{ + FSGArrayUtils::ToMillimeters(Lengths) + }; + Pimpl->BasicHandModel.SetFingerLengths(Finger, MoveTemp(LengthsVector)); +} + +TArray> FSGBasicHandModelImpl::GetFingerRatios() const +{ + const TArray> FingerRatios{ + FSGArrayUtils::FromStdVector(Pimpl->BasicHandModel.GetFingerRatios()) + }; + return FingerRatios; +} + +TArray FSGBasicHandModelImpl::GetFingerRatios(const ESGFinger Finger) const +{ + const TArray FingerRatios{ + FSGArrayUtils::FromStdVector(Pimpl->BasicHandModel.GetFingerRatios(FSGCoreEnumCast::ToEFinger(Finger))) + }; + return FingerRatios; +} + +TArray FSGBasicHandModelImpl::GetStartJointPositions() const +{ + const TArray StartJointPositions{ + FSGArrayUtils::FromMillimeters( + Pimpl->BasicHandModel.GetStartJointPositions()) + }; + return StartJointPositions; +} + +void FSGBasicHandModelImpl::SetStartJointPosition(const ESGFinger Finger, const FVector& Position) +{ + Pimpl->BasicHandModel.SetStartJointPosition( + FSGCoreEnumCast::ToEFinger(Finger), + FSGUnits::CentimetersToMillimeters(Position)); +} + +void FSGBasicHandModelImpl::SetStartJointPosition(const uint8 Finger, const FVector& Position) +{ + Pimpl->BasicHandModel.SetStartJointPosition( + Finger, + FSGUnits::CentimetersToMillimeters(Position)); +} + +TArray FSGBasicHandModelImpl::GetStartJointRotations() const +{ + const TArray StartJointRotations{ + FSGArrayUtils::FromStdVector< + FSGQuatImpl::FQuatType, FQuat, FSGQuatImpl, &FSGQuatImpl::ToFQuat>( + Pimpl->BasicHandModel.GetStartJointRotations()) + }; + return StartJointRotations; +} + +FVector FSGBasicHandModelImpl::GetJointPosition(const ESGFinger Finger) const +{ + return FSGUnits::MillimetersToCentimeters( + Pimpl->BasicHandModel.GetJointPosition(FSGCoreEnumCast::ToEFinger(Finger))); +} + +void FSGBasicHandModelImpl::SetJointPosition(const FVector& NewPosition, const ESGFinger Finger) +{ + Pimpl->BasicHandModel.SetJointPosition( + FSGUnits::CentimetersToMillimeters(NewPosition), + FSGCoreEnumCast::ToEFinger(Finger)); +} + +FQuat FSGBasicHandModelImpl::GetJointRotation(const ESGFinger Finger) const +{ + const FSGQuatImpl Rotation(Pimpl->BasicHandModel.GetJointRotation(FSGCoreEnumCast::ToEFinger(Finger))); + return Rotation.ToFQuat(); +} + +void FSGBasicHandModelImpl::SetJointRotation(const FQuat& NewRotation, const ESGFinger Finger) +{ + Pimpl->BasicHandModel.SetJointRotation(FSGQuatImpl(NewRotation).ToQuat(), FSGCoreEnumCast::ToEFinger(Finger)); +} + +TArray FSGBasicHandModelImpl::GetTotalLengths() const +{ + const TArray TotalLengths{ + FSGArrayUtils::FromMillimeters(Pimpl->BasicHandModel.GetTotalLengths()) + }; + return TotalLengths; +} + +float FSGBasicHandModelImpl::GetTotalLength(const ESGFinger Finger) const +{ + return FSGUnits::MillimetersToCentimeters( + Pimpl->BasicHandModel.GetTotalLength(FSGCoreEnumCast::ToEFinger(Finger))); +} + +TArray FSGBasicHandModelImpl::Get3DLengths(const ESGFinger Finger) const +{ + const TArray Lengths{ + FSGArrayUtils::FromMillimeters( + Pimpl->BasicHandModel.Get3DLengths(FSGCoreEnumCast::ToEFinger(Finger))) + }; + return Lengths; +} + +bool FSGBasicHandModelImpl::Equals(const FSGBasicHandModelImpl& BasicHandModelImpl) const +{ + return Pimpl->BasicHandModel.Equals(BasicHandModelImpl.ToBasicHandModel()); +} + +FString FSGBasicHandModelImpl::ToString() const +{ + const FString String(UTF8_TO_TCHAR(Pimpl->BasicHandModel.ToString().c_str())); + return String; +} + +FString FSGBasicHandModelImpl::ToString(const bool bLengthsOnly) const +{ + const FString String(UTF8_TO_TCHAR(Pimpl->BasicHandModel.ToString(bLengthsOnly).c_str())); + return String; +} + +FString FSGBasicHandModelImpl::Serialize() const +{ + const FString Serialized(UTF8_TO_TCHAR(Pimpl->BasicHandModel.Serialize().c_str())); + return Serialized; +} + +FSGBasicHandModelImpl::FImpl::FImpl(FSGBasicHandModelImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGBasicHandModelImpl::FImpl::~FImpl() = default; + +void FSGBasicHandModelImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGBetaDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGBetaDeviceImpl.cpp new file mode 100644 index 0000000..a971b3b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGBetaDeviceImpl.cpp @@ -0,0 +1,213 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGBetaDeviceImpl.h" + +#include + +#include "Containers/StringConv.h" +#include "Misc/AssertionMacros.h" + +#include "SGBuildHacks/SGInclude_Core_BetaDevice.h" +#include "SGBuildHacks/SGInclude_Core_SGDevice.h" +#include "SGCoreImpl/SGCoreEnumCast.h" + +struct FSGBetaDeviceImpl::FImpl +{ + /************************ + * Owner object + ************************/ + + FSGBetaDeviceImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGBetaDeviceImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TSharedRef FSGBetaDeviceImpl::Parse(const FString& String) +{ + FSGDevicePtrType SGDevicePtr{FBetaDeviceType::Parse(TCHAR_TO_UTF8(*String))}; + ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!")); + const TSharedRef BetaDeviceImpl{ + MakeShared(std::static_pointer_cast(MoveTemp(SGDevicePtr))) + }; + return BetaDeviceImpl; +} + +FSGBetaDeviceImpl::FSGBetaDeviceImpl() + : FSGDeviceImpl(), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FString& ConstantsString, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion) + : FSGDeviceImpl(std::make_shared( + TCHAR_TO_UTF8(*ConstantsString), + TCHAR_TO_UTF8(*DeviceId), + TCHAR_TO_UTF8(*HardwareVersion), + FirmwareVersion, + SubFirmwareVersion)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FBetaDeviceType BetaDevice) + : FSGDeviceImpl(std::make_shared(BetaDevice)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FBetaDevicePtrType BetaDevice) + : FSGDeviceImpl(BetaDevice), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGBetaDeviceImpl::FSGBetaDeviceImpl(const FSGBetaDeviceImpl& Rhs) + : FSGDeviceImpl(Rhs), + Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGBetaDeviceImpl::FSGBetaDeviceImpl(FSGBetaDeviceImpl&& Rhs) SG_NOEXCEPT = default; + +FSGBetaDeviceImpl::~FSGBetaDeviceImpl() = default; + +FSGBetaDeviceImpl& FSGBetaDeviceImpl::operator=(const FSGBetaDeviceImpl& Rhs) +{ + FSGDeviceImpl::operator=(Rhs); + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGBetaDeviceImpl& FSGBetaDeviceImpl::operator=(FSGBetaDeviceImpl&& Rhs) SG_NOEXCEPT = default; + +FSGBetaDeviceImpl::FBetaDeviceType FSGBetaDeviceImpl::ToBetaDevice() const +{ + return *ToBetaDevicePtr(); +} + +FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtr() const +{ + return std::static_pointer_cast(ToSGDevicePtr()); +} + +FSGBetaDeviceImpl::FBetaDevicePtrType FSGBetaDeviceImpl::ToBetaDevicePtrChecked() const +{ + FBetaDevicePtrType BetaDevice = std::static_pointer_cast(ToSGDevicePtr()); + ensureAlwaysMsgf(BetaDevice.get(), TEXT("Invalid BetaDevice")); + return BetaDevice; +} + +ESGDeviceType FSGBetaDeviceImpl::GetDeviceType() const +{ + return FSGCoreEnumCast::ToESGDeviceType(ToBetaDevicePtrChecked()->GetDeviceType()); +} + +FString FSGBetaDeviceImpl::GetDeviceId() const +{ + const FString Id{UTF8_TO_TCHAR(ToBetaDevicePtrChecked()->GetDeviceId().c_str())}; + return Id; +} + +FString FSGBetaDeviceImpl::GetHardwareVersion() const +{ + const FString Version{UTF8_TO_TCHAR(ToBetaDevicePtrChecked()->GetHardwareVersion().c_str())}; + return Version; +} + +int32 FSGBetaDeviceImpl::GetFirmwareVersion() const +{ + return ToBetaDevicePtrChecked()->GetFirmwareVersion(); +} + +int32 FSGBetaDeviceImpl::GetSubFirmwareVersion() const +{ + return ToBetaDevicePtrChecked()->GetSubFirmwareVersion(); +} + +FString FSGBetaDeviceImpl::GetConstantsString() const +{ + const FString String{UTF8_TO_TCHAR(ToBetaDevicePtrChecked()->GetConstantsString().c_str())}; + return String; +} + +FString FSGBetaDeviceImpl::GetSensorData() const +{ + const FString Data{UTF8_TO_TCHAR(ToBetaDevicePtrChecked()->GetSensorData().c_str())}; + return Data; +} + +FString FSGBetaDeviceImpl::GetLastCommand() const +{ + const FString Command{UTF8_TO_TCHAR(ToBetaDevicePtrChecked()->GetLastCommand().c_str())}; + return Command; +} + +bool FSGBetaDeviceImpl::SendHaptics(const FString& Command, const int32 Channel) const +{ + return ToBetaDevicePtrChecked()->SendHaptics(TCHAR_TO_UTF8(*Command), Channel); +} + +FString FSGBetaDeviceImpl::ToString() const +{ + return FSGDeviceImpl::ToString(); +} + +FSGBetaDeviceImpl::FImpl::FImpl(FSGBetaDeviceImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGBetaDeviceImpl::FImpl::~FImpl() = default; + +void FSGBetaDeviceImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp new file mode 100644 index 0000000..bbfd52c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.cpp @@ -0,0 +1,796 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGCoreEnumCast.h" + +#include "Misc/AssertionMacros.h" + +FSGCoreEnumCast::FEBackendType FSGCoreEnumCast::ToEBackendType(const ESGBackendType Enum) +{ + switch (Enum) + { + case ESGBackendType::SharedMemory: + return FEBackendType::SharedMemory; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEBackendType::SharedMemory; +} + +ESGBackendType FSGCoreEnumCast::ToESGBackendType(const FEBackendType Enum) +{ + switch (Enum) + { + case FEBackendType::SharedMemory: + return ESGBackendType::SharedMemory; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGBackendType::None; +} + +FSGCoreEnumCast::FEConnectionType FSGCoreEnumCast::ToEConnectionType(const ESGConnectionType Enum) +{ + switch (Enum) + { + case ESGConnectionType::Unknown: + return FEConnectionType::Unknown; + case ESGConnectionType::Serial: + return FEConnectionType::Serial; + case ESGConnectionType::BluetoothSerial: + return FEConnectionType::BluetoothSerial; + case ESGConnectionType::BluetoothAndroid: + return FEConnectionType::BluetoothAndroid; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEConnectionType::Unknown; +} + +ESGConnectionType FSGCoreEnumCast::ToESGConnectionType(const FEConnectionType Enum) +{ + switch (Enum) + { + case FEConnectionType::Unknown: + return ESGConnectionType::Unknown; + case FEConnectionType::Serial: + return ESGConnectionType::Serial; + case FEConnectionType::BluetoothSerial: + return ESGConnectionType::BluetoothSerial; + case FEConnectionType::BluetoothAndroid: + return ESGConnectionType::BluetoothAndroid; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGConnectionType::None; +} + +FSGCoreEnumCast::FEDeviceType FSGCoreEnumCast::ToEDeviceType(const ESGDeviceType Enum) +{ + switch (Enum) + { + case ESGDeviceType::Unknown: + return FEDeviceType::Unknown; + case ESGDeviceType::BetaDevice: + return FEDeviceType::BetaDevice; + case ESGDeviceType::SenseGlove: + return FEDeviceType::SenseGlove; + case ESGDeviceType::Nova: + return FEDeviceType::Nova; + case ESGDeviceType::Nova2: + return FEDeviceType::Nova2; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEDeviceType::Unknown; +} + +ESGDeviceType FSGCoreEnumCast::ToESGDeviceType(const FEDeviceType Enum) +{ + switch (Enum) + { + case FEDeviceType::Unknown: + return ESGDeviceType::Unknown; + case FEDeviceType::BetaDevice: + return ESGDeviceType::BetaDevice; + case FEDeviceType::SenseGlove: + return ESGDeviceType::SenseGlove; + case FEDeviceType::Nova: + return ESGDeviceType::Nova; + case FEDeviceType::Nova2: + return ESGDeviceType::Nova2; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGDeviceType::None; +} + +FSGCoreEnumCast::FEFingerType FSGCoreEnumCast::ToEFinger(const ESGFinger Enum) +{ + switch (Enum) + { + case ESGFinger::Thumb: + return FEFingerType::Thumb; + case ESGFinger::Index: + return FEFingerType::Index; + case ESGFinger::Middle: + return FEFingerType::Middle; + case ESGFinger::Ring: + return FEFingerType::Ring; + case ESGFinger::Pinky: + return FEFingerType::Pinky; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEFingerType::Thumb; +} + +ESGFinger FSGCoreEnumCast::ToESGFinger(const FSGCoreEnumCast::FEFingerType Enum) +{ + switch (Enum) + { + case FEFingerType::Thumb: + return ESGFinger::Thumb; + case FEFingerType::Index: + return ESGFinger::Index; + case FEFingerType::Middle: + return ESGFinger::Middle; + case FEFingerType::Ring: + return ESGFinger::Ring; + case FEFingerType::Pinky: + return ESGFinger::Pinky; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGFinger::None; +} + +FSGCoreEnumCast::FEFingerMovementType FSGCoreEnumCast::ToEFingerMovement(const ESGFingerMovement Enum) +{ + switch (Enum) + { + case ESGFingerMovement::McpFlexion: + return FEFingerMovementType::McpFlexion; + case ESGFingerMovement::McpAbduction: + return FEFingerMovementType::McpAbduction; + case ESGFingerMovement::PipFlexion: + return FEFingerMovementType::PipFlexion; + case ESGFingerMovement::DipFlexion: + return FEFingerMovementType::DipFlexion; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEFingerMovementType::McpFlexion; +} + +ESGFingerMovement FSGCoreEnumCast::ToESGFingerMovement(const FEFingerMovementType Enum) +{ + switch (Enum) + { + case FEFingerMovementType::McpFlexion: + return ESGFingerMovement::McpFlexion; + case FEFingerMovementType::McpAbduction: + return ESGFingerMovement::McpAbduction; + case FEFingerMovementType::PipFlexion: + return ESGFingerMovement::PipFlexion; + case FEFingerMovementType::DipFlexion: + return ESGFingerMovement::DipFlexion; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGFingerMovement::None; +} + +FSGCoreEnumCast::FEHapticChannelType FSGCoreEnumCast::ToEHapticChannelType(const ESGHapticChannelType Enum) +{ + switch (Enum) + { + case ESGHapticChannelType::StreamingChannel: + return FEHapticChannelType::StreamingChannel; + case ESGHapticChannelType::FireAndForgetChannel: + return FEHapticChannelType::FireAndForgetChannel; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEHapticChannelType::StreamingChannel; +} + +ESGHapticChannelType FSGCoreEnumCast::ToESGHapticChannelType(const FEHapticChannelType Enum) +{ + switch (Enum) + { + case FEHapticChannelType::StreamingChannel: + return ESGHapticChannelType::StreamingChannel; + case FEHapticChannelType::FireAndForgetChannel: + return ESGHapticChannelType::FireAndForgetChannel; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGHapticChannelType::None; +} + +FSGCoreEnumCast::FEHapticGloveCalibrationStateType FSGCoreEnumCast::ToEHapticGloveCalibrationState( + const ESGHapticGloveCalibrationState Enum) +{ + switch (Enum) + { + case ESGHapticGloveCalibrationState::Unknown: + return FEHapticGloveCalibrationStateType::Unknown; + case ESGHapticGloveCalibrationState::MoveFingers: + return FEHapticGloveCalibrationStateType::MoveFingers; + case ESGHapticGloveCalibrationState::AllSensorsMoved: + return FEHapticGloveCalibrationStateType::AllSensorsMoved; + case ESGHapticGloveCalibrationState::CalibrationLocked: + return FEHapticGloveCalibrationStateType::CalibrationLocked; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEHapticGloveCalibrationStateType::Unknown; +} + +ESGHapticGloveCalibrationState FSGCoreEnumCast::ToESGHapticGloveCalibrationState( + const FEHapticGloveCalibrationStateType Enum) +{ + switch (Enum) + { + case FEHapticGloveCalibrationStateType::Unknown: + return ESGHapticGloveCalibrationState::Unknown; + case FEHapticGloveCalibrationStateType::MoveFingers: + return ESGHapticGloveCalibrationState::MoveFingers; + case FEHapticGloveCalibrationStateType::AllSensorsMoved: + return ESGHapticGloveCalibrationState::AllSensorsMoved; + case FEHapticGloveCalibrationStateType::CalibrationLocked: + return ESGHapticGloveCalibrationState::CalibrationLocked; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGHapticGloveCalibrationState::None; +} + +FSGCoreEnumCast::FEHapticLocationType FSGCoreEnumCast::ToEHapticLocation(const ESGHapticLocation Enum) +{ + switch (Enum) + { + case ESGHapticLocation::Unknown: + return FEHapticLocationType::Unknown; + case ESGHapticLocation::ThumbTip: + return FEHapticLocationType::ThumbTip; + case ESGHapticLocation::IndexTip: + return FEHapticLocationType::IndexTip; + case ESGHapticLocation::MiddleTip: + return FEHapticLocationType::MiddleTip; + case ESGHapticLocation::RingTip: + return FEHapticLocationType::RingTip; + case ESGHapticLocation::PinkyTip: + return FEHapticLocationType::PinkyTip; + case ESGHapticLocation::PalmIndexSide: + return FEHapticLocationType::PalmIndexSide; + case ESGHapticLocation::PalmPinkySide: + return FEHapticLocationType::PalmPinkySide; + case ESGHapticLocation::WholeHand: + return FEHapticLocationType::WholeHand; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEHapticLocationType::Unknown; +} + +ESGHapticLocation FSGCoreEnumCast::ToESGHapticLocation(const FEHapticLocationType Enum) +{ + switch (Enum) + { + case FEHapticLocationType::Unknown: + return ESGHapticLocation::Unknown; + case FEHapticLocationType::ThumbTip: + return ESGHapticLocation::ThumbTip; + case FEHapticLocationType::IndexTip: + return ESGHapticLocation::IndexTip; + case FEHapticLocationType::MiddleTip: + return ESGHapticLocation::MiddleTip; + case FEHapticLocationType::RingTip: + return ESGHapticLocation::RingTip; + case FEHapticLocationType::PinkyTip: + return ESGHapticLocation::PinkyTip; + case FEHapticLocationType::PalmIndexSide: + return ESGHapticLocation::PalmIndexSide; + case FEHapticLocationType::PalmPinkySide: + return ESGHapticLocation::PalmPinkySide; + case FEHapticLocationType::WholeHand: + return ESGHapticLocation::WholeHand; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGHapticLocation::None; +} + +FSGCoreEnumCast::FENormalizationStateType FSGCoreEnumCast::ToENormalizationState(const ESGNormalizationState Enum) +{ + switch (Enum) + { + case ESGNormalizationState::Unknown: + return FENormalizationStateType::Unknown; + case ESGNormalizationState::SendingRawData: + return FENormalizationStateType::SendingRawData; + case ESGNormalizationState::Normalizing_MoveFingers: + return FENormalizationStateType::Normalizing_MoveFingers; + case ESGNormalizationState::Normalizing_AwaitConfirm: + return FENormalizationStateType::Normalizing_AwaitConfirm; + case ESGNormalizationState::NormalizationFinished: + return FENormalizationStateType::NormalizationFinished; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FENormalizationStateType::Unknown; +} + +ESGNormalizationState FSGCoreEnumCast::ToESGNormalizationState(const FENormalizationStateType Enum) +{ + switch (Enum) + { + case FENormalizationStateType::Unknown: + return ESGNormalizationState::Unknown; + case FENormalizationStateType::SendingRawData: + return ESGNormalizationState::SendingRawData; + case FENormalizationStateType::Normalizing_MoveFingers: + return ESGNormalizationState::Normalizing_MoveFingers; + case FENormalizationStateType::Normalizing_AwaitConfirm: + return ESGNormalizationState::Normalizing_AwaitConfirm; + case FENormalizationStateType::NormalizationFinished: + return ESGNormalizationState::NormalizationFinished; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGNormalizationState::None; +} + +FSGCoreEnumCast::FEPositionalTrackingHardwareType FSGCoreEnumCast::ToEPositionalTrackingHardware( + const ESGPositionalTrackingHardware Enum) +{ + switch (Enum) + { + case ESGPositionalTrackingHardware::Custom: + return FEPositionalTrackingHardwareType::Custom; + case ESGPositionalTrackingHardware::ViveTracker: + return FEPositionalTrackingHardwareType::ViveTracker; + case ESGPositionalTrackingHardware::Quest2Controller: + return FEPositionalTrackingHardwareType::Quest2Controller; + case ESGPositionalTrackingHardware::ViveFocus3WristTracker: + return FEPositionalTrackingHardwareType::ViveFocus3WristTracker; + case ESGPositionalTrackingHardware::QuestProController: + return FEPositionalTrackingHardwareType::QuestProController; + case ESGPositionalTrackingHardware::Quest3Controller: + return FEPositionalTrackingHardwareType::Quest3Controller; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEPositionalTrackingHardwareType::Custom; +} + +ESGPositionalTrackingHardware FSGCoreEnumCast::ToESGPositionalTrackingHardware( + const FEPositionalTrackingHardwareType Enum) +{ + switch (Enum) + { + case FEPositionalTrackingHardwareType::Custom: + return ESGPositionalTrackingHardware::Custom; + case FEPositionalTrackingHardwareType::ViveTracker: + return ESGPositionalTrackingHardware::ViveTracker; + case FEPositionalTrackingHardwareType::Quest2Controller: + return ESGPositionalTrackingHardware::Quest2Controller; + case FEPositionalTrackingHardwareType::ViveFocus3WristTracker: + return ESGPositionalTrackingHardware::ViveFocus3WristTracker; + case FEPositionalTrackingHardwareType::QuestProController: + return ESGPositionalTrackingHardware::QuestProController; + case FEPositionalTrackingHardwareType::Quest3Controller: + return ESGPositionalTrackingHardware::Quest3Controller; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGPositionalTrackingHardware::None; +} + +FSGCoreEnumCast::FESenseGloveThumperCommandType FSGCoreEnumCast::ToESenseGloveThumperCommand( + const ESGSenseGloveThumperCommand Enum) +{ + switch (Enum) + { + case ESGSenseGloveThumperCommand::None: + return FESenseGloveThumperCommandType::None; + case ESGSenseGloveThumperCommand::TurnOff: + return FESenseGloveThumperCommandType::TurnOff; + case ESGSenseGloveThumperCommand::CueGameOver: + return FESenseGloveThumperCommandType::CueGameOver; + case ESGSenseGloveThumperCommand::ButtonDouble100: + return FESenseGloveThumperCommandType::ButtonDouble100; + case ESGSenseGloveThumperCommand::ButtonDouble60: + return FESenseGloveThumperCommandType::ButtonDouble60; + case ESGSenseGloveThumperCommand::ImpactThump100: + return FESenseGloveThumperCommandType::ImpactThump100; + case ESGSenseGloveThumperCommand::ImpactThump30: + return FESenseGloveThumperCommandType::ImpactThump30; + case ESGSenseGloveThumperCommand::ImpactThump10: + return FESenseGloveThumperCommandType::ImpactThump10; + case ESGSenseGloveThumperCommand::ObjectGrasp100: + return FESenseGloveThumperCommandType::ObjectGrasp100; + case ESGSenseGloveThumperCommand::ObjectGrasp60: + return FESenseGloveThumperCommandType::ObjectGrasp60; + case ESGSenseGloveThumperCommand::ObjectGrasp30: + return FESenseGloveThumperCommandType::ObjectGrasp30; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FESenseGloveThumperCommandType::None; +} + +ESGSenseGloveThumperCommand FSGCoreEnumCast::ToESGSenseGloveThumperCommand(const FESenseGloveThumperCommandType Enum) +{ + switch (Enum) + { + case FESenseGloveThumperCommandType::None: + return ESGSenseGloveThumperCommand::None; + case FESenseGloveThumperCommandType::TurnOff: + return ESGSenseGloveThumperCommand::TurnOff; + case FESenseGloveThumperCommandType::CueGameOver: + return ESGSenseGloveThumperCommand::CueGameOver; + case FESenseGloveThumperCommandType::ButtonDouble100: + return ESGSenseGloveThumperCommand::ButtonDouble100; + case FESenseGloveThumperCommandType::ButtonDouble60: + return ESGSenseGloveThumperCommand::ButtonDouble60; + case FESenseGloveThumperCommandType::ImpactThump100: + return ESGSenseGloveThumperCommand::ImpactThump100; + case FESenseGloveThumperCommandType::ImpactThump30: + return ESGSenseGloveThumperCommand::ImpactThump30; + case FESenseGloveThumperCommandType::ImpactThump10: + return ESGSenseGloveThumperCommand::ImpactThump10; + case FESenseGloveThumperCommandType::ObjectGrasp100: + return ESGSenseGloveThumperCommand::ObjectGrasp100; + case FESenseGloveThumperCommandType::ObjectGrasp60: + return ESGSenseGloveThumperCommand::ObjectGrasp60; + case FESenseGloveThumperCommandType::ObjectGrasp30: + return ESGSenseGloveThumperCommand::ObjectGrasp30; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGSenseGloveThumperCommand::None; +} + +FSGCoreEnumCast::FENova2SensorLocationType FSGCoreEnumCast::ToESensorLocation(const ESGNova2SensorLocation Enum) +{ + switch (Enum) + { + case ESGNova2SensorLocation::Abduction: + return FENova2SensorLocationType::Abduction; + case ESGNova2SensorLocation::FlexionProximal: + return FENova2SensorLocationType::FlexionProximal; + case ESGNova2SensorLocation::FlexionDistal: + return FENova2SensorLocationType::FlexionDistal; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FENova2SensorLocationType::Abduction; +} + +ESGNova2SensorLocation FSGCoreEnumCast::ToESGNova2SensorLocation(const FENova2SensorLocationType Enum) +{ + switch (Enum) + { + case FENova2SensorLocationType::Abduction: + return ESGNova2SensorLocation::Abduction; + case FENova2SensorLocationType::FlexionProximal: + return ESGNova2SensorLocation::FlexionProximal; + case FENova2SensorLocationType::FlexionDistal: + return ESGNova2SensorLocation::FlexionDistal; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGNova2SensorLocation::None; +} + +FSGCoreEnumCast::FENovaSensorLocationType FSGCoreEnumCast::ToESensorLocation(const ESGNovaSensorLocation Enum) +{ + switch (Enum) + { + case ESGNovaSensorLocation::Abduction: + return FENovaSensorLocationType::Abduction; + case ESGNovaSensorLocation::Flexion: + return FENovaSensorLocationType::Flexion; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FENovaSensorLocationType::Abduction; +} + +ESGNovaSensorLocation FSGCoreEnumCast::ToESGNovaSensorLocation(const FENovaSensorLocationType Enum) +{ + switch (Enum) + { + case FENovaSensorLocationType::Abduction: + return ESGNovaSensorLocation::Abduction; + case FENovaSensorLocationType::Flexion: + return ESGNovaSensorLocation::Flexion; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGNovaSensorLocation::None; +} + +FSGCoreEnumCast::FEThumbMovementType FSGCoreEnumCast::ToEThumbMovement(const ESGThumbMovement Enum) +{ + switch (Enum) + { + case ESGThumbMovement::CmcTwist: + return FEThumbMovementType::CmcTwist; + case ESGThumbMovement::CmcFlexion: + return FEThumbMovementType::CmcFlexion; + case ESGThumbMovement::CmcAbduction: + return FEThumbMovementType::CmcAbduction; + case ESGThumbMovement::McpFlexion: + return FEThumbMovementType::McpFlexion; + case ESGThumbMovement::IpFlexion: + return FEThumbMovementType::IpFlexion; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEThumbMovementType::CmcTwist; +} + +ESGThumbMovement FSGCoreEnumCast::ToESGThumbMovement(const FEThumbMovementType Enum) +{ + switch (Enum) + { + case FEThumbMovementType::CmcTwist: + return ESGThumbMovement::CmcTwist; + case FEThumbMovementType::CmcFlexion: + return ESGThumbMovement::CmcFlexion; + case FEThumbMovementType::CmcAbduction: + return ESGThumbMovement::CmcAbduction; + case FEThumbMovementType::McpFlexion: + return ESGThumbMovement::McpFlexion; + case FEThumbMovementType::IpFlexion: + return ESGThumbMovement::IpFlexion; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGThumbMovement::None; +} + +FSGCoreEnumCast::FENova2VibroMotorType FSGCoreEnumCast::ToENova2VibroMotor(const ESGNova2VibroMotor Enum) +{ + switch (Enum) + { + case ESGNova2VibroMotor::Unknown: + return FENova2VibroMotorType::Unknown; + case ESGNova2VibroMotor::ThumbFingertip: + return FENova2VibroMotorType::ThumbFingertip; + case ESGNova2VibroMotor::IndexFingertip: + return FENova2VibroMotorType::IndexFingertip; + case ESGNova2VibroMotor::PalmIndexSide: + return FENova2VibroMotorType::PalmIndexSide; + case ESGNova2VibroMotor::PalmPinkySide: + return FENova2VibroMotorType::PalmPinkySide; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FENova2VibroMotorType::Unknown; +} + +ESGNova2VibroMotor FSGCoreEnumCast::ToESGNova2VibroMotor(const FENova2VibroMotorType Enum) +{ + switch (Enum) + { + case FENova2VibroMotorType::Unknown: + return ESGNova2VibroMotor::Unknown; + case FENova2VibroMotorType::ThumbFingertip: + return ESGNova2VibroMotor::ThumbFingertip; + case FENova2VibroMotorType::IndexFingertip: + return ESGNova2VibroMotor::IndexFingertip; + case FENova2VibroMotorType::PalmIndexSide: + return ESGNova2VibroMotor::PalmIndexSide; + case FENova2VibroMotorType::PalmPinkySide: + return ESGNova2VibroMotor::PalmPinkySide; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGNova2VibroMotor::None; +} + +FSGCoreEnumCast::FENovaVibroMotorType FSGCoreEnumCast::ToENovaVibroMotor(const ESGNovaVibroMotor Enum) +{ + switch (Enum) + { + case ESGNovaVibroMotor::Unknown: + return FENovaVibroMotorType::Unknown; + case ESGNovaVibroMotor::BackOfHand: + return FENovaVibroMotorType::BackOfHand; + case ESGNovaVibroMotor::ThumbTip: + return FENovaVibroMotorType::ThumbTip; + case ESGNovaVibroMotor::IndexFingertip: + return FENovaVibroMotorType::IndexFingertip; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FENovaVibroMotorType::Unknown; +} + +ESGNovaVibroMotor FSGCoreEnumCast::ToESGNovaVibroMotor(const FENovaVibroMotorType Enum) +{ + switch (Enum) + { + case FENovaVibroMotorType::Unknown: + return ESGNovaVibroMotor::Unknown; + case FENovaVibroMotorType::BackOfHand: + return ESGNovaVibroMotor::BackOfHand; + case FENovaVibroMotorType::ThumbTip: + return ESGNovaVibroMotor::ThumbTip; + case FENovaVibroMotorType::IndexFingertip: + return ESGNovaVibroMotor::IndexFingertip; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGNovaVibroMotor::None; +} + +FSGCoreEnumCast::FEWaveformType FSGCoreEnumCast::ToEWaveformType(const ESGWaveformType Enum) +{ + switch (Enum) + { + case ESGWaveformType::Unknown: + return FEWaveformType::Unknown; + case ESGWaveformType::Sine: + return FEWaveformType::Sine; + case ESGWaveformType::Square: + return FEWaveformType::Square; + case ESGWaveformType::SawDown: + return FEWaveformType::SawUp; + case ESGWaveformType::SawUp: + return FEWaveformType::SawDown; + case ESGWaveformType::Triangle: + return FEWaveformType::Triangle; + case ESGWaveformType::Noise: + return FEWaveformType::Noise; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + // Keep the compiler satisfied! + return FEWaveformType::Unknown; +} + +ESGWaveformType FSGCoreEnumCast::ToESGWaveformType(const FEWaveformType Enum) +{ + switch (Enum) + { + case FEWaveformType::Unknown: + return ESGWaveformType::Unknown; + case FEWaveformType::Sine: + return ESGWaveformType::Sine; + case FEWaveformType::Square: + return ESGWaveformType::Square; + case FEWaveformType::SawUp: + return ESGWaveformType::SawDown; + case FEWaveformType::SawDown: + return ESGWaveformType::SawUp; + case FEWaveformType::Triangle: + return ESGWaveformType::Triangle; + case FEWaveformType::Noise: + return ESGWaveformType::Noise; + default: + ensureAlwaysMsgf(false, TEXT("Unhandled enum cast item!")); + break; + } + + return ESGWaveformType::None; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h new file mode 100644 index 0000000..a112d9f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCoreEnumCast.h @@ -0,0 +1,127 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGBuildHacks/SGInclude_Core_CustomWaveform.h" +#include "SGBuildHacks/SGInclude_Core_Fingers.h" +#include "SGBuildHacks/SGInclude_Core_HapticChannelInfo.h" +#include "SGBuildHacks/SGInclude_Core_HapticGlove.h" +#include "SGBuildHacks/SGInclude_Core_Library.h" +#include "SGBuildHacks/SGInclude_Core_NormalizationState.h" +#include "SGBuildHacks/SGInclude_Core_Nova2Glove.h" +#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_NovaGlove.h" +#include "SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveThumperCommand.h" +#include "SGBuildHacks/SGInclude_Core_SGDevice.h" +#include "SGBuildHacks/SGInclude_Core_Tracking.h" +#include "SGCoreImpl/SGNova2GloveImpl.h" +#include "SGTypes/SGCoreTypes.h" + +class SENSEGLOVECOREIMPL_API FSGCoreEnumCast +{ +public: + typedef SGCore::EBackendType FEBackendType; + typedef SGCore::SGDevice::EConnectionType FEConnectionType; + typedef SGCore::EDeviceType FEDeviceType; + typedef SGCore::EFinger FEFingerType; + typedef SGCore::EHapticChannelType FEHapticChannelType; + typedef SGCore::EHapticGloveCalibrationState FEHapticGloveCalibrationStateType; + typedef SGCore::EHapticLocation FEHapticLocationType; + typedef SGCore::Kinematics::EFingerMovement FEFingerMovementType; + typedef SGCore::Nova::ENormalizationState FENormalizationStateType; + typedef SGCore::Nova::Nova2GloveSensorData::ESensorLocation FENova2SensorLocationType; + typedef SGCore::Nova::NovaGloveSensorData::ESensorLocation FENovaSensorLocationType; + typedef SGCore::EPositionalTrackingHardware FEPositionalTrackingHardwareType; + typedef SGCore::Haptics::ESenseGloveThumperCommand FESenseGloveThumperCommandType; + typedef SGCore::Kinematics::EThumbMovement FEThumbMovementType; + typedef SGCore::Nova::ENova2VibroMotor FENova2VibroMotorType; + typedef SGCore::Nova::ENovaVibroMotor FENovaVibroMotorType; + typedef SGCore::EWaveformType FEWaveformType; + +public: + static FEBackendType ToEBackendType(ESGBackendType Enum); + static ESGBackendType ToESGBackendType(FEBackendType Enum); + + static FEConnectionType ToEConnectionType(ESGConnectionType Enum); + static ESGConnectionType ToESGConnectionType(FEConnectionType Enum); + + static FEDeviceType ToEDeviceType(ESGDeviceType Enum); + static ESGDeviceType ToESGDeviceType(FEDeviceType Enum); + + static FEFingerType ToEFinger(ESGFinger Enum); + static ESGFinger ToESGFinger(FEFingerType Enum); + + static FEFingerMovementType ToEFingerMovement(ESGFingerMovement Enum); + static ESGFingerMovement ToESGFingerMovement(FEFingerMovementType Enum); + + static FEHapticChannelType ToEHapticChannelType(ESGHapticChannelType Enum); + static ESGHapticChannelType ToESGHapticChannelType(FEHapticChannelType Enum); + + static FEHapticGloveCalibrationStateType ToEHapticGloveCalibrationState(ESGHapticGloveCalibrationState Enum); + static ESGHapticGloveCalibrationState ToESGHapticGloveCalibrationState(FEHapticGloveCalibrationStateType Enum); + + static FEHapticLocationType ToEHapticLocation(ESGHapticLocation Enum); + static ESGHapticLocation ToESGHapticLocation(FEHapticLocationType Enum); + + static FENormalizationStateType ToENormalizationState(ESGNormalizationState Enum); + static ESGNormalizationState ToESGNormalizationState(FENormalizationStateType Enum); + + static FEPositionalTrackingHardwareType ToEPositionalTrackingHardware(ESGPositionalTrackingHardware Enum); + static ESGPositionalTrackingHardware ToESGPositionalTrackingHardware(FEPositionalTrackingHardwareType Enum); + + static FESenseGloveThumperCommandType ToESenseGloveThumperCommand(ESGSenseGloveThumperCommand Enum); + static ESGSenseGloveThumperCommand ToESGSenseGloveThumperCommand(FESenseGloveThumperCommandType Enum); + + static FENova2SensorLocationType ToESensorLocation(ESGNova2SensorLocation Enum); + static ESGNova2SensorLocation ToESGNova2SensorLocation(FENova2SensorLocationType Enum); + + static FENovaSensorLocationType ToESensorLocation(ESGNovaSensorLocation Enum); + static ESGNovaSensorLocation ToESGNovaSensorLocation(FENovaSensorLocationType Enum); + + static FEThumbMovementType ToEThumbMovement(ESGThumbMovement Enum); + static ESGThumbMovement ToESGThumbMovement(FEThumbMovementType Enum); + + static FENova2VibroMotorType ToENova2VibroMotor(ESGNova2VibroMotor Enum); + static ESGNova2VibroMotor ToESGNova2VibroMotor(FENova2VibroMotorType Enum); + + static FENovaVibroMotorType ToENovaVibroMotor(ESGNovaVibroMotor Enum); + static ESGNovaVibroMotor ToESGNovaVibroMotor(FENovaVibroMotorType Enum); + + static FEWaveformType ToEWaveformType(ESGWaveformType Enum); + static ESGWaveformType ToESGWaveformType(FEWaveformType Enum); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCustomWaveformImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCustomWaveformImpl.cpp new file mode 100644 index 0000000..e0f8e1a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGCustomWaveformImpl.cpp @@ -0,0 +1,276 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGCustomWaveformImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h" +#include "SGCoreImpl/SGCoreEnumCast.h" + +struct FSGCustomWaveformImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FCustomWaveformType CustomWaveform; + + /************************ + * Owner object + ************************/ + + FSGCustomWaveformImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGCustomWaveformImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FString FSGCustomWaveformImpl::ToString(const ESGWaveformType Type) +{ + const FString String{FCustomWaveformType::ToString(FSGCoreEnumCast::ToEWaveformType(Type)).c_str()}; + return String; +} + +FSGCustomWaveformImpl::FSGCustomWaveformImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGCustomWaveformImpl::FSGCustomWaveformImpl(const float Amplitude, const float Duration) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->CustomWaveform = FCustomWaveformType{Amplitude, Duration}; +} + +FSGCustomWaveformImpl::FSGCustomWaveformImpl(const float Amplitude, const float Duration, const float Frequency) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->CustomWaveform = FCustomWaveformType{Amplitude, Duration, Frequency}; +} + +FSGCustomWaveformImpl::FSGCustomWaveformImpl(const FCustomWaveformType& CustomWaveform) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->CustomWaveform = CustomWaveform; +} + +FSGCustomWaveformImpl::FSGCustomWaveformImpl(const FSGCustomWaveformImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGCustomWaveformImpl::FSGCustomWaveformImpl(FSGCustomWaveformImpl&& Rhs) SG_NOEXCEPT = default; + +FSGCustomWaveformImpl::~FSGCustomWaveformImpl() = default; + +FSGCustomWaveformImpl& FSGCustomWaveformImpl::operator=(const FSGCustomWaveformImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGCustomWaveformImpl& FSGCustomWaveformImpl::operator=(FSGCustomWaveformImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGCustomWaveformImpl::FCustomWaveformType& FSGCustomWaveformImpl::ToCustomWaveform() const +{ + return Pimpl->CustomWaveform; +} + +FSGCustomWaveformImpl::FCustomWaveformType& FSGCustomWaveformImpl::ToCustomWaveform() +{ + return Pimpl->CustomWaveform; +} + +float FSGCustomWaveformImpl::GetAmplitude() const +{ + return Pimpl->CustomWaveform.GetAmplitude(); +} + +void FSGCustomWaveformImpl::SetAmplitude(const float Amplitude) +{ + Pimpl->CustomWaveform.SetAmplitude(Amplitude); +} + +ESGWaveformType FSGCustomWaveformImpl::GetWaveType() const +{ + return FSGCoreEnumCast::ToESGWaveformType(Pimpl->CustomWaveform.GetWaveType()); +} + +void FSGCustomWaveformImpl::SetWaveType(const ESGWaveformType Type) +{ + Pimpl->CustomWaveform.SetWaveType(FSGCoreEnumCast::ToEWaveformType(Type)); +} + +bool FSGCustomWaveformImpl::IsInfinite() const +{ + return Pimpl->CustomWaveform.IsInfinite(); +} + +void FSGCustomWaveformImpl::SetInfinite(const bool bInfinite) +{ + return Pimpl->CustomWaveform.SetInfinite(bInfinite); +} + +int32 FSGCustomWaveformImpl::GetRepeatAmount() const +{ + return Pimpl->CustomWaveform.GetRepeatAmount(); +} + +void FSGCustomWaveformImpl::SetRepeatAmount(const int32 Amount) +{ + Pimpl->CustomWaveform.SetRepeatAmount(Amount); +} + +float FSGCustomWaveformImpl::GetAttackTime() const +{ + return Pimpl->CustomWaveform.GetAttackTime(); +} + +void FSGCustomWaveformImpl::SetAttackTime(const float Time) +{ + Pimpl->CustomWaveform.SetAttackTime(Time); +} + +float FSGCustomWaveformImpl::GetSustainTime() const +{ + return Pimpl->CustomWaveform.GetSustainTime(); +} + +void FSGCustomWaveformImpl::SetSustainTime(const float Time) +{ + Pimpl->CustomWaveform.SetSustainTime(Time); +} + +float FSGCustomWaveformImpl::GetDecayTime() const +{ + return Pimpl->CustomWaveform.GetDecayTime(); +} + +void FSGCustomWaveformImpl::SetDecayTime(const float Time) +{ + Pimpl->CustomWaveform.SetDecayTime(Time); +} + +float FSGCustomWaveformImpl::GetFrequencyStart() const +{ + return Pimpl->CustomWaveform.GetFrequencyStart(); +} + +void FSGCustomWaveformImpl::SetFrequencyStart(const float Frequency) +{ + Pimpl->CustomWaveform.SetFrequencyStart(Frequency); +} + +float FSGCustomWaveformImpl::GetFrequencyEnd() const +{ + return Pimpl->CustomWaveform.GetFrequencyEnd(); +} + +void FSGCustomWaveformImpl::SetFrequencyEnd(const float Frequency) +{ + Pimpl->CustomWaveform.SetFrequencyEnd(Frequency); +} + +float FSGCustomWaveformImpl::GetFrequencySwitchTime() const +{ + return Pimpl->CustomWaveform.GetFrequencySwitchTime(); +} + +void FSGCustomWaveformImpl::SetFrequencySwitchTime(const float Time) +{ + Pimpl->CustomWaveform.SetFrequencySwitchTime(Time); +} + +float FSGCustomWaveformImpl::GetFrequencySwitchFactor() const +{ + return Pimpl->CustomWaveform.GetFrequencySwitchFactor(); +} + +void FSGCustomWaveformImpl::SetFrequencySwitchFactor(const float Factor) +{ + Pimpl->CustomWaveform.SetFrequencySwitchFactor(Factor); +} + +float FSGCustomWaveformImpl::GetEffectTime() const +{ + return Pimpl->CustomWaveform.GetEffectTime(); +} + +float FSGCustomWaveformImpl::GetTotalEffectTime() const +{ + return Pimpl->CustomWaveform.GetTotalEffectTime(); +} + +bool FSGCustomWaveformImpl::FrequencyJumps() const +{ + return Pimpl->CustomWaveform.FrequencyJumps(); +} + +bool FSGCustomWaveformImpl::Equals(const FSGCustomWaveformImpl& CustomWaveformImpl) const +{ + return Pimpl->CustomWaveform.Equals(CustomWaveformImpl.ToCustomWaveform()); +} + +FString FSGCustomWaveformImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->CustomWaveform.ToString().c_str())}; + return String; +} + +FSGCustomWaveformImpl::FImpl::FImpl(FSGCustomWaveformImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGCustomWaveformImpl::FImpl::~FImpl() = default; + +void FSGCustomWaveformImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceImpl.cpp new file mode 100644 index 0000000..af008b9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceImpl.cpp @@ -0,0 +1,410 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceImpl.h" + +#include +#include + +#include "Containers/StringConv.h" +#include "Misc/AssertionMacros.h" + +#include "SGBuildHacks/SGInclude_Core_BetaDevice.h" +#include "SGBuildHacks/SGInclude_Core_SGDevice.h" +#include "SGBuildHacks/SGInclude_Core_HapticChannelInfo.h" +#include "SGBuildHacks/SGInclude_Core_HapticGlove.h" +#include "SGBuildHacks/SGInclude_Core_Nova2Glove.h" +#include "SGBuildHacks/SGInclude_Core_NovaGlove.h" +#include "SGBuildHacks/SGInclude_Core_SenseGlove.h" +#include "SGCoreImpl/SGBetaDeviceImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGHapticChannelInfoImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGNova2GloveImpl.h" +#include "SGCoreImpl/SGNovaGloveImpl.h" +#include "SGCoreImpl/SGSenseGloveImpl.h" +#include "Templates/Casts.h" + +struct FSGDeviceImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGDevicePtrType SGDevice; + + /************************ + * Owner object + ************************/ + + FSGDeviceImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGDeviceImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +void FSGDeviceImpl::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion) +{ + FSGDeviceType::ParseFirmware(TCHAR_TO_UTF8(*RawFirmware), OutMainVersion, OutSubVersion); +} + +bool FSGDeviceImpl::FirmwareNewerThan(const int32 MyFirmwareMain, const int32 MyFirmwareSub, + const int32 ReferenceMain, const int32 ReferenceSub, const bool bInclusive) +{ + return FSGDeviceType::FirmwareNewerThan(MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive); +} + +bool FSGDeviceImpl::FirmwareOlderThan(const int32 MyFirmwareMain, const int32 MyFirmwareSub, + const int32 ReferenceMain, const int32 ReferenceSub, const bool bInclusive) +{ + return FSGDeviceType::FirmwareOlderThan(MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive); +} + +FString FSGDeviceImpl::ToString(const ESGDeviceType DeviceType) +{ + const FString String{UTF8_TO_TCHAR(FSGDeviceType::ToString(FSGCoreEnumCast::ToEDeviceType(DeviceType)).c_str())}; + return String; +} + +FSGDeviceImpl::FSGDeviceImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGDeviceImpl::FSGDeviceImpl(const FSGDevicePtrType SGDevice) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + ensureAlwaysMsgf(SGDevice.get(), TEXT("Invalid SGDevice!")); + Pimpl->SGDevice = SGDevice; +} + +FSGDeviceImpl::FSGDeviceImpl(const FSGDeviceImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGDeviceImpl::FSGDeviceImpl(FSGDeviceImpl&& Rhs) SG_NOEXCEPT = default; + +FSGDeviceImpl::~FSGDeviceImpl() = default; + +FSGDeviceImpl& FSGDeviceImpl::operator=(const FSGDeviceImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGDeviceImpl& FSGDeviceImpl::operator=(FSGDeviceImpl&& Rhs) SG_NOEXCEPT = default; + +FSGDeviceImpl::FSGDevicePtrType FSGDeviceImpl::ToSGDevicePtr() const +{ + return Pimpl->SGDevice; +} + +FSGDeviceImpl::FSGDevicePtrType FSGDeviceImpl::ToSGDevicePtrChecked() const +{ + ensureAlwaysMsgf(Pimpl->SGDevice.get(), TEXT("Invalid Pimpl->SGDevice!")); + return Pimpl->SGDevice; +} + +TSharedRef FSGDeviceImpl::ToSGDeviceImplRef() +{ + return SharedThis(this); +} + +TSharedRef FSGDeviceImpl::ToBetaDeviceImplRef() +{ + FSGBetaDeviceImpl* BetaDevice{static_cast(this)}; + ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!")); + return SharedThis(BetaDevice); +} + +TSharedRef FSGDeviceImpl::ToHapticGloveImplRef() +{ + FSGHapticGloveImpl* HapticGlove{static_cast(this)}; + ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!")); + return SharedThis(HapticGlove); +} + +TSharedRef FSGDeviceImpl::ToNova2GloveImplRef() +{ + FSGNova2GloveImpl* Nova2Glove{static_cast(this)}; + ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!")); + return SharedThis(Nova2Glove); +} + +TSharedRef FSGDeviceImpl::ToNovaGloveImplRef() +{ + FSGNovaGloveImpl* NovaGlove{static_cast(this)}; + ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!")); + return SharedThis(NovaGlove); +} + +TSharedRef FSGDeviceImpl::ToSenseGloveImplRef() +{ + FSGSenseGloveImpl* SenseGlove{static_cast(this)}; + ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!")); + return SharedThis(SenseGlove); +} + +bool FSGDeviceImpl::IsABetaDevice() const +{ + const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + return BetaDevice != nullptr; +} + +bool FSGDeviceImpl::IsAHapticGlove() const +{ + const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + return HapticGlove != nullptr; +} + +bool FSGDeviceImpl::IsANova2Glove() const +{ + const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + return Nova2Glove != nullptr; +} + +bool FSGDeviceImpl::IsANovaGlove() const +{ + const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + return NovaGlove != nullptr; +} + +bool FSGDeviceImpl::IsASenseGlove() const +{ + const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + return SenseGlove != nullptr; +} + +TSharedPtr FSGDeviceImpl::AsBetaDevice() const +{ + const FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!")); + return MakeShared(BetaDevice); +} + +TSharedPtr FSGDeviceImpl::AsHapticGlove() const +{ + const FSGHapticGloveImpl::FHapticGlovePtrType HapticGlove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + ensureAlwaysMsgf(HapticGlove, TEXT("Invalid HapticGlove!")); + return MakeShared(HapticGlove); +} + +TSharedPtr FSGDeviceImpl::AsNova2Glove() const +{ + const FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove!")); + return MakeShared(Nova2Glove); +} + +TSharedPtr FSGDeviceImpl::AsNovaGlove() const +{ + const FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove!")); + return MakeShared(NovaGlove); +} + +TSharedPtr FSGDeviceImpl::AsSenseGlove() const +{ + const FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{ + std::static_pointer_cast(ToSGDevicePtr()) + }; + ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove!")); + return MakeShared(SenseGlove); +} + +ESGDeviceType FSGDeviceImpl::GetDeviceType() const +{ + return FSGCoreEnumCast::ToESGDeviceType(ToSGDevicePtrChecked()->GetDeviceType()); +} + +FString FSGDeviceImpl::GetDeviceId() const +{ + const FString Id{UTF8_TO_TCHAR(ToSGDevicePtrChecked()->GetDeviceId().c_str())}; + return Id; +} + +FString FSGDeviceImpl::GetHardwareVersion() const +{ + const FString Version{UTF8_TO_TCHAR(ToSGDevicePtrChecked()->GetHardwareVersion().c_str())}; + return Version; +} + +int32 FSGDeviceImpl::GetFirmwareVersion() const +{ + return ToSGDevicePtrChecked()->GetFirmwareVersion(); +} + +int32 FSGDeviceImpl::GetSubFirmwareVersion() const +{ + return ToSGDevicePtrChecked()->GetSubFirmwareVersion(); +} + +FString FSGDeviceImpl::GetFirmwareString() const +{ + const FString String{UTF8_TO_TCHAR(ToSGDevicePtrChecked()->GetFirmwareString().c_str())}; + return String; +} + +bool FSGDeviceImpl::FirmwareNewerThan(const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + return ToSGDevicePtrChecked()->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool FSGDeviceImpl::FirmwareOlderThan(const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + return ToSGDevicePtrChecked()->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive); +} + +FString FSGDeviceImpl::GetAddress() const +{ + const FString String(UTF8_TO_TCHAR(ToSGDevicePtrChecked()->GetAddress().c_str())); + return String; +} + +bool FSGDeviceImpl::IsConnected() const +{ + return ToSGDevicePtrChecked()->IsConnected(); +} + +ESGConnectionType FSGDeviceImpl::GetConnectionType() const +{ + return FSGCoreEnumCast::ToESGConnectionType(ToSGDevicePtrChecked()->GetConnectionType()); +} + +int32 FSGDeviceImpl::PacketsPerSecondReceived() const +{ + return ToSGDevicePtrChecked()->PacketsPerSecondReceived(); +} + +int32 FSGDeviceImpl::PacketsPerSecondSent() const +{ + return ToSGDevicePtrChecked()->PacketsPerSecondSent(); +} + +int32 FSGDeviceImpl::GetDeviceIndex() const +{ + return ToSGDevicePtrChecked()->GetDeviceIndex(); +} + +void FSGDeviceImpl::SetDeviceIndex(const int32 NewIndex) +{ + ToSGDevicePtrChecked()->SetDeviceIndex(NewIndex); +} + +bool FSGDeviceImpl::IsWireless() const +{ + return ToSGDevicePtrChecked()->IsWireless(); +} + +bool FSGDeviceImpl::HasBattery() const +{ + return ToSGDevicePtrChecked()->HasBattery(); +} + +bool FSGDeviceImpl::IsCharging() +{ + return ToSGDevicePtrChecked()->IsCharging(); +} + +bool FSGDeviceImpl::GetBatteryLevel(float& OutLevel) +{ + return ToSGDevicePtrChecked()->GetBatteryLevel(OutLevel); +} + +void FSGDeviceImpl::SetHapticChannels(const FSGHapticChannelInfoImpl& Channels) +{ + ToSGDevicePtrChecked()->SetHapticChannels(Channels.ToHapticChannelInfo()); +} + +int32 FSGDeviceImpl::GetHapticChannelCount() const +{ + return ToSGDevicePtrChecked()->GetHapticChannelCount(); +} + +int32 FSGDeviceImpl::GetHapticChannelCount(const ESGHapticChannelType ChannelType) const +{ + return ToSGDevicePtrChecked()->GetHapticChannelCount(FSGCoreEnumCast::ToEHapticChannelType(ChannelType)); +} + +FString FSGDeviceImpl::ToString() const +{ + const FString String(UTF8_TO_TCHAR(ToSGDevicePtrChecked()->ToString().c_str())); + return String; +} + +FSGDeviceImpl::FImpl::FImpl(FSGDeviceImpl* InOwner) + : SGDevice(std::make_shared()), + Owner(InOwner) +{ +} + +FSGDeviceImpl::FImpl::~FImpl() = default; + +void FSGDeviceImpl::FImplDeleter::operator()(const FSGDeviceImpl::FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceListImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceListImpl.cpp new file mode 100644 index 0000000..62cb742 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceListImpl.cpp @@ -0,0 +1,210 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceListImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_BetaDevice.h" +#include "SGBuildHacks/SGInclude_Core_DeviceList.h" +#include "SGBuildHacks/SGInclude_Core_NovaGlove.h" +#include "SGBuildHacks/SGInclude_Core_SenseGlove.h" +#include "SGBuildHacks/SGInclude_Core_SGDevice.h" +#include "SGCoreImpl/SGBetaDeviceImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGNova2GloveImpl.h" +#include "SGCoreImpl/SGNovaGloveImpl.h" +#include "SGCoreImpl/SGSenseGloveImpl.h" +#include "SGLog/SGLog.h" + +int32 FSGDeviceListImpl::ActiveDevices() +{ + return FDeviceListType::ActiveDevices(); +} + +bool FSGDeviceListImpl::SenseComRunning() +{ + return FDeviceListType::SenseComRunning(); +} + +void FSGDeviceListImpl::Dispose() +{ + FDeviceListType::Dispose(); +} + +void FSGDeviceListImpl::Reinitialize() +{ + FDeviceListType::Reinitialize(); +} + +TArray> FSGDeviceListImpl::GetDevices() +{ + const FSGDeviceImpl::FSGDevicePtrVectorType Devices = FDeviceListType::GetDevices(); + TArray> DeviceImpls; + + for (const FSGDeviceImpl::FSGDevicePtrType& Device: Devices) + { + switch (FSGCoreEnumCast::ToESGDeviceType(Device->GetDeviceType())) + { + case ESGDeviceType::BetaDevice: + { + FSGBetaDeviceImpl::FBetaDevicePtrType BetaDevice = + std::static_pointer_cast(Device); + if (ensureAlwaysMsgf(BetaDevice, TEXT("Invalid BetaDevice!"))) + { + TSharedRef BetaDeviceImpl{ + MakeShared(BetaDevice) + }; + DeviceImpls.Push(MoveTemp(BetaDeviceImpl)); + } + } + break; + + case ESGDeviceType::Nova2: + { + FSGNova2GloveImpl::FNova2GlovePtrType Nova2Glove = + std::static_pointer_cast(Device); + if (ensureAlwaysMsgf(Nova2Glove, TEXT("Invalid Nova2Glove device!"))) + { + TSharedRef Nova2GloveImpl{MakeShared(Nova2Glove)}; + DeviceImpls.Push(MoveTemp(Nova2GloveImpl)); + } + } + break; + + case ESGDeviceType::Nova: + { + FSGNovaGloveImpl::FNovaGlovePtrType NovaGlove = + std::static_pointer_cast(Device); + if (ensureAlwaysMsgf(NovaGlove, TEXT("Invalid NovaGlove device!"))) + { + TSharedRef NovaGloveImpl{MakeShared(NovaGlove)}; + DeviceImpls.Push(MoveTemp(NovaGloveImpl)); + } + } + break; + + case ESGDeviceType::SenseGlove: + { + FSGSenseGloveImpl::FSenseGlovePtrType SenseGlove{ + std::static_pointer_cast(Device)}; + if (ensureAlwaysMsgf(SenseGlove, TEXT("Invalid SenseGlove device!"))) + { + TSharedRef SenseGloveImpl{ + MakeShared(SenseGlove) + }; + DeviceImpls.Push(MoveTemp(SenseGloveImpl)); + } + } + break; + + default: + SGLOG_WARNING( + FString::Printf(TEXT("Unknown SenseGlove device '%s'!"), *UEnum::GetValueAsString(FSGCoreEnumCast::ToESGDeviceType(Device->GetDeviceType()))), + FString::Printf(TEXT("Device ID: '%s'!"), UTF8_TO_TCHAR(Device->GetDeviceId().c_str())), + FString::Printf(TEXT("Hardware Version: '%s'!"), UTF8_TO_TCHAR(Device->GetHardwareVersion().c_str())), + FString::Printf(TEXT("Firmware Version: '%d'!"), Device->GetFirmwareVersion()), + FString::Printf(TEXT("Sub Firmware Version: '%d'!"), Device->GetSubFirmwareVersion()), + FString::Printf(TEXT("Firmware String: '%s'!"), UTF8_TO_TCHAR(Device->GetFirmwareString().c_str())) + ); + + break;; + } + } + + return DeviceImpls; +} + +bool FSGDeviceListImpl::GetSensorDataString(const int32 IpcIndex, const FString& IpcAddress, FString& OutString) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + std::string OutSensorData; + const bool bReturn = FDeviceListType::GetSensorDataString(IpcIndex, MoveTemp(IpcAddressString), OutSensorData); + OutString = UTF8_TO_TCHAR(OutSensorData.c_str()); + return bReturn; +} + +bool FSGDeviceListImpl::SendHaptics( + const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + std::string CommandsString(TCHAR_TO_UTF8(*Commands)); + return FDeviceListType::SendHaptics(IpcIndex, MoveTemp(IpcAddressString), ChannelIndex, MoveTemp(CommandsString)); +} + +FString FSGDeviceListImpl::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress, const int32 Index) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + const FString String( + UTF8_TO_TCHAR(FDeviceListType::GetDeviceStringAt(IpcIndex, MoveTemp(IpcAddressString), Index).c_str())); + return String; +} + +FString FSGDeviceListImpl::GetAddress(const int32 IpcIndex, const FString& IpcAddress) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + const FString Address(UTF8_TO_TCHAR(FDeviceListType::GetAddress(IpcIndex, MoveTemp(IpcAddressString)).c_str())); + return Address; +} + +ESGConnectionType FSGDeviceListImpl::GetConnectionType(const int32 IpcIndex, const FString& IpcAddress) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + const ESGConnectionType Type( + FSGCoreEnumCast::ToESGConnectionType( + FDeviceListType::GetConnectionType(IpcIndex, MoveTemp(IpcAddressString)))); + return Type; +} + +bool FSGDeviceListImpl::IsConnected(const int32 IpcIndex, const FString& IpcAddress) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + return FDeviceListType::IsConnected(IpcIndex, MoveTemp(IpcAddressString)); +} + +int32 FSGDeviceListImpl::PacketsPerSecondReceived(const int32 IpcIndex, const FString& IpcAddress) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + return FDeviceListType::PacketsPerSecondReceived(IpcIndex, MoveTemp(IpcAddressString)); +} + +int32 FSGDeviceListImpl::PacketsPerSecondSent(const int32 IpcIndex, const FString& IpcAddress) +{ + std::string IpcAddressString(TCHAR_TO_UTF8(*IpcAddress)); + return FDeviceListType::PacketsPerSecondSent(IpcIndex, MoveTemp(IpcAddressString)); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceModelImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceModelImpl.cpp new file mode 100644 index 0000000..d63dddb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGDeviceModelImpl.cpp @@ -0,0 +1,186 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceModelImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_DeviceModel.h" + +struct FSGDeviceModelImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FDeviceModelType DeviceModel; + + /************************ + * Owner object + ************************/ + + FSGDeviceModelImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGDeviceModelImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TArray FSGDeviceModelImpl::ParseFunctions(int32 Value, int32 Size) +{ + /// NOTE + /// std::vector is a non conforming container. Since it packs bools to be stored in one bit, + /// it cannot provide a bool reference. Thus FSGArrayUtils::FromStdVector() cannot be used. + + static TArray ParsedFunctionsArray; + + std::vector ParsedFunctionsVector{FDeviceModelType::ParseFunctions(Value, Size)}; + for (const bool bValue: ParsedFunctionsVector) + { + ParsedFunctionsArray.Add(bValue); + } + + return ParsedFunctionsArray; +} + +void FSGDeviceModelImpl::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion) +{ + std::string RawFirmwareString(TCHAR_TO_UTF8(*RawFirmware)); + FDeviceModelType::ParseFirmware(MoveTemp(RawFirmwareString), OutMainVersion, OutSubVersion); +} + +FSGDeviceModelImpl::FSGDeviceModelImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGDeviceModelImpl::FSGDeviceModelImpl( + const FString& Id, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::string IdString(TCHAR_TO_UTF8(*Id)); + std::string HardwareVersionString(TCHAR_TO_UTF8(*HardwareVersion)); + Pimpl->DeviceModel = FDeviceModelType(MoveTemp(IdString), MoveTemp(HardwareVersionString), + FirmwareVersion, SubFirmwareVersion); +} + +FSGDeviceModelImpl::FSGDeviceModelImpl(const FDeviceModelType& DeviceModel) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->DeviceModel = DeviceModel; +} + +FSGDeviceModelImpl::FSGDeviceModelImpl(const FSGDeviceModelImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGDeviceModelImpl::FSGDeviceModelImpl(FSGDeviceModelImpl&& Rhs) SG_NOEXCEPT = default; + +FSGDeviceModelImpl::~FSGDeviceModelImpl() = default; + +FSGDeviceModelImpl& FSGDeviceModelImpl::operator=(const FSGDeviceModelImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGDeviceModelImpl& FSGDeviceModelImpl::operator=(FSGDeviceModelImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGDeviceModelImpl::FDeviceModelType& FSGDeviceModelImpl::ToDeviceModel() const +{ + return Pimpl->DeviceModel; +} + +FString FSGDeviceModelImpl::GetDeviceId() const +{ + const FString DeviceId(UTF8_TO_TCHAR(Pimpl->DeviceModel.GetDeviceId().c_str())); + return DeviceId; +} + +FString FSGDeviceModelImpl::GetHardwareVersion() const +{ + const FString HardwareVersion(UTF8_TO_TCHAR(Pimpl->DeviceModel.GetHardwareVersion().c_str())); + return HardwareVersion; +} + +int32 FSGDeviceModelImpl::GetFirmwareVersion() const +{ + return Pimpl->DeviceModel.GetFirmwareVersion(); +} + +int32 FSGDeviceModelImpl::GetSubFirmwareVersion() const +{ + return Pimpl->DeviceModel.GetSubFirmwareVersion(); +} + +bool FSGDeviceModelImpl::FirmwareNewerThan( + const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + return Pimpl->DeviceModel.FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool FSGDeviceModelImpl::FirmwareOlderThan( + const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + return Pimpl->DeviceModel.FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive); +} + +FSGDeviceModelImpl::FImpl::FImpl(FSGDeviceModelImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGDeviceModelImpl::FImpl::~FImpl() = default; + +void FSGDeviceModelImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp new file mode 100644 index 0000000..ffee3bd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGExportedFunctions.cpp @@ -0,0 +1,6246 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGExportedFunctions.h" + +#if PLATFORM_ANDROID +#include "Android/AndroidApplication.h" +#include "Android/AndroidJava.h" +#endif /* PLATFORM_ANDROID */ + +#include "Templates/UnrealTemplate.h" + +#if PLATFORM_ANDROID +#include "SGBuildHacks/SGInclude_Core_Android.h" +#endif /* PLATFORM_ANDROID */ + +#include "SGCoreImpl/SGAnatomyImpl.h" +#include "SGCoreImpl/SGDeviceListImpl.h" +#include "SGCoreImpl/SGHandLayerImpl.h" +#include "SGCoreImpl/SGJointKinematicsImpl.h" +#include "SGCoreImpl/SGLibraryImpl.h" +#include "SGCoreImpl/SGSenseComImpl.h" +#include "SGCoreImpl/SGSenseGloveVarsImpl.h" +#include "SGCoreImpl/SGTrackingImpl.h" +#include "SGInterop/SGIC_ESGBackendType.h" +#include "SGInterop/SGIC_ESGConnectionType.h" +#include "SGInterop/SGIC_ESGDeviceType.h" +#include "SGInterop/SGIC_ESGFinger.h" +#include "SGInterop/SGIC_ESGFingerMovement.h" +#include "SGInterop/SGIC_ESGFingerSolver.h" +#include "SGInterop/SGIC_ESGHapticChannelType.h" +#include "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" +#include "SGInterop/SGIC_ESGHapticLocation.h" +#include "SGInterop/SGIC_ESGListFormat.h" +#include "SGInterop/SGIC_ESGNormalizationState.h" +#include "SGInterop/SGIC_ESGNova2SensorLocation.h" +#include "SGInterop/SGIC_ESGNova2VibroMotor.h" +#include "SGInterop/SGIC_ESGNovaCVar.h" +#include "SGInterop/SGIC_ESGNovaData.h" +#include "SGInterop/SGIC_ESGNovaSensorLocation.h" +#include "SGInterop/SGIC_ESGNovaVibroMotor.h" +#include "SGInterop/SGIC_ESGPositionalTrackingHardware.h" +#include "SGInterop/SGIC_ESGSenseGloveCVar.h" +#include "SGInterop/SGIC_ESGSenseGloveSVar.h" +#include "SGInterop/SGIC_ESGSenseGloveThumperCommand.h" +#include "SGInterop/SGIC_ESGSensorFormat.h" +#include "SGInterop/SGIC_ESGThumbMovement.h" +#include "SGInterop/SGIC_ESGThumbSolver.h" +#include "SGInterop/SGIC_ESGWaveformType.h" +#include "SGInterop/SGIC_FQuat.h" +#include "SGInterop/SGIC_FSGBasicHandModelImpl.h" +#include "SGInterop/SGIC_FSGBetaDeviceImpl.h" +#include "SGInterop/SGIC_FSGCustomWaveformImpl.h" +#include "SGInterop/SGIC_FSGDeviceImpl.h" +#include "SGInterop/SGIC_FSGDeviceModelImpl.h" +#include "SGInterop/SGIC_FSGHandInterpolatorImpl.h" +#include "SGInterop/SGIC_FSGHandPoseImpl.h" +#include "SGInterop/SGIC_FSGHapticChannelInfoImpl.h" +#include "SGInterop/SGIC_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_FSGInterpolationSetImpl.h" +#include "SGInterop/SGIC_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" +#include "SGInterop/SGIC_FSGSenseGlovePoseImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h" +#include "SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h" +#include "SGInterop/SGIC_FSGSensorNormalizationImpl.h" +#include "SGInterop/SGIC_FSGThresholdCommandImpl.h" +#include "SGInterop/SGIC_FString.h" +#include "SGInterop/SGIC_FVector.h" + +#if PLATFORM_ANDROID +#include "SGInterop/SGIC_jclass.h" +#include "SGInterop/SGIC_jmethodID.h" +#include "SGInterop/SGIC_JNIEnv_Ptr.h" +#endif /* PLATFORM_ANDROID */ + +#include "SGInterop/SGIC_TArray_bool.h" +#include "SGInterop/SGIC_TArray_float.h" +#include "SGInterop/SGIC_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_TArray_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_TArray_FSGSenseGloveImpl.h" +#include "SGInterop/SGIC_TArray_FString.h" +#include "SGInterop/SGIC_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_int32.h" +#include "SGInterop/SGIC_TArray_TArray_float.h" +#include "SGInterop/SGIC_TArray_TArray_FQuat.h" +#include "SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h" +#include "SGInterop/SGIC_TArray_TArray_FVector.h" +#include "SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.h" +#include "SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h" +#include "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h" + +/******************************************************************************* + * Exceptional function calls + ******************************************************************************/ + +#if PLATFORM_ANDROID +int32 SGCoreImpl_Android_Initialize( + void* InEnv, + void* InClass, + void* InActiveDevicesMethodID, + void* InGetDeviceStringMethodID, + void* InGetSensorStringMethodID, + void* InWriteHapticsMethodID, + void* StoragePath) +{ + return SGCore::Android::Initialize( + StaticCast(InEnv)->Ptr, + StaticCast(InClass)->Class, + StaticCast(InActiveDevicesMethodID)->MethodID, + StaticCast(InGetDeviceStringMethodID)->MethodID, + StaticCast(InGetSensorStringMethodID)->MethodID, + StaticCast(InWriteHapticsMethodID)->MethodID, + std::string{TCHAR_TO_UTF8(*StaticCast(StoragePath)->String)}); +} +#endif /* PLATFORM_ANDROID */ + +/******************************************************************************* + * SGAnatomyImpl.h + ******************************************************************************/ + +float SGCoreImpl_FSGAnatomyImpl_GetTotalFingerFlexion() +{ + return FSGAnatomyImpl::GetTotalFingerFlexion(); +} + +float SGCoreImpl_FSGAnatomyImpl_GetTotalFingerExtension() +{ + return FSGAnatomyImpl::GetTotalFingerExtension(); +} + +float SGCoreImpl_FSGAnatomyImpl_GetTotalThumbFlexion() +{ + return FSGAnatomyImpl::GetTotalThumbFlexion(); +} + +float SGCoreImpl_FSGAnatomyImpl_GetTotalThumbExtension() +{ + return FSGAnatomyImpl::GetTotalThumbExtension(); +} + +float SGCoreImpl_FSGAnatomyImpl_GetFingerJointLimit( + const bool bRightHanded, + const int32 Joint, + const int32 Movement, + const bool bMax) +{ + return FSGAnatomyImpl::GetFingerJointLimit(bRightHanded, Joint, Movement, bMax); +} + +float SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit( + const bool bRightHanded, + const int32 Joint, + const int32 Movement, + const bool bMax) +{ + return FSGAnatomyImpl::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax); +} + +float SGCoreImpl_FSGAnatomyImpl_ClampJointAngle( + const float Value, + const int32 Finger, + const bool bRightHand, + const int32 Joint, + const int32 Movement) +{ + return FSGAnatomyImpl::ClampJointAngle(Value, Finger, bRightHand, Joint, Movement); +} + +float SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion( + const float FlexionInDegrees) +{ + return FSGAnatomyImpl::NormalizeFingerFlexion(FlexionInDegrees); +} + +float SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlexion( + const float FlexionInDegrees) +{ + return FSGAnatomyImpl::NormalizeThumbFlexion(FlexionInDegrees); +} + +void SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles( + void* OutAngles, + const bool bRightHanded) +{ + StaticCast(OutAngles)->Array = FSGAnatomyImpl::GetDefaultHandAngles( + bRightHanded); +} + +void SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles( + void* OutAngles, + const bool bRightHanded) +{ + StaticCast(OutAngles)->Array = FSGAnatomyImpl::GetFlatHandAngles( + bRightHanded); +} + +void SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles( + void* OutAngles, + const bool bRightHanded) +{ + StaticCast(OutAngles)->Array = FSGAnatomyImpl::GetThumbsUpHandAngles( + bRightHanded); +} + +void SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles( + void* OutAngles, + const bool bRightHanded) +{ + StaticCast(OutAngles)->Array = FSGAnatomyImpl::GetFistHandAngles( + bRightHanded); +} + +/******************************************************************************* + * SGBasicHandModelImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGBasicHandModelImpl_Default( + void* OutBasicHandModelImpl, + const bool bRightHanded) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = + FSGBasicHandModelImpl::Default(bRightHanded); +} + +void SGCoreImpl_FSGBasicHandModelImpl_Deserialize( + void* OutBasicHandModelImpl, + void* SerializedString) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = + FSGBasicHandModelImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetBaseFingerLengths( + void* OutLengths) +{ + StaticCast(OutLengths)->Array = FSGBasicHandModelImpl::GetBaseFingerLengths(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions( + void* OutPositions) +{ + StaticCast(OutPositions)->Array = FSGBasicHandModelImpl::GetBaseJointPositions(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles( + void* OutRotations) +{ + StaticCast(OutRotations)->Array = FSGBasicHandModelImpl::GetBaseJointAngles(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ctor( + void* OutBasicHandModelImpl) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = FSGBasicHandModelImpl(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition( + void* OutBasicHandModelImpl, + const bool bRightHanded, + void* Lengths, + void* StartPositions) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = + FSGBasicHandModelImpl( + bRightHanded, + StaticCast(Lengths)->Array, + StaticCast(StartPositions)->Array); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + void* OutBasicHandModelImpl, + const bool bRightHanded, + void* Lengths, + void* StartPositions, + void* StartRotations) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = + FSGBasicHandModelImpl( + bRightHanded, + StaticCast(Lengths)->Array, + StaticCast(StartPositions)->Array, + StaticCast(StartRotations)->Array); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ctor_copy( + void* OutBasicHandModelImpl, + void* Rhs) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = + FSGBasicHandModelImpl(StaticCast(Rhs)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ctor_copy_assignment( + void* OutBasicHandModelImpl, + void* Rhs) +{ + StaticCast(OutBasicHandModelImpl)->BasicHandModelImpl = + StaticCast(Rhs)->BasicHandModelImpl; +} + +bool SGCoreImpl_FSGBasicHandModelImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->BasicHandModelImpl.IsRight(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths( + void* Instance, + void* OutLengths) +{ + StaticCast(OutLengths)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetFingerLengths(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths_Finger( + void* Instance, + void* OutLengths, + void* Finger) +{ + StaticCast(OutLengths)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetFingerLengths( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_SetFingerLengths_ESGFinger( + void* Instance, + void* Finger, + void* Lengths) +{ + StaticCast(Instance)->BasicHandModelImpl.SetFingerLengths( + StaticCast(Finger)->Finger, + StaticCast(Lengths)->Array); +} + +void SGCoreImpl_FSGBasicHandModelImpl_SetFingerLengths_uint8Finger( + void* Instance, + const uint8 Finger, + void* Lengths) +{ + StaticCast(Instance)->BasicHandModelImpl.SetFingerLengths( + Finger, + StaticCast(Lengths)->Array); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios( + void* Instance, + void* OutRatios) +{ + StaticCast(OutRatios)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetFingerRatios(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios_Finger( + void* Instance, + void* OutRatios, + void* Finger) +{ + StaticCast(OutRatios)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetFingerRatios( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetStartJointPositions( + void* Instance, + void* OutPositions) +{ + StaticCast(OutPositions)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetStartJointPositions(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_SetStartJointPosition_ESGFinger( + void* Instance, + void* Finger, + void* Position) +{ + StaticCast(Instance)->BasicHandModelImpl.SetStartJointPosition( + StaticCast(Finger)->Finger, + StaticCast(Position)->Vector); +} + +void SGCoreImpl_FSGBasicHandModelImpl_SetStartJointPosition_uin8Finger( + void* Instance, + const uint8 Finger, + void* Position) +{ + StaticCast(Instance)->BasicHandModelImpl.SetStartJointPosition( + Finger, + StaticCast(Position)->Vector); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations( + void* Instance, + void* OutRotations) +{ + StaticCast(OutRotations)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetStartJointRotations(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetJointPosition( + void* Instance, + void* OutPosition, + void* Finger) +{ + StaticCast(OutPosition)->Vector = + StaticCast(Instance)->BasicHandModelImpl.GetJointPosition( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_SetJointPosition( + void* Instance, + void* NewPosition, + void* Finger) +{ + StaticCast(Instance)->BasicHandModelImpl.SetJointPosition( + StaticCast(NewPosition)->Vector, + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation( + void* Instance, + void* OutRotation, + void* Finger) +{ + StaticCast(OutRotation)->Quat = + StaticCast(Instance)->BasicHandModelImpl.GetJointRotation( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_SetJointRotation( + void* Instance, + void* NewRotation, + void* Finger) +{ + StaticCast(Instance)->BasicHandModelImpl.SetJointRotation( + StaticCast(NewRotation)->Quat, + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_GetTotalLengths( + void* Instance, + void* OutLengths) +{ + StaticCast(OutLengths)->Array = + StaticCast(Instance)->BasicHandModelImpl.GetTotalLengths(); +} + +float SGCoreImpl_FSGBasicHandModelImpl_GetTotalLength( + void* Instance, + void* Finger) +{ + return StaticCast(Instance)->BasicHandModelImpl.GetTotalLength( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGBasicHandModelImpl_Get3DLengths( + void* Instance, + void* OutLengths, + void* Finger) +{ + StaticCast(OutLengths)->Array = + StaticCast(Instance)->BasicHandModelImpl.Get3DLengths( + StaticCast(Finger)->Finger); +} + +bool SGCoreImpl_FSGBasicHandModelImpl_Equals( + void* Instance, + void* BasicHandModelImpl) +{ + return StaticCast(Instance)->BasicHandModelImpl.Equals( + StaticCast(BasicHandModelImpl)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->BasicHandModelImpl.ToString(); +} + +void SGCoreImpl_FSGBasicHandModelImpl_ToString_bLengthsOnly( + void* Instance, + void* OutString, + const bool bLengthsOnly) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->BasicHandModelImpl.ToString(bLengthsOnly); +} + +void SGCoreImpl_FSGBasicHandModelImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->BasicHandModelImpl.Serialize(); +} + +/******************************************************************************* + * SGBetaDeviceImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGBetaDeviceImpl_Parse( + void* OutBetaDevice, + void* String) +{ + StaticCast(OutBetaDevice)->Ptr = + FSGBetaDeviceImpl::Parse(StaticCast(String)->String); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ctor( + void* OutBetaDeviceImpl) +{ + StaticCast(OutBetaDeviceImpl)->BetaDeviceImpl = FSGBetaDeviceImpl(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ctor_ConstantsString_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion( + void* OutBetaDeviceImpl, + void* ConstantsString, + void* DeviceId, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + StaticCast(OutBetaDeviceImpl)->BetaDeviceImpl = + FSGBetaDeviceImpl{ + StaticCast(ConstantsString)->String, + StaticCast(DeviceId)->String, + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion + }; +} + +void +SGCoreImpl_FSGBetaDeviceImpl_ctor_ConstantsString_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_MakeShared( + void* OutSharedPtr, + void* ConstantsString, + void* DeviceId, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared( + StaticCast(ConstantsString)->String, + StaticCast(DeviceId)->String, + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared( + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ctor_copy( + void* OutBetaDeviceImpl, + void* Rhs) +{ + StaticCast(OutBetaDeviceImpl)->BetaDeviceImpl = + FSGBetaDeviceImpl(StaticCast(Rhs)->BetaDeviceImpl); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(StaticCast(Rhs)->BetaDeviceImpl); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ctor_copy_assignment( + void* OutBetaDeviceImpl, + void* Rhs) +{ + StaticCast(OutBetaDeviceImpl)->BetaDeviceImpl = + StaticCast(Rhs)->BetaDeviceImpl; +} + +void SGCoreImpl_FSGBetaDeviceImpl_GetDeviceType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetDeviceType(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->Ptr->GetDeviceId(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->Ptr->GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGBetaDeviceImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGBetaDeviceImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetSubFirmwareVersion(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_GetConstantsString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->GetConstantsString(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_GetSensorData( + void* Instance, + void* OutData) +{ + StaticCast(OutData)->String = + StaticCast(Instance)->Ptr->GetSensorData(); +} + +void SGCoreImpl_FSGBetaDeviceImpl_GetLastCommand( + void* Instance, + void* OutCommand) +{ + StaticCast(OutCommand)->String = + StaticCast(Instance)->Ptr->GetLastCommand(); +} + +bool SGCoreImpl_FSGBetaDeviceImpl_SendHaptics( + void* Instance, + void* Command) +{ + return StaticCast(Instance)->Ptr->SendHaptics( + StaticCast(Command)->String); +} + +void SGCoreImpl_FSGBetaDeviceImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToString(); +} + +/******************************************************************************* + * SGCustomWaveformImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGCustomWaveformImpl_ToString_Type( + void* OutString, + void* Type) +{ + StaticCast(OutString)->String = FSGCustomWaveformImpl::ToString( + StaticCast(Type)->Type); +} + +void SGCoreImpl_FSGCustomWaveformImpl_ctor( + void* OutCustomWaveformImpl) +{ + StaticCast(OutCustomWaveformImpl)->CustomWaveformImpl = + FSGCustomWaveformImpl{}; +} + +void SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration( + void* OutCustomWaveformImpl, + const float Amplitude, + const float Duration) +{ + StaticCast(OutCustomWaveformImpl)->CustomWaveformImpl = + FSGCustomWaveformImpl{Amplitude, Duration}; +} + +void SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency( + void* OutCustomWaveformImpl, + const float Amplitude, + const float Duration, + const float Frequency) +{ + StaticCast(OutCustomWaveformImpl)->CustomWaveformImpl = + FSGCustomWaveformImpl{Amplitude, Duration, Frequency}; +} + +void SGCoreImpl_FSGCustomWaveformImpl_ctor_copy( + void* OutCustomWaveformImpl, + void* Rhs) +{ + StaticCast(OutCustomWaveformImpl)->CustomWaveformImpl = + FSGCustomWaveformImpl(StaticCast(Rhs)->CustomWaveformImpl); +} + +void SGCoreImpl_FSGCustomWaveformImpl_ctor_copy_assignment( + void* OutCustomWaveformImpl, + void* Rhs) +{ + StaticCast(OutCustomWaveformImpl)->CustomWaveformImpl = + StaticCast(Rhs)->CustomWaveformImpl; +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetAmplitude( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetAmplitude(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetAmplitude( + void* Instance, + const float Amplitude) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetAmplitude(Amplitude); +} + +void SGCoreImpl_FSGCustomWaveformImpl_GetWaveType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->CustomWaveformImpl.GetWaveType(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetWaveType( + void* Instance, + void* Type) +{ + StaticCast(Instance)->CustomWaveformImpl.SetWaveType( + StaticCast(Type)->Type); +} + +bool SGCoreImpl_FSGCustomWaveformImpl_IsInfinite( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.IsInfinite(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetInfinite( + void* Instance, + const bool bInfinite) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetInfinite(bInfinite); +} + +int32 SGCoreImpl_FSGCustomWaveformImpl_GetRepeatAmount( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetRepeatAmount(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetRepeatAmount( + void* Instance, + const int32 Amount) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetRepeatAmount(Amount); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetAttackTime( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetAttackTime(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetAttackTime( + void* Instance, + const float Time) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetAttackTime(Time); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetSustainTime( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetSustainTime(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetSustainTime( + void* Instance, + const float Time) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetSustainTime(Time); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetDecayTime( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetDecayTime(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetDecayTime( + void* Instance, + const float Time) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetDecayTime(Time); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyStart( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetFrequencyStart(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyStart( + void* Instance, + const float Frequency) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetFrequencyStart(Frequency); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyEnd( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetFrequencyEnd(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyEnd( + void* Instance, + const float Frequency) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetFrequencyEnd(Frequency); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchTime( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetFrequencySwitchTime(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchTime( + void* Instance, + const float Time) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetFrequencySwitchTime(Time); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchFactor( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetFrequencySwitchFactor(); +} + +void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchFactor( + void* Instance, + const float Factor) +{ + return StaticCast(Instance)->CustomWaveformImpl.SetFrequencySwitchFactor(Factor); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetEffectTime( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetEffectTime(); +} + +float SGCoreImpl_FSGCustomWaveformImpl_GetTotalEffectTime( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.GetTotalEffectTime(); +} + +bool SGCoreImpl_FSGCustomWaveformImpl_FrequencyJumps( + void* Instance) +{ + return StaticCast(Instance)->CustomWaveformImpl.FrequencyJumps(); +} + +bool SGCoreImpl_FSGCustomWaveformImpl_Equals( + void* Instance, + void* CustomWaveformImpl) +{ + return StaticCast(Instance)->CustomWaveformImpl.Equals( + StaticCast(CustomWaveformImpl)->CustomWaveformImpl); +} + +void SGCoreImpl_FSGCustomWaveformImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->CustomWaveformImpl.ToString(); +} + +/******************************************************************************* + * SGDeviceImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGDeviceImpl_ParseFirmware( + void* RawFirmware, int32* OutMainVersion, int32* OutSubVersion) +{ + FSGDeviceImpl::ParseFirmware( + StaticCast(RawFirmware)->String, + *OutMainVersion, + *OutSubVersion); +} + +bool SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive( + const int32 MyFirmwareMain, + const int32 MyFirmwareSub, + const int32 ReferenceMain, + const int32 ReferenceSub, + const bool bInclusive) +{ + return FSGDeviceImpl::FirmwareNewerThan( + MyFirmwareMain, + MyFirmwareSub, + ReferenceMain, + ReferenceSub, + bInclusive); +} + +bool SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive( + const int32 MyFirmwareMain, + const int32 MyFirmwareSub, + const int32 ReferenceMain, + const int32 ReferenceSub, + const bool bInclusive) +{ + return FSGDeviceImpl::FirmwareOlderThan( + MyFirmwareMain, + MyFirmwareSub, + ReferenceMain, + ReferenceSub, + bInclusive); +} + +void SGCoreImpl_FSGDeviceImpl_ToString_DeviceType( + void* DeviceType, + void* OutString) +{ + StaticCast(OutString)->String = + FSGDeviceImpl::ToString( + StaticCast(DeviceType)->Type); +} + +void SGCoreImpl_FSGDeviceImpl_ctor( + void* OutSGDeviceImpl) +{ + StaticCast(OutSGDeviceImpl)->SGDeviceImpl = FSGDeviceImpl(); +} + +void SGCoreImpl_FSGDeviceImpl_ctor_MakeShared( + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(); +} + +void SGCoreImpl_FSGDeviceImpl_ctor_copy( + void* OutSGDeviceImpl, + void* Rhs) +{ + StaticCast(OutSGDeviceImpl)->SGDeviceImpl = + FSGDeviceImpl(StaticCast(Rhs)->SGDeviceImpl); +} + +void SGCoreImpl_FSGDeviceImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(StaticCast(Rhs)->SGDeviceImpl); +} + +void SGCoreImpl_FSGDeviceImpl_ctor_copy_assignment( + void* OutSGDeviceImpl, + void* Rhs) +{ + StaticCast(OutSGDeviceImpl)->SGDeviceImpl = + StaticCast(Rhs)->SGDeviceImpl; +} + +void SGCoreImpl_FSGDeviceImpl_ToSGDeviceImplRef( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->ToSGDeviceImplRef(); +} + +void SGCoreImpl_FSGDeviceImpl_ToBetaDeviceImplRef( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->ToBetaDeviceImplRef(); +} + +void SGCoreImpl_FSGDeviceImpl_ToHapticGloveImplRef( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->ToHapticGloveImplRef(); +} + +void SGCoreImpl_FSGDeviceImpl_ToNova2GloveImplRef( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->ToNova2GloveImplRef(); +} + +void SGCoreImpl_FSGDeviceImpl_ToNovaGloveImplRef( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->ToNovaGloveImplRef(); +} + +void SGCoreImpl_FSGDeviceImpl_ToSenseGloveImplRef( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->ToSenseGloveImplRef(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsABetaDevice( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsABetaDevice(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsAHapticGlove( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsAHapticGlove(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsANova2Glove( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsANova2Glove(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsANovaGlove( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsANovaGlove(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsASenseGlove( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsASenseGlove(); +} + +void SGCoreImpl_FSGDeviceImpl_AsBetaDevice( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->AsBetaDevice(); +} + +void SGCoreImpl_FSGDeviceImpl_AsHapticGlove( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->AsHapticGlove(); +} + +void SGCoreImpl_FSGDeviceImpl_AsNova2Glove( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->AsNova2Glove(); +} + +void SGCoreImpl_FSGDeviceImpl_AsNovaGlove( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->AsNovaGlove(); +} + +void SGCoreImpl_FSGDeviceImpl_AsSenseGlove( + void* Instance, + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + StaticCast(Instance)->Ptr->AsSenseGlove(); +} + +void SGCoreImpl_FSGDeviceImpl_GetDeviceType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetDeviceType(); +} + +void SGCoreImpl_FSGDeviceImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->Ptr->GetDeviceId(); +} + +void SGCoreImpl_FSGDeviceImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->Ptr->GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGDeviceImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGDeviceImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetSubFirmwareVersion(); +} + +void SGCoreImpl_FSGDeviceImpl_GetFirmwareString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->GetFirmwareString(); +} + +bool SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_bInclusive( + void* Instance, + const int32 MyFirmwareMain, + const int32 MyFirmwareSub, + const bool bInclusive) +{ + return StaticCast(Instance)->Ptr->FirmwareNewerThan( + MyFirmwareMain, + MyFirmwareSub, + bInclusive); +} + +bool SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_bInclusive( + void* Instance, + const int32 MyFirmwareMain, + const int32 MyFirmwareSub, + const bool bInclusive) +{ + return StaticCast(Instance)->Ptr->FirmwareOlderThan( + MyFirmwareMain, + MyFirmwareSub, + bInclusive); +} + +void SGCoreImpl_FSGDeviceImpl_GetAddress( + void* Instance, + void* Address) +{ + StaticCast(Address)->String = + StaticCast(Instance)->Ptr->GetAddress(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsConnected( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsConnected(); +} + +void SGCoreImpl_FSGDeviceImpl_GetConnectionType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetConnectionType(); +} + +int32 SGCoreImpl_FSGDeviceImpl_PacketsPerSecondReceived( + void* Instance) +{ + return StaticCast(Instance)->Ptr->PacketsPerSecondReceived(); +} + +int32 SGCoreImpl_FSGDeviceImpl_PacketsPerSecondSent( + void* Instance) +{ + return StaticCast(Instance)->Ptr->PacketsPerSecondSent(); +} + +int32 SGCoreImpl_FSGDeviceImpl_GetDeviceIndex( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetDeviceIndex(); +} + +void SGCoreImpl_FSGDeviceImpl_SetDeviceIndex( + void* Instance, + const int32 NewIndex) +{ + return StaticCast(Instance)->Ptr->SetDeviceIndex(NewIndex); +} + +bool SGCoreImpl_FSGDeviceImpl_IsWireless( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsWireless(); +} + +bool SGCoreImpl_FSGDeviceImpl_HasBattery( + void* Instance) +{ + return StaticCast(Instance)->Ptr->HasBattery(); +} + +bool SGCoreImpl_FSGDeviceImpl_IsCharging( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsCharging(); +} + +bool SGCoreImpl_FSGDeviceImpl_GetBatteryLevel( + void* Instance, + float* OutLevel) +{ + return StaticCast(Instance)->Ptr->GetBatteryLevel( + *OutLevel); +} + +void SGCoreImpl_FSGDeviceImpl_SetHapticChannels( + void* Instance, + void* Channels) +{ + StaticCast(Instance)->Ptr->SetHapticChannels( + StaticCast(Channels)->HapticChannelInfoImpl); +} + +int32 SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetHapticChannelCount(); +} + +int32 SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount_ChannelType( + void* Instance, + void* ChannelType) +{ + return StaticCast(Instance)->Ptr->GetHapticChannelCount( + StaticCast(ChannelType)->Type); +} + +void SGCoreImpl_FSGDeviceImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToString(); +} + +/******************************************************************************* + * SGDeviceListImpl.h + ******************************************************************************/ + +int32 SGCoreImpl_FSGDeviceListImpl_ActiveDevices() +{ + return FSGDeviceListImpl::ActiveDevices(); +} + +bool SGCoreImpl_FSGDeviceListImpl_SenseComRunning() +{ + return FSGDeviceListImpl::SenseComRunning(); +} + +void SGCoreImpl_FSGDeviceListImpl_Dispose() +{ + FSGDeviceListImpl::Dispose(); +} + +void SGCoreImpl_FSGDeviceListImpl_Reinitialize() +{ + FSGDeviceListImpl::Reinitialize(); +} + +void SGCoreImpl_FSGDeviceListImpl_GetDevices( + void* OutDevices) +{ + StaticCast(OutDevices)->Array = + FSGDeviceListImpl::GetDevices(); +} + +bool SGCoreImpl_FSGDeviceListImpl_GetSensorDataString( + const int32 IpcIndex, + void* IpcAddress, + void* OutString) +{ + return FSGDeviceListImpl::GetSensorDataString( + IpcIndex, + StaticCast(IpcAddress)->String, + StaticCast(OutString)->String); +} + +bool SGCoreImpl_FSGDeviceListImpl_SendHaptics( + const int32 IpcIndex, + void* IpcAddress, + const int32 ChannelIndex, + void* Commands) +{ + return FSGDeviceListImpl::SendHaptics( + IpcIndex, + StaticCast(IpcAddress)->String, + ChannelIndex, + StaticCast(Commands)->String); +} + +void SGCoreImpl_FSGDeviceListImpl_GetDeviceStringAt( + void* OutString, + const int32 IpcIndex, + void* IpcAddress, + const int32 Index) +{ + StaticCast(OutString)->String = FSGDeviceListImpl::GetDeviceStringAt( + IpcIndex, + StaticCast(IpcAddress)->String, Index); +} + +void SGCoreImpl_FSGDeviceListImpl_GetAddress( + void* OutAddress, const int32 IpcIndex, + void* IpcAddress) +{ + StaticCast(OutAddress)->String = FSGDeviceListImpl::GetAddress( + IpcIndex, + StaticCast(IpcAddress)->String); +} + +void SGCoreImpl_FSGDeviceListImpl_GetConnectionType( + void* OutType, + const int32 IpcIndex, + void* IpcAddress) +{ + StaticCast(OutType)->Type = + FSGDeviceListImpl::GetConnectionType( + IpcIndex, + StaticCast(IpcAddress)->String); +} + +bool SGCoreImpl_FSGDeviceListImpl_IsConnected( + const int32 IpcIndex, + void* IpcAddress) +{ + return FSGDeviceListImpl::IsConnected(IpcIndex, StaticCast(IpcAddress)->String); +} + +int32 SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondReceived( + const int32 IpcIndex, + void* IpcAddress) +{ + return FSGDeviceListImpl::PacketsPerSecondReceived(IpcIndex, StaticCast(IpcAddress)->String); +} + +int32 SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondSent( + const int32 IpcIndex, + void* IpcAddress) +{ + return FSGDeviceListImpl::PacketsPerSecondSent(IpcIndex, StaticCast(IpcAddress)->String); +} + +/******************************************************************************* + * SGDeviceModelImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGDeviceModelImpl_ParseFunctions( + void* OutParseFunctions, + const int32 Value, + const int32 Size) +{ + StaticCast(OutParseFunctions)->Array = FSGDeviceModelImpl::ParseFunctions(Value, Size); +} + +void SGCoreImpl_FSGDeviceModelImpl_ParseFirmware( + void* RawFirmware, + int32* OutMainVersion, + int32* OutSubVersion) +{ + FSGDeviceModelImpl::ParseFirmware( + StaticCast(RawFirmware)->String, + *OutMainVersion, + *OutSubVersion); +} + +void SGCoreImpl_FSGDeviceModelImpl_ctor( + void* OutDeviceModelImpl) +{ + StaticCast(OutDeviceModelImpl)->DeviceModelImpl = FSGDeviceModelImpl(); +} + +void SGCoreImpl_FSGDeviceModelImpl_ctor_Id_HardwareVersion_FirmwareVersion_SubFirmwareVersion( + void* OutDeviceModelImpl, + void* Id, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + StaticCast(OutDeviceModelImpl)->DeviceModelImpl = + FSGDeviceModelImpl( + StaticCast(Id)->String, + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion); +} + +void SGCoreImpl_FSGDeviceModelImpl_ctor_copy( + void* OutDeviceModelImpl, + void* Rhs) +{ + StaticCast(OutDeviceModelImpl)->DeviceModelImpl = + FSGDeviceModelImpl(StaticCast(Rhs)->DeviceModelImpl); +} + +void SGCoreImpl_FSGDeviceModelImpl_ctor_copy_assignment( + void* OutDeviceModelImpl, + void* Rhs) +{ + StaticCast(OutDeviceModelImpl)->DeviceModelImpl = + StaticCast(Rhs)->DeviceModelImpl; +} + +void SGCoreImpl_FSGDeviceModelImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->DeviceModelImpl.GetDeviceId(); +} + +void SGCoreImpl_FSGDeviceModelImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->DeviceModelImpl.GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGDeviceModelImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->DeviceModelImpl.GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGDeviceModelImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->DeviceModelImpl.GetSubFirmwareVersion(); +} + +bool SGCoreImpl_FSGDeviceModelImpl_FirmwareNewerThan( + void* Instance, + const int32 FirmwareMain, + const int32 FirmwareSub, + const bool bInclusive) +{ + return StaticCast(Instance)->DeviceModelImpl.FirmwareNewerThan( + FirmwareMain, + FirmwareSub, + bInclusive); +} + +bool SGCoreImpl_FSGDeviceModelImpl_FirmwareOlderThan( + void* Instance, + const int32 FirmwareMain, + const int32 FirmwareSub, + const bool bInclusive) +{ + return StaticCast(Instance)->DeviceModelImpl.FirmwareOlderThan( + FirmwareMain, + FirmwareSub, + bInclusive); +} + +/******************************************************************************* + * SGHandInterpolatorImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGHandInterpolatorImpl_Deserialize( + void* OutHandInterpolatorImpl, + void* SerializedString, + const bool bRightHanded) +{ + StaticCast(OutHandInterpolatorImpl)->HandInterpolatorImpl = + FSGHandInterpolatorImpl::Deserialize( + StaticCast(SerializedString)->String, + bRightHanded); +} + +void SGCoreImpl_FSGHandInterpolatorImpl_ctor( + void* OutHandInterpolatorImpl) +{ + StaticCast(OutHandInterpolatorImpl)->HandInterpolatorImpl = + FSGHandInterpolatorImpl(); +} + +void SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded( + void* OutHandInterpolatorImpl, + const bool bRightHanded) +{ + StaticCast(OutHandInterpolatorImpl)->HandInterpolatorImpl = + FSGHandInterpolatorImpl(bRightHanded); +} + +void SGCoreImpl_FSGHandInterpolatorImpl_ctor_copy( + void* OutHandInterpolatorImpl, + void* Rhs) +{ + StaticCast(OutHandInterpolatorImpl)->HandInterpolatorImpl = + FSGHandInterpolatorImpl(StaticCast(Rhs)->HandInterpolatorImpl); +} + +void SGCoreImpl_FSGHandInterpolatorImpl_ctor_copy_assignment( + void* OutHandInterpolatorImpl, + void* Rhs) +{ + StaticCast(OutHandInterpolatorImpl)->HandInterpolatorImpl = + StaticCast(Rhs)->HandInterpolatorImpl; +} + +float SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGFingerMovement_Value_bApplyLimits( + void* Instance, + void* Movement, + const float Value, + const bool bApplyLimits) +{ + return StaticCast(Instance)->HandInterpolatorImpl.CalculateAngle( + StaticCast(Movement)->Movement, + Value, + bApplyLimits); +} + +float SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGThumbMovement_Value_bApplyLimits( + void* Instance, + void* Movement, + const float Value, + const bool bApplyLimits) +{ + return StaticCast(Instance)->HandInterpolatorImpl.CalculateAngle( + StaticCast(Movement)->Movement, + Value, + bApplyLimits); +} + +void SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles( + void* Instance, + void* OutAngles, + void* Flexions, + void* Abductions, + const float CmcTwist) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->HandInterpolatorImpl.InterpolateHandAngles( + StaticCast(Flexions)->Array, + StaticCast(Abductions)->Array, + CmcTwist); +} + +bool SGCoreImpl_FSGHandInterpolatorImpl_Equals( + void* Instance, + void* HandInterpolatorImpl) +{ + return StaticCast(Instance)->HandInterpolatorImpl.Equals( + StaticCast(HandInterpolatorImpl)->HandInterpolatorImpl); +} + +void SGCoreImpl_FSGHandInterpolatorImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->HandInterpolatorImpl.Serialize(); +} + +/******************************************************************************* + * SGHandLayerImpl.h + ******************************************************************************/ + +bool SGCoreImpl_FSGHandLayerImpl_DeviceConnected( + const bool bRightHanded) +{ + return FSGHandLayerImpl::DeviceConnected( + bRightHanded); +} + +void SGCoreImpl_FSGHandLayerImpl_GetDeviceType( + void* OutDeviceType, + const bool bRightHanded) +{ + StaticCast(OutDeviceType)->Type = + FSGHandLayerImpl::GetDeviceType( + bRightHanded); +} + +bool SGCoreImpl_FSGHandLayerImpl_GetFirstGloveHandedness() +{ + return FSGHandLayerImpl::GetFirstGloveHandedness(); +} + +int32 SGCoreImpl_FSGHandLayerImpl_GlovesConnected() +{ + return FSGHandLayerImpl::GlovesConnected(); +} + +bool SGCoreImpl_FSGHandLayerImpl_GetGloveInstance( + const bool bRightHanded, + void* OutGlove) +{ + return FSGHandLayerImpl::GetGloveInstance( + bRightHanded, + StaticCast(OutGlove)->Ptr); +} + +void SGCoreImpl_FSGHandLayerImpl_GetCalibrationState( + void* OutHapticGloveCalibrationState, + const bool bRightHanded) +{ + StaticCast(OutHapticGloveCalibrationState)->State = + FSGHandLayerImpl::GetCalibrationState(bRightHanded); +} + +void SGCoreImpl_FSGHandLayerImpl_GetCalibrationInstructions( + void* OutString, + const bool bRightHanded) +{ + StaticCast(OutString)->String = + FSGHandLayerImpl::GetCalibrationInstructions( + bRightHanded); +} + +void SGCoreImpl_FSGHandLayerImpl_ResetCalibration( + const bool bRightHanded) +{ + FSGHandLayerImpl::ResetCalibration( + bRightHanded); +} + +void SGCoreImpl_FSGHandLayerImpl_EndCalibration( + const bool bRightHanded) +{ + FSGHandLayerImpl::EndCalibration( + bRightHanded); +} + +bool SGCoreImpl_FSGHandLayerImpl_GetHandPose( + const bool bRightHanded, + void* OutHandPose) +{ + return FSGHandLayerImpl::GetHandPose( + bRightHanded, + StaticCast(OutHandPose)->HandPoseImpl); +} + +void SGCoreImpl_FSGHandLayerImpl_GetWristLocation( + const bool bRightHanded, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation) +{ + FSGHandLayerImpl::GetWristLocation( + bRightHanded, + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +void SGCoreImpl_FSGHandLayerImpl_StopAllHaptics( + const bool bRightHanded) +{ + FSGHandLayerImpl::StopAllHaptics( + bRightHanded); +} + +bool SGCoreImpl_FSGHandLayerImpl_SendHaptics( + const bool bRightHanded) +{ + return FSGHandLayerImpl::SendHaptics( + bRightHanded); +} + +bool SGCoreImpl_FSGHandLayerImpl_SupportsCustomWaveform( + const bool bRightHanded, + void* AtLocation) +{ + return FSGHandLayerImpl::SupportsCustomWaveform( + bRightHanded, + StaticCast(AtLocation)->Location); +} + +bool SGCoreImpl_FSGHandLayerImpl_SendCustomWaveform( + const bool bRightHanded, + void* OutWaveform, + void* Location) +{ + return FSGHandLayerImpl::SendCustomWaveform( + bRightHanded, + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Location)->Location); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevel( + const bool bRightHanded, + const int32 Finger, + const float Level01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_ForceFeedbackLevel( + bRightHanded, + Finger, + Level01, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevels( + const bool bRightHanded, + void* Levels01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_ForceFeedbackLevels( + bRightHanded, + StaticCast(Levels01)->Array, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevels( + const bool bRightHanded, + void* Levels01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_VibroLevels( + bRightHanded, + StaticCast(Levels01)->Array, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_Finger_Level0_bSendImmediate( + const bool bRightHanded, + const int32 Finger, + const float Level01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_VibroLevel( + bRightHanded, + Finger, + Level01, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_AtLocation_Level01_bSendImmediate( + const bool bRightHanded, + void* AtLocation, + const float Level01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_VibroLevel( + bRightHanded, + StaticCast(AtLocation)->Location, + Level01, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_SupportsWristSqueeze( + const bool bRightHanded) +{ + return FSGHandLayerImpl::SupportsWristSqueeze( + bRightHanded); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_WristSqueeze( + const bool bRightHanded, + const float SqueezeLevel01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_WristSqueeze( + bRightHanded, + SqueezeLevel01, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_SupportsFlexionLocks( + const bool bRightHanded) +{ + return FSGHandLayerImpl::SupportsFlexionLocks( + bRightHanded); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_FlexionLock( + const bool bRightHanded, + const int32 Finger, + const float Flexion01, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_FlexionLock( + bRightHanded, + Finger, + Flexion01, + bSendImmediate); +} + +bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_ClearFlexionLock( + const bool bRightHanded, + const int32 Finger, + const bool bSendImmediate) +{ + return FSGHandLayerImpl::QueueCommand_ClearFlexionLock( + bRightHanded, + Finger, + bSendImmediate); +} + +/******************************************************************************* + * SGHandPoseImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGHandPoseImpl_Deserialize( + void* OutHandPoseImpl, + void* SerializedString) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::Deserialize(StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + void* HandAngles, + const bool bRightHanded, + void* HandDimensions) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::FromHandAngles( + StaticCast(HandAngles)->Array, + bRightHanded, + StaticCast(HandDimensions)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded( + void* OutHandPoseImpl, + void* HandAngles, + const bool bRightHanded) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::FromHandAngles( + StaticCast(HandAngles)->Array, + bRightHanded); +} + +void SGCoreImpl_FSGHandPoseImpl_DefaultIdle_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + const bool bRightHanded, + void* HandDimensions) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::DefaultIdle( + bRightHanded, + StaticCast(HandDimensions)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGHandPoseImpl_DefaultIdle_bRightHanded( + void* OutHandPoseImpl, + const bool bRightHanded) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::DefaultIdle( + bRightHanded); +} + +void SGCoreImpl_FSGHandPoseImpl_FlatHand_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + const bool bRightHanded, + void* HandDimensions) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::FlatHand( + bRightHanded, + StaticCast(HandDimensions)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGHandPoseImpl_FlatHand_bRightHanded( + void* OutHandPoseImpl, + const bool bRightHanded) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::FlatHand( + bRightHanded); +} + +void SGCoreImpl_FSGHandPoseImpl_ThumbsUp_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + const bool bRightHanded, + void* HandDimensions) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::ThumbsUp( + bRightHanded, + StaticCast(HandDimensions)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGHandPoseImpl_ThumbsUp_bRightHanded( + void* OutHandPoseImpl, + const bool bRightHanded) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::ThumbsUp( + bRightHanded); +} + +void SGCoreImpl_FSGHandPoseImpl_Fist_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + const bool bRightHanded, + void* HandDimensions) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::Fist( + bRightHanded, + StaticCast(HandDimensions)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGHandPoseImpl_Fist_bRightHanded( + void* OutHandPoseImpl, + const bool bRightHanded) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl::Fist( + bRightHanded); +} + +void SGCoreImpl_FSGHandPoseImpl_ctor( + void* OutHandPoseImpl) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = FSGHandPoseImpl(); +} + +void SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + void* OutHandPoseImpl, + const bool bRightHanded, + void* JointPositions, + void* JointRotations, + void* HandAngles) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl( + bRightHanded, + StaticCast(JointPositions)->Array, + StaticCast(JointRotations)->Array, + StaticCast(HandAngles)->Array); +} + +void SGCoreImpl_FSGHandPoseImpl_ctor_copy( + void* OutHandPoseImpl, + void* Rhs) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + FSGHandPoseImpl(StaticCast(Rhs)->HandPoseImpl); +} + +void SGCoreImpl_FSGHandPoseImpl_ctor_copy_assignment( + void* OutHandPoseImpl, + void* Rhs) +{ + StaticCast(OutHandPoseImpl)->HandPoseImpl = + StaticCast(Rhs)->HandPoseImpl; +} + +bool SGCoreImpl_FSGHandPoseImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->HandPoseImpl.IsRight(); +} + +void SGCoreImpl_FSGHandPoseImpl_GetJointPositions( + void* Instance, + void* OutPositions) +{ + StaticCast(OutPositions)->Array = + StaticCast(Instance)->HandPoseImpl.GetJointPositions(); +} + +void SGCoreImpl_FSGHandPoseImpl_GetJointRotations( + void* Instance, + void* OutRotations) +{ + StaticCast(OutRotations)->Array = + StaticCast(Instance)->HandPoseImpl.GetJointRotations(); +} + +void SGCoreImpl_FSGHandPoseImpl_GetHandAngles( + void* Instance, + void* OutAngles) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->HandPoseImpl.GetHandAngles(); +} + +bool SGCoreImpl_FSGHandPoseImpl_Equals( + void* Instance, + void* HandPoseImpl) +{ + return StaticCast(Instance)->HandPoseImpl.Equals( + StaticCast(HandPoseImpl)->HandPoseImpl); +} + +float SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_Finger_bClamp01( + void* Instance, + void* Finger, + const bool bClamp01) +{ + return StaticCast(Instance)->HandPoseImpl.GetNormalizedFlexion( + StaticCast(Finger)->Finger, + bClamp01); +} + +void SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_bClamp01( + void* Instance, + void* OutFlexion, + const bool bClamp01) +{ + StaticCast(OutFlexion)->Array = + StaticCast(Instance)->HandPoseImpl.GetNormalizedFlexion( + bClamp01); +} + +void SGCoreImpl_FSGHandPoseImpl_ToString( + void* Instance, + void* OutString, + const bool bShortFormat) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->HandPoseImpl.ToString(bShortFormat); +} + +void SGCoreImpl_FSGHandPoseImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->HandPoseImpl.Serialize(); +} + +/******************************************************************************* + * SGHapticChannelInfoImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGHapticChannelInfoImpl_GenerateAddress( + void* OutString, + const int32 DeviceIndex, + const int32 ChannelIndex) +{ + StaticCast(OutString)->String = + FSGHapticChannelInfoImpl::GenerateAddress(DeviceIndex, ChannelIndex); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_Parse( + void* OutHapticChannelInfoImpl, + void* IpcString) +{ + StaticCast(OutHapticChannelInfoImpl)->HapticChannelInfoImpl = + FSGHapticChannelInfoImpl::Parse(StaticCast(IpcString)->String); +} + +int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamingType() +{ + return FSGHapticChannelInfoImpl::GetStreamingType(); +} + +int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetType() +{ + return FSGHapticChannelInfoImpl::GetFireAndForgetType(); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_ctor( + void* OutHapticChannelInfoImpl) +{ + StaticCast(OutHapticChannelInfoImpl)->HapticChannelInfoImpl = + FSGHapticChannelInfoImpl(); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex( + void* OutHapticChannelInfoImpl, + void* StreamIndex, + void* FireAndForgetIndex) +{ + StaticCast(OutHapticChannelInfoImpl)->HapticChannelInfoImpl = + FSGHapticChannelInfoImpl( + StaticCast(StreamIndex)->Array, + StaticCast(FireAndForgetIndex)->Array); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy( + void* OutHapticChannelInfoImpl, + void* Rhs) +{ + StaticCast(OutHapticChannelInfoImpl)->HapticChannelInfoImpl = + FSGHapticChannelInfoImpl(StaticCast(Rhs)->HapticChannelInfoImpl); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy_assignment( + void* OutHapticChannelInfoImpl, + void* Rhs) +{ + StaticCast(OutHapticChannelInfoImpl)->HapticChannelInfoImpl = + StaticCast(Rhs)->HapticChannelInfoImpl; +} + +int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamChannelCount( + void* Instance) +{ + return StaticCast(Instance)->HapticChannelInfoImpl.GetStreamChannelCount(); +} + +int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetChannelCount( + void* Instance) +{ + return + StaticCast(Instance)->HapticChannelInfoImpl.GetFireAndForgetChannelCount(); +} + +int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetTotalChannelCount( + void* Instance) +{ + return StaticCast(Instance)->HapticChannelInfoImpl.GetTotalChannelCount(); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_GetAddress_Unguarded( + void* Instance, + void* OutString, + void* Type, + const int32 TypeIndex) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->HapticChannelInfoImpl.GetAddress_Unguarded( + StaticCast(Type)->Type, + TypeIndex); + +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_GetIpcParams_Unguarded( + void* Instance, + void* Type, + const int32 TypeIndex, + int32* OutIndex, + void* OutAddressString) +{ + StaticCast(Instance)->HapticChannelInfoImpl.GetIpcParams_Unguarded( + StaticCast(Type)->Type, + TypeIndex, + *OutIndex, + StaticCast(OutAddressString)->String); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_RegenerateAddresses( + void* Instance, + const int32 ForDeviceIndex) +{ + StaticCast(Instance)->HapticChannelInfoImpl.RegenerateAddresses( + ForDeviceIndex); +} + +void SGCoreImpl_FSGHapticChannelInfoImpl_GetAllAddresses( + void* Instance, + void* OutArray) +{ + StaticCast(OutArray)->Array = + StaticCast(Instance)->HapticChannelInfoImpl.GetAllAddresses(); +} + +/******************************************************************************* + * SGHapticGloveImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves( + void* OutGloves, + const bool bConnectedOnly) +{ + StaticCast(OutGloves)->Array = + FSGHapticGloveImpl::GetHapticGloves(bConnectedOnly); +} + +bool SGCoreImpl_FSGHapticGloveImpl_GetGlove_OutGlove( + void* OutGlove) +{ + return FSGHapticGloveImpl::GetGlove( + StaticCast(OutGlove)->Ptr); +} + +bool SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove( + const bool bRightHanded, + void* OutGlove) +{ + return FSGHapticGloveImpl::GetGlove( + bRightHanded, + StaticCast(OutGlove)->Ptr); +} + +void SGCoreImpl_FSGHapticGloveImpl_ToString_State( + void* OutString, + void* State) +{ + StaticCast(OutString)->String = + FSGHapticGloveImpl::ToString( + StaticCast(State)->State); +} + +void SGCoreImpl_FSGHapticGloveImpl_ToString_Location( + void* OutString, + void* Location) +{ + StaticCast(OutString)->String = + FSGHapticGloveImpl::ToString( + StaticCast(Location)->Location); +} + +void SGCoreImpl_FSGHapticGloveImpl_ctor( + void* OutHapticGloveImpl) +{ + StaticCast(OutHapticGloveImpl)->HapticGloveImpl = FSGHapticGloveImpl(); +} + +void SGCoreImpl_FSGHapticGloveImpl_ctor_MakeShared( + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(); +} + +void SGCoreImpl_FSGHapticGloveImpl_ctor_copy( + void* OutHapticGloveImpl, + void* Rhs) +{ + StaticCast(OutHapticGloveImpl)->HapticGloveImpl = + FSGHapticGloveImpl(StaticCast(Rhs)->HapticGloveImpl); +} + +void SGCoreImpl_FSGHapticGloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(StaticCast(Rhs)->HapticGloveImpl); +} + +void SGCoreImpl_FSGHapticGloveImpl_ctor_copy_assignment( + void* OutHapticGloveImpl, + void* Rhs) +{ + StaticCast(OutHapticGloveImpl)->HapticGloveImpl = + StaticCast(Rhs)->HapticGloveImpl; +} + +void SGCoreImpl_FSGHapticGloveImpl_GetDeviceType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetDeviceType(); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->Ptr->GetDeviceId(); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->Ptr->GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGHapticGloveImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGHapticGloveImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetSubFirmwareVersion(); +} + +bool SGCoreImpl_FSGHapticGloveImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsRight(); +} + +bool SGCoreImpl_FSGHapticGloveImpl_GetImuRotation( + void* Instance, + void* OutImu) +{ + return StaticCast(Instance)->Ptr->GetImuRotation( + StaticCast(OutImu)->Quat); +} + +bool SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandGeometry_OutHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose) +{ + return StaticCast(Instance)->Ptr->GetHandPose( + StaticCast(HandGeometry)->BasicHandModelImpl, + StaticCast(OutHandPose)->HandPoseImpl); +} + +bool SGCoreImpl_FSGHapticGloveImpl_GetHandPose_OutHandPose( + void* Instance, + void* OutHandPose) +{ + return StaticCast(Instance)->Ptr->GetHandPose( + StaticCast(OutHandPose)->HandPoseImpl); +} + +bool SGCoreImpl_FSGHapticGloveImpl_GetHandAngles_OutHandAngles( + void* Instance, + void* OutHandAngles) +{ + return StaticCast(Instance)->Ptr->GetHandAngles( + StaticCast(OutHandAngles)->Array); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetHandGeometry( + void* Instance, + void* OutBasicHandModel) +{ + StaticCast(OutBasicHandModel)->BasicHandModelImpl = + StaticCast(Instance)->Ptr->GetHandGeometry(); +} + +void SGCoreImpl_FSGHapticGloveImpl_SetHandGeometry( + void* Instance, + void* HandGeometry) +{ + StaticCast(Instance)->Ptr->SetHandGeometry( + StaticCast(HandGeometry)->BasicHandModelImpl); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState) +{ + StaticCast(OutHapticGloveCalibrationState)->State = + StaticCast(Instance)->Ptr->GetCalibrationState(); +} + +void SGCoreImpl_FSGHapticGloveImpl_EndCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->EndCalibration(); +} + +void SGCoreImpl_FSGHapticGloveImpl_ResetCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->ResetCalibration(); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetCalibrationInstruction( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->GetCalibrationInstruction(); +} + +void SGCoreImpl_FSGHapticGloveImpl_StopHaptics( + void* Instance) +{ + return StaticCast(Instance)->Ptr->StopHaptics(); +} + +void SGCoreImpl_FSGHapticGloveImpl_StopVibrations( + void* Instance) +{ + return StaticCast(Instance)->Ptr->StopVibrations(); +} + +bool SGCoreImpl_FSGHapticGloveImpl_SendHaptics( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SendHaptics(); +} + +bool SGCoreImpl_FSGHapticGloveImpl_SupportsCustomWaveform( + void* Instance, + void* AtLocation) +{ + return StaticCast(Instance)->Ptr->SupportsCustomWaveform( + StaticCast(AtLocation)->Location); +} + +bool SGCoreImpl_FSGHapticGloveImpl_SendCustomWaveform( + void* Instance, + void* OutWaveform, + void* Location) +{ + return StaticCast(Instance)->Ptr->SendCustomWaveform( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Location)->Location); +} + +bool SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevels( + StaticCast(Levels01)->Array); +} + +bool SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevel( + void* Instance, + const int32 Finger, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevel( + Finger, + Level01); +} + +bool SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevels( + void* Instance, + void* Levels01) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevels( + StaticCast(Levels01)->Array); +} + +bool SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevel( + void* Instance, + void* Location, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevel( + StaticCast(Location)->Location, + Level01); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetWristLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation) +{ + StaticCast(Instance)->Ptr->GetWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +void SGCoreImpl_FSGHapticGloveImpl_GetGloveLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation) +{ + StaticCast(Instance)->Ptr->GetGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void SGCoreImpl_FSGHapticGloveImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToString(); +} + +/******************************************************************************* + * SGInterpolationSetImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGInterpolationSetImpl_Deserialize( + void* OutInterpolationSetImpl, + void* SerializedString) +{ + StaticCast(OutInterpolationSetImpl)->InterpolationSetImpl = + FSGInterpolationSetImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ctor( + void* OutInterpolationSetImpl) +{ + StaticCast(OutInterpolationSetImpl)->InterpolationSetImpl = + FSGInterpolationSetImpl(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2( + void* OutInterpolationSetImpl, + const float From1, + const float From2, + const float To1, + const float To2) +{ + StaticCast(OutInterpolationSetImpl)->InterpolationSetImpl = + FSGInterpolationSetImpl( + From1, + From2, + To1, + To2); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2_Min_Max( + void* OutInterpolationSetImpl, + const float From1, + const float From2, + const float To1, + const float To2, + const float Min, + const float Max) +{ + StaticCast(OutInterpolationSetImpl)->InterpolationSetImpl = + FSGInterpolationSetImpl( + From1, + From2, + To1, + To2, + Min, + Max); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ctor_copy( + void* OutInterpolationSetImpl, + void* Rhs) +{ + StaticCast(OutInterpolationSetImpl)->InterpolationSetImpl = + FSGInterpolationSetImpl(StaticCast(Rhs)->InterpolationSetImpl); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ctor_copy_assignment( + void* OutInterpolationSetImpl, + void* Rhs) +{ + StaticCast(OutInterpolationSetImpl)->InterpolationSetImpl = + StaticCast(Rhs)->InterpolationSetImpl; +} + +float SGCoreImpl_FSGInterpolationSetImpl_GetX0( + void* Instance) +{ + return StaticCast(Instance)->InterpolationSetImpl.GetX0(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_SetX0( + void* Instance, + const float X0) +{ + return StaticCast(Instance)->InterpolationSetImpl.SetX0(X0); +} + +float SGCoreImpl_FSGInterpolationSetImpl_GetX1( + void* Instance) +{ + return StaticCast(Instance)->InterpolationSetImpl.GetX1(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_SetX1( + void* Instance, + const float X1) +{ + return StaticCast(Instance)->InterpolationSetImpl.SetX1(X1); +} + +float SGCoreImpl_FSGInterpolationSetImpl_GetY0( + void* Instance) +{ + return StaticCast(Instance)->InterpolationSetImpl.GetY0(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_SetY0( + void* Instance, + const float Y0) +{ + return StaticCast(Instance)->InterpolationSetImpl.SetY0(Y0); +} + +float SGCoreImpl_FSGInterpolationSetImpl_GetY1( + void* Instance) +{ + return StaticCast(Instance)->InterpolationSetImpl.GetY1(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_SetY1( + void* Instance, + const float Y1) +{ + return StaticCast(Instance)->InterpolationSetImpl.SetY1(Y1); +} + +float SGCoreImpl_FSGInterpolationSetImpl_GetMin( + void* Instance) +{ + return StaticCast(Instance)->InterpolationSetImpl.GetMin(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_SetMin( + void* Instance, + const float Min) +{ + StaticCast(Instance)->InterpolationSetImpl.SetMin(Min); +} + +float SGCoreImpl_FSGInterpolationSetImpl_GetMax( + void* Instance) +{ + return StaticCast(Instance)->InterpolationSetImpl.GetMax(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_SetMax( + void* Instance, + const float Max) +{ + StaticCast(Instance)->InterpolationSetImpl.SetMax(Max); +} + +float SGCoreImpl_FSGInterpolationSetImpl_Get( + void* Instance, + const float Value, + const bool bLimit, + const bool bNormalizeAngle) +{ + return StaticCast(Instance)->InterpolationSetImpl.Get( + Value, + bLimit, + bNormalizeAngle); +} + +bool SGCoreImpl_FSGInterpolationSetImpl_Equals( + void* Instance, + void* InterpolationSetImpl) +{ + return StaticCast(Instance)->InterpolationSetImpl.Equals( + StaticCast(InterpolationSetImpl)->InterpolationSetImpl); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->InterpolationSetImpl.ToString(); +} + +void SGCoreImpl_FSGInterpolationSetImpl_ToString_bLimits( + void* Instance, + void* OutString, + const bool bLimits) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->InterpolationSetImpl.ToString(bLimits); +} + +void SGCoreImpl_FSGInterpolationSetImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->InterpolationSetImpl.Serialize(); +} + +/******************************************************************************* + * SGJointKinematicsImpl.h + ******************************************************************************/ + +bool +SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations( + void* StartPosition, + void* StartRotation, + void* JointLengths, + void* JointAngles, + void* OutNewPositions, + void* OutNewRotations) +{ + return FSGJointKinematicsImpl::ForwardKinematics( + StaticCast(StartPosition)->Vector, + StaticCast(StartRotation)->Quat, + StaticCast(JointLengths)->Array, + StaticCast(JointAngles)->Array, + StaticCast(OutNewPositions)->Array, + StaticCast(OutNewRotations)->Array); +} + +bool SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations( + void* Profile, + void* Finger, + void* JointAngles, + void* OutNewPositions, + void* OutNewRotations) +{ + return FSGJointKinematicsImpl::ForwardKinematics( + StaticCast(Profile)->BasicHandModelImpl, + StaticCast(Finger)->Finger, + StaticCast(JointAngles)->Array, + StaticCast(OutNewPositions)->Array, + StaticCast(OutNewRotations)->Array); +} + +/******************************************************************************* + * SGLibraryImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGLibraryImpl_Version( + void* OutVersion) +{ + StaticCast(OutVersion)->String = FSGLibraryImpl::Version(); +} + +void SGCoreImpl_FSGLibraryImpl_GetBackendType( + void* OutType) +{ + StaticCast(OutType)->Type = FSGLibraryImpl::GetBackendType(); +} + +void SGCoreImpl_FSGLibraryImpl_BackendVersion( + void* OutVersion) +{ + StaticCast(OutVersion)->String = FSGLibraryImpl::BackendVersion(); +} + +void SGCoreImpl_FSGLibraryImpl_SGConnectVersion( + void* OutVersion) +{ + StaticCast(OutVersion)->String = FSGLibraryImpl::SGConnectVersion(); +} + +/******************************************************************************* + * SGNova2GloveImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGNova2GloveImpl_Parse( + void* OutNova2GloveImpl, + void* ConstantsString) +{ + StaticCast(OutNova2GloveImpl)->Ptr = + FSGNova2GloveImpl::Parse(StaticCast(ConstantsString)->String); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetNova2Gloves( + void* OutGloves) +{ + StaticCast(OutGloves)->Array = + FSGNova2GloveImpl::GetNova2Gloves(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetNova2Glove_OutGlove( + void* OutGlove) +{ + return FSGNova2GloveImpl::GetNova2Glove( + StaticCast(OutGlove)->Nova2GloveImpl); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetNova2Glove_bRightHanded_OutGlove( + const bool bRightHanded, + void* OutGlove) +{ + return FSGNova2GloveImpl::GetNova2Glove( + bRightHanded, + StaticCast(OutGlove)->Nova2GloveImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_CalculateGloveLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + const bool bRightHanded, + void* HardwareVersion, + void* OutGlovePosition, + void* OutGloveRotation) +{ + FSGNova2GloveImpl::CalculateGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + bRightHanded, + StaticCast(HardwareVersion)->String, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void SGCoreImpl_FSGNova2GloveImpl_CalculateWristLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + const bool bRightHanded, + void* HardwareVersion, + void* OutWristPosition, + void* OutWristRotation) +{ + FSGNova2GloveImpl::CalculateWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + bRightHanded, + StaticCast(HardwareVersion)->String, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +ANSICHAR SGCoreImpl_FSGNova2GloveImpl_GetStreamByte() +{ + return FSGNova2GloveImpl::GetStreamByte(); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetNova2SensorRanges( + void* OutNova2SensorRanges) +{ + StaticCast(OutNova2SensorRanges)->Array = + FSGNova2GloveImpl::GetNova2SensorRanges(); +} + +void SGCoreImpl_FSGNova2GloveImpl_ToNormalizedValues_SensorData( + void* OutNormalizedValues, + void* SensorData) +{ + StaticCast(OutNormalizedValues)->Array = + FSGNova2GloveImpl::ToNormalizedValues( + StaticCast(SensorData)->Nova2GloveSensorDataImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_ToNormalizedValues_SensorData_OutSensorNormalizer( + void* OutNormalizedValues, + void* SensorData, + void* OutSensorNormalizer) +{ + StaticCast(OutNormalizedValues)->Array = + FSGNova2GloveImpl::ToNormalizedValues( + StaticCast(SensorData)->Nova2GloveSensorDataImpl, + StaticCast(OutSensorNormalizer)->SensorNormalizationImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_CalculateHandAngles( + void* OutHandAngles, + void* NormalizedValues, + void* Interpolator, + const bool bInfluenceIndex) +{ + StaticCast(OutHandAngles)->Array = + FSGNova2GloveImpl::CalculateHandAngles( + StaticCast(NormalizedValues)->Array, + StaticCast(Interpolator)->HandInterpolatorImpl, + bInfluenceIndex); +} + +void SGCoreImpl_FSGNova2GloveImpl_ToNormalizedAngles( + void* OutNormalizedAngles, + void* NormalizedData, + void* GloveInfo) +{ + StaticCast(OutNormalizedAngles)->Array = + FSGNova2GloveImpl::ToNormalizedAngles( + StaticCast(NormalizedData)->Array, + StaticCast(GloveInfo)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor( + void* OutNova2GloveImpl) +{ + StaticCast(OutNova2GloveImpl)->Nova2GloveImpl = FSGNova2GloveImpl{}; +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor_MakeShared( + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(); +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor_DeviceInfo( + void* OutNova2GloveImpl, + void* DeviceInfo) +{ + StaticCast(OutNova2GloveImpl)->Nova2GloveImpl = + FSGNova2GloveImpl{ + StaticCast(DeviceInfo)->NovaGloveInfoImpl}; +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor_DeviceInfo_MakeShared( + void* OutSharedPtr, + void* DeviceInfo) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared( + StaticCast(DeviceInfo)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor_copy( + void* OutNova2GloveImpl, + void* Rhs) +{ + StaticCast(OutNova2GloveImpl)->Nova2GloveImpl = + FSGNova2GloveImpl(StaticCast(Rhs)->Nova2GloveImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(StaticCast(Rhs)->Nova2GloveImpl); +} + +void SGCoreImpl_FSGNova2GloveImpl_ctor_copy_assignment( + void* OutNova2GloveImpl, + void* Rhs) +{ + StaticCast(OutNova2GloveImpl)->Nova2GloveImpl = + StaticCast(Rhs)->Nova2GloveImpl; +} + +void SGCoreImpl_FSGNova2GloveImpl_GetDeviceType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetDeviceType(); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->Ptr->GetDeviceId(); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->Ptr->GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGNova2GloveImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGNova2GloveImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetSubFirmwareVersion(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_HasBattery( + void* Instance) +{ + return StaticCast(Instance)->Ptr->HasBattery(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_IsCharging( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsCharging(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetBatteryLevel( + void* Instance, + float* OutBatteryLevel) +{ + return StaticCast(Instance)->Ptr->GetBatteryLevel( + *OutBatteryLevel); +} + +bool SGCoreImpl_FSGNova2GloveImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsRight(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetImuRotation( + void* Instance, + void* OutImu) +{ + return StaticCast(Instance)->Ptr->GetImuRotation( + StaticCast(OutImu)->Quat); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose) +{ + return StaticCast(Instance)->Ptr->GetHandPose( + StaticCast(HandGeometry)->BasicHandModelImpl, + StaticCast(OutHandPose)->HandPoseImpl); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles) +{ + return StaticCast(Instance)->Ptr->GetHandAngles( + StaticCast(OutHandAngles)->Array); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState) +{ + StaticCast(OutHapticGloveCalibrationState)->State = + StaticCast(Instance)->Ptr->GetCalibrationState(); +} + +void SGCoreImpl_FSGNova2GloveImpl_EndCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->EndCalibration(); +} + +void SGCoreImpl_FSGNova2GloveImpl_ResetCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->ResetCalibration(); +} + +void SGCoreImpl_FSGNova2GloveImpl_StopHaptics( + void* Instance) +{ + StaticCast(Instance)->Ptr->StopHaptics(); +} + +void SGCoreImpl_FSGNova2GloveImpl_StopVibrations( + void* Instance) +{ + StaticCast(Instance)->Ptr->StopVibrations(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SendHaptics( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SendHaptics(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SupportsCustomWaveform( + void* Instance, + void* AtLocation) +{ + return StaticCast(Instance)->Ptr->SupportsCustomWaveform( + StaticCast(AtLocation)->Location); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SendCustomWaveform( + void* Instance, + void* OutWaveform, + void* Location) +{ + return StaticCast(Instance)->Ptr->SendCustomWaveform( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Location)->Location); +} + +bool SGCoreImpl_FSGNova2GloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevels( + StaticCast(Levels01)->Array); +} + +bool SGCoreImpl_FSGNova2GloveImpl_QueueForceFeedbackLevel( + void* Instance, + const int32 Finger, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevel( + Finger, + Level01); +} + +bool SGCoreImpl_FSGNova2GloveImpl_QueueVibroLevels( + void* Instance, + void* Amplitudes) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevels( + StaticCast(Amplitudes)->Array); +} + +bool SGCoreImpl_FSGNova2GloveImpl_QueueVibroLevel( + void* Instance, + void* Location, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevel( + StaticCast(Location)->Location, + Level01); +} + +bool SGCoreImpl_FSGNova2GloveImpl_QueueSqueezeLevel( + void* Instance, + const float SqueezeLevel01) +{ + return StaticCast(Instance)->Ptr->QueueSqueezeLevel( + SqueezeLevel01); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetGloveLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation) +{ + StaticCast(Instance)->Ptr->GetGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetWristLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation) +{ + StaticCast(Instance)->Ptr->GetWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +void SGCoreImpl_FSGNova2GloveImpl_GetGloveInfo( + void* Instance, + void* OutGloveInfo) +{ + StaticCast(OutGloveInfo)->NovaGloveInfoImpl = + StaticCast(Instance)->Ptr->GetGloveInfo(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_DoesIndexInfluenceOthers( + void* Instance) +{ + return StaticCast(Instance)->Ptr->DoesIndexInfluenceOthers(); +} + +void SGCoreImpl_FSGNova2GloveImpl_SetIndexInfluencesOthers( + void* Instance, + const bool bInfluenceOthers) +{ + StaticCast(Instance)->Ptr->SetIndexInfluencesOthers( + bInfluenceOthers); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SupportsOnBoardNormalization( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SupportsOnBoardNormalization(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetSensorData( + void* Instance, + void* OutSensorData) +{ + return StaticCast(Instance)->Ptr->GetSensorData( + StaticCast(OutSensorData)->Nova2GloveSensorDataImpl); +} + +bool SGCoreImpl_FSGNova2GloveImpl_GetNormalizedInput( + void* Instance, + void* OutNormalizedValues) +{ + return StaticCast(Instance)->Ptr->GetNormalizedInput( + StaticCast(OutNormalizedValues)->Array); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SendRawData( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SendRawData(); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SendNormalizedData( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SendNormalizedData(); +} + +void SGCoreImpl_FSGNova2GloveImpl_ToNovaMotor( + void* Instance, + void* OutNova2Motor, + void* Location) +{ + StaticCast(OutNova2Motor)->Motor = + StaticCast(Instance)->Ptr->ToNovaMotor( + StaticCast(Location)->Location); +} + +int32 SGCoreImpl_FSGNova2GloveImpl_ChannelIndex( + void* Instance, + void* Motor) +{ + return StaticCast(Instance)->Ptr->ChannelIndex( + StaticCast(Motor)->Motor); +} + +void SGCoreImpl_FSGNova2GloveImpl_ValidateWaveform( + void* Instance, + void* OutWaveform, + void* Motor) +{ + return StaticCast(Instance)->Ptr->ValidateWaveform( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Motor)->Motor); +} + +bool SGCoreImpl_FSGNova2GloveImpl_SendCustomWaveform_Nova2( + void* Instance, + void* OutWaveform, + void* Motor, + const bool bValidateWaveform) +{ + return StaticCast(Instance)->Ptr->SendCustomWaveform_Nova2( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Motor)->Motor, + bValidateWaveform); +} + +void SGCoreImpl_FSGNova2GloveImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToString(); +} + +/******************************************************************************* + * SGNova2GloveSensorDataImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_Parse( + void* OutNova2GloveSensorDataImpl, + void* RawData, + void* GloveInfo) +{ + StaticCast(OutNova2GloveSensorDataImpl)->Nova2GloveSensorDataImpl = + FSGNova2GloveSensorDataImpl::Parse( + StaticCast(RawData)->String, + StaticCast(GloveInfo)->NovaGloveInfoImpl); +} + +void +SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + void* OutNova2GloveSensorDataImpl, + void* NormalizationState, + void* Values, + const int32 ParsedValues, + void* ImuRotation, + const bool bImuParsed, + const float BatteryLevel, + const bool bCharging) +{ + StaticCast(OutNova2GloveSensorDataImpl)->Nova2GloveSensorDataImpl = + FSGNova2GloveSensorDataImpl( + StaticCast(NormalizationState)->State, + StaticCast(Values)->Array, + ParsedValues, + StaticCast(ImuRotation)->Quat, + bImuParsed, + BatteryLevel, + bCharging); +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor( + void* OutNova2GloveSensorDataImpl) +{ + StaticCast(OutNova2GloveSensorDataImpl)->Nova2GloveSensorDataImpl = + FSGNova2GloveSensorDataImpl(); +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_copy( + void* OutNova2GloveSensorDataImpl, + void* Rhs) +{ + StaticCast(OutNova2GloveSensorDataImpl)->Nova2GloveSensorDataImpl = + FSGNova2GloveSensorDataImpl(StaticCast(Rhs)->Nova2GloveSensorDataImpl); +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_copy_assignment( + void* OutNova2GloveSensorDataImpl, + void* Rhs) +{ + StaticCast(OutNova2GloveSensorDataImpl)->Nova2GloveSensorDataImpl = + StaticCast(Rhs)->Nova2GloveSensorDataImpl; +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorState( + void* Instance, + void* OutNormalizationState) +{ + StaticCast(OutNormalizationState)->State = + StaticCast(Instance)->Nova2GloveSensorDataImpl.GetSensorState(); +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorValues( + void* Instance, + void* OutValues) +{ + StaticCast(OutValues)->Array = + StaticCast(Instance)->Nova2GloveSensorDataImpl.GetSensorValues(); +} + +float SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorValue( + void* Instance, + void* Finger, + void* Location) +{ + return StaticCast(Instance)->Nova2GloveSensorDataImpl.GetSensorValue( + StaticCast(Finger)->Finger, + StaticCast(Location)->Location); +} + +int32 SGCoreImpl_FSGNova2GloveSensorDataImpl_GetParsedValues( + void* Instance) +{ + return StaticCast(Instance)->Nova2GloveSensorDataImpl.GetParsedValues(); +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_GetImuRotation( + void* Instance, + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = + StaticCast(Instance)->Nova2GloveSensorDataImpl.GetImuRotation(); +} + +bool SGCoreImpl_FSGNova2GloveSensorDataImpl_IsImuParsed( + void* Instance) +{ + return StaticCast(Instance)->Nova2GloveSensorDataImpl.IsImuParsed(); +} + +float SGCoreImpl_FSGNova2GloveSensorDataImpl_GetBatteryLevel( + void* Instance) +{ + return StaticCast(Instance)->Nova2GloveSensorDataImpl.GetBatteryLevel(); +} + +bool SGCoreImpl_FSGNova2GloveSensorDataImpl_IsCharging( + void* Instance) +{ + return StaticCast(Instance)->Nova2GloveSensorDataImpl.IsCharging(); +} + +bool SGCoreImpl_FSGNova2GloveSensorDataImpl_Equals( + void* Instance, + void* Nova2GloveSensorDataImpl) +{ + return StaticCast(Instance)->Nova2GloveSensorDataImpl.Equals( + StaticCast(Nova2GloveSensorDataImpl)->Nova2GloveSensorDataImpl); +} + +void SGCoreImpl_FSGNova2GloveSensorDataImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Nova2GloveSensorDataImpl.ToString(); +} + +/******************************************************************************* + * SGNovaGloveImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGNovaGloveImpl_Parse( + void* OutNovaGloveImpl, + void* ConstantsString) +{ + StaticCast(OutNovaGloveImpl)->Ptr = + FSGNovaGloveImpl::Parse(StaticCast(ConstantsString)->String); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetNovaGloves( + void* OutGloves) +{ + StaticCast(OutGloves)->Array = + FSGNovaGloveImpl::GetNovaGloves(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetNovaGlove_OutGlove( + void* OutGlove) +{ + return FSGNovaGloveImpl::GetNovaGlove( + StaticCast(OutGlove)->NovaGloveImpl); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetNovaGlove_bRightHanded_OutGlove( + const bool bRightHanded, + void* OutGlove) +{ + return FSGNovaGloveImpl::GetNovaGlove( + bRightHanded, + StaticCast(OutGlove)->NovaGloveImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_CalculateGloveLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + const bool bRightHanded, + void* OutGlovePosition, + void* OutGloveRotation) +{ + FSGNovaGloveImpl::CalculateGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + bRightHanded, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void SGCoreImpl_FSGNovaGloveImpl_CalculateWristLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + const bool bRightHanded, + void* OutWristPosition, + void* OutWristRotation) +{ + FSGNovaGloveImpl::CalculateWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + bRightHanded, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +ANSICHAR SGCoreImpl_FSGNovaGloveImpl_GetHapticsByte() +{ + return FSGNovaGloveImpl::GetHapticsByte(); +} + +ANSICHAR SGCoreImpl_FSGNovaGloveImpl_GetThresholdsByte() +{ + return FSGNovaGloveImpl::GetThresholdsByte(); +} + +ANSICHAR SGCoreImpl_FSGNovaGloveImpl_GetIgnoreThresholdsByte() +{ + return FSGNovaGloveImpl::GetIgnoreThresholdsByte(); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetNovaSensorRanges( + void* OutNovaSensorRanges) +{ + StaticCast(OutNovaSensorRanges)->Array = + FSGNovaGloveImpl::GetNovaSensorRanges(); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToNormalizedValues_SensorData( + void* OutNormalizedValues, + void* SensorData) +{ + StaticCast(OutNormalizedValues)->Array = + FSGNovaGloveImpl::ToNormalizedValues( + StaticCast(SensorData)->NovaGloveSensorDataImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToNormalizedValues_SensorData_OutSensorNormalizer( + void* OutNormalizedValues, + void* SensorData, + void* OutSensorNormalizer) +{ + StaticCast(OutNormalizedValues)->Array = + FSGNovaGloveImpl::ToNormalizedValues( + StaticCast(SensorData)->NovaGloveSensorDataImpl, + StaticCast(OutSensorNormalizer)->SensorNormalizationImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_CalculateHandAngles( + void* OutHandAngles, + void* NormalizedValues, + void* Interpolator) +{ + StaticCast(OutHandAngles)->Array = + FSGNovaGloveImpl::CalculateHandAngles( + StaticCast(NormalizedValues)->Array, + StaticCast(Interpolator)->HandInterpolatorImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToNovaCommandAsFlexion( + void* OutString, + void* Thresholds) +{ + StaticCast(OutString)->String = + FSGNovaGloveImpl::ToNovaCommandAsFlexion( + StaticCast(Thresholds)->ThresholdCommandImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToNovaCommandAsRaw( + void* OutString, + void* Thresholds, + void* Interpolator) +{ + StaticCast(OutString)->String = + FSGNovaGloveImpl::ToNovaCommandAsRaw( + StaticCast(Thresholds)->ThresholdCommandImpl, + StaticCast(Interpolator)->SensorNormalizationImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor( + void* OutNovaGloveImpl) +{ + StaticCast(OutNovaGloveImpl)->NovaGloveImpl = FSGNovaGloveImpl{}; +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor_MakeShared( + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(); +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor_DeviceInfo( + void* OutNovaGloveImpl, + void* DeviceInfo) +{ + StaticCast(OutNovaGloveImpl)->NovaGloveImpl = + FSGNovaGloveImpl{ + StaticCast(DeviceInfo)->NovaGloveInfoImpl}; +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor_DeviceInfo_MakeShared( + void* OutSharedPtr, + void* DeviceInfo) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared( + StaticCast(DeviceInfo)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor_copy( + void* OutNovaGloveImpl, + void* Rhs) +{ + StaticCast(OutNovaGloveImpl)->NovaGloveImpl = + FSGNovaGloveImpl(StaticCast(Rhs)->NovaGloveImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(StaticCast(Rhs)->NovaGloveImpl); +} + +void SGCoreImpl_FSGNovaGloveImpl_ctor_copy_assignment( + void* OutNovaGloveImpl, + void* Rhs) +{ + StaticCast(OutNovaGloveImpl)->NovaGloveImpl = + StaticCast(Rhs)->NovaGloveImpl; +} + +void SGCoreImpl_FSGNovaGloveImpl_GetDeviceType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetDeviceType(); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->Ptr->GetDeviceId(); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->Ptr->GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGNovaGloveImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGNovaGloveImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetSubFirmwareVersion(); +} + +void SGCoreImpl_FSGNovaGloveImpl_SetDeviceIndex( + void* Instance, + const int32 Index) +{ + StaticCast(Instance)->Ptr->SetDeviceIndex(Index); +} + +bool SGCoreImpl_FSGNovaGloveImpl_HasBattery( + void* Instance) +{ + return StaticCast(Instance)->Ptr->HasBattery(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_IsCharging( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsCharging(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetBatteryLevel( + void* Instance, + float* OutBatteryLevel) +{ + return StaticCast(Instance)->Ptr->GetBatteryLevel( + *OutBatteryLevel); +} + +bool SGCoreImpl_FSGNovaGloveImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsRight(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetImuRotation( + void* Instance, + void* OutImu) +{ + return StaticCast(Instance)->Ptr->GetImuRotation( + StaticCast(OutImu)->Quat); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose) +{ + return StaticCast(Instance)->Ptr->GetHandPose( + StaticCast(HandGeometry)->BasicHandModelImpl, + StaticCast(OutHandPose)->HandPoseImpl); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles) +{ + return StaticCast(Instance)->Ptr->GetHandAngles( + StaticCast(OutHandAngles)->Array); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState) +{ + StaticCast(OutHapticGloveCalibrationState)->State = + StaticCast(Instance)->Ptr->GetCalibrationState(); +} + +void SGCoreImpl_FSGNovaGloveImpl_EndCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->EndCalibration(); +} + +void SGCoreImpl_FSGNovaGloveImpl_ResetCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->ResetCalibration(); +} + +void SGCoreImpl_FSGNovaGloveImpl_StopHaptics( + void* Instance) +{ + StaticCast(Instance)->Ptr->StopHaptics(); +} + +void SGCoreImpl_FSGNovaGloveImpl_StopVibrations( + void* Instance) +{ + StaticCast(Instance)->Ptr->StopVibrations(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SendHaptics( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SendHaptics(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SupportsCustomWaveform( + void* Instance, + void* AtLocation) +{ + return StaticCast(Instance)->Ptr->SupportsCustomWaveform( + StaticCast(AtLocation)->Location); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SendCustomWaveform( + void* Instance, + void* OutWaveform, + void* Location) +{ + return StaticCast(Instance)->Ptr->SendCustomWaveform( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Location)->Location); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevels( + StaticCast(Levels01)->Array); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueForceFeedbackLevel( + void* Instance, + const int32 Finger, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevel( + Finger, + Level01); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevels( + void* Instance, + void* Amplitudes) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevels( + StaticCast(Amplitudes)->Array); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevel_Localtion_Level01( + void* Instance, + void* Location, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevel( + StaticCast(Location)->Location, + Level01); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetGloveLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation) +{ + StaticCast(Instance)->Ptr->GetGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetWristLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation) +{ + StaticCast(Instance)->Ptr->GetWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +void SGCoreImpl_FSGNovaGloveImpl_GetGloveInfo( + void* Instance, + void* OutGloveInfo) +{ + StaticCast(OutGloveInfo)->NovaGloveInfoImpl = + StaticCast(Instance)->Ptr->GetGloveInfo(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SupportsThresholds( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SupportsThresholds(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SupportsCustomWaveforms( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SupportsCustomWaveforms(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SupportsOnBoardNormalization( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SupportsOnBoardNormalization(); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetSensorData( + void* Instance, + void* OutSensorData) +{ + return StaticCast(Instance)->Ptr->GetSensorData( + StaticCast(OutSensorData)->NovaGloveSensorDataImpl); +} + +bool SGCoreImpl_FSGNovaGloveImpl_GetNormalizedInput( + void* Instance, + void* OutNormalizedValues) +{ + return StaticCast(Instance)->Ptr->GetNormalizedInput( + StaticCast(OutNormalizedValues)->Array); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToNovaCommand( + void* Instance, + void* OutString, + void* ForceFeedbackLevels, + void* BuzzLevels, + const float WristLevel) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToNovaCommand( + StaticCast(ForceFeedbackLevels)->Array, + StaticCast(BuzzLevels)->Array, + WristLevel); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevel_Finger_Amplitude( + void* Instance, + const int32 Finger, + const float Amplitude) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevel( + Finger, + Amplitude); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueWristLevel( + void* Instance, + const float Amplitude) +{ + return StaticCast(Instance)->Ptr->QueueWristLevel( + Amplitude); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToNovaMotor( + void* Instance, + void* OutNovaMotor, + void* Location) +{ + StaticCast(OutNovaMotor)->Motor = + StaticCast(Instance)->Ptr->ToNovaMotor( + StaticCast(Location)->Location); +} + +int32 SGCoreImpl_FSGNovaGloveImpl_ChannelIndex( + void* Instance, + void* Motor) +{ + return StaticCast(Instance)->Ptr->ChannelIndex( + StaticCast(Motor)->Motor); +} + +void SGCoreImpl_FSGNovaGloveImpl_ValidateWaveform( + void* Instance, + void* OutWaveform, + void* Motor) +{ + return StaticCast(Instance)->Ptr->ValidateWaveform( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Motor)->Motor); +} + +bool SGCoreImpl_FSGNovaGloveImpl_SendCustomWaveform_Nova( + void* Instance, + void* OutWaveform, + void* Motor, + const bool bValidateWaveform) +{ + return StaticCast(Instance)->Ptr->SendCustomWaveform_Nova( + StaticCast(OutWaveform)->CustomWaveformImpl, + StaticCast(Motor)->Motor, + bValidateWaveform); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueThresholdCommand_Flexion( + void* Instance, + const int32 Finger, + const float FlexionThreshold) +{ + return StaticCast(Instance)->Ptr->QueueThresholdCommand_Flexion( + Finger, + FlexionThreshold); +} + +bool SGCoreImpl_FSGNovaGloveImpl_QueueClearThreshold( + void* Instance, + const int32 Finger) +{ + return StaticCast(Instance)->Ptr->QueueClearThreshold( + Finger); +} + +void SGCoreImpl_FSGNovaGloveImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToString(); +} + +/******************************************************************************* + * SGNovaGloveInfoImpl.h + ******************************************************************************/ + +bool SGCoreImpl_FSGNovaGloveInfoImpl_Parse( + void* ConstantsString, + void* OutGloveInfo) +{ + return FSGNovaGloveInfoImpl::Parse( + StaticCast(ConstantsString)->String, + StaticCast(OutGloveInfo)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_Deserialize( + void* OutNovaGloveInfoImpl, + void* SerializedString) +{ + StaticCast(OutNovaGloveInfoImpl)->NovaGloveInfoImpl = + FSGNovaGloveInfoImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_ctor( + void* OutNovaGloveInfoImpl) +{ + StaticCast(OutNovaGloveInfoImpl)->NovaGloveInfoImpl = FSGNovaGloveInfoImpl(); +} + +void +SGCoreImpl_FSGNovaGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_ImuCorrection_NumberOfSensors( + void* OutNovaGloveInfoImpl, + void* DeviceId, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion, + const bool bRightHanded, + void* ImuCorrection, + const int32 NumberOfSensors) +{ + StaticCast(OutNovaGloveInfoImpl)->NovaGloveInfoImpl = + FSGNovaGloveInfoImpl( + StaticCast(DeviceId)->String, + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion, + bRightHanded, + StaticCast(ImuCorrection)->Quat, + NumberOfSensors); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_ctor_copy( + void* OutNovaGloveInfoImpl, + void* Rhs) +{ + StaticCast(OutNovaGloveInfoImpl)->NovaGloveInfoImpl = + FSGNovaGloveInfoImpl(StaticCast(Rhs)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_ctor_copy_assignment( + void* OutNovaGloveInfoImpl, + void* Rhs) +{ + StaticCast(OutNovaGloveInfoImpl)->NovaGloveInfoImpl = + StaticCast(Rhs)->NovaGloveInfoImpl; +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->NovaGloveInfoImpl.GetDeviceId(); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->NovaGloveInfoImpl.GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGNovaGloveInfoImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGNovaGloveInfoImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.GetSubFirmwareVersion(); +} + +bool SGCoreImpl_FSGNovaGloveInfoImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.IsRight(); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_GetImuCorrection( + void* Instance, + void* OutCorrection) +{ + StaticCast(OutCorrection)->Quat = + StaticCast(Instance)->NovaGloveInfoImpl.GetImuCorrection(); +} + +int32 SGCoreImpl_FSGNovaGloveInfoImpl_GetNumberOfSensors( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.GetNumberOfSensors(); +} + +bool SGCoreImpl_FSGNovaGloveInfoImpl_FirmwareNewerThan( + void* Instance, + const int32 FirmwareMain, + const int32 FirmwareSub, + const bool bInclusive) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.FirmwareNewerThan( + FirmwareMain, + FirmwareSub, + bInclusive); +} + +bool SGCoreImpl_FSGNovaGloveInfoImpl_FirmwareOlderThan( + void* Instance, + const int32 FirmwareMain, + const int32 FirmwareSub, + const bool bInclusive) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.FirmwareOlderThan( + FirmwareMain, + FirmwareSub, + bInclusive); +} + +bool SGCoreImpl_FSGNovaGloveInfoImpl_Equals( + void* Instance, + void* NovaGloveInfoImpl) +{ + return StaticCast(Instance)->NovaGloveInfoImpl.Equals( + StaticCast(NovaGloveInfoImpl)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->NovaGloveInfoImpl.ToString(); +} + +void SGCoreImpl_FSGNovaGloveInfoImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->NovaGloveInfoImpl.Serialize(); +} + +/******************************************************************************* + * SGNovaGloveSensorDataImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_Empty( + void* OutNovaGloveSensorDataImpl) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + FSGNovaGloveSensorDataImpl::Empty(); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_Parse( + void* OutNovaGloveSensorDataImpl, + void* RawData, + void* GloveInfo) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + FSGNovaGloveSensorDataImpl::Parse( + StaticCast(RawData)->String, + StaticCast(GloveInfo)->NovaGloveInfoImpl); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_Deserialize( + void* OutNovaGloveSensorDataImpl, + void* SerializedString) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + FSGNovaGloveSensorDataImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor( + void* OutNovaGloveSensorDataImpl) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + FSGNovaGloveSensorDataImpl(); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + void* OutNovaGloveSensorDataImpl, + void* Values, + const int32 ParsedValues, + void* ImuRotation, + const bool bImuParsed, + const float BatteryLevel, + const bool bCharging) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + FSGNovaGloveSensorDataImpl( + StaticCast(Values)->Array, + ParsedValues, + StaticCast(ImuRotation)->Quat, + bImuParsed, + BatteryLevel, + bCharging); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_copy( + void* OutNovaGloveSensorDataImpl, + void* Rhs) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + FSGNovaGloveSensorDataImpl(StaticCast(Rhs)->NovaGloveSensorDataImpl); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_copy_assignment( + void* OutNovaGloveSensorDataImpl, + void* Rhs) +{ + StaticCast(OutNovaGloveSensorDataImpl)->NovaGloveSensorDataImpl = + StaticCast(Rhs)->NovaGloveSensorDataImpl; +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_GetSensorValues( + void* Instance, + void* OutValues) +{ + StaticCast(OutValues)->Array = + StaticCast(Instance)->NovaGloveSensorDataImpl.GetSensorValues(); +} + +float SGCoreImpl_FSGNovaGloveSensorDataImpl_GetSensorValue( + void* Instance, + void* Finger, + void* Location) +{ + return StaticCast(Instance)->NovaGloveSensorDataImpl.GetSensorValue( + StaticCast(Finger)->Finger, + StaticCast(Location)->Location); +} + +int32 SGCoreImpl_FSGNovaGloveSensorDataImpl_GetParsedValues( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveSensorDataImpl.GetParsedValues(); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_GetImuRotation( + void* Instance, + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = + StaticCast(Instance)->NovaGloveSensorDataImpl.GetImuRotation(); +} + +bool SGCoreImpl_FSGNovaGloveSensorDataImpl_IsImuParsed( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveSensorDataImpl.IsImuParsed(); +} + +float SGCoreImpl_FSGNovaGloveSensorDataImpl_GetBatteryLevel( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveSensorDataImpl.GetBatteryLevel(); +} + +bool SGCoreImpl_FSGNovaGloveSensorDataImpl_IsCharging( + void* Instance) +{ + return StaticCast(Instance)->NovaGloveSensorDataImpl.IsCharging(); +} + +bool SGCoreImpl_FSGNovaGloveSensorDataImpl_Equals( + void* Instance, + void* NovaGloveSensorDataImpl) +{ + return StaticCast(Instance)->NovaGloveSensorDataImpl.Equals( + StaticCast(NovaGloveSensorDataImpl)->NovaGloveSensorDataImpl); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->NovaGloveSensorDataImpl.ToString(); +} + +void SGCoreImpl_FSGNovaGloveSensorDataImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->NovaGloveSensorDataImpl.Serialize(); +} + +/******************************************************************************* + * SGSenseComImpl.h + ******************************************************************************/ + +bool SGCoreImpl_FSGSenseComImpl_RegisterExe() +{ + return FSGSenseComImpl::RegisterExe(); +} + +bool SGCoreImpl_FSGSenseComImpl_RegisterExe_ExePath(void* ExePath) +{ + return FSGSenseComImpl::RegisterExe(StaticCast(ExePath)->String); +} + +bool SGCoreImpl_FSGSenseComImpl_GetExePath(void* OutExePath) +{ + return FSGSenseComImpl::GetExePath(StaticCast(OutExePath)->String); +} + +bool SGCoreImpl_FSGSenseComImpl_ScanningActive() +{ + return FSGSenseComImpl::ScanningActive(); +} + +bool SGCoreImpl_FSGSenseComImpl_GetCurrentExeDirectory(void* OutDirectory) +{ + return FSGSenseComImpl::GetCurrentExeDirectory(StaticCast(OutDirectory)->String); +} + +bool SGCoreImpl_FSGSenseComImpl_StartupSenseCom() +{ + return FSGSenseComImpl::StartupSenseCom(); +} + +/******************************************************************************* + * SGSenseGloveImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGSenseGloveImpl_Parse( + void* OutSenseGloveImpl, + void* ConstantsString) +{ + StaticCast(OutSenseGloveImpl)->Ptr = + FSGSenseGloveImpl::Parse(StaticCast(ConstantsString)->String); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetSenseGloves( + void* OutGloves) +{ + StaticCast(OutGloves)->Array = + FSGSenseGloveImpl::GetSenseGloves(); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetSenseGlove_OutGlove( + void* OutGlove) +{ + return FSGSenseGloveImpl::GetSenseGlove( + StaticCast(OutGlove)->SenseGloveImpl); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetSenseGlove_bRightHanded_OutGlove( + const bool bRightHanded, + void* OutGlove) +{ + return FSGSenseGloveImpl::GetSenseGlove( + bRightHanded, + StaticCast(OutGlove)->SenseGloveImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_CalculateGloveLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + const bool bRightHanded, + void* MountedOn, + void* OutGlovePosition, + void* OutGloveRotation) +{ + FSGSenseGloveImpl::CalculateGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + bRightHanded, + StaticCast(MountedOn)->Finger, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void SGCoreImpl_FSGSenseGloveImpl_CalculateWristLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + const bool bRightHanded, + void* MountedOn, + void* GloveWristPositionOffset, + void* GloveWristRotationOffset, + void* OutWristPosition, + void* OutWristRotation) +{ + FSGSenseGloveImpl::CalculateWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + bRightHanded, + StaticCast(MountedOn)->Finger, + StaticCast(GloveWristPositionOffset)->Vector, + StaticCast(GloveWristRotationOffset)->Quat, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +ANSICHAR SGCoreImpl_FSGSenseGloveImpl_GetHapticsByte() +{ + return FSGSenseGloveImpl::GetHapticsByte(); +} + +ANSICHAR SGCoreImpl_FSGSenseGloveImpl_GetThumperByte() +{ + return FSGSenseGloveImpl::GetThumperByte(); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetDefaultThimbleOffset( + void* OutOffset) +{ + StaticCast(OutOffset)->Vector = + FSGSenseGloveImpl::GetDefaultThimbleOffset(); +} + +void SGCoreImpl_FSGSenseGloveImpl_CalculateGlovePose_SensorData_GloveModel( + void* OutPose, + void* SensorData, + void* GloveModel) +{ + StaticCast(OutPose)->SenseGlovePoseImpl = + FSGSenseGloveImpl::CalculateGlovePose( + StaticCast(SensorData)->SenseGloveSensorDataImpl, + StaticCast(GloveModel)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_CalculateGlovePose_GloveAngles_GloveModel( + void* OutPose, + void* GloveAngles, + void* GloveModel) +{ + StaticCast(OutPose)->SenseGlovePoseImpl = + FSGSenseGloveImpl::CalculateGlovePose( + StaticCast(GloveAngles)->Array, + StaticCast(GloveModel)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_NormalizeValues( + void* SumAngles, + void* Normalizer, + void* OutFlexions, + void* OutAbductions) +{ + FSGSenseGloveImpl::NormalizeValues( + StaticCast(SumAngles)->Array, + StaticCast(Normalizer)->SenseGloveSensorNormalizerImpl, + StaticCast(OutFlexions)->Array, + StaticCast(OutAbductions)->Array); +} + +void SGCoreImpl_FSGSenseGloveImpl_CalculateHandAngles( + void* GlovePose, + void* Normalizer, + void* NormalizedToAngles, + void* OutHandAngles) +{ + FSGSenseGloveImpl::CalculateHandAngles( + StaticCast(GlovePose)->SenseGlovePoseImpl, + StaticCast(Normalizer)->SenseGloveSensorNormalizerImpl, + StaticCast(NormalizedToAngles)->HandInterpolatorImpl, + StaticCast(OutHandAngles)->Array); +} + +void SGCoreImpl_FSGSenseGloveImpl_CalculateHandPose( + void* GlovePose, + void* HandModel, + void* Normalizer, + void* NormalizedToAngles, + void* OutHandPose) +{ + FSGSenseGloveImpl::CalculateHandPose( + StaticCast(GlovePose)->SenseGlovePoseImpl, + StaticCast(HandModel)->BasicHandModelImpl, + StaticCast(Normalizer)->SenseGloveSensorNormalizerImpl, + StaticCast(NormalizedToAngles)->HandInterpolatorImpl, + StaticCast(OutHandPose)->HandPoseImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor( + void* OutSenseGloveImpl) +{ + StaticCast(OutSenseGloveImpl)->SenseGloveImpl = FSGSenseGloveImpl{}; +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared( + void* OutSharedPtr) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(); +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor_Model( + void* OutSenseGloveImpl, + void* Model) +{ + StaticCast(OutSenseGloveImpl)->SenseGloveImpl = + FSGSenseGloveImpl{ + StaticCast(Model)->SenseGloveInfoImpl}; +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor_Model_MakeShared( + void* OutSharedPtr, + void* Model) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared( + StaticCast(Model)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor_copy( + void* OutSenseGloveImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveImpl)->SenseGloveImpl = + FSGSenseGloveImpl(StaticCast(Rhs)->SenseGloveImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs) +{ + StaticCast(OutSharedPtr)->Ptr = + MakeShared(StaticCast(Rhs)->SenseGloveImpl); +} + +void SGCoreImpl_FSGSenseGloveImpl_ctor_copy_assignment( + void* OutSenseGloveImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveImpl)->SenseGloveImpl = + StaticCast(Rhs)->SenseGloveImpl; +} + +void SGCoreImpl_FSGSenseGloveImpl_GetDeviceType( + void* Instance, + void* OutType) +{ + StaticCast(OutType)->Type = + StaticCast(Instance)->Ptr->GetDeviceType(); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->Ptr->GetDeviceId(); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->Ptr->GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGSenseGloveImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGSenseGloveImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->Ptr->GetSubFirmwareVersion(); +} + +bool SGCoreImpl_FSGSenseGloveImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->Ptr->IsRight(); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetImuRotation( + void* Instance, + void* OutImu) +{ + return StaticCast(Instance)->Ptr->GetImuRotation( + StaticCast(OutImu)->Quat); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose) +{ + return StaticCast(Instance)->Ptr->GetHandPose( + StaticCast(HandGeometry)->BasicHandModelImpl, + StaticCast(OutHandPose)->HandPoseImpl); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles) +{ + return StaticCast(Instance)->Ptr->GetHandAngles( + StaticCast(OutHandAngles)->Array); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState) +{ + StaticCast(OutHapticGloveCalibrationState)->State = + StaticCast(Instance)->Ptr->GetCalibrationState(); +} + +void SGCoreImpl_FSGSenseGloveImpl_EndCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->EndCalibration(); +} + +void SGCoreImpl_FSGSenseGloveImpl_ResetCalibration( + void* Instance) +{ + StaticCast(Instance)->Ptr->ResetCalibration(); +} + +void SGCoreImpl_FSGSenseGloveImpl_StopHaptics( + void* Instance) +{ + StaticCast(Instance)->Ptr->StopHaptics(); +} + +void SGCoreImpl_FSGSenseGloveImpl_StopVibrations( + void* Instance) +{ + StaticCast(Instance)->Ptr->StopVibrations(); +} + +bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SendHaptics(); +} + +bool SGCoreImpl_FSGSenseGloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevels( + StaticCast(Levels01)->Array); +} + +bool SGCoreImpl_FSGSenseGloveImpl_QueueForceFeedbackLevel( + void* Instance, + const int32 Finger, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueForceFeedbackLevel( + Finger, + Level01); +} + +bool SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevels( + void* Instance, + void* Amplitudes) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevels( + StaticCast(Amplitudes)->Array); +} + +bool SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevel_Location_Level01( + void* Instance, + void* Location, + const float Level01) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevel( + StaticCast(Location)->Location, + Level01); +} + +void +SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation) +{ + StaticCast(Instance)->Ptr->GetGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void +SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* MountedOn, + void* OutGlovePosition, + void* OutGloveRotation) +{ + StaticCast(Instance)->Ptr->GetGloveLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(MountedOn)->Finger, + StaticCast(OutGlovePosition)->Vector, + StaticCast(OutGloveRotation)->Quat); +} + +void +SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation) +{ + StaticCast(Instance)->Ptr->GetWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +void +SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* GloveWristPositionOffset, + void* GloveWristRotationOffset, + void* OutWristPosition, + void* OutWristRotation) +{ + StaticCast(Instance)->Ptr->GetWristLocation( + StaticCast(ReferencePosition)->Vector, + StaticCast(ReferenceRotation)->Quat, + StaticCast(TrackingHardware)->Hardware, + StaticCast(GloveWristPositionOffset)->Vector, + StaticCast(GloveWristRotationOffset)->Quat, + StaticCast(OutWristPosition)->Vector, + StaticCast(OutWristRotation)->Quat); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetGloveInfo( + void* Instance, + void* OutGloveInfo) +{ + StaticCast(OutGloveInfo)->SenseGloveInfoImpl = + StaticCast(Instance)->Ptr->GetGloveInfo(); +} + +void SGCoreImpl_FSGSenseGloveImpl_GetFingerThimbleOffsets( + void* Instance, + void* OutFingerThimbleOffsets) +{ + StaticCast(OutFingerThimbleOffsets)->Array = + StaticCast(Instance)->Ptr->GetFingerThimbleOffsets(); +} + +void SGCoreImpl_FSGSenseGloveImpl_SetFingerThimbleOffset( + void* Instance, + const int32 Finger, + void* Offset) +{ + StaticCast(Instance)->Ptr->SetFingerThimbleOffset( + Finger, + StaticCast(Offset)->Vector); +} + +bool SGCoreImpl_FSGSenseGloveImpl_SupportsWristActuator( + void* Instance) +{ + return StaticCast(Instance)->Ptr->SupportsWristActuator(); +} + + +bool SGCoreImpl_FSGSenseGloveImpl_GetSensorData( + void* Instance, + void* OutSensorData) +{ + return StaticCast(Instance)->Ptr->GetSensorData( + StaticCast(OutSensorData)->NovaGloveSensorDataImpl); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_OutGlovePose( + void* Instance, + void* OutGlovePose) +{ + return StaticCast(Instance)->Ptr->GetGlovePose( + StaticCast(OutGlovePose)->SenseGlovePoseImpl); +} + +bool SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_SensorData_OutGlovePose( + void* Instance, + void* SensorData, + void* OutGlovePose) +{ + return StaticCast(Instance)->Ptr->GetGlovePose( + StaticCast(SensorData)->SenseGloveSensorDataImpl, + StaticCast(OutGlovePose)->SenseGlovePoseImpl); +} + +bool SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevel_Finger_Amplitude( + void* Instance, + const int32 Finger, + const float Amplitude) +{ + return StaticCast(Instance)->Ptr->QueueVibroLevel( + Finger, + Amplitude); +} + +bool SGCoreImpl_FSGSenseGloveImpl_QueueThumperCommand( + void* Instance, + void* Command) +{ + return StaticCast(Instance)->Ptr->QueueThumperCommand( + StaticCast(Command)->Command); +} + +void SGCoreImpl_FSGSenseGloveImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->Ptr->ToString(); +} + +/******************************************************************************* + * SGSenseGloveInfoImpl.h + ******************************************************************************/ + +bool SGCoreImpl_FSGSenseGloveInfoImpl_Parse( + void* ConstantsString, + void* OutGloveInfo, + const bool bUpdateOldModels) +{ + return FSGSenseGloveInfoImpl::Parse( + StaticCast(ConstantsString)->String, + StaticCast(OutGloveInfo)->SenseGloveInfoImpl, + bUpdateOldModels); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_Deserialize( + void* OutSenseGloveInfoImpl, + void* SerializedString) +{ + StaticCast(OutSenseGloveInfoImpl)->SenseGloveInfoImpl = + FSGSenseGloveInfoImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_ctor( + void* OutSenseGloveInfoImpl) +{ + StaticCast(OutSenseGloveInfoImpl)->SenseGloveInfoImpl = FSGSenseGloveInfoImpl(); +} + +void +SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + void* OutSenseGloveInfoImpl, + void* DeviceId, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion, + const bool bRightHanded, + const int32 NumberOfSensors, + void* ImuCorrection, + void* StartPositions, + void* StartRotations, + void* GloveLengths, + void* Functions) +{ + StaticCast(OutSenseGloveInfoImpl)->SenseGloveInfoImpl = + FSGSenseGloveInfoImpl( + StaticCast(DeviceId)->String, + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion, + bRightHanded, + NumberOfSensors, + StaticCast(ImuCorrection)->Quat, + StaticCast(StartPositions)->Array, + StaticCast(StartRotations)->Array, + StaticCast(GloveLengths)->Array, + StaticCast(Functions)->Array); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy( + void* OutSenseGloveInfoImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveInfoImpl)->SenseGloveInfoImpl = + FSGSenseGloveInfoImpl(StaticCast(Rhs)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy_assignment( + void* OutSenseGloveInfoImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveInfoImpl)->SenseGloveInfoImpl = + StaticCast(Rhs)->SenseGloveInfoImpl; +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetDeviceId( + void* Instance, + void* OutId) +{ + StaticCast(OutId)->String = + StaticCast(Instance)->SenseGloveInfoImpl.GetDeviceId(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetHardwareVersion( + void* Instance, + void* OutVersion) +{ + StaticCast(OutVersion)->String = + StaticCast(Instance)->SenseGloveInfoImpl.GetHardwareVersion(); +} + +int32 SGCoreImpl_FSGSenseGloveInfoImpl_GetFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->SenseGloveInfoImpl.GetFirmwareVersion(); +} + +int32 SGCoreImpl_FSGSenseGloveInfoImpl_GetSubFirmwareVersion( + void* Instance) +{ + return StaticCast(Instance)->SenseGloveInfoImpl.GetSubFirmwareVersion(); +} + +bool SGCoreImpl_FSGSenseGloveInfoImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->SenseGloveInfoImpl.IsRight(); +} + +int32 SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors( + void* Instance) +{ + return StaticCast(Instance)->SenseGloveInfoImpl.GetNumberOfSensors(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection( + void* Instance, + void* OutCorrection) +{ + StaticCast(OutCorrection)->Quat = + StaticCast(Instance)->SenseGloveInfoImpl.GetImuCorrection(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPositions( + void* Instance, + void* OutPositions) +{ + StaticCast(OutPositions)->Array = + StaticCast(Instance)->SenseGloveInfoImpl.GetStartPositions(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations( + void* Instance, + void* OutRotations) +{ + StaticCast(OutRotations)->Array = + StaticCast(Instance)->SenseGloveInfoImpl.GetStartRotations(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths( + void* Instance, + void* OutLengths) +{ + StaticCast(OutLengths)->Array = + StaticCast(Instance)->SenseGloveInfoImpl.GetGloveLengths(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetFunctions( + void* Instance, + void* OutFunctions) +{ + StaticCast(OutFunctions)->Array = + StaticCast(Instance)->SenseGloveInfoImpl.GetFunctions(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPosition( + void* Instance, + void* OutPosition, + void* Finger) +{ + StaticCast(OutPosition)->Vector = + StaticCast(Instance)->SenseGloveInfoImpl.GetStartPosition( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation( + void* Instance, + void* OutRotation, + void* Finger) +{ + StaticCast(OutRotation)->Quat = + StaticCast(Instance)->SenseGloveInfoImpl.GetStartRotation( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths_Finger( + void* Instance, + void* OutLengths, + void* Finger) +{ + StaticCast(OutLengths)->Array = + StaticCast(Instance)->SenseGloveInfoImpl.GetGloveLengths( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_ToGloveAngles( + void* Instance, + void* OutAngles, + void* SensorAngles) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->SenseGloveInfoImpl.ToGloveAngles( + StaticCast(SensorAngles)->Array); +} + +bool SGCoreImpl_FSGSenseGloveInfoImpl_Equals( + void* Instance, + void* SenseGloveInfoImpl) +{ + return StaticCast(Instance)->SenseGloveInfoImpl.Equals( + StaticCast(SenseGloveInfoImpl)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_ToString_bShortNotation( + void* Instance, + void* OutString, + const bool bShortNotation) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGloveInfoImpl.ToString(bShortNotation); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGloveInfoImpl.ToString(); +} + +void SGCoreImpl_FSGSenseGloveInfoImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGloveInfoImpl.Serialize(); +} + +/******************************************************************************* + * SGSenseGlovePoseImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGSenseGlovePoseImpl_IdlePose( + void* OutSenseGlovePoseImpl, + void* GloveInfo) +{ + StaticCast(OutSenseGlovePoseImpl)->SenseGlovePoseImpl = + FSGSenseGlovePoseImpl::IdlePose( + StaticCast(GloveInfo)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_Deserialize( + void* OutSenseGlovePoseImpl, + void* SerializedString) +{ + StaticCast(OutSenseGlovePoseImpl)->SenseGlovePoseImpl = + FSGSenseGlovePoseImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_ctor( + void* OutSenseGlovePoseImpl) +{ + StaticCast(OutSenseGlovePoseImpl)->SenseGlovePoseImpl = FSGSenseGlovePoseImpl(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + void* OutSenseGlovePoseImpl, + const bool bRightHanded, + void* JointPositions, + void* JointRotations, + void* GloveAngles) +{ + StaticCast(OutSenseGlovePoseImpl)->SenseGlovePoseImpl = + FSGSenseGlovePoseImpl( + bRightHanded, + StaticCast(JointPositions)->Array, + StaticCast(JointRotations)->Array, + StaticCast(GloveAngles)->Array); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_ctor_copy( + void* OutSenseGlovePoseImpl, + void* Rhs) +{ + StaticCast(OutSenseGlovePoseImpl)->SenseGlovePoseImpl = + FSGSenseGlovePoseImpl(StaticCast(Rhs)->SenseGlovePoseImpl); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_ctor_copy_assignment( + void* OutSenseGlovePoseImpl, + void* Rhs) +{ + StaticCast(OutSenseGlovePoseImpl)->SenseGlovePoseImpl = + StaticCast(Rhs)->SenseGlovePoseImpl; +} + +bool SGCoreImpl_FSGSenseGlovePoseImpl_IsRight( + void* Instance) +{ + return StaticCast(Instance)->SenseGlovePoseImpl.IsRight(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_GetJointPositions( + void* Instance, + void* OutPositions) +{ + StaticCast(OutPositions)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.GetJointPositions(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_GetJointRotations( + void* Instance, + void* OutRotations) +{ + StaticCast(OutRotations)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.GetJointRotations(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_GetGloveAngles( + void* Instance, + void* OutAngles) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.GetGloveAngles(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_GetThimblePositions( + void* Instance, + void* OutPositions) +{ + StaticCast(OutPositions)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.GetThimblePositions(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRotations( + void* Instance, + void* OutRotations) +{ + StaticCast(OutRotations)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.GetThimbleRotations(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_GetTotalGloveAngles( + void* Instance, + void* OutAngles) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.GetTotalGloveAngles(); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_CalculateFingertips( + void* Instance, + void* OutFingertips, + void* FingerOffsets) +{ + StaticCast(OutFingertips)->Array = + StaticCast(Instance)->SenseGlovePoseImpl.CalculateFingertips( + StaticCast(FingerOffsets)->Array); +} + +bool SGCoreImpl_FSGSenseGlovePoseImpl_Equals( + void* Instance, + void* SenseGlovePoseImpl) +{ + return StaticCast(Instance)->SenseGlovePoseImpl.Equals( + StaticCast(SenseGlovePoseImpl)->SenseGlovePoseImpl); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_ToString( + void* Instance, + void* OutString, + const bool bShortFormat) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGlovePoseImpl.ToString(bShortFormat); +} + +void SGCoreImpl_FSGSenseGlovePoseImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGlovePoseImpl.Serialize(); +} + +/******************************************************************************* + * SGSenseGloveSensorDataImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_Empty( + void* OutSenseGloveSensorDataImpl) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + FSGSenseGloveSensorDataImpl::Empty(); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_Parse( + void* OutSenseGloveSensorDataImpl, + void* RawData, + void* GloveInfo) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + FSGSenseGloveSensorDataImpl::Parse( + StaticCast(RawData)->String, + StaticCast(GloveInfo)->SenseGloveInfoImpl); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_Deserialize( + void* OutSenseGloveSensorDataImpl, + void* SerializedString) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + FSGSenseGloveSensorDataImpl::Deserialize( + StaticCast(SerializedString)->String); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor( + void* OutSenseGloveSensorDataImpl) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + FSGSenseGloveSensorDataImpl(); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + void* OutSenseGloveSensorDataImpl, + void* SensorAngles, + void* ImuRotation, + const int32 ParsedValues, + const bool bImuParsed) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + FSGSenseGloveSensorDataImpl( + StaticCast(SensorAngles)->Array, + StaticCast(ImuRotation)->Quat, + ParsedValues, + bImuParsed); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_copy( + void* OutSenseGloveSensorDataImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + FSGSenseGloveSensorDataImpl(StaticCast(Rhs)->SenseGloveSensorDataImpl); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_copy_assignment( + void* OutSenseGloveSensorDataImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveSensorDataImpl)->SenseGloveSensorDataImpl = + StaticCast(Rhs)->SenseGloveSensorDataImpl; +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetSensorAngles( + void* Instance, + void* OutAngles) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->SenseGloveSensorDataImpl.GetSensorAngles(); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetSensorAngles_Finger( + void* Instance, + void* OutAngles, + void* Finger) +{ + StaticCast(OutAngles)->Array = + StaticCast(Instance)->SenseGloveSensorDataImpl.GetSensorAngles( + StaticCast(Finger)->Finger); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetAngleSequence( + void* Instance, + void* OutSequence) +{ + StaticCast(OutSequence)->Array = + StaticCast(Instance)->SenseGloveSensorDataImpl.GetAngleSequence(); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetImuRotation( + void* Instance, + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = + StaticCast(Instance)->SenseGloveSensorDataImpl.GetImuRotation(); +} + +int32 SGCoreImpl_FSGSenseGloveSensorDataImpl_GetParsedValues( + void* Instance) +{ + return StaticCast(Instance)->SenseGloveSensorDataImpl.GetParsedValues(); +} + +bool SGCoreImpl_FSGSenseGloveSensorDataImpl_IsImuParsed( + void* Instance) +{ + return StaticCast(Instance)->SenseGloveSensorDataImpl.IsImuParsed(); +} + +bool SGCoreImpl_FSGSenseGloveSensorDataImpl_Equals( + void* Instance, + void* SenseGloveSensorDataImpl) +{ + return StaticCast(Instance)->SenseGloveSensorDataImpl.Equals( + StaticCast(SenseGloveSensorDataImpl)->SenseGloveSensorDataImpl); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGloveSensorDataImpl.ToString(); +} + +void SGCoreImpl_FSGSenseGloveSensorDataImpl_Serialize( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->SenseGloveSensorDataImpl.Serialize(); +} + +/******************************************************************************* + * SGSenseGloveSensorNormalizerImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor( + void* OutSenseGloveSensorNormalizerImpl) +{ + StaticCast(OutSenseGloveSensorNormalizerImpl)-> + SenseGloveSensorNormalizerImpl = + FSGSenseGloveSensorNormalizerImpl(); +} + +void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_bRightHanded( + void* OutSenseGloveSensorNormalizerImpl, + const bool bRightHanded) +{ + StaticCast(OutSenseGloveSensorNormalizerImpl)-> + SenseGloveSensorNormalizerImpl = + FSGSenseGloveSensorNormalizerImpl( + bRightHanded); +} + +void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_copy( + void* OutSenseGloveSensorNormalizerImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveSensorNormalizerImpl)-> + SenseGloveSensorNormalizerImpl = + FSGSenseGloveSensorNormalizerImpl( + StaticCast(Rhs)->SenseGloveSensorNormalizerImpl); +} + +void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_copy_assignment( + void* OutSenseGloveSensorNormalizerImpl, + void* Rhs) +{ + StaticCast(OutSenseGloveSensorNormalizerImpl)-> + SenseGloveSensorNormalizerImpl = + StaticCast(Rhs)->SenseGloveSensorNormalizerImpl; +} + +float SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_NormalizeFlexion( + void* Instance, + const int32 Finger, + const float SumFlexionAngles) +{ + return StaticCast( + Instance)->SenseGloveSensorNormalizerImpl.NormalizeFlexion( + Finger, SumFlexionAngles); +} + +float SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_NormalizeAbduction( + void* Instance, + const int32 Finger, + const float SumAbductionAngles) +{ + return StaticCast( + Instance)->SenseGloveSensorNormalizerImpl.NormalizeAbduction( + Finger, SumAbductionAngles); +} + +/******************************************************************************* + * SGSenseGloveVarsImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetStandardConstantsString( + void* OutString, + void* HardwareVersion, + const float FirmwareVersion, + const bool bRightHanded) +{ + StaticCast(OutString)->String = FSGSenseGloveVarsImpl::GetStandardConstantsString( + StaticCast(HardwareVersion)->String, + FirmwareVersion, + bRightHanded); +} + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetSensorString( + void* OutString, + void* HardwareVersion, + const float FirmwareVersion) +{ + StaticCast(OutString)->String = FSGSenseGloveVarsImpl::GetSensorString( + StaticCast(HardwareVersion)->String, + FirmwareVersion); +} + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetStartPositions( + void* OutPositions, + void* HardwareVersion, + const bool bRightHanded) +{ + StaticCast(OutPositions)->Array = FSGSenseGloveVarsImpl::GetStartPositions( + StaticCast(HardwareVersion)->String, + bRightHanded); +} + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetStartRotations( + void* OutRotations, + void* HardwareVersion, + const bool bRightHanded) +{ + StaticCast(OutRotations)->Array = FSGSenseGloveVarsImpl::GetStartRotations( + StaticCast(HardwareVersion)->String, + bRightHanded); +} + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetGloveLengths( + void* OutLengths, + void* HardwareVersion) +{ + StaticCast(OutLengths)->Array = FSGSenseGloveVarsImpl::GetGloveLengths( + StaticCast(HardwareVersion)->String); +} + +int32 SGCoreImpl_FSGSenseGloveVarsImpl_GetSensors( + void* HardwareVersion) +{ + return FSGSenseGloveVarsImpl::GetSensors(StaticCast(HardwareVersion)->String); +} + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetImuCorrection( + void* OutCorrection, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + StaticCast(OutCorrection)->Quat = FSGSenseGloveVarsImpl::GetImuCorrection( + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion); +} + +void SGCoreImpl_FSGSenseGloveVarsImpl_GetFunctions( + void* OutFunctions, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + StaticCast(OutFunctions)->Array = FSGSenseGloveVarsImpl::GetFunctions( + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion); +} + +void +SGCoreImpl_FSGSenseGloveVarsImpl_GenerateGloveModel_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded( + void* OutModel, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion, + const bool bRightHanded) +{ + StaticCast(OutModel)->SenseGloveInfoImpl = + FSGSenseGloveVarsImpl::GenerateGloveModel( + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion, + bRightHanded); +} + +void +SGCoreImpl_FSGSenseGloveVarsImpl_GenerateGloveModel_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_CustomId( + void* OutModel, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion, + const bool bRightHanded, + void* CustomId) +{ + StaticCast(OutModel)->SenseGloveInfoImpl = + FSGSenseGloveVarsImpl::GenerateGloveModel( + StaticCast(HardwareVersion)->String, + FirmwareVersion, + SubFirmwareVersion, + bRightHanded, + StaticCast(CustomId)->String); +} + +/******************************************************************************* + * SGSensorNormalizationImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGSensorNormalizationImpl_ctor( + void* OutSensorNormalizationImpl) +{ + StaticCast(OutSensorNormalizationImpl)->SensorNormalizationImpl = + FSGSensorNormalizationImpl{}; +} + +void SGCoreImpl_FSGSensorNormalizationImpl_ctor_MovementRanges( + void* OutSensorNormalizationImpl, + void* MovementRanges) +{ + StaticCast(OutSensorNormalizationImpl)->SensorNormalizationImpl = + FSGSensorNormalizationImpl{ + StaticCast(MovementRanges)->Array + }; +} + +void SGCoreImpl_FSGSensorNormalizationImpl_ctor_copy( + void* OutSensorNormalizationImpl, + void* Rhs) +{ + StaticCast(OutSensorNormalizationImpl)->SensorNormalizationImpl = + FSGSensorNormalizationImpl(StaticCast(Rhs)->SensorNormalizationImpl); +} + +void SGCoreImpl_FSGSensorNormalizationImpl_ctor_copy_assignment( + void* OutSensorNormalizationImpl, + void* Rhs) +{ + StaticCast(OutSensorNormalizationImpl)->SensorNormalizationImpl = + StaticCast(Rhs)->SensorNormalizationImpl; +} + +bool SGCoreImpl_FSGSensorNormalizationImpl_CollectsNormalization( + void* Instance) +{ + return StaticCast(Instance)->SensorNormalizationImpl.CollectsNormalization(); +} + +void SGCoreImpl_FSGSensorNormalizationImpl_SetCollectNormalization( + void* Instance, + const bool bCollectNormalization) +{ + StaticCast(Instance)->SensorNormalizationImpl.SetCollectNormalization( + bCollectNormalization); +} + +int32 SGCoreImpl_FSGSensorNormalizationImpl_GetLength( + void* Instance) +{ + return StaticCast(Instance)->SensorNormalizationImpl.GetLength(); +} + +int32 SGCoreImpl_FSGSensorNormalizationImpl_GetMoveCount( + void* Instance) +{ + return StaticCast(Instance)->SensorNormalizationImpl.GetMoveCount(); +} + +bool SGCoreImpl_FSGSensorNormalizationImpl_AllSensorsMoving( + void* Instance) +{ + return StaticCast(Instance)->SensorNormalizationImpl.AllSensorsMoving(); +} + +void SGCoreImpl_FSGSensorNormalizationImpl_ResetNormalization( + void* Instance) +{ + return StaticCast(Instance)->SensorNormalizationImpl.ResetNormalization(); +} + +void SGCoreImpl_FSGSensorNormalizationImpl_UpdateNormalization( + void* Instance, + const float Value, + const int32 Index) +{ + StaticCast(Instance)->SensorNormalizationImpl.UpdateNormalization( + Value, Index); +} + +float SGCoreImpl_FSGSensorNormalizationImpl_NormalizeValue( + void* Instance, + const float Value, + const int32 Index) +{ + return StaticCast(Instance)->SensorNormalizationImpl.NormalizeValue( + Value, Index); +} + +void SGCoreImpl_FSGSensorNormalizationImpl_NormalizeValues( + void* Instance, + void* Values, + void* OutNormalizedValues) +{ + StaticCast(OutNormalizedValues)->Array = + StaticCast(Instance)->SensorNormalizationImpl.NormalizeValues( + StaticCast(Values)->Array); +} + +bool SGCoreImpl_FSGSensorNormalizationImpl_MovedEnough( + void* Instance, + const int32 Index) +{ + return StaticCast(Instance)->SensorNormalizationImpl.MovedEnough( + Index); +} + +float SGCoreImpl_FSGSensorNormalizationImpl_Denormalize( + void* Instance, + const float Value01, + const int32 Index, + const float FallbackValue) +{ + return StaticCast(Instance)->SensorNormalizationImpl.Denormalize( + Value01, + Index, + FallbackValue); +} + +/******************************************************************************* + * SGThresholdCommandImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGThresholdCommandImpl_ctor( + void* OutThresholdCommandImpl) +{ + StaticCast(OutThresholdCommandImpl)->ThresholdCommandImpl = + FSGThresholdCommandImpl{}; +} + +void SGCoreImpl_FSGThresholdCommandImpl_ctor_AffectedFingers_ThresholdValues( + void* OutThresholdCommandImpl, + void* AffectedFingers, + void* ThresholdValues) +{ + StaticCast(OutThresholdCommandImpl)->ThresholdCommandImpl = + FSGThresholdCommandImpl{ + StaticCast(AffectedFingers)->Array, + StaticCast(ThresholdValues)->Array + }; +} + +void SGCoreImpl_FSGThresholdCommandImpl_ctor_copy( + void* OutThresholdCommandImpl, + void* Rhs) +{ + StaticCast(OutThresholdCommandImpl)->ThresholdCommandImpl = + FSGThresholdCommandImpl(StaticCast(Rhs)->ThresholdCommandImpl); +} + +void SGCoreImpl_FSGThresholdCommandImpl_ctor_copy_assignment( + void* OutThresholdCommandImpl, + void* Rhs) +{ + StaticCast(OutThresholdCommandImpl)->ThresholdCommandImpl = + StaticCast(Rhs)->ThresholdCommandImpl; +} + +float SGCoreImpl_FSGThresholdCommandImpl_GetThreshold( + void* Instance, + const int32 Finger) +{ + return StaticCast(Instance)->ThresholdCommandImpl.GetThreshold( + Finger); +} + +void SGCoreImpl_FSGThresholdCommandImpl_SetThreshold( + void* Instance, + const int32 Finger, + const float ThresholdValue) +{ + return StaticCast(Instance)->ThresholdCommandImpl.SetThreshold( + Finger, + ThresholdValue); +} + +void SGCoreImpl_FSGThresholdCommandImpl_GetThresholds( + void* Instance, + void* OutThresholds) +{ + StaticCast(OutThresholds)->Array = + StaticCast(Instance)->ThresholdCommandImpl.GetThresholds(); +} + +void SGCoreImpl_FSGThresholdCommandImpl_SetThresholds( + void* Instance, + void* AffectedFingers, + void* ThresholdValues) +{ + return StaticCast(Instance)->ThresholdCommandImpl.SetThresholds( + StaticCast(AffectedFingers)->Array, + StaticCast(ThresholdValues)->Array); +} + +bool SGCoreImpl_FSGThresholdCommandImpl_GetFingerActive( + void* Instance, + const int32 Finger) +{ + return StaticCast(Instance)->ThresholdCommandImpl.GetFingerActive( + Finger); +} + +void SGCoreImpl_FSGThresholdCommandImpl_GetActiveFingers( + void* Instance, + void* OutActiveFingers) +{ + StaticCast(OutActiveFingers)->Array = + StaticCast(Instance)->ThresholdCommandImpl.GetActiveFingers(); +} + +void SGCoreImpl_FSGThresholdCommandImpl_ClearThreshold( + void* Instance, + const int32 Finger) +{ + return StaticCast(Instance)->ThresholdCommandImpl.ClearThreshold( + Finger); +} + +void SGCoreImpl_FSGThresholdCommandImpl_ClearThresholds( + void* Instance) +{ + return StaticCast(Instance)->ThresholdCommandImpl.ClearThresholds(); +} + +bool SGCoreImpl_FSGThresholdCommandImpl_Equals( + void* Instance, + void* ThresholdCommandImpl) +{ + return StaticCast(Instance)->ThresholdCommandImpl.Equals( + StaticCast(ThresholdCommandImpl)->ThresholdCommandImpl); +} + +void SGCoreImpl_FSGThresholdCommandImpl_ToString( + void* Instance, + void* OutString) +{ + StaticCast(OutString)->String = + StaticCast(Instance)->ThresholdCommandImpl.ToString(); +} + +/******************************************************************************* + * SGTrackingImpl.h + ******************************************************************************/ + +void SGCoreImpl_FSGTrackingImpl_CalculateLocation( + void* TrackedPosition, + void* TrackedRotation, + void* PositionOffset, + void* RotationOffset, + void* OutNewPosition, + void* OutNewRotation) +{ + FSGTrackingImpl::CalculateLocation( + StaticCast(TrackedPosition)->Vector, + StaticCast(TrackedRotation)->Quat, + StaticCast(PositionOffset)->Vector, + StaticCast(RotationOffset)->Quat, + StaticCast(OutNewPosition)->Vector, + StaticCast(OutNewRotation)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGlovePositionOrigin( + void* OutOrigin) +{ + StaticCast(OutOrigin)->Array = + FSGTrackingImpl::GetSenseGloveFingerToGlovePositionOrigin(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin( + void* OutOrigin) +{ + StaticCast(OutOrigin)->Array = FSGTrackingImpl::GetSenseGloveFingerToGloveRotationOrigin(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristPositionOffset( + void* OutOffset) +{ + StaticCast(OutOffset)->Vector = FSGTrackingImpl::GetSenseGloveWristPositionOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset( + void* OutOffset) +{ + StaticCast(OutOffset)->Quat = FSGTrackingImpl::GetSenseGloveWristRotationOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveMountOffset( + const bool bRightHanded, + void* ToFinger, + void* OutIPosition, + void* OutIRotation) +{ + FSGTrackingImpl::GetSenseGloveMountOffset( + bRightHanded, + StaticCast(ToFinger)->Finger, + StaticCast(OutIPosition)->Vector, + StaticCast(OutIRotation)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveTrackerMountOffset( + void* Hardware, + const bool bRightHanded, + void* OutPositionOffset, + void* OutRotationOffset) +{ + FSGTrackingImpl::GetSenseGloveTrackerMountOffset( + StaticCast(Hardware)->Hardware, + bRightHanded, + StaticCast(OutPositionOffset)->Vector, + StaticCast(OutRotationOffset)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetSenseGloveViveToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetSenseGloveViveToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetSenseGloveOculusTouchToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetSenseGloveOculusTouchToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetNovaToWristPositionOffset( + void* OutOffset) +{ + StaticCast(OutOffset)->Vector = FSGTrackingImpl::GetNovaToWristPositionOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset( + void* OutOffset) +{ + StaticCast(OutOffset)->Quat = FSGTrackingImpl::GetNovaToWristRotationOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNovaViveToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNovaViveToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNovaViveToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNovaViveToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNovaQuest2ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNovaQuest2ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNovaQuest2ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNovaQuest2ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNovaPico2ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNovaPico2ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNovaPico2ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNovaQuestProToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNovaQuestProToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNovaQuestProToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNovaQuestProToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNovaViveFocus3ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNovaViveFocus3ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNovaViveFocus3ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNovaViveFocus3ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNovaQuest3ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNovaQuest3ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNovaQuest3ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNovaQuest3ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetNovaGloveWristOffset( + const bool bRightHanded, + void* OutPositionOffset, + void* OutRotationOffset) +{ + FSGTrackingImpl::GetNovaGloveWristOffset( + bRightHanded, + StaticCast(OutPositionOffset)->Vector, + StaticCast(OutRotationOffset)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_GetNovaGloveTrackerOffset( + void* Hardware, + const bool bRightHanded, + void* OutPositionOffset, + void* OutRotationOffset) +{ + FSGTrackingImpl::GetNovaGloveTrackerOffset( + StaticCast(Hardware)->Hardware, + bRightHanded, + StaticCast(OutPositionOffset)->Vector, + StaticCast(OutRotationOffset)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristPositionOffset( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNova2ToWristPositionOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristRotationOffset( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNova2ToWristRotationOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristPositionOffset( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNova2ToWristPositionOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristRotationOffset( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNova2ToWristRotationOffset(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNova2Quest2ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNova2Quest2ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNova2Quest2ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNova2Quest2ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2QuestProToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNova2QuestProToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2QuestProToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNova2QuestProToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2QuestProToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNova2QuestProToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2QuestProToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNova2QuestProToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNova2ViveTrackerToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNova2ViveTrackerToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNova2ViveTrackerToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNova2ViveTrackerToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = + FSGTrackingImpl::GetRightNova2ViveWristTrackerToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNova2ViveWristTrackerToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = + FSGTrackingImpl::GetLeftNova2ViveWristTrackerToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNova2ViveWristTrackerToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetRightNova2Quest3ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetRightNova2Quest3ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachPosition( + void* OutPosition) +{ + StaticCast(OutPosition)->Vector = FSGTrackingImpl::GetLeftNova2Quest3ToAttachPosition(); +} + +void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachRotation( + void* OutRotation) +{ + StaticCast(OutRotation)->Quat = FSGTrackingImpl::GetLeftNova2Quest3ToAttachRotation(); +} + +void SGCoreImpl_FSGTrackingImpl_GetNova2GloveWristOffset( + const bool bRightHanded, + void* HardwareVersion, + void* OutPositionOffset, + void* OutRotationOffset) +{ + FSGTrackingImpl::GetNova2GloveWristOffset( + bRightHanded, + StaticCast(HardwareVersion)->String, + StaticCast(OutPositionOffset)->Vector, + StaticCast(OutRotationOffset)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_GetNova2GloveTrackerOffset( + void* Hardware, + const bool bRightHanded, + void* HardwareVersion, + void* OutPositionOffset, + void* OutRotationOffset) +{ + FSGTrackingImpl::GetNova2GloveTrackerOffset( + StaticCast(Hardware)->Hardware, + bRightHanded, + StaticCast(HardwareVersion)->String, + StaticCast(OutPositionOffset)->Vector, + StaticCast(OutRotationOffset)->Quat); +} + +void SGCoreImpl_FSGTrackingImpl_ToString( + void* OutString, + void* Hardware) +{ + StaticCast(OutString)->String = FSGTrackingImpl::ToString( + StaticCast(Hardware)->Hardware); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandInterpolatorImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandInterpolatorImpl.cpp new file mode 100644 index 0000000..a5f2e1e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandInterpolatorImpl.cpp @@ -0,0 +1,186 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHandInterpolatorImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_HandInterpolator.h" +#include "SGBuildHacks/SGInclude_Core_InterpolationSet.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGInterpolationSetImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGAngles.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGHandInterpolatorImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FHandInterpolatorType HandInterpolator; + + /************************ + * Owner object + ************************/ + + FSGHandInterpolatorImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGHandInterpolatorImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGHandInterpolatorImpl FSGHandInterpolatorImpl::Deserialize(const FString& SerializedString, const bool bRightHanded) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGHandInterpolatorImpl GlovePose(FHandInterpolatorType::Deserialize(MoveTemp(Serialized), bRightHanded)); + return GlovePose; +} + +FSGHandInterpolatorImpl::FSGHandInterpolatorImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const bool bRightHanded) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->HandInterpolator = FHandInterpolatorType(bRightHanded); +} + +FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const FHandInterpolatorType& HandInterpolator) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->HandInterpolator = HandInterpolator; +} + +FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(const FSGHandInterpolatorImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGHandInterpolatorImpl::FSGHandInterpolatorImpl(FSGHandInterpolatorImpl&& Rhs) SG_NOEXCEPT = default; + +FSGHandInterpolatorImpl::~FSGHandInterpolatorImpl() = default; + +FSGHandInterpolatorImpl& FSGHandInterpolatorImpl::operator=(const FSGHandInterpolatorImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGHandInterpolatorImpl& FSGHandInterpolatorImpl::operator=(FSGHandInterpolatorImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGHandInterpolatorImpl::FHandInterpolatorType& FSGHandInterpolatorImpl::ToHandInterpolator( + ) const +{ + return Pimpl->HandInterpolator; +} + +float FSGHandInterpolatorImpl::CalculateAngle( + const ESGFingerMovement Movement, const float Value, const bool bApplyLimits) const +{ + return FSGAngles::TransformToUnreal( + Movement, Pimpl->HandInterpolator.CalculateAngle( + FSGCoreEnumCast::ToEFingerMovement(Movement), Value, bApplyLimits)); +} + +float FSGHandInterpolatorImpl::CalculateAngle( + const ESGThumbMovement Movement, const float Value, const bool bApplyLimits) const +{ + return FSGAngles::TransformToUnreal( + Movement, Pimpl->HandInterpolator.CalculateAngle( + FSGCoreEnumCast::ToEThumbMovement(Movement), Value, bApplyLimits)); +} + +TArray> FSGHandInterpolatorImpl::InterpolateHandAngles( + const TArray>& Flexions, const TArray& Abductions, const float CmcTwist) +{ + std::vector> FlexionsVector{ + FSGArrayUtils::ToSenseGloveAngles(Flexions) + }; + std::vector AbductionsVector{ + FSGArrayUtils::ToSenseGloveAngles(Abductions) + }; + const TArray> Angles{ + FSGArrayUtils::FromSenseGloveAngles( + Pimpl->HandInterpolator.InterpolateHandAngles( + MoveTemp(FlexionsVector), MoveTemp(AbductionsVector), CmcTwist)) + }; + return Angles; +} + +bool FSGHandInterpolatorImpl::Equals(const FSGHandInterpolatorImpl& HandInterpolatorImpl) const +{ + return Pimpl->HandInterpolator.Equals(HandInterpolatorImpl.ToHandInterpolator()); +} + +FString FSGHandInterpolatorImpl::Serialize() const +{ + const FString Serialized(UTF8_TO_TCHAR(Pimpl->HandInterpolator.Serialize().c_str())); + return Serialized; +} + +FSGHandInterpolatorImpl::FImpl::FImpl(FSGHandInterpolatorImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGHandInterpolatorImpl::FImpl::~FImpl() = default; + +void FSGHandInterpolatorImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandLayerImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandLayerImpl.cpp new file mode 100644 index 0000000..bac41d9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandLayerImpl.cpp @@ -0,0 +1,221 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHandLayerImpl.h" + +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h" +#include "SGBuildHacks/SGInclude_Core_HandLayer.h" +#include "SGBuildHacks/SGInclude_Core_HandPose.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCustomWaveformImpl.h" +#include "SGCoreImpl/SGCustomWaveformImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +bool FSGHandLayerImpl::DeviceConnected(const bool bRightHanded) +{ + return FHandLayerType::DeviceConnected(bRightHanded); +} + +ESGDeviceType FSGHandLayerImpl::GetDeviceType(const bool bRightHanded) +{ + return FSGCoreEnumCast::ToESGDeviceType(FHandLayerType::GetDeviceType(bRightHanded)); +} + +bool FSGHandLayerImpl::GetFirstGloveHandedness() +{ + return FHandLayerType::GetFirstGloveHandedness(); +} + +int32 FSGHandLayerImpl::GlovesConnected() +{ + return FHandLayerType::GlovesConnected(); +} + +bool FSGHandLayerImpl::GetGloveInstance(const bool bRightHanded, TSharedPtr& OutGlove) +{ + FSGHapticGloveImpl::FHapticGlovePtrType Glove; + const bool bResult = FHandLayerType::GetGloveInstance(bRightHanded, Glove); + + if (bResult) + { + OutGlove = MakeShared(MoveTemp(Glove)); + } + + return bResult; +} + +ESGHapticGloveCalibrationState FSGHandLayerImpl::GetCalibrationState(const bool bRightHanded) +{ + return FSGCoreEnumCast::ToESGHapticGloveCalibrationState(FHandLayerType::GetCalibrationState(bRightHanded)); +} + +FString FSGHandLayerImpl::GetCalibrationInstructions(const bool bRightHanded) +{ + const FString Instructions{UTF8_TO_TCHAR(FHandLayerType::GetCalibrationInstructions(bRightHanded).c_str())}; + return Instructions; +} + +void FSGHandLayerImpl::ResetCalibration(const bool bRightHanded) +{ + FHandLayerType::ResetCalibration(bRightHanded); +} + +void FSGHandLayerImpl::EndCalibration(const bool bRightHanded) +{ + FHandLayerType::EndCalibration(bRightHanded); +} + +bool FSGHandLayerImpl::GetHandPose(const bool bRightHanded, FSGHandPoseImpl& OutHandPose) +{ + FSGHandPoseImpl::FHandPoseType HandPose; + + const bool bResult = FHandLayerType::GetHandPose(bRightHanded, HandPose); + OutHandPose = FSGHandPoseImpl{HandPose}; + + return bResult; +} + +void FSGHandLayerImpl::GetWristLocation( + const bool bRightHanded, const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, + FQuat& OutWristRotation) +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + FHandLayerType::GetWristLocation( + bRightHanded, + FSGVect3DImpl{ReferencePosition}.ToVect3D(), FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + WristPosition, WristRotation); + + OutWristPosition = FSGVect3DImpl{WristPosition}.ToFVector(); + OutWristRotation = FSGQuatImpl{WristRotation}.ToFQuat(); +} + +void FSGHandLayerImpl::StopAllHaptics(const bool bRightHanded) +{ + FHandLayerType::StopAllHaptics(bRightHanded); +} + +bool FSGHandLayerImpl::SendHaptics(const bool bRightHanded) +{ + return FHandLayerType::SendHaptics(bRightHanded); +} + +bool FSGHandLayerImpl::SupportsCustomWaveform(const bool bRightHanded, const ESGHapticLocation AtLocation) +{ + return FHandLayerType::SupportsCustomWaveform(bRightHanded, FSGCoreEnumCast::ToEHapticLocation(AtLocation)); +} + +bool FSGHandLayerImpl::SendCustomWaveform( + const bool bRightHanded, FSGCustomWaveformImpl& OutWaveform, const ESGHapticLocation Location) +{ + const bool bResult = FHandLayerType::SendCustomWaveform( + bRightHanded, OutWaveform.ToCustomWaveform(), FSGCoreEnumCast::ToEHapticLocation(Location)); + return bResult; +} + +bool FSGHandLayerImpl::QueueCommand_ForceFeedbackLevels( + const bool bRightHanded, const TArray& Levels01, const bool bSendImmediate) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return FHandLayerType::QueueCommand_ForceFeedbackLevels(bRightHanded, MoveTemp(Levels01Vector), bSendImmediate); +} + +bool FSGHandLayerImpl::QueueCommand_ForceFeedbackLevel( + const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate) +{ + return FHandLayerType::QueueCommand_ForceFeedbackLevel(bRightHanded, Finger, Level01, bSendImmediate); +} + +bool FSGHandLayerImpl::QueueCommand_VibroLevels( + const bool bRightHanded, const TArray& Levels01, const bool bSendImmediate) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return FHandLayerType::QueueCommand_VibroLevels(bRightHanded, MoveTemp(Levels01Vector), bSendImmediate); +} + +bool FSGHandLayerImpl::QueueCommand_VibroLevel( + const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate) +{ + return FHandLayerType::QueueCommand_VibroLevel(bRightHanded, Finger, Level01, bSendImmediate); +} + +bool FSGHandLayerImpl::QueueCommand_VibroLevel( + const bool bRightHanded, const ESGHapticLocation AtLocation, const float Level01, const bool bSendImmediate) +{ + return FHandLayerType::QueueCommand_VibroLevel( + bRightHanded, FSGCoreEnumCast::ToEHapticLocation(AtLocation), Level01, bSendImmediate); +} + +bool FSGHandLayerImpl::SupportsWristSqueeze(const bool bRightHanded) +{ + return FHandLayerType::SupportsWristSqueeze(bRightHanded); +} + +bool FSGHandLayerImpl::QueueCommand_WristSqueeze( + const bool bRightHanded, const float SqueezeLevel01, const bool bSendImmediate) +{ + return FHandLayerType::QueueCommand_WristSqueeze(bRightHanded, SqueezeLevel01, bSendImmediate); +} + +bool FSGHandLayerImpl::SupportsFlexionLocks(const bool bRightHanded) +{ + return FHandLayerType::SupportsFlexionLocks(bRightHanded); +} + +bool FSGHandLayerImpl::QueueCommand_FlexionLock( + const bool bRightHanded, const int32 Finger, const float Flexion01, const bool bSendImmediate) +{ + return FHandLayerType::QueueCommand_FlexionLock(bRightHanded, Finger, Flexion01, bSendImmediate); +} + +bool FSGHandLayerImpl::QueueCommand_ClearFlexionLock( + const bool bRightHanded, const int32 Finger, const bool bSendImmediate) +{ + return FHandLayerType::QueueCommand_ClearFlexionLock(bRightHanded, Finger, bSendImmediate); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandPoseImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandPoseImpl.cpp new file mode 100644 index 0000000..e257078 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHandPoseImpl.cpp @@ -0,0 +1,272 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHandPoseImpl.h" + +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_HandPose.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGAngles.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGHandPoseImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FHandPoseType HandPose; + + /************************ + * Owner object + ************************/ + + FSGHandPoseImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGHandPoseImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGHandPoseImpl FSGHandPoseImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGHandPoseImpl HandPose(FHandPoseType::Deserialize(MoveTemp(Serialized))); + return HandPose; +} + +FSGHandPoseImpl FSGHandPoseImpl::FromHandAngles(const TArray>& HandAngles, const bool bRightHanded, + const FSGBasicHandModelImpl& HandDimensions) +{ + std::vector> HandAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(HandAngles) + }; + return FSGHandPoseImpl(FHandPoseType::FromHandAngles( + MoveTemp(HandAnglesVector), bRightHanded, HandDimensions.ToBasicHandModel())); +} + +FSGHandPoseImpl FSGHandPoseImpl::FromHandAngles(const TArray>& HandAngles, const bool bRightHanded) +{ + std::vector> HandAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(HandAngles) + }; + return FSGHandPoseImpl(FHandPoseType::FromHandAngles(MoveTemp(HandAnglesVector), bRightHanded)); +} + +FSGHandPoseImpl FSGHandPoseImpl::DefaultIdle(const bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions) +{ + return FSGHandPoseImpl(FHandPoseType::DefaultIdle(bRightHanded, HandDimensions.ToBasicHandModel())); +} + +FSGHandPoseImpl FSGHandPoseImpl::DefaultIdle(const bool bRightHanded) +{ + return FSGHandPoseImpl(FHandPoseType::DefaultIdle(bRightHanded)); +} + +FSGHandPoseImpl FSGHandPoseImpl::FlatHand(const bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions) +{ + return FSGHandPoseImpl(FHandPoseType::FlatHand(bRightHanded, HandDimensions.ToBasicHandModel())); +} + +FSGHandPoseImpl FSGHandPoseImpl::FlatHand(const bool bRightHanded) +{ + return FSGHandPoseImpl(FHandPoseType::FlatHand(bRightHanded)); +} + +FSGHandPoseImpl FSGHandPoseImpl::ThumbsUp(const bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions) +{ + return FSGHandPoseImpl(FHandPoseType::ThumbsUp(bRightHanded, HandDimensions.ToBasicHandModel())); +} + +FSGHandPoseImpl FSGHandPoseImpl::ThumbsUp(const bool bRightHanded) +{ + return FSGHandPoseImpl(FHandPoseType::ThumbsUp(bRightHanded)); +} + +FSGHandPoseImpl FSGHandPoseImpl::Fist(const bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions) +{ + return FSGHandPoseImpl(FHandPoseType::Fist(bRightHanded, HandDimensions.ToBasicHandModel())); +} + +FSGHandPoseImpl FSGHandPoseImpl::Fist(const bool bRightHanded) +{ + return FSGHandPoseImpl(FHandPoseType::Fist(bRightHanded)); +} + +FSGHandPoseImpl::FSGHandPoseImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGHandPoseImpl::FSGHandPoseImpl(const bool bRightHanded, const TArray>& JointPositions, + const TArray>& JointRotations, const TArray>& HandAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector> JointPositionsVector{ + FSGArrayUtils::ToMillimeters(JointPositions) + }; + + std::vector> JointRotationsVector{ + FSGArrayUtils::ToStdVector(JointRotations) + }; + + std::vector> HandAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(HandAngles) + }; + + Pimpl->HandPose = FHandPoseType( + bRightHanded, MoveTemp(JointPositionsVector), MoveTemp(JointRotationsVector), MoveTemp(HandAnglesVector)); +} + +FSGHandPoseImpl::FSGHandPoseImpl(const FHandPoseType& SenseGloveHandPose) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->HandPose = SenseGloveHandPose; +} + +FSGHandPoseImpl::FSGHandPoseImpl(const FSGHandPoseImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGHandPoseImpl::FSGHandPoseImpl(FSGHandPoseImpl&& Rhs) SG_NOEXCEPT = default; + +FSGHandPoseImpl::~FSGHandPoseImpl() = default; + +FSGHandPoseImpl& FSGHandPoseImpl::operator=(const FSGHandPoseImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGHandPoseImpl& FSGHandPoseImpl::operator=(FSGHandPoseImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGHandPoseImpl::FHandPoseType& FSGHandPoseImpl::ToHandPose() const +{ + return Pimpl->HandPose; +} + +bool FSGHandPoseImpl::IsRight() const +{ + return Pimpl->HandPose.IsRight(); +} + +TArray> FSGHandPoseImpl::GetJointPositions() const +{ + const TArray> JointPositions{ + FSGArrayUtils::FromMillimeters( + Pimpl->HandPose.GetJointPositions()) + }; + return JointPositions; +} + +TArray> FSGHandPoseImpl::GetJointRotations() const +{ + const TArray> JointRotations{ + FSGArrayUtils::FromStdVector( + Pimpl->HandPose.GetJointRotations()) + }; + return JointRotations; +} + +TArray> FSGHandPoseImpl::GetHandAngles() const +{ + const TArray> HandAngles{ + FSGArrayUtils::FromSenseGloveAngles(Pimpl->HandPose.GetHandAngles()) + }; + return HandAngles; +} + +bool FSGHandPoseImpl::Equals(const FSGHandPoseImpl& HandPoseImpl) const +{ + return Pimpl->HandPose.Equals(HandPoseImpl.ToHandPose()); +} + +float FSGHandPoseImpl::GetNormalizedFlexion(ESGFinger Finger, bool bClamp01) const +{ + return Pimpl->HandPose.GetNormalizedFlexion(FSGCoreEnumCast::ToEFinger(Finger), bClamp01); +} + +TArray FSGHandPoseImpl::GetNormalizedFlexion(bool bClamp01) const +{ + const TArray NormalizedFlexion{ + FSGArrayUtils::FromStdVector(Pimpl->HandPose.GetNormalizedFlexion(bClamp01)) + }; + return NormalizedFlexion; +} + +FString FSGHandPoseImpl::ToString(bool bShortFormat) const +{ + const FString String(UTF8_TO_TCHAR(Pimpl->HandPose.ToString(bShortFormat).c_str())); + return String; +} + +FString FSGHandPoseImpl::Serialize() const +{ + const FString Serialized(UTF8_TO_TCHAR(Pimpl->HandPose.Serialize().c_str())); + return Serialized; +} + +FSGHandPoseImpl::FImpl::FImpl(FSGHandPoseImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGHandPoseImpl::FImpl::~FImpl() = default; + +void FSGHandPoseImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHapticChannelInfoImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHapticChannelInfoImpl.cpp new file mode 100644 index 0000000..34cb674 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHapticChannelInfoImpl.cpp @@ -0,0 +1,206 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHapticChannelInfoImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_HapticChannelInfo.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGHapticChannelInfoImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FHapticChannelInfoType HapticChannelInfo; + + /************************ + * Owner object + ************************/ + + FSGHapticChannelInfoImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGHapticChannelInfoImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FString FSGHapticChannelInfoImpl::GenerateAddress(const int32 DeviceIndex, const int32 ChannelIndex) +{ + const FString Address{UTF8_TO_TCHAR(FHapticChannelInfoType::GenerateAddress(DeviceIndex, ChannelIndex).c_str())}; + return Address; +} + +FSGHapticChannelInfoImpl FSGHapticChannelInfoImpl::Parse(const FString& IpcString) +{ + std::string IpcStdString{TCHAR_TO_UTF8(*IpcString)}; + FHapticChannelInfoType HapticChannelInfo{FHapticChannelInfoType::Parse(MoveTemp(IpcStdString))}; + const FSGHapticChannelInfoImpl HapticChannelInfoImpl{MoveTemp(HapticChannelInfo)}; + return HapticChannelInfoImpl; +} + +int32 FSGHapticChannelInfoImpl::GetStreamingType() +{ + return FHapticChannelInfoType::GetStreamingType(); +} + +int32 FSGHapticChannelInfoImpl::GetFireAndForgetType() +{ + return FHapticChannelInfoType::GetFireAndForgetType(); +} + +FSGHapticChannelInfoImpl::FSGHapticChannelInfoImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGHapticChannelInfoImpl::FSGHapticChannelInfoImpl( + const TArray& StreamIndex, const TArray& FireAndForgetIndex) +{ + std::vector StreamIndexVector{ + FSGArrayUtils::ToStdVector(StreamIndex) + }; + std::vector FireAndForgetIndexVector{ + FSGArrayUtils::ToStdVector(FireAndForgetIndex) + }; + + Pimpl->HapticChannelInfo = FHapticChannelInfoType{ + MoveTemp(StreamIndexVector), + MoveTemp(FireAndForgetIndexVector) + }; +} + +FSGHapticChannelInfoImpl::FSGHapticChannelInfoImpl(const FHapticChannelInfoType& HapticChannelInfo) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->HapticChannelInfo = HapticChannelInfo; +} + +FSGHapticChannelInfoImpl::FSGHapticChannelInfoImpl(const FSGHapticChannelInfoImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGHapticChannelInfoImpl::FSGHapticChannelInfoImpl(FSGHapticChannelInfoImpl&& Rhs) SG_NOEXCEPT = default; + +FSGHapticChannelInfoImpl::~FSGHapticChannelInfoImpl() = default; + +FSGHapticChannelInfoImpl& FSGHapticChannelInfoImpl::operator=(const FSGHapticChannelInfoImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGHapticChannelInfoImpl& FSGHapticChannelInfoImpl::operator=(FSGHapticChannelInfoImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGHapticChannelInfoImpl::FHapticChannelInfoType& FSGHapticChannelInfoImpl::ToHapticChannelInfo() const +{ + return Pimpl->HapticChannelInfo; +} + +int32 FSGHapticChannelInfoImpl::GetStreamChannelCount() const +{ + return Pimpl->HapticChannelInfo.GetStreamChannelCount(); +} + +int32 FSGHapticChannelInfoImpl::GetFireAndForgetChannelCount() const +{ + return Pimpl->HapticChannelInfo.GetFireAndForgetChannelCount(); +} + +int32 FSGHapticChannelInfoImpl::GetTotalChannelCount() const +{ + return Pimpl->HapticChannelInfo.GetTotalChannelCount(); +} + +FString FSGHapticChannelInfoImpl::GetAddress_Unguarded(const ESGHapticChannelType Type, const int32 TypeIndex) const +{ + const FString Address{ + UTF8_TO_TCHAR( + Pimpl->HapticChannelInfo.GetAddress_Unguarded( + FSGCoreEnumCast::ToEHapticChannelType(Type), TypeIndex).c_str( + )) + }; + return Address; +} + +void FSGHapticChannelInfoImpl::GetIpcParams_Unguarded( + const ESGHapticChannelType Type, const int32 TypeIndex, int32& OutIndex, FString& OutAddressString) const +{ + std::string OutAddressStdString; + Pimpl->HapticChannelInfo.GetIpcParams_Unguarded( + FSGCoreEnumCast::ToEHapticChannelType(Type), TypeIndex, OutIndex, OutAddressStdString); + OutAddressString = FString{UTF8_TO_TCHAR(OutAddressStdString.c_str())}; +} + +void FSGHapticChannelInfoImpl::RegenerateAddresses(const int32 ForDeviceIndex) +{ + Pimpl->HapticChannelInfo.RegenerateAddresses(ForDeviceIndex); +} + +TArray FSGHapticChannelInfoImpl::GetAllAddresses() const +{ + const TArray AddressesArray{ + FSGArrayUtils::FromStdVector(Pimpl->HapticChannelInfo.GetAllAddresses()) + }; + return AddressesArray; +} + +FSGHapticChannelInfoImpl::FImpl::FImpl(FSGHapticChannelInfoImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGHapticChannelInfoImpl::FImpl::~FImpl() = default; + +void FSGHapticChannelInfoImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHapticGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHapticGloveImpl.cpp new file mode 100644 index 0000000..1d3212f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGHapticGloveImpl.cpp @@ -0,0 +1,377 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHapticGloveImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_BasicHandModel.h" +#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h" +#include "SGBuildHacks/SGInclude_Core_HandPose.h" +#include "SGBuildHacks/SGInclude_Core_HapticGlove.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGCustomWaveformImpl.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGHapticGloveImpl::FImpl +{ + /************************ + * Owner object + ************************/ + + FSGHapticGloveImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGHapticGloveImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TArray> FSGHapticGloveImpl::GetHapticGloves(const bool bConnectedOnly) +{ + const FHapticGlovePtrVectorType HapticGloves{FHapticGloveType::GetHapticGloves(bConnectedOnly)}; + TArray> HapticGloveImpls; + + for (FHapticGlovePtrType HapticGlove: HapticGloves) + { + TSharedRef HapticGloveImpl{MakeShared(MoveTemp(HapticGlove))}; + HapticGloveImpls.Push(MoveTemp(HapticGloveImpl)); + } + + return HapticGloveImpls; +} + +bool FSGHapticGloveImpl::GetGlove(TSharedPtr& OutGlove) +{ + FHapticGlovePtrType Glove; + const bool bReturn = FHapticGloveType::GetGlove(Glove); + + if (bReturn) + { + OutGlove = MakeShared(MoveTemp(Glove)); + } + + return bReturn; +} + +bool FSGHapticGloveImpl::GetGlove(const bool bRightHanded, TSharedPtr& OutGlove) +{ + FHapticGlovePtrType Glove; + const bool bReturn = FHapticGloveType::GetGlove(bRightHanded, Glove); + + if (bReturn) + { + OutGlove = MakeShared(MoveTemp(Glove)); + } + + return bReturn; +} + +FString FSGHapticGloveImpl::ToString(ESGHapticGloveCalibrationState State) +{ + const FString String{ + UTF8_TO_TCHAR(FHapticGloveType::ToString(FSGCoreEnumCast::ToEHapticGloveCalibrationState(State)).c_str()) + }; + return String; +} + +FString FSGHapticGloveImpl::ToString(ESGHapticLocation Location) +{ + const FString String{ + UTF8_TO_TCHAR(FHapticGloveType::ToString(FSGCoreEnumCast::ToEHapticLocation(Location)).c_str()) + }; + return String; +} + +FSGHapticGloveImpl::FSGHapticGloveImpl() + : FSGDeviceImpl(), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGHapticGloveImpl::FSGHapticGloveImpl(const FHapticGlovePtrType HapticGlove) + : FSGDeviceImpl(std::static_pointer_cast(HapticGlove)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGHapticGloveImpl::FSGHapticGloveImpl(const FSGHapticGloveImpl& Rhs) + : FSGDeviceImpl(Rhs), + Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGHapticGloveImpl::FSGHapticGloveImpl(FSGHapticGloveImpl&& Rhs) SG_NOEXCEPT = default; + +FSGHapticGloveImpl::~FSGHapticGloveImpl() = default; + +FSGHapticGloveImpl& FSGHapticGloveImpl::operator=(const FSGHapticGloveImpl& Rhs) +{ + FSGDeviceImpl::operator=(Rhs); + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGHapticGloveImpl& FSGHapticGloveImpl::operator=(FSGHapticGloveImpl&& Rhs) SG_NOEXCEPT = default; + +FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtr() const +{ + return std::static_pointer_cast(ToSGDevicePtr()); +} + +FSGHapticGloveImpl::FHapticGlovePtrType FSGHapticGloveImpl::ToHapticGlovePtrChecked() const +{ + FHapticGlovePtrType HapticGlove = std::static_pointer_cast(ToSGDevicePtr()); + ensureAlwaysMsgf(HapticGlove.get(), TEXT("Invalid HapticGlove")); + return HapticGlove; +} + +ESGDeviceType FSGHapticGloveImpl::GetDeviceType() const +{ + return FSGCoreEnumCast::ToESGDeviceType(ToHapticGlovePtrChecked()->GetDeviceType()); +} + +FString FSGHapticGloveImpl::GetDeviceId() const +{ + const FString Id{UTF8_TO_TCHAR(ToHapticGlovePtrChecked()->GetDeviceId().c_str())}; + return Id; +} + +FString FSGHapticGloveImpl::GetHardwareVersion() const +{ + const FString Version{UTF8_TO_TCHAR(ToHapticGlovePtrChecked()->GetHardwareVersion().c_str())}; + return Version; +} + +int32 FSGHapticGloveImpl::GetFirmwareVersion() const +{ + return ToHapticGlovePtrChecked()->GetFirmwareVersion(); +} + +int32 FSGHapticGloveImpl::GetSubFirmwareVersion() const +{ + return ToHapticGlovePtrChecked()->GetSubFirmwareVersion(); +} + +bool FSGHapticGloveImpl::IsRight() const +{ + return ToHapticGlovePtrChecked()->IsRight(); +} + +bool FSGHapticGloveImpl::GetImuRotation(FQuat& OutImu) +{ + FSGQuatImpl::FQuatType Imu; + const bool bResult = ToHapticGlovePtrChecked()->GetImuRotation(Imu); + OutImu = FSGQuatImpl{MoveTemp(Imu)}.ToFQuat(); + return bResult; +} + +bool FSGHapticGloveImpl::GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const +{ + FSGHandPoseImpl::FHandPoseType HandPose; + const bool bResult = ToHapticGlovePtrChecked()->GetHandPose(HandGeometry.ToBasicHandModel(), HandPose); + OutHandPose = FSGHandPoseImpl{MoveTemp(HandPose)}; + return bResult; +} + +bool FSGHapticGloveImpl::GetHandPose(FSGHandPoseImpl& OutHandPose) +{ + FSGHandPoseImpl::FHandPoseType HandPose; + const bool bResult = ToHapticGlovePtrChecked()->GetHandPose(HandPose); + OutHandPose = FSGHandPoseImpl{MoveTemp(HandPose)}; + return bResult; +} + +bool FSGHapticGloveImpl::GetHandAngles(TArray>& OutHandAngles) const +{ + std::vector> HandAngles; + const bool bResult = ToHapticGlovePtrChecked()->GetHandAngles(HandAngles); + OutHandAngles = FSGArrayUtils::FromSenseGloveAngles(HandAngles); + return bResult; +} + +FSGBasicHandModelImpl FSGHapticGloveImpl::GetHandGeometry() const +{ + FSGBasicHandModelImpl::FBasicHandModelType Geometry{ToHapticGlovePtrChecked()->GetHandGeometry()}; + return FSGBasicHandModelImpl{MoveTemp(Geometry)}; +} + +void FSGHapticGloveImpl::SetHandGeometry(const FSGBasicHandModelImpl& HandGeometry) +{ + ToHapticGlovePtrChecked()->SetHandGeometry(HandGeometry.ToBasicHandModel()); +} + +ESGHapticGloveCalibrationState FSGHapticGloveImpl::GetCalibrationState() const +{ + return FSGCoreEnumCast::ToESGHapticGloveCalibrationState(ToHapticGlovePtrChecked()->GetCalibrationState()); +} + +void FSGHapticGloveImpl::EndCalibration() +{ + ToHapticGlovePtrChecked()->EndCalibration(); +} + +void FSGHapticGloveImpl::ResetCalibration() +{ + ToHapticGlovePtrChecked()->ResetCalibration(); +} + +FString FSGHapticGloveImpl::GetCalibrationInstruction() const +{ + const FString Instruction{UTF8_TO_TCHAR(ToHapticGlovePtrChecked()->GetCalibrationInstruction().c_str())}; + return Instruction; +} + +void FSGHapticGloveImpl::StopHaptics() +{ + ToHapticGlovePtrChecked()->StopHaptics(); +} + +void FSGHapticGloveImpl::StopVibrations() +{ + ToHapticGlovePtrChecked()->StopVibrations(); +} + +bool FSGHapticGloveImpl::SendHaptics() +{ + return ToHapticGlovePtrChecked()->SendHaptics(); +} + +bool FSGHapticGloveImpl::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const +{ + return ToHapticGlovePtrChecked()->SupportsCustomWaveform(FSGCoreEnumCast::ToEHapticLocation(AtLocation)); +} + +bool FSGHapticGloveImpl::SendCustomWaveform(FSGCustomWaveformImpl& OutWaveform, const ESGHapticLocation Location) +{ + return ToHapticGlovePtrChecked()->SendCustomWaveform( + OutWaveform.ToCustomWaveform(), FSGCoreEnumCast::ToEHapticLocation(Location)); +} + +bool FSGHapticGloveImpl::QueueForceFeedbackLevels(const TArray& Levels01) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return ToHapticGlovePtrChecked()->QueueForceFeedbackLevels(MoveTemp(Levels01Vector)); +} + +bool FSGHapticGloveImpl::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + return ToHapticGlovePtrChecked()->QueueForceFeedbackLevel(Finger, Level01); +} + +bool FSGHapticGloveImpl::QueueVibroLevels(const TArray& Levels01) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return ToHapticGlovePtrChecked()->QueueVibroLevels(MoveTemp(Levels01Vector)); +} + +bool FSGHapticGloveImpl::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + return ToHapticGlovePtrChecked()->QueueVibroLevel(FSGCoreEnumCast::ToEHapticLocation(Location), Level01); +} + +void FSGHapticGloveImpl::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + ToHapticGlovePtrChecked()->GetWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl(ReferenceRotation).ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl(MoveTemp(WristRotation)).ToFQuat(); +} + +void FSGHapticGloveImpl::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + ToHapticGlovePtrChecked()->GetGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl(ReferenceRotation).ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition)); + OutGloveRotation = FSGQuatImpl(MoveTemp(GloveRotation)).ToFQuat(); +} + +FString FSGHapticGloveImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(ToHapticGlovePtrChecked()->ToString().c_str())}; + return String; +} + +FSGHapticGloveImpl::FImpl::FImpl(FSGHapticGloveImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGHapticGloveImpl::FImpl::~FImpl() = default; + +void FSGHapticGloveImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGInterpolationSetImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGInterpolationSetImpl.cpp new file mode 100644 index 0000000..4f82b2b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGInterpolationSetImpl.cpp @@ -0,0 +1,228 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGInterpolationSetImpl.h" + +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_InterpolationSet.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGInterpolationSetImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FInterpolationSetType InterpolationSet; + + /************************ + * Owner object + ************************/ + + FSGInterpolationSetImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGInterpolationSetImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGInterpolationSetImpl FSGInterpolationSetImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGInterpolationSetImpl InterpolationSet(FInterpolationSetType::Deserialize(MoveTemp(Serialized))); + return InterpolationSet; +} + +FSGInterpolationSetImpl::FSGInterpolationSetImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGInterpolationSetImpl::FSGInterpolationSetImpl(const float From1, const float From2, const float To1, const float To2) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->InterpolationSet = FInterpolationSetType(From1, From2, To1, To2); +} + +FSGInterpolationSetImpl::FSGInterpolationSetImpl(const float From1, const float From2, const float To1, const float To2, + const float Min, const float Max) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->InterpolationSet = FInterpolationSetType(From1, From2, To1, To2, Min, Max); +} + +FSGInterpolationSetImpl::FSGInterpolationSetImpl(const FInterpolationSetType& InterpolationSet) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->InterpolationSet = InterpolationSet; +} + +FSGInterpolationSetImpl::FSGInterpolationSetImpl(const FSGInterpolationSetImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGInterpolationSetImpl::FSGInterpolationSetImpl(FSGInterpolationSetImpl&& Rhs) SG_NOEXCEPT = default; + +FSGInterpolationSetImpl::~FSGInterpolationSetImpl() = default; + +FSGInterpolationSetImpl& FSGInterpolationSetImpl::operator=(const FSGInterpolationSetImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGInterpolationSetImpl& FSGInterpolationSetImpl::operator=(FSGInterpolationSetImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGInterpolationSetImpl::FInterpolationSetType& FSGInterpolationSetImpl::ToInterpolationSet() const +{ + return Pimpl->InterpolationSet; +} + +float FSGInterpolationSetImpl::GetX0() const +{ + return Pimpl->InterpolationSet.GetX0(); +} + +void FSGInterpolationSetImpl::SetX0(const float X0) +{ + Pimpl->InterpolationSet.SetX0(X0); +} + +float FSGInterpolationSetImpl::GetX1() const +{ + return Pimpl->InterpolationSet.GetX1(); +} + +void FSGInterpolationSetImpl::SetX1(const float X1) +{ + Pimpl->InterpolationSet.SetX1(X1); +} + +float FSGInterpolationSetImpl::GetY0() const +{ + return Pimpl->InterpolationSet.GetY0(); +} + +void FSGInterpolationSetImpl::SetY0(const float Y0) +{ + Pimpl->InterpolationSet.SetY0(Y0); +} + +float FSGInterpolationSetImpl::GetY1() const +{ + return Pimpl->InterpolationSet.GetY1(); +} + +void FSGInterpolationSetImpl::SetY1(const float Y1) +{ + Pimpl->InterpolationSet.SetY1(Y1); +} + +float FSGInterpolationSetImpl::GetMin() const +{ + return Pimpl->InterpolationSet.GetMin(); +} + +void FSGInterpolationSetImpl::SetMin(const float Min) +{ + Pimpl->InterpolationSet.SetMin(Min); +} + +float FSGInterpolationSetImpl::GetMax() const +{ + return Pimpl->InterpolationSet.GetMax(); +} + +void FSGInterpolationSetImpl::SetMax(const float Max) +{ + Pimpl->InterpolationSet.SetMax(Max); +} + +float FSGInterpolationSetImpl::Get(const float Value, const bool bLimit, const bool bNormalizeAngle) const +{ + return Pimpl->InterpolationSet.Get(Value, bLimit, bNormalizeAngle); +} + +bool FSGInterpolationSetImpl::Equals(const FSGInterpolationSetImpl& InterpolationSetImpl) const +{ + return Pimpl->InterpolationSet.Equals(InterpolationSetImpl.ToInterpolationSet()); +} + +FString FSGInterpolationSetImpl::ToString() const +{ + const FString String(UTF8_TO_TCHAR(Pimpl->InterpolationSet.ToString().c_str())); + return String; +} + +FString FSGInterpolationSetImpl::ToString(const bool bLimits) const +{ + const FString String(UTF8_TO_TCHAR(Pimpl->InterpolationSet.ToString(bLimits).c_str())); + return String; +} + +FString FSGInterpolationSetImpl::Serialize() const +{ + const FString Serialized(UTF8_TO_TCHAR(Pimpl->InterpolationSet.Serialize().c_str())); + return Serialized; +} + +FSGInterpolationSetImpl::FImpl::FImpl(FSGInterpolationSetImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGInterpolationSetImpl::FImpl::~FImpl() = default; + +void FSGInterpolationSetImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGJointKinematicsImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGJointKinematicsImpl.cpp new file mode 100644 index 0000000..24b8369 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGJointKinematicsImpl.cpp @@ -0,0 +1,98 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGJointKinematicsImpl.h" + +#include "SGBuildHacks/SGInclude_Core_JointKinematics.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +bool FSGJointKinematicsImpl::ForwardKinematics(const FVector& StartPosition, const FQuat& StartRotation, + const TArray& JointLengths, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations) +{ + FSGVect3DImpl::FVect3DType StartPositionVect3D( + FSGUnits::CentimetersToMillimeters(StartPosition)); + FSGQuatImpl::FQuatType StartRotationQuat(FSGQuatImpl(StartRotation).ToQuat()); + + std::vector JointLengthsVector{ + FSGArrayUtils::ToMillimeters(JointLengths) + }; + + std::vector JointAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(JointAngles) + }; + + std::vector NewPositions; + std::vector NewRotations; + + const bool bResults = FSGJointKinematicsImpl::FJointKinematicsType::ForwardKinematics( + MoveTemp(StartPositionVect3D), MoveTemp(StartRotationQuat), + MoveTemp(JointLengthsVector), MoveTemp(JointAnglesVector), + NewPositions, NewRotations); + + OutNewPositions = FSGArrayUtils::FromMillimeters(NewPositions);; + OutNewRotations = FSGArrayUtils::FromStdVector(NewRotations);; + + return bResults; +} + +bool FSGJointKinematicsImpl::ForwardKinematics(const FSGBasicHandModelImpl& Profile, const ESGFinger Finger, + const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations) +{ + std::vector JointAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(JointAngles) + }; + + std::vector NewPositions; + std::vector NewRotations; + + const bool bResults = FSGJointKinematicsImpl::FJointKinematicsType::ForwardKinematics( + Profile.ToBasicHandModel(), FSGCoreEnumCast::ToEFinger(Finger), MoveTemp(JointAnglesVector), + NewPositions, NewRotations); + + OutNewPositions = FSGArrayUtils::FromMillimeters(NewPositions);; + OutNewRotations = FSGArrayUtils::FromStdVector(NewRotations);; + + return bResults; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGLibraryImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGLibraryImpl.cpp new file mode 100644 index 0000000..18862db --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGLibraryImpl.cpp @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGLibraryImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Library.h" +#include "SGCoreImpl/SGCoreEnumCast.h" + +FString FSGLibraryImpl::Version() +{ + const FString Version(UTF8_TO_TCHAR(FLibraryType::Version().c_str())); + return Version; +} + +ESGBackendType FSGLibraryImpl::GetBackendType() +{ + return FSGCoreEnumCast::ToESGBackendType(FLibraryType::GetBackendType()); +} + +FString FSGLibraryImpl::BackendVersion() +{ + const FString Version(UTF8_TO_TCHAR(FLibraryType::BackendVersion().c_str())); + return Version; +} + +FString FSGLibraryImpl::SGConnectVersion() +{ + const FString Version(UTF8_TO_TCHAR(FLibraryType::SGConnectVersion().c_str())); + return Version; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNova2GloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNova2GloveImpl.cpp new file mode 100644 index 0000000..b610786 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNova2GloveImpl.cpp @@ -0,0 +1,550 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNova2GloveImpl.h" + +#include +#include + +#include "Containers/StringConv.h" +#include "Misc/AssertionMacros.h" + +#include "SGBuildHacks/SGInclude_Core_BasicHandModel.h" +#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h" +#include "SGBuildHacks/SGInclude_Core_HandInterpolator.h" +#include "SGBuildHacks/SGInclude_Core_HandPose.h" +#include "SGBuildHacks/SGInclude_Core_HapticGlove.h" +#include "SGBuildHacks/SGInclude_Core_Nova2Glove.h" +#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_NovaGloveInfo.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SensorNormalization.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGCustomWaveformImpl.h" +#include "SGCoreImpl/SGHandInterpolatorImpl.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGCoreImpl/SGNova2GloveSensorDataImpl.h" +#include "SGCoreImpl/SGNovaGloveInfoImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGSensorNormalizationImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGNova2GloveImpl::FImpl +{ + /************************ + * Owner object + ************************/ + + FSGNova2GloveImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGNova2GloveImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TSharedRef FSGNova2GloveImpl::Parse(const FString& ConstantsString) +{ + std::string ConstantsStdString{TCHAR_TO_UTF8(*ConstantsString)}; + FSGDevicePtrType SGDevicePtr{FNova2GloveType::Parse(MoveTemp(ConstantsStdString))}; + ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!")); + const TSharedRef Nova2GloveImpl{ + MakeShared(std::static_pointer_cast(MoveTemp(SGDevicePtr))) + }; + return Nova2GloveImpl; +} + +TArray FSGNova2GloveImpl::GetNova2Gloves() +{ + FNova2GloveVectorType Vector{FNova2GloveType::GetNova2Gloves()}; + + const TArray Array{ + FSGArrayUtils::FromStdVector(MoveTemp(Vector)) + }; + + return Array; +} + + +bool FSGNova2GloveImpl::GetNova2Glove(FSGNova2GloveImpl& OutGlove) +{ + FNova2GloveType Glove; + const bool bResult = FNova2GloveType::GetNova2Glove(Glove); + OutGlove = FSGNova2GloveImpl{MoveTemp(Glove)}; + return bResult; +} + +bool FSGNova2GloveImpl::GetNova2Glove(const bool bRightHanded, FSGNova2GloveImpl& OutGlove) +{ + FNova2GloveType Glove; + const bool bResult = FNova2GloveType::GetNova2Glove(bRightHanded, Glove); + OutGlove = FSGNova2GloveImpl{MoveTemp(Glove)}; + return bResult; +} + +void FSGNova2GloveImpl::CalculateGloveLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + FNova2GloveType::CalculateGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), bRightHanded, TCHAR_TO_UTF8(*HardwareVersion), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition));; + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGNova2GloveImpl::CalculateWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + FNova2GloveType::CalculateWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), bRightHanded, TCHAR_TO_UTF8(*HardwareVersion), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +ANSICHAR FSGNova2GloveImpl::GetStreamByte() +{ + static const ANSICHAR Byte = FNova2GloveType::GetStreamByte(); + return Byte; +} + +const TArray& FSGNova2GloveImpl::GetNova2SensorRanges() +{ + static const TArray Ranges{FSGArrayUtils::FromStdVector(FNova2GloveType::GetNova2SensorRanges())}; + return Ranges; +} + +TArray FSGNova2GloveImpl::ToNormalizedValues(const FSGNova2GloveSensorDataImpl& SensorData) +{ + const TArray NormalizedValues{ + FSGArrayUtils::FromStdVector( + FNova2GloveType::ToNormalizedValues(SensorData.ToNova2GloveSensorData())) + }; + return NormalizedValues; +} + +TArray> FSGNova2GloveImpl::CalculateHandAngles( + const TArray& NormalizedValues, const FSGHandInterpolatorImpl& Interpolator, const bool bInfluenceIndex) +{ + std::vector NormalizedValuesVector{FSGArrayUtils::ToStdVector(NormalizedValues)}; + + const TArray> Angles{ + FSGArrayUtils::FromSenseGloveAngles( + FNova2GloveType::CalculateHandAngles( + MoveTemp(NormalizedValuesVector), Interpolator.ToHandInterpolator(), bInfluenceIndex)) + }; + + return Angles; +} + +TArray> FSGNova2GloveImpl::ToNormalizedAngles( + const TArray& NormalizedData, const FSGNovaGloveInfoImpl& GloveInfo) +{ + std::vector NormalizedDataVector{FSGArrayUtils::ToStdVector(NormalizedData)}; + + const TArray> Angles{ + FSGArrayUtils::FromSenseGloveAngles( + FNova2GloveType::ToNormalizedAngles(MoveTemp(NormalizedDataVector), GloveInfo.ToNovaGloveInfo())) + }; + + return Angles; +} + +TArray FSGNova2GloveImpl::ToNormalizedValues(const FSGNova2GloveSensorDataImpl& SensorData, + FSGSensorNormalizationImpl& OutSensorNormalizer) +{ + const TArray NormalizedValues{ + FSGArrayUtils::FromStdVector( + FNova2GloveType::ToNormalizedValues(SensorData.ToNova2GloveSensorData(), + OutSensorNormalizer.ToSensorNormalization())) + }; + return NormalizedValues; +} + +FSGNova2GloveImpl::FSGNova2GloveImpl() + : FSGHapticGloveImpl(), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNova2GloveImpl::FSGNova2GloveImpl(const FSGNovaGloveInfoImpl& DeviceInfo) + : FSGHapticGloveImpl(FSGNova2GloveImpl(std::make_shared((DeviceInfo.ToNovaGloveInfo())))), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNova2GloveImpl::FSGNova2GloveImpl(const FNova2GloveType Nova2Glove) + : FSGHapticGloveImpl(std::make_shared(Nova2Glove)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNova2GloveImpl::FSGNova2GloveImpl(const FNova2GlovePtrType Nova2Glove) + : FSGHapticGloveImpl(Nova2Glove), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNova2GloveImpl::FSGNova2GloveImpl(const FSGNova2GloveImpl& Rhs) + : FSGHapticGloveImpl(Rhs), + Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGNova2GloveImpl::FSGNova2GloveImpl(FSGNova2GloveImpl&& Rhs) SG_NOEXCEPT = default; + +FSGNova2GloveImpl::~FSGNova2GloveImpl() = default; + +FSGNova2GloveImpl& FSGNova2GloveImpl::operator=(const FSGNova2GloveImpl& Rhs) +{ + FSGHapticGloveImpl::operator=(Rhs); + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGNova2GloveImpl& FSGNova2GloveImpl::operator=(FSGNova2GloveImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGNova2GloveImpl::FNova2GloveType& FSGNova2GloveImpl::ToNova2Glove() const +{ + return *ToNova2GlovePtrChecked(); +} + +FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtr() const +{ + return std::static_pointer_cast(ToSGDevicePtr()); +} + +FSGNova2GloveImpl::FNova2GlovePtrType FSGNova2GloveImpl::ToNova2GlovePtrChecked() const +{ + FNova2GlovePtrType Nova2Glove = std::static_pointer_cast(ToSGDevicePtr()); + ensureAlwaysMsgf(Nova2Glove.get(), TEXT("Invalid Nova2Glove")); + return Nova2Glove; +} + +ESGDeviceType FSGNova2GloveImpl::GetDeviceType() const +{ + return FSGCoreEnumCast::ToESGDeviceType(ToNova2GlovePtrChecked()->GetDeviceType()); +} + +FString FSGNova2GloveImpl::GetDeviceId() const +{ + const FString Id{UTF8_TO_TCHAR(ToNova2GlovePtrChecked()->GetDeviceId().c_str())}; + return Id; +} + +FString FSGNova2GloveImpl::GetHardwareVersion() const +{ + const FString Version{UTF8_TO_TCHAR(ToNova2GlovePtrChecked()->GetHardwareVersion().c_str())}; + return Version; +} + +int32 FSGNova2GloveImpl::GetFirmwareVersion() const +{ + return ToNova2GlovePtrChecked()->GetFirmwareVersion(); +} + +int32 FSGNova2GloveImpl::GetSubFirmwareVersion() const +{ + return ToNova2GlovePtrChecked()->GetSubFirmwareVersion(); +} + +bool FSGNova2GloveImpl::HasBattery() const +{ + return ToNova2GlovePtrChecked()->HasBattery(); +} + +bool FSGNova2GloveImpl::IsCharging() +{ + return ToNova2GlovePtrChecked()->IsCharging(); +} + +bool FSGNova2GloveImpl::GetBatteryLevel(float& OutBatteryLevel) +{ + return ToNova2GlovePtrChecked()->GetBatteryLevel(OutBatteryLevel); +} + +bool FSGNova2GloveImpl::IsRight() const +{ + return ToNova2GlovePtrChecked()->IsRight(); +} + +bool FSGNova2GloveImpl::GetImuRotation(FQuat& OutImu) +{ + FSGQuatImpl::FQuatType Imu; + const bool bResult = ToNova2GlovePtrChecked()->GetImuRotation(Imu); + OutImu = FSGQuatImpl{MoveTemp(Imu)}.ToFQuat(); + return bResult; +} + +bool FSGNova2GloveImpl::GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const +{ + FSGHandPoseImpl::FHandPoseType HandPose; + const bool bResult = ToNova2GlovePtrChecked()->GetHandPose(HandGeometry.ToBasicHandModel(), HandPose); + OutHandPose = FSGHandPoseImpl{MoveTemp(HandPose)}; + return bResult; +} + +bool FSGNova2GloveImpl::GetHandAngles(TArray>& OutHandAngles) const +{ + std::vector> HandAngles; + const bool bResult = ToNova2GlovePtrChecked()->GetHandAngles(HandAngles); + OutHandAngles = FSGArrayUtils::FromSenseGloveAngles(MoveTemp(HandAngles)); + return bResult; +} + +ESGHapticGloveCalibrationState FSGNova2GloveImpl::GetCalibrationState() const +{ + return FSGCoreEnumCast::ToESGHapticGloveCalibrationState(ToNova2GlovePtrChecked()->GetCalibrationState()); +} + +void FSGNova2GloveImpl::EndCalibration() +{ + ToNova2GlovePtrChecked()->EndCalibration(); +} + +void FSGNova2GloveImpl::ResetCalibration() +{ + ToNova2GlovePtrChecked()->ResetCalibration(); +} + +void FSGNova2GloveImpl::StopHaptics() +{ + ToNova2GlovePtrChecked()->StopHaptics(); +} + +void FSGNova2GloveImpl::StopVibrations() +{ + ToNova2GlovePtrChecked()->StopVibrations(); +} + +bool FSGNova2GloveImpl::SendHaptics() +{ + return ToNova2GlovePtrChecked()->SendHaptics(); +} + +bool FSGNova2GloveImpl::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const +{ + return ToNova2GlovePtrChecked()->SupportsCustomWaveform(FSGCoreEnumCast::ToEHapticLocation(AtLocation)); +} + +bool FSGNova2GloveImpl::SendCustomWaveform(FSGCustomWaveformImpl& OutWaveform, const ESGHapticLocation Location) +{ + return ToNova2GlovePtrChecked()->SendCustomWaveform(OutWaveform.ToCustomWaveform(), + FSGCoreEnumCast::ToEHapticLocation(Location)); +} + +bool FSGNova2GloveImpl::QueueForceFeedbackLevels(const TArray& Levels01) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return ToNova2GlovePtrChecked()->QueueForceFeedbackLevels(MoveTemp(Levels01Vector)); +} + +bool FSGNova2GloveImpl::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + return ToNova2GlovePtrChecked()->QueueForceFeedbackLevel(Finger, Level01); +} + +bool FSGNova2GloveImpl::QueueVibroLevels(const TArray& Amplitudes) +{ + std::vector AmplitudesVector{FSGArrayUtils::ToStdVector(Amplitudes)}; + return ToNova2GlovePtrChecked()->QueueVibroLevels(MoveTemp(AmplitudesVector)); +} + +bool FSGNova2GloveImpl::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + return ToNova2GlovePtrChecked()->QueueVibroLevel(FSGCoreEnumCast::ToEHapticLocation(Location), Level01); +} + +bool FSGNova2GloveImpl::QueueSqueezeLevel(const float SqueezeLevel01) +{ + return ToNova2GlovePtrChecked()->QueueSqueezeLevel(SqueezeLevel01); +} + +void FSGNova2GloveImpl::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + ToNova2GlovePtrChecked()->GetGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition)); + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGNova2GloveImpl::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + ToNova2GlovePtrChecked()->GetWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +FSGNovaGloveInfoImpl FSGNova2GloveImpl::GetGloveInfo() const +{ + const FSGNovaGloveInfoImpl GloveInfo{ToNova2GlovePtrChecked()->GetGloveInfo()}; + return GloveInfo; +} + +bool FSGNova2GloveImpl::DoesIndexInfluenceOthers() const +{ + return ToNova2GlovePtrChecked()->DoesIndexInfluenceOthers(); +} + +void FSGNova2GloveImpl::SetIndexInfluencesOthers(const bool bInfluenceOthers) +{ + ToNova2GlovePtrChecked()->SetIndexInfluencesOthers(bInfluenceOthers); +} + +bool FSGNova2GloveImpl::SupportsOnBoardNormalization() const +{ + return ToNova2GlovePtrChecked()->SupportsOnBoardNormalization(); +} + +bool FSGNova2GloveImpl::GetSensorData(FSGNova2GloveSensorDataImpl& OutSensorData) const +{ + FSGNova2GloveSensorDataImpl::FNova2GloveSensorDataType SensorData; + const bool bResult = ToNova2GlovePtrChecked()->GetSensorData(SensorData); + OutSensorData = FSGNova2GloveSensorDataImpl{MoveTemp(SensorData)}; + return bResult; +} + +bool FSGNova2GloveImpl::GetNormalizedInput(TArray& OutNormalizedValues) const +{ + std::vector NormalizedValues; + const bool bResult = ToNova2GlovePtrChecked()->GetNormalizedInput(NormalizedValues); + OutNormalizedValues = FSGArrayUtils::FromStdVector(MoveTemp(NormalizedValues)); + return bResult; +} + +bool FSGNova2GloveImpl::SendRawData() +{ + return ToNova2GlovePtrChecked()->SendRawData(); +} + +bool FSGNova2GloveImpl::SendNormalizedData() +{ + return ToNova2GlovePtrChecked()->SendNormalizedData(); +} + +ESGNova2VibroMotor FSGNova2GloveImpl::ToNovaMotor(const ESGHapticLocation Location) const +{ + return FSGCoreEnumCast::ToESGNova2VibroMotor( + ToNova2GlovePtrChecked()->ToNova2Motor(FSGCoreEnumCast::ToEHapticLocation(Location))); +} + +int32 FSGNova2GloveImpl::ChannelIndex(const ESGNova2VibroMotor Motor) const +{ + return ToNova2GlovePtrChecked()->ChannelIndex(FSGCoreEnumCast::ToENova2VibroMotor(Motor)); +} + +void FSGNova2GloveImpl::ValidateWaveform(FSGCustomWaveformImpl& OutWaveform, const ESGNova2VibroMotor Motor) const +{ + return ToNova2GlovePtrChecked()->ValidateWaveform(OutWaveform.ToCustomWaveform(), + FSGCoreEnumCast::ToENova2VibroMotor(Motor)); +} + +bool FSGNova2GloveImpl::SendCustomWaveform_Nova2(FSGCustomWaveformImpl& OutWaveform, + const ESGNova2VibroMotor Motor, const bool bValidateWaveform) +{ + return ToNova2GlovePtrChecked()->SendCustomWaveform_Nova2( + OutWaveform.ToCustomWaveform(), FSGCoreEnumCast::ToENova2VibroMotor(Motor), bValidateWaveform); +} + +FString FSGNova2GloveImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(ToNova2GlovePtrChecked()->ToString().c_str())}; + return String; +} + +FSGNova2GloveImpl::FImpl::FImpl(FSGNova2GloveImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGNova2GloveImpl::FImpl::~FImpl() = default; + +void FSGNova2GloveImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNova2GloveSensorDataImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNova2GloveSensorDataImpl.cpp new file mode 100644 index 0000000..92914b0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNova2GloveSensorDataImpl.cpp @@ -0,0 +1,210 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNova2GloveSensorDataImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Nova2GloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGNovaGloveInfoImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGNova2GloveSensorDataImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FNova2GloveSensorDataType Nova2GloveSensorData; + + /************************ + * Owner object + ************************/ + + FSGNova2GloveSensorDataImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGNova2GloveSensorDataImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGNova2GloveSensorDataImpl FSGNova2GloveSensorDataImpl::Parse(const FString& RawData, + const FSGNovaGloveInfoImpl& GloveInfo) +{ + std::string RawDataString(TCHAR_TO_UTF8(*RawData)); + const FSGNova2GloveSensorDataImpl SensorData{ + FNova2GloveSensorDataType::Parse(MoveTemp(RawDataString), GloveInfo.ToNovaGloveInfo()) + }; + return SensorData; +} + +FSGNova2GloveSensorDataImpl::FSGNova2GloveSensorDataImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNova2GloveSensorDataImpl::FSGNova2GloveSensorDataImpl(const ESGNormalizationState NormalizationState, + const TArray>& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector> ValuesVector{ + FSGArrayUtils::ToStdVector( + Values) + }; + Pimpl->Nova2GloveSensorData = FNova2GloveSensorDataType( + FSGCoreEnumCast::ToENormalizationState(NormalizationState), + MoveTemp(ValuesVector), ParsedValues, FSGQuatImpl(ImuRotation).ToQuat(), bImuParsed, + BatteryLevel, bCharging); +} + +FSGNova2GloveSensorDataImpl::FSGNova2GloveSensorDataImpl(const FNova2GloveSensorDataType& Nova2GloveSensorData) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->Nova2GloveSensorData = Nova2GloveSensorData; +} + +FSGNova2GloveSensorDataImpl::FSGNova2GloveSensorDataImpl(const FSGNova2GloveSensorDataImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGNova2GloveSensorDataImpl::FSGNova2GloveSensorDataImpl(FSGNova2GloveSensorDataImpl&& Rhs) SG_NOEXCEPT = default; + +FSGNova2GloveSensorDataImpl::~FSGNova2GloveSensorDataImpl() = default; + +FSGNova2GloveSensorDataImpl& FSGNova2GloveSensorDataImpl::operator=(const FSGNova2GloveSensorDataImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGNova2GloveSensorDataImpl& FSGNova2GloveSensorDataImpl::operator=(FSGNova2GloveSensorDataImpl&& Rhs) SG_NOEXCEPT += default; + +const FSGNova2GloveSensorDataImpl::FNova2GloveSensorDataType& +FSGNova2GloveSensorDataImpl::ToNova2GloveSensorData() const +{ + return Pimpl->Nova2GloveSensorData; +} + +ESGNormalizationState FSGNova2GloveSensorDataImpl::GetSensorState() const +{ + return FSGCoreEnumCast::ToESGNormalizationState(Pimpl->Nova2GloveSensorData.GetSensorState()); +} + +TArray> FSGNova2GloveSensorDataImpl::GetSensorValues() const +{ + const TArray> SensorValues{ + FSGArrayUtils::FromStdVector( + Pimpl->Nova2GloveSensorData.GetSensorValues()) + }; + return SensorValues; +} + +float FSGNova2GloveSensorDataImpl::GetSensorValue(const ESGFinger Finger, const ESGNova2SensorLocation Location) const +{ + return Pimpl->Nova2GloveSensorData.GetSensorValue( + FSGCoreEnumCast::ToEFinger(Finger), FSGCoreEnumCast::ToESensorLocation(Location)); +} + +int32 FSGNova2GloveSensorDataImpl::GetParsedValues() const +{ + return Pimpl->Nova2GloveSensorData.GetParsedValues(); +} + +FQuat FSGNova2GloveSensorDataImpl::GetImuRotation() const +{ + return FSGQuatImpl(Pimpl->Nova2GloveSensorData.GetImuRotation()).ToFQuat(); +} + +bool FSGNova2GloveSensorDataImpl::IsImuParsed() const +{ + return Pimpl->Nova2GloveSensorData.IsImuParsed(); +} + +float FSGNova2GloveSensorDataImpl::GetBatteryLevel() const +{ + return Pimpl->Nova2GloveSensorData.GetBatteryLevel(); +} + +bool FSGNova2GloveSensorDataImpl::IsCharging() const +{ + return Pimpl->Nova2GloveSensorData.IsCharging(); +} + +bool FSGNova2GloveSensorDataImpl::Equals(const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl) const +{ + return Pimpl->Nova2GloveSensorData.Equals(Nova2GloveSensorDataImpl.ToNova2GloveSensorData()); +} + +FString FSGNova2GloveSensorDataImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->Nova2GloveSensorData.ToString().c_str())}; + return String; +} + +FSGNova2GloveSensorDataImpl::FImpl::FImpl(FSGNova2GloveSensorDataImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGNova2GloveSensorDataImpl::FImpl::~FImpl() = default; + +void FSGNova2GloveSensorDataImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveImpl.cpp new file mode 100644 index 0000000..d9ab3ba --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveImpl.cpp @@ -0,0 +1,585 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveImpl.h" + +#include +#include + +#include "Containers/StringConv.h" +#include "Misc/AssertionMacros.h" + +#include "SGBuildHacks/SGInclude_Core_BasicHandModel.h" +#include "SGBuildHacks/SGInclude_Core_CustomWaveform.h" +#include "SGBuildHacks/SGInclude_Core_HandInterpolator.h" +#include "SGBuildHacks/SGInclude_Core_HandPose.h" +#include "SGBuildHacks/SGInclude_Core_HapticGlove.h" +#include "SGBuildHacks/SGInclude_Core_NovaGlove.h" +#include "SGBuildHacks/SGInclude_Core_NovaGloveInfo.h" +#include "SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SensorNormalization.h" +#include "SGBuildHacks/SGInclude_Core_ThresholdCommand.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGCustomWaveformImpl.h" +#include "SGCoreImpl/SGHandInterpolatorImpl.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGCoreImpl/SGNovaGloveInfoImpl.h" +#include "SGCoreImpl/SGNovaGloveSensorDataImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGSensorNormalizationImpl.h" +#include "SGCoreImpl/SGThresholdCommandImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGNovaGloveImpl::FImpl +{ + /************************ + * Owner object + ************************/ + + FSGNovaGloveImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGNovaGloveImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TSharedRef FSGNovaGloveImpl::Parse(const FString& ConstantsString) +{ + std::string ConstantsStdString{TCHAR_TO_UTF8(*ConstantsString)}; + FSGDevicePtrType SGDevicePtr{FNovaGloveType::Parse(MoveTemp(ConstantsStdString))}; + ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!")); + const TSharedRef NovaGloveImpl{MakeShared( + std::static_pointer_cast(MoveTemp(SGDevicePtr)))}; + return NovaGloveImpl; +} + +TArray FSGNovaGloveImpl::GetNovaGloves() +{ + const TArray Gloves{ + FSGArrayUtils::FromStdVector(FNovaGloveType::GetNovaGloves()) + }; + return Gloves; +} + +bool FSGNovaGloveImpl::GetNovaGlove(FSGNovaGloveImpl& OutGlove) +{ + FNovaGloveType Glove; + const bool bResult = FNovaGloveType::GetNovaGlove(Glove); + OutGlove = FSGNovaGloveImpl{MoveTemp(Glove)}; + return bResult; +} + +bool FSGNovaGloveImpl::GetNovaGlove(const bool bRightHanded, FSGNovaGloveImpl& OutGlove) +{ + FNovaGloveType Glove; + const bool bResult = FNovaGloveType::GetNovaGlove(bRightHanded, Glove); + OutGlove = FSGNovaGloveImpl{MoveTemp(Glove)}; + return bResult; +} + +void FSGNovaGloveImpl::CalculateGloveLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + FNovaGloveType::CalculateGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), bRightHanded, + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition));; + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGNovaGloveImpl::CalculateWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + FNovaGloveType::CalculateWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), bRightHanded, + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +ANSICHAR FSGNovaGloveImpl::GetHapticsByte() +{ + static const ANSICHAR Byte = FNovaGloveType::GetHapticsByte(); + return Byte; +} + +ANSICHAR FSGNovaGloveImpl::GetThresholdsByte() +{ + static const ANSICHAR Byte = FNovaGloveType::GetThresholdsByte(); + return Byte; +} + +ANSICHAR FSGNovaGloveImpl::GetIgnoreThresholdsByte() +{ + static const ANSICHAR Byte = FNovaGloveType::GetIgnoreThresholdsByte(); + return Byte; +} + +const TArray& FSGNovaGloveImpl::GetNovaSensorRanges() +{ + static const TArray Ranges{FSGArrayUtils::FromStdVector(FNovaGloveType::GetNovaSensorRanges())}; + return Ranges; +} + +TArray FSGNovaGloveImpl::ToNormalizedValues(const FSGNovaGloveSensorDataImpl& SensorData) +{ + const TArray NormalizedValues{ + FSGArrayUtils::FromStdVector( + FNovaGloveType::ToNormalizedValues(SensorData.ToNovaGloveSensorData())) + }; + return NormalizedValues; +} + +TArray FSGNovaGloveImpl::ToNormalizedValues(const FSGNovaGloveSensorDataImpl& SensorData, + FSGSensorNormalizationImpl& OutSensorNormalizer) +{ + const TArray NormalizedValues{ + FSGArrayUtils::FromStdVector( + FNovaGloveType::ToNormalizedValues(SensorData.ToNovaGloveSensorData(), + OutSensorNormalizer.ToSensorNormalization())) + }; + return NormalizedValues; +} + +TArray> FSGNovaGloveImpl::CalculateHandAngles( + const TArray& NormalizedValues, const FSGHandInterpolatorImpl& Interpolator) +{ + std::vector NormalizedValuesVector{FSGArrayUtils::ToStdVector(NormalizedValues)}; + + const TArray> Angles{ + FSGArrayUtils::FromSenseGloveAngles( + FNovaGloveType::CalculateHandAngles(MoveTemp(NormalizedValuesVector), Interpolator.ToHandInterpolator())) + }; + + return Angles; +} + +FString FSGNovaGloveImpl::ToNovaCommandAsFlexion(const FSGThresholdCommandImpl& Thresholds) +{ + const FString Flexion{ + UTF8_TO_TCHAR(FNovaGloveType::ToNovaCommandAsFlexion(Thresholds.ToThresholdCommand()).c_str()) + }; + return Flexion; +} + +FString FSGNovaGloveImpl::ToNovaCommandAsRaw( + const FSGThresholdCommandImpl& Thresholds, const FSGSensorNormalizationImpl& Interpolator) +{ + const FString Raw{ + UTF8_TO_TCHAR(FNovaGloveType::ToNovaCommandAsRaw(Thresholds.ToThresholdCommand(), + Interpolator.ToSensorNormalization()).c_str()) + }; + return Raw; +} + +FSGNovaGloveImpl::FSGNovaGloveImpl() + : FSGHapticGloveImpl(), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNovaGloveImpl::FSGNovaGloveImpl(const FSGNovaGloveInfoImpl& DeviceInfo) + : FSGHapticGloveImpl(FSGNovaGloveImpl(std::make_shared((DeviceInfo.ToNovaGloveInfo())))), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNovaGloveImpl::FSGNovaGloveImpl(const FNovaGloveType NovaGlove) + : FSGHapticGloveImpl(std::make_shared(NovaGlove)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNovaGloveImpl::FSGNovaGloveImpl(const FNovaGlovePtrType NovaGlove) + : FSGHapticGloveImpl(NovaGlove), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNovaGloveImpl::FSGNovaGloveImpl(const FSGNovaGloveImpl& Rhs) + : FSGHapticGloveImpl(Rhs), + Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGNovaGloveImpl::FSGNovaGloveImpl(FSGNovaGloveImpl&& Rhs) SG_NOEXCEPT = default; + +FSGNovaGloveImpl::~FSGNovaGloveImpl() = default; + +FSGNovaGloveImpl& FSGNovaGloveImpl::operator=(const FSGNovaGloveImpl& Rhs) +{ + FSGHapticGloveImpl::operator=(Rhs); + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGNovaGloveImpl& FSGNovaGloveImpl::operator=(FSGNovaGloveImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGNovaGloveImpl::FNovaGloveType& FSGNovaGloveImpl::ToNovaGlove() const +{ + return *ToNovaGlovePtrChecked(); +} + +FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtr() const +{ + return std::static_pointer_cast(ToSGDevicePtr()); +} + +FSGNovaGloveImpl::FNovaGlovePtrType FSGNovaGloveImpl::ToNovaGlovePtrChecked() const +{ + FNovaGlovePtrType NovaGlove{std::static_pointer_cast(ToSGDevicePtr())}; + ensureAlwaysMsgf(NovaGlove.get(), TEXT("Invalid NovaGlove")); + return NovaGlove; +} + +ESGDeviceType FSGNovaGloveImpl::GetDeviceType() const +{ + return FSGCoreEnumCast::ToESGDeviceType(ToNovaGlovePtrChecked()->GetDeviceType()); +} + +FString FSGNovaGloveImpl::GetDeviceId() const +{ + const FString Id{UTF8_TO_TCHAR(ToNovaGlovePtrChecked()->GetDeviceId().c_str())}; + return Id; +} + +FString FSGNovaGloveImpl::GetHardwareVersion() const +{ + const FString Version{UTF8_TO_TCHAR(ToNovaGlovePtrChecked()->GetHardwareVersion().c_str())}; + return Version; +} + +int32 FSGNovaGloveImpl::GetFirmwareVersion() const +{ + return ToNovaGlovePtrChecked()->GetFirmwareVersion(); +} + +int32 FSGNovaGloveImpl::GetSubFirmwareVersion() const +{ + return ToNovaGlovePtrChecked()->GetSubFirmwareVersion(); +} + +void FSGNovaGloveImpl::SetDeviceIndex(const int32 NewIndex) +{ + ToNovaGlovePtrChecked()->SetDeviceIndex(NewIndex); +} + +bool FSGNovaGloveImpl::HasBattery() const +{ + return ToNovaGlovePtrChecked()->HasBattery(); +} + +bool FSGNovaGloveImpl::IsCharging() +{ + return ToNovaGlovePtrChecked()->IsCharging(); +} + +bool FSGNovaGloveImpl::GetBatteryLevel(float& OutBatteryLevel) +{ + return ToNovaGlovePtrChecked()->GetBatteryLevel(OutBatteryLevel); +} + +bool FSGNovaGloveImpl::IsRight() const +{ + return ToNovaGlovePtrChecked()->IsRight(); +} + +bool FSGNovaGloveImpl::GetImuRotation(FQuat& OutImu) +{ + FSGQuatImpl::FQuatType Imu; + const bool bResult = ToNovaGlovePtrChecked()->GetImuRotation(Imu); + OutImu = FSGQuatImpl{MoveTemp(Imu)}.ToFQuat(); + return bResult; +} + +bool FSGNovaGloveImpl::GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const +{ + FSGHandPoseImpl::FHandPoseType HandPose; + const bool bResult = ToNovaGlovePtrChecked()->GetHandPose(HandGeometry.ToBasicHandModel(), HandPose); + OutHandPose = FSGHandPoseImpl{MoveTemp(HandPose)}; + return bResult; +} + +bool FSGNovaGloveImpl::GetHandAngles(TArray>& OutHandAngles) const +{ + std::vector> HandAngles; + const bool bResult = ToNovaGlovePtrChecked()->GetHandAngles(HandAngles); + OutHandAngles = FSGArrayUtils::FromSenseGloveAngles(MoveTemp(HandAngles)); + return bResult; +} + +ESGHapticGloveCalibrationState FSGNovaGloveImpl::GetCalibrationState() const +{ + return FSGCoreEnumCast::ToESGHapticGloveCalibrationState(ToNovaGlovePtrChecked()->GetCalibrationState()); +} + +void FSGNovaGloveImpl::EndCalibration() +{ + ToNovaGlovePtrChecked()->EndCalibration(); +} + +void FSGNovaGloveImpl::ResetCalibration() +{ + ToNovaGlovePtrChecked()->ResetCalibration(); +} + +void FSGNovaGloveImpl::StopHaptics() +{ + ToNovaGlovePtrChecked()->StopHaptics(); +} + +void FSGNovaGloveImpl::StopVibrations() +{ + ToNovaGlovePtrChecked()->StopVibrations(); +} + +bool FSGNovaGloveImpl::SendHaptics() +{ + return ToNovaGlovePtrChecked()->SendHaptics(); +} + +bool FSGNovaGloveImpl::SupportsCustomWaveform(const ESGHapticLocation AtLocation) const +{ + return ToNovaGlovePtrChecked()->SupportsCustomWaveform(FSGCoreEnumCast::ToEHapticLocation(AtLocation)); +} + +bool FSGNovaGloveImpl::SendCustomWaveform(FSGCustomWaveformImpl& OutWaveform, ESGHapticLocation Location) +{ + return ToNovaGlovePtrChecked()->SendCustomWaveform(OutWaveform.ToCustomWaveform(), + FSGCoreEnumCast::ToEHapticLocation(Location)); +} + +bool FSGNovaGloveImpl::QueueForceFeedbackLevels(const TArray& Levels01) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return ToNovaGlovePtrChecked()->QueueForceFeedbackLevels(MoveTemp(Levels01Vector)); +} + +bool FSGNovaGloveImpl::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + return ToNovaGlovePtrChecked()->QueueForceFeedbackLevel(Finger, Level01); +} + +void FSGNovaGloveImpl::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + ToNovaGlovePtrChecked()->GetGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition)); + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGNovaGloveImpl::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + ToNovaGlovePtrChecked()->GetWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +FSGNovaGloveInfoImpl FSGNovaGloveImpl::GetGloveInfo() const +{ + const FSGNovaGloveInfoImpl GloveInfo{ToNovaGlovePtrChecked()->GetGloveInfo()}; + return GloveInfo; +} + +bool FSGNovaGloveImpl::SupportsThresholds() const +{ + return ToNovaGlovePtrChecked()->SupportsThresholds(); +} + +bool FSGNovaGloveImpl::SupportsCustomWaveforms() const +{ + return ToNovaGlovePtrChecked()->SupportsCustomWaveforms(); +} + +bool FSGNovaGloveImpl::SupportsOnBoardNormalization() const +{ + return ToNovaGlovePtrChecked()->SupportsOnBoardNormalization(); +} + +bool FSGNovaGloveImpl::GetSensorData(FSGNovaGloveSensorDataImpl& OutSensorData) const +{ + FSGNovaGloveSensorDataImpl::FNovaGloveSensorDataType SensorData; + const bool bResult = ToNovaGlovePtrChecked()->GetSensorData(SensorData); + OutSensorData = FSGNovaGloveSensorDataImpl{MoveTemp(SensorData)}; + return bResult; +} + +bool FSGNovaGloveImpl::GetNormalizedInput(TArray& OutNormalizedValues) const +{ + std::vector NormalizedValues; + const bool bResult = ToNovaGlovePtrChecked()->GetNormalizedInput(NormalizedValues); + OutNormalizedValues = FSGArrayUtils::FromStdVector(MoveTemp(NormalizedValues)); + return bResult; +} + +FString FSGNovaGloveImpl::ToNovaCommand( + const TArray& ForceFeedbackLevels, const TArray& BuzzLevels, const float WristLevel) const +{ + std::vector ForceFeedbackLevelsVector{FSGArrayUtils::ToStdVector(ForceFeedbackLevels)}; + std::vector BuzzLevelsVector{FSGArrayUtils::ToStdVector(BuzzLevels)}; + const FString Command{ + UTF8_TO_TCHAR(ToNovaGlovePtrChecked()->ToNovaCommand( + MoveTemp(ForceFeedbackLevelsVector), MoveTemp(BuzzLevelsVector), WristLevel).c_str()) + }; + return Command; +} + +bool FSGNovaGloveImpl::QueueVibroLevels(const TArray& Amplitudes) +{ + std::vector AmplitudesVector{FSGArrayUtils::ToStdVector(Amplitudes)}; + return ToNovaGlovePtrChecked()->QueueVibroLevels(MoveTemp(AmplitudesVector)); +} + +bool FSGNovaGloveImpl::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + return ToNovaGlovePtrChecked()->QueueVibroLevel(FSGCoreEnumCast::ToEHapticLocation(Location), Level01); +} + +bool FSGNovaGloveImpl::QueueVibroLevel(const int32 Finger, const float Amplitude) +{ + return ToNovaGlovePtrChecked()->QueueVibroLevel(Finger, Amplitude); +} + +bool FSGNovaGloveImpl::QueueWristLevel(const float Amplitude) +{ + return ToNovaGlovePtrChecked()->QueueWristLevel(Amplitude); +} + +ESGNovaVibroMotor FSGNovaGloveImpl::ToNovaMotor(const ESGHapticLocation Location) const +{ + return FSGCoreEnumCast::ToESGNovaVibroMotor( + ToNovaGlovePtrChecked()->ToNovaMotor(FSGCoreEnumCast::ToEHapticLocation(Location))); +} + +int32 FSGNovaGloveImpl::ChannelIndex(const ESGNovaVibroMotor Motor) const +{ + return ToNovaGlovePtrChecked()->ChannelIndex(FSGCoreEnumCast::ToENovaVibroMotor(Motor)); +} + +void FSGNovaGloveImpl::ValidateWaveform(FSGCustomWaveformImpl& OutWaveform, const ESGNovaVibroMotor Motor) const +{ + return ToNovaGlovePtrChecked()->ValidateWaveform(OutWaveform.ToCustomWaveform(), + FSGCoreEnumCast::ToENovaVibroMotor(Motor)); +} + +bool FSGNovaGloveImpl::SendCustomWaveform_Nova(FSGCustomWaveformImpl& OutWaveform, + const ESGNovaVibroMotor Motor, const bool bValidateWaveform) +{ + return ToNovaGlovePtrChecked()->SendCustomWaveform_Nova( + OutWaveform.ToCustomWaveform(), FSGCoreEnumCast::ToENovaVibroMotor(Motor), bValidateWaveform); +} + +bool FSGNovaGloveImpl::QueueThresholdCommand_Flexion(const int32 Finger, const float FlexionThreshold) +{ + return ToNovaGlovePtrChecked()->QueueThresholdCommand_Flexion(Finger, FlexionThreshold); +} + +bool FSGNovaGloveImpl::QueueClearThreshold(const int32 Finger) +{ + return ToNovaGlovePtrChecked()->QueueClearThreshold(Finger); +} + +FString FSGNovaGloveImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(ToNovaGlovePtrChecked()->ToString().c_str())}; + return String; +} + +FSGNovaGloveImpl::FImpl::FImpl(FSGNovaGloveImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGNovaGloveImpl::FImpl::~FImpl() = default; + +void FSGNovaGloveImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveInfoImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveInfoImpl.cpp new file mode 100644 index 0000000..50bdbb3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveInfoImpl.cpp @@ -0,0 +1,222 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveInfoImpl.h" + +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_NovaGloveInfo.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGNovaGloveInfoImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FNovaGloveInfoType NovaGloveInfo; + + /************************ + * Owner object + ************************/ + + FSGNovaGloveInfoImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGNovaGloveInfoImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +bool FSGNovaGloveInfoImpl::Parse(const FString& ConstantsString, FSGNovaGloveInfoImpl& OutGloveInfo) +{ + std::string Constants(TCHAR_TO_UTF8(*ConstantsString)); + FNovaGloveInfoType GloveInfo; + + const bool bResults = FNovaGloveInfoType::Parse(MoveTemp(Constants), GloveInfo); + OutGloveInfo = FSGNovaGloveInfoImpl(GloveInfo); + + return bResults; +} + +FSGNovaGloveInfoImpl FSGNovaGloveInfoImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGNovaGloveInfoImpl GloveInfo(FNovaGloveInfoType::Deserialize(MoveTemp(Serialized))); + return GloveInfo; +} + +FSGNovaGloveInfoImpl::FSGNovaGloveInfoImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNovaGloveInfoImpl::FSGNovaGloveInfoImpl( + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const FQuat& ImuCorrection, const int32 NumberOfSensors) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::string DeviceIdString(TCHAR_TO_UTF8(*DeviceId)); + std::string HardwareVersionString(TCHAR_TO_UTF8(*HardwareVersion)); + FSGQuatImpl::FQuatType ImuCorrectionQuat(FSGQuatImpl(ImuCorrection).ToQuat()); + + Pimpl->NovaGloveInfo = FNovaGloveInfoType(MoveTemp(DeviceIdString), + MoveTemp(HardwareVersionString), FirmwareVersion, SubFirmwareVersion, + bRightHanded, MoveTemp(ImuCorrectionQuat), NumberOfSensors); +} + +FSGNovaGloveInfoImpl::FSGNovaGloveInfoImpl(const FNovaGloveInfoType& GloveInfo) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->NovaGloveInfo = GloveInfo; +} + +FSGNovaGloveInfoImpl::FSGNovaGloveInfoImpl(const FSGNovaGloveInfoImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGNovaGloveInfoImpl::FSGNovaGloveInfoImpl(FSGNovaGloveInfoImpl&& Rhs) SG_NOEXCEPT = default; + +FSGNovaGloveInfoImpl::~FSGNovaGloveInfoImpl() = default; + +FSGNovaGloveInfoImpl& FSGNovaGloveInfoImpl::operator=(const FSGNovaGloveInfoImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGNovaGloveInfoImpl& FSGNovaGloveInfoImpl::operator=(FSGNovaGloveInfoImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGNovaGloveInfoImpl::FNovaGloveInfoType& FSGNovaGloveInfoImpl::ToNovaGloveInfo() const +{ + return Pimpl->NovaGloveInfo; +} + +FString FSGNovaGloveInfoImpl::GetDeviceId() const +{ + const FString DeviceId(UTF8_TO_TCHAR(Pimpl->NovaGloveInfo.GetDeviceId().c_str())); + return DeviceId; +} + +FString FSGNovaGloveInfoImpl::GetHardwareVersion() const +{ + const FString HardwareVersion(UTF8_TO_TCHAR(Pimpl->NovaGloveInfo.GetHardwareVersion().c_str())); + return HardwareVersion; +} + +int32 FSGNovaGloveInfoImpl::GetFirmwareVersion() const +{ + return Pimpl->NovaGloveInfo.GetFirmwareVersion(); +} + +int32 FSGNovaGloveInfoImpl::GetSubFirmwareVersion() const +{ + return Pimpl->NovaGloveInfo.GetSubFirmwareVersion(); +} + +bool FSGNovaGloveInfoImpl::IsRight() const +{ + return Pimpl->NovaGloveInfo.IsRight(); +} + +FQuat FSGNovaGloveInfoImpl::GetImuCorrection() const +{ + const FQuat ImuCorrection(FSGQuatImpl(Pimpl->NovaGloveInfo.GetImuCorrection()).ToFQuat()); + return ImuCorrection; +} + +int32 FSGNovaGloveInfoImpl::GetNumberOfSensors() const +{ + return Pimpl->NovaGloveInfo.GetNumberOfSensors(); +} + +bool FSGNovaGloveInfoImpl::FirmwareNewerThan(const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) const +{ + return Pimpl->NovaGloveInfo.FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool FSGNovaGloveInfoImpl::FirmwareOlderThan(const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) const +{ + return Pimpl->NovaGloveInfo.FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool FSGNovaGloveInfoImpl::Equals(const FSGNovaGloveInfoImpl& SGNovaGloveInfo) const +{ + return Pimpl->NovaGloveInfo.Equals(SGNovaGloveInfo.ToNovaGloveInfo()); +} + +FString FSGNovaGloveInfoImpl::ToString() const +{ + FString String(UTF8_TO_TCHAR(Pimpl->NovaGloveInfo.ToString().c_str())); + return String; +} + +FString FSGNovaGloveInfoImpl::Serialize() const +{ + FString Serialized(UTF8_TO_TCHAR(Pimpl->NovaGloveInfo.Serialize().c_str())); + return Serialized; +} + +FSGNovaGloveInfoImpl::FImpl::FImpl(FSGNovaGloveInfoImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGNovaGloveInfoImpl::FImpl::~FImpl() = default; + +void FSGNovaGloveInfoImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveSensorDataImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveSensorDataImpl.cpp new file mode 100644 index 0000000..9a9c38a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGNovaGloveSensorDataImpl.cpp @@ -0,0 +1,225 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveSensorDataImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_NovaGloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGNovaGloveInfoImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGNovaGloveSensorDataImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FNovaGloveSensorDataType NovaGloveSensorData; + + /************************ + * Owner object + ************************/ + + FSGNovaGloveSensorDataImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGNovaGloveSensorDataImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +const FSGNovaGloveSensorDataImpl& FSGNovaGloveSensorDataImpl::Empty() +{ + static const FSGNovaGloveSensorDataImpl EmptyData(FNovaGloveSensorDataType::Empty()); + return EmptyData; +} + +FSGNovaGloveSensorDataImpl FSGNovaGloveSensorDataImpl::Parse(const FString& RawData, + const FSGNovaGloveInfoImpl& GloveInfo) +{ + std::string RawDataString(TCHAR_TO_UTF8(*RawData)); + const FSGNovaGloveSensorDataImpl SensorData(FNovaGloveSensorDataType::Parse( + MoveTemp(RawDataString), GloveInfo.ToNovaGloveInfo())); + return SensorData; +} + +FSGNovaGloveSensorDataImpl FSGNovaGloveSensorDataImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGNovaGloveSensorDataImpl SensorData(FNovaGloveSensorDataType::Deserialize(MoveTemp(Serialized))); + return SensorData; +} + +FSGNovaGloveSensorDataImpl::FSGNovaGloveSensorDataImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGNovaGloveSensorDataImpl::FSGNovaGloveSensorDataImpl(const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, + const float BatteryLevel, const bool bCharging) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector ValuesVector{ + FSGArrayUtils::ToStdVector( + Values) + }; + Pimpl->NovaGloveSensorData = FNovaGloveSensorDataType( + MoveTemp(ValuesVector), ParsedValues, FSGQuatImpl(ImuRotation).ToQuat(), bImuParsed, + BatteryLevel, bCharging); +} + +FSGNovaGloveSensorDataImpl::FSGNovaGloveSensorDataImpl(const FNovaGloveSensorDataType& NovaGloveSensorData) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->NovaGloveSensorData = NovaGloveSensorData; +} + +FSGNovaGloveSensorDataImpl::FSGNovaGloveSensorDataImpl(const FSGNovaGloveSensorDataImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGNovaGloveSensorDataImpl::FSGNovaGloveSensorDataImpl(FSGNovaGloveSensorDataImpl&& Rhs) SG_NOEXCEPT = default; + +FSGNovaGloveSensorDataImpl::~FSGNovaGloveSensorDataImpl() = default; + +FSGNovaGloveSensorDataImpl& FSGNovaGloveSensorDataImpl::operator=(const FSGNovaGloveSensorDataImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGNovaGloveSensorDataImpl& FSGNovaGloveSensorDataImpl::operator=(FSGNovaGloveSensorDataImpl&& Rhs) SG_NOEXCEPT += default; + +const FSGNovaGloveSensorDataImpl::FNovaGloveSensorDataType& FSGNovaGloveSensorDataImpl::ToNovaGloveSensorData() const +{ + return Pimpl->NovaGloveSensorData; +} + +ESGNormalizationState FSGNovaGloveSensorDataImpl::GetSensorState() const +{ + return FSGCoreEnumCast::ToESGNormalizationState(Pimpl->NovaGloveSensorData.GetSensorState()); +} + +TArray FSGNovaGloveSensorDataImpl::GetSensorValues() const +{ + const TArray SensorValues{ + FSGArrayUtils::FromStdVector( + Pimpl->NovaGloveSensorData.GetSensorValues()) + }; + return SensorValues; +} + +float FSGNovaGloveSensorDataImpl::GetSensorValue(const ESGFinger Finger, const ESGNovaSensorLocation Location) const +{ + return Pimpl->NovaGloveSensorData.GetSensorValue( + FSGCoreEnumCast::ToEFinger(Finger), FSGCoreEnumCast::ToESensorLocation(Location)); +} + +int32 FSGNovaGloveSensorDataImpl::GetParsedValues() const +{ + return Pimpl->NovaGloveSensorData.GetParsedValues(); +} + +FQuat FSGNovaGloveSensorDataImpl::GetImuRotation() const +{ + return FSGQuatImpl(Pimpl->NovaGloveSensorData.GetImuRotation()).ToFQuat(); +} + +bool FSGNovaGloveSensorDataImpl::IsImuParsed() const +{ + return Pimpl->NovaGloveSensorData.IsImuParsed(); +} + +float FSGNovaGloveSensorDataImpl::GetBatteryLevel() const +{ + return Pimpl->NovaGloveSensorData.GetBatteryLevel(); +} + +bool FSGNovaGloveSensorDataImpl::IsCharging() const +{ + return Pimpl->NovaGloveSensorData.IsCharging(); +} + +bool FSGNovaGloveSensorDataImpl::Equals(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl) const +{ + return Pimpl->NovaGloveSensorData.Equals(NovaGloveSensorDataImpl.ToNovaGloveSensorData()); +} + +FString FSGNovaGloveSensorDataImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->NovaGloveSensorData.ToString().c_str())}; + return String; +} + +FString FSGNovaGloveSensorDataImpl::Serialize() const +{ + const FString Serialized{UTF8_TO_TCHAR(Pimpl->NovaGloveSensorData.Serialize().c_str())}; + return Serialized; +} + +FSGNovaGloveSensorDataImpl::FImpl::FImpl(FSGNovaGloveSensorDataImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGNovaGloveSensorDataImpl::FImpl::~FImpl() = default; + +void FSGNovaGloveSensorDataImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp new file mode 100644 index 0000000..2a3105d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.cpp @@ -0,0 +1,307 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGQuatImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGVect3DImpl.h" + +struct FSGQuatImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FQuatType Quat; + + /************************ + * Owner object + ************************/ + + FSGQuatImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGQuatImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +const FSGQuatImpl& FSGQuatImpl::Identity() +{ + static const FSGQuatImpl I(FQuatType::Identity()); + return I; +} + +FSGQuatImpl FSGQuatImpl::FromEuler(const float XAngle, const float YAngle, const float ZAngle) +{ + return FSGQuatImpl(FQuatType::FromEuler(XAngle, YAngle, ZAngle)); +} + +FSGQuatImpl FSGQuatImpl::FromEuler(const FSGVect3DImpl& Euler) +{ + return FSGQuatImpl(FQuatType::FromEuler(Euler.ToVect3D())); +} + +FSGQuatImpl FSGQuatImpl::FromEuler(const FVector& Euler) +{ + return FSGQuatImpl(FQuatType::FromEuler(FSGVect3DImpl(Euler).ToVect3D())); +} + +FSGQuatImpl FSGQuatImpl::FromAngleAxis(const float Angle, const float XAxis, const float YAxis, const float ZAxis) +{ + return FSGQuatImpl(FQuatType::FromAngleAxis(Angle, XAxis, YAxis, ZAxis)); +} + +FSGQuatImpl FSGQuatImpl::FromAngleAxis(const float Angle, const FSGVect3DImpl& Axis) +{ + return FSGQuatImpl(FQuatType::FromAngleAxis(Angle, Axis.ToVect3D())); +} + +FSGQuatImpl FSGQuatImpl::FromAngleAxis(const float Angle, const FVector& Axis) +{ + return FSGQuatImpl(FQuatType::FromAngleAxis(Angle, FSGVect3DImpl(Axis).ToVect3D())); +} + +FSGQuatImpl FSGQuatImpl::Invert(const FSGQuatImpl& QuatImpl) +{ + return FSGQuatImpl(FQuatType::Invert(QuatImpl.ToQuat())); +} + +FSGQuatImpl FSGQuatImpl::Normalize(const FSGQuatImpl& QuatImpl) +{ + return FSGQuatImpl(FQuatType::Normalize(QuatImpl.ToQuat())); +} + +bool FSGQuatImpl::Deserialize(const FString& String, FSGQuatImpl& OutResult, const ANSICHAR Delimiter) +{ + FQuatType Quat; + const bool bReturn = FQuatType::Deserialize(TCHAR_TO_UTF8(*String), Quat, Delimiter); + OutResult = FSGQuatImpl(Quat); + return bReturn; +} + +FSGQuatImpl::FSGQuatImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGQuatImpl::FSGQuatImpl(const float X, const float Y, const float Z, const float W) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->Quat = FQuatType(X, Y, Z, W); +} + +FSGQuatImpl::FSGQuatImpl(const FQuatType& Quat) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->Quat = Quat; +} + +FSGQuatImpl::FSGQuatImpl(const FQuat& Quat) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + /// NOTE + /// Unreal Engine uses a left-handed, z-up world coordinate system, which yealds clockwise rotations: + /// Forward X + /// Right Y + /// Up Z + /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: + /// Forward X + /// Left Y + /// Up Z + Pimpl->Quat = FQuatType(-Quat.X, Quat.Y, -Quat.Z, Quat.W); +} + +FSGQuatImpl::FSGQuatImpl(const FSGQuatImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGQuatImpl::FSGQuatImpl(FSGQuatImpl&& Rhs) SG_NOEXCEPT = default; + +FSGQuatImpl::~FSGQuatImpl() = default; + +FSGQuatImpl& FSGQuatImpl::operator=(const FSGQuatImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGQuatImpl& FSGQuatImpl::operator=(FSGQuatImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGQuatImpl::FQuatType& FSGQuatImpl::ToQuat() const +{ + return Pimpl->Quat; +} + +FQuat FSGQuatImpl::ToFQuat() const +{ + /// NOTE + /// Unreal Engine uses a left-handed, z-up world coordinate system, which yealds clockwise rotations: + /// Forward X + /// Right Y + /// Up Z + /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: + /// Forward X + /// Left Y + /// Up Z + return FQuat(-Pimpl->Quat.GetX(), Pimpl->Quat.GetY(), -Pimpl->Quat.GetZ(), Pimpl->Quat.GetW()); +} + +FSGQuatImpl FSGQuatImpl::operator*(const FSGQuatImpl& QuatImpl) const +{ + return FSGQuatImpl(Pimpl->Quat.operator*(QuatImpl.ToQuat())); +} + +FSGVect3DImpl FSGQuatImpl::operator*(const FSGVect3DImpl& Vect3DImpl) const +{ + return FSGVect3DImpl(Pimpl->Quat.operator*(Vect3DImpl.ToVect3D())); +} + +FVector FSGQuatImpl::operator*(const FVector& Vector) const +{ + return FSGVect3DImpl(Pimpl->Quat.operator*(FSGVect3DImpl(Vector).ToVect3D())).ToFVector(); +} + +float FSGQuatImpl::GetX() const +{ + return Pimpl->Quat.GetX(); +} + +void FSGQuatImpl::SetX(const float X) +{ + Pimpl->Quat.SetX(X); +} + +float FSGQuatImpl::GetY() const +{ + return Pimpl->Quat.GetY(); +} + +void FSGQuatImpl::SetY(const float Y) +{ + Pimpl->Quat.SetY(Y); +} + +float FSGQuatImpl::GetZ() const +{ + return Pimpl->Quat.GetZ(); +} + +void FSGQuatImpl::SetZ(const float Z) +{ + Pimpl->Quat.SetZ(Z); +} + +float FSGQuatImpl::GetW() const +{ + return Pimpl->Quat.GetW(); +} + +void FSGQuatImpl::SetW(const float W) +{ + Pimpl->Quat.SetW(W); +} + +FSGVect3DImpl FSGQuatImpl::ToEulerImpl() const +{ + return FSGVect3DImpl(Pimpl->Quat.ToEuler()); +} + +FVector FSGQuatImpl::ToEuler() const +{ + return FSGVect3DImpl(Pimpl->Quat.ToEuler()).ToFVector(); +} + +FSGVect3DImpl FSGQuatImpl::Rotate(const FSGVect3DImpl& Vect3DImpl) const +{ + return FSGVect3DImpl(Pimpl->Quat.Rotate(Vect3DImpl.ToVect3D())); +} + +FVector FSGQuatImpl::Rotate(const FVector& Vector) const +{ + return FSGVect3DImpl(Pimpl->Quat.Rotate(FSGVect3DImpl(Vector).ToVect3D())).ToFVector(); +} + +bool FSGQuatImpl::Equals(const FSGQuatImpl& QuatImpl) const +{ + return Pimpl->Quat.Equals(QuatImpl.ToQuat()); +} + +bool FSGQuatImpl::IsIdentity() const +{ + return Pimpl->Quat.IsIdentity(); +} + +float FSGQuatImpl::Magnitude() const +{ + return Pimpl->Quat.Magnitude(); +} + +FString FSGQuatImpl::ToString() const +{ + return UTF8_TO_TCHAR(Pimpl->Quat.ToString().c_str()); +} + +FString FSGQuatImpl::Serialize(const ANSICHAR Delimiter) const +{ + return UTF8_TO_TCHAR(Pimpl->Quat.Serialize(Delimiter).c_str()); +} + +FSGQuatImpl::FImpl::FImpl(FSGQuatImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGQuatImpl::FImpl::~FImpl() = default; + +void FSGQuatImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.h new file mode 100644 index 0000000..937dfc4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGQuatImpl.h @@ -0,0 +1,174 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +class FSGVect3DImpl; + +namespace SGCore +{ + namespace Kinematics + { + class Quat; + } +} + +class SENSEGLOVECOREIMPL_API FSGQuatImpl +{ +public: + typedef SGCore::Kinematics::Quat FQuatType; + +public: + static const FSGQuatImpl& Identity(); + + static FSGQuatImpl FromEuler(float XAngle, float YAngle, float ZAngle); + static FSGQuatImpl FromEuler(const FSGVect3DImpl& Euler); + static FSGQuatImpl FromEuler(const FVector& Euler); + static FSGQuatImpl FromAngleAxis(float Angle, float XAxis, float YAxis, float ZAxis); + static FSGQuatImpl FromAngleAxis(float Angle, const FSGVect3DImpl& Axis); + static FSGQuatImpl FromAngleAxis(float Angle, const FVector& Axis); + + static FSGQuatImpl Invert(const FSGQuatImpl& QuatImpl); + static FSGQuatImpl Normalize(const FSGQuatImpl& QuatImpl); + + static bool Deserialize(const FString& String, FSGQuatImpl& OutResult, ANSICHAR Delimiter); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGQuatImpl(); + FSGQuatImpl(float X, float Y, float Z, float W); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGQuatImpl(const FQuatType& Quat); + + /** + * The cast from FQuat type constructor. + */ + explicit FSGQuatImpl(const FQuat& Quat); + +public: + /** + * The copy constructor. + */ + FSGQuatImpl(const FSGQuatImpl& Rhs); + + /** + * The move constructor. + */ + FSGQuatImpl(FSGQuatImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGQuatImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGQuatImpl& operator=(const FSGQuatImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGQuatImpl& operator=(FSGQuatImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FQuatType& ToQuat() const; + + /** + * The cast to FQuat type method. + */ + FQuat ToFQuat() const; + +public: + FSGQuatImpl operator*(const FSGQuatImpl& QuatImpl) const; + FSGVect3DImpl operator*(const FSGVect3DImpl& Vect3DImpl) const; + FVector operator*(const FVector& Vector) const; + +public: + float GetX() const; + void SetX(float X); + + float GetY() const; + void SetY(float Y); + + float GetZ() const; + void SetZ(float Z); + + float GetW() const; + void SetW(float W); + +public: + FSGVect3DImpl ToEulerImpl() const; + FVector ToEuler() const; + + FSGVect3DImpl Rotate(const FSGVect3DImpl& Vect3DImpl) const; + FVector Rotate(const FVector& Vector) const; + + bool Equals(const FSGQuatImpl& QuatImpl) const; + + bool IsIdentity() const; + + float Magnitude() const; + + FString ToString() const; + + FString Serialize(ANSICHAR Delimiter) const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseComImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseComImpl.cpp new file mode 100644 index 0000000..27bde8a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseComImpl.cpp @@ -0,0 +1,76 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseComImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_SenseCom.h" + +bool FSGSenseComImpl::RegisterExe() +{ + return FSenseComType::RegisterExe(); +} + +bool FSGSenseComImpl::RegisterExe(const FString& ExePath) +{ + return FSenseComType::RegisterExe(std::move(std::string(TCHAR_TO_UTF8(*ExePath)))); +} + +bool FSGSenseComImpl::GetExePath(FString& OutExePath) +{ + std::string Path; + const bool bResult = FSenseComType::GetExePath(Path); + OutExePath = FString(UTF8_TO_TCHAR(Path.c_str())); + return bResult; +} + +bool FSGSenseComImpl::ScanningActive() +{ + return FSenseComType::ScanningActive(); +} + +bool FSGSenseComImpl::GetCurrentExeDirectory(FString& OutDirectory) +{ + std::string Directory; + const bool bResult = FSenseComType::GetCurrentExeDirectory(Directory); + OutDirectory = FString(UTF8_TO_TCHAR(Directory.c_str())); + return bResult; +} + +bool FSGSenseComImpl::StartupSenseCom() +{ + return FSenseComType::StartupSenseCom(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp new file mode 100644 index 0000000..7026310 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveImpl.cpp @@ -0,0 +1,586 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveImpl.h" + +#include +#include + +#include "Containers/StringConv.h" +#include "Misc/AssertionMacros.h" + +#include "SGBuildHacks/SGInclude_Core_BasicHandModel.h" +#include "SGBuildHacks/SGInclude_Core_HandInterpolator.h" +#include "SGBuildHacks/SGInclude_Core_HandPose.h" +#include "SGBuildHacks/SGInclude_Core_HapticGlove.h" +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SenseGlove.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveInfo.h" +#include "SGBuildHacks/SGInclude_Core_SenseGlovePose.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveSensorData.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGBasicHandModelImpl.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGHandInterpolatorImpl.h" +#include "SGCoreImpl/SGHandPoseImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGSenseGloveInfoImpl.h" +#include "SGCoreImpl/SGSenseGlovePoseImpl.h" +#include "SGCoreImpl/SGSenseGloveSensorDataImpl.h" +#include "SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGSenseGloveImpl::FImpl +{ + /************************ + * Owner object + ************************/ + + FSGSenseGloveImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSenseGloveImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TSharedRef FSGSenseGloveImpl::Parse(const FString& ConstantsString) +{ + std::string ConstantsStdString{TCHAR_TO_UTF8(*ConstantsString)}; + FSGDevicePtrType SGDevicePtr{FSenseGloveType::Parse(MoveTemp(ConstantsStdString))}; + ensureAlwaysMsgf(SGDevicePtr, TEXT("Invalid SGDevice!")); + const TSharedRef SenseGloveImpl{ + MakeShared(std::static_pointer_cast(MoveTemp(SGDevicePtr))) + }; + return SenseGloveImpl; +} + +TArray FSGSenseGloveImpl::GetSenseGloves() +{ + FSenseGloveVectorType Vector{FSenseGloveType::GetSenseGloves()}; + + const TArray Array{ + FSGArrayUtils::FromStdVector(MoveTemp(Vector)) + }; + + return Array; +} + +bool FSGSenseGloveImpl::GetSenseGlove(FSGSenseGloveImpl& OutGlove) +{ + FSenseGloveType Glove; + const bool bResult = FSenseGloveType::GetSenseGlove(Glove); + OutGlove = FSGSenseGloveImpl{MoveTemp(Glove)}; + return bResult; +} + +bool FSGSenseGloveImpl::GetSenseGlove(const bool bRightHanded, FSGSenseGloveImpl& OutGlove) +{ + FSenseGloveType Glove; + const bool bResult = FSenseGloveType::GetSenseGlove(bRightHanded, Glove); + OutGlove = FSGSenseGloveImpl{MoveTemp(Glove)}; + return bResult; +} + +void FSGSenseGloveImpl::CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const bool bRightHanded, const ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + FSenseGloveType::CalculateGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + bRightHanded, FSGCoreEnumCast::ToEFinger(MountedOn), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition));; + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGSenseGloveImpl::CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const bool bRightHanded, const ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + FSenseGloveType::CalculateWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + bRightHanded, FSGCoreEnumCast::ToEFinger(MountedOn), + FSGUnits::CentimetersToMillimeters(GloveWristPositionOffset), + FSGQuatImpl(GloveWristRotationOffset).ToQuat(), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +ANSICHAR FSGSenseGloveImpl::GetHapticsByte() +{ + static const ANSICHAR Byte = FSenseGloveType::GetHapticsByte(); + return Byte; +} + +ANSICHAR FSGSenseGloveImpl::GetThumperByte() +{ + static const ANSICHAR Byte = FSenseGloveType::GetThumperByte(); + return Byte; +} + +const FVector& FSGSenseGloveImpl::GetDefaultThimbleOffset() +{ + static const FVector Offset{FSGVect3DImpl{FSenseGloveType::GetDefaultThimbleOffset()}.ToFVector()}; + return Offset; +} + +FSGSenseGlovePoseImpl FSGSenseGloveImpl::CalculateGlovePose(const FSGSenseGloveSensorDataImpl& SensorData, + const FSGSenseGloveInfoImpl& GloveModel) +{ + const FSGSenseGlovePoseImpl Pose{ + FSenseGloveType::CalculateGlovePose(SensorData.ToSenseGloveSensorData(), GloveModel.ToSenseGloveInfo()) + }; + return Pose; +} + +FSGSenseGlovePoseImpl FSGSenseGloveImpl::CalculateGlovePose(const TArray>& GloveAngles, + const FSGSenseGloveInfoImpl& GloveModel) +{ + std::vector> GloveAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(GloveAngles) + }; + + const FSGSenseGlovePoseImpl Pose{ + FSenseGloveType::CalculateGlovePose(MoveTemp(GloveAnglesVector), GloveModel.ToSenseGloveInfo()) + }; + + return Pose; +} + +void FSGSenseGloveImpl::NormalizeValues( + const TArray& SumAngles, const FSGSenseGloveSensorNormalizerImpl& Normalizer, + TArray& OutFlexions, TArray& OutAbductions) +{ + std::vector SumAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(SumAngles) + }; + + std::vector Flexions; + std::vector Abductions; + + FSenseGloveType::NormalizeValues(MoveTemp(SumAnglesVector), Normalizer.ToSenseGloveSensorNormalizer(), + Flexions, Abductions); + + OutFlexions = FSGArrayUtils::FromStdVector(MoveTemp(Flexions)); + OutAbductions = FSGArrayUtils::FromStdVector(MoveTemp(Abductions)); +} + +void FSGSenseGloveImpl::CalculateHandAngles( + const FSGSenseGlovePoseImpl& GlovePose, + const FSGSenseGloveSensorNormalizerImpl& Normalizer, const FSGHandInterpolatorImpl& NormalizedToAngles, + TArray>& OutHandAngles) +{ + std::vector> HandAngles; + + FSenseGloveType::CalculateHandAngles( + GlovePose.ToSenseGlovePose(), + Normalizer.ToSenseGloveSensorNormalizer(), NormalizedToAngles.ToHandInterpolator(), + HandAngles); + + OutHandAngles = FSGArrayUtils::FromSenseGloveAngles(MoveTemp(HandAngles)); +} + +void FSGSenseGloveImpl::CalculateHandPose( + const FSGSenseGlovePoseImpl& GlovePose, const FSGBasicHandModelImpl& HandModel, + const FSGSenseGloveSensorNormalizerImpl& Normalizer, const FSGHandInterpolatorImpl& NormalizedToAngles, + FSGHandPoseImpl& OutHandPose) +{ + FSGHandPoseImpl::FHandPoseType HandPose; + + FSenseGloveType::CalculateHandPose( + GlovePose.ToSenseGlovePose(), HandModel.ToBasicHandModel(), + Normalizer.ToSenseGloveSensorNormalizer(), NormalizedToAngles.ToHandInterpolator(), + HandPose); + + OutHandPose = FSGHandPoseImpl{MoveTemp(HandPose)}; +} + +FSGSenseGloveImpl::FSGSenseGloveImpl() + : FSGHapticGloveImpl(), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveImpl::FSGSenseGloveImpl(const FSGSenseGloveInfoImpl& Model) + : FSGHapticGloveImpl(std::make_shared(Model.ToSenseGloveInfo())), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGloveType SenseGlove) + : FSGHapticGloveImpl(std::make_shared(SenseGlove)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveImpl::FSGSenseGloveImpl(const FSenseGlovePtrType SenseGlove) + : FSGHapticGloveImpl(std::static_pointer_cast(SenseGlove)), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveImpl::FSGSenseGloveImpl(const FSGSenseGloveImpl& Rhs) + : FSGHapticGloveImpl(Rhs), + Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGSenseGloveImpl::FSGSenseGloveImpl(FSGSenseGloveImpl&& Rhs) SG_NOEXCEPT = default; + +FSGSenseGloveImpl::~FSGSenseGloveImpl() = default; + +FSGSenseGloveImpl& FSGSenseGloveImpl::operator=(const FSGSenseGloveImpl& Rhs) +{ + FSGHapticGloveImpl::operator=(Rhs); + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGSenseGloveImpl& FSGSenseGloveImpl::operator=(FSGSenseGloveImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGSenseGloveImpl::FSenseGloveType& FSGSenseGloveImpl::ToSenseGlove() const +{ + return *ToSenseGlovePtrChecked(); +} + +FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtr() const +{ + return std::static_pointer_cast(ToSGDevicePtr()); +} + +FSGSenseGloveImpl::FSenseGlovePtrType FSGSenseGloveImpl::ToSenseGlovePtrChecked() const +{ + FSenseGlovePtrType SenseGlove = std::static_pointer_cast(ToSGDevicePtr()); + ensureAlwaysMsgf(SenseGlove.get(), TEXT("Invalid SenseGlove")); + return SenseGlove; +} + +ESGDeviceType FSGSenseGloveImpl::GetDeviceType() const +{ + return FSGCoreEnumCast::ToESGDeviceType(ToSenseGlovePtrChecked()->GetDeviceType()); +} + +FString FSGSenseGloveImpl::GetDeviceId() const +{ + const FString Id{UTF8_TO_TCHAR(ToSenseGlovePtrChecked()->GetDeviceId().c_str())}; + return Id; +} + +FString FSGSenseGloveImpl::GetHardwareVersion() const +{ + const FString Version{UTF8_TO_TCHAR(ToSenseGlovePtrChecked()->GetHardwareVersion().c_str())}; + return Version; +} + +int32 FSGSenseGloveImpl::GetFirmwareVersion() const +{ + return ToSenseGlovePtrChecked()->GetFirmwareVersion(); +} + +int32 FSGSenseGloveImpl::GetSubFirmwareVersion() const +{ + return ToSenseGlovePtrChecked()->GetSubFirmwareVersion(); +} + +bool FSGSenseGloveImpl::IsRight() const +{ + return ToSenseGlovePtr()->IsRight(); +} + +bool FSGSenseGloveImpl::GetImuRotation(FQuat& OutImu) +{ + FSGQuatImpl::FQuatType Imu; + const bool bResult = ToSenseGlovePtrChecked()->GetImuRotation(Imu); + OutImu = FSGQuatImpl{MoveTemp(Imu)}.ToFQuat(); + return bResult; +} + +bool FSGSenseGloveImpl::GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const +{ + FSGHandPoseImpl::FHandPoseType HandPose; + const bool bResult = ToSenseGlovePtrChecked()->GetHandPose(HandGeometry.ToBasicHandModel(), HandPose); + OutHandPose = FSGHandPoseImpl{MoveTemp(HandPose)}; + return bResult; +} + +bool FSGSenseGloveImpl::GetHandAngles(TArray>& OutHandAngles) const +{ + std::vector> HandAngles; + const bool bResult = ToSenseGlovePtrChecked()->GetHandAngles(HandAngles); + OutHandAngles = + FSGArrayUtils::FromSenseGloveAngles(MoveTemp(HandAngles)); + return bResult; +} + +ESGHapticGloveCalibrationState FSGSenseGloveImpl::GetCalibrationState() const +{ + return FSGCoreEnumCast::ToESGHapticGloveCalibrationState(ToSenseGlovePtrChecked()->GetCalibrationState()); +} + +void FSGSenseGloveImpl::EndCalibration() +{ + return ToSenseGlovePtrChecked()->EndCalibration(); +} + +void FSGSenseGloveImpl::ResetCalibration() +{ + return ToSenseGlovePtrChecked()->EndCalibration(); +} + +void FSGSenseGloveImpl::StopHaptics() +{ + ToSenseGlovePtrChecked()->StopHaptics(); +} + +void FSGSenseGloveImpl::StopVibrations() +{ + ToSenseGlovePtrChecked()->StopVibrations(); +} + +bool FSGSenseGloveImpl::SendHaptics() +{ + return ToSenseGlovePtrChecked()->SendHaptics(); +} + +bool FSGSenseGloveImpl::QueueForceFeedbackLevels(const TArray& Levels01) +{ + std::vector Levels01Vector{FSGArrayUtils::ToStdVector(Levels01)}; + return ToSenseGlovePtrChecked()->QueueForceFeedbackLevels(MoveTemp(Levels01Vector)); +} + +bool FSGSenseGloveImpl::QueueForceFeedbackLevel(const int32 Finger, const float Level01) +{ + return ToSenseGlovePtrChecked()->QueueForceFeedbackLevel(Finger, Level01); +} + +bool FSGSenseGloveImpl::QueueVibroLevels(const TArray& Amplitudes) +{ + std::vector AmplitudesVector{FSGArrayUtils::ToStdVector(Amplitudes)}; + return ToSenseGlovePtrChecked()->QueueVibroLevels(MoveTemp(AmplitudesVector)); +} + +bool FSGSenseGloveImpl::QueueVibroLevel(const ESGHapticLocation Location, const float Level01) +{ + return ToSenseGlovePtrChecked()->QueueVibroLevel(FSGCoreEnumCast::ToEHapticLocation(Location), Level01); +} + +void FSGSenseGloveImpl::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + ToSenseGlovePtrChecked()->GetGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition)); + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGSenseGloveImpl::GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const +{ + FSGVect3DImpl::FVect3DType GlovePosition; + FSGQuatImpl::FQuatType GloveRotation; + + ToSenseGlovePtrChecked()->GetGloveLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + FSGCoreEnumCast::ToEFinger(MountedOn), + GlovePosition, GloveRotation); + + OutGlovePosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(GlovePosition)); + OutGloveRotation = FSGQuatImpl{MoveTemp(GloveRotation)}.ToFQuat(); +} + +void FSGSenseGloveImpl::GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + ToSenseGlovePtrChecked()->GetWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +void FSGSenseGloveImpl::GetWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) const +{ + FSGVect3DImpl::FVect3DType WristPosition; + FSGQuatImpl::FQuatType WristRotation; + + ToSenseGlovePtrChecked()->GetWristLocation( + FSGUnits::CentimetersToMillimeters(ReferencePosition), + FSGQuatImpl{ReferenceRotation}.ToQuat(), + FSGCoreEnumCast::ToEPositionalTrackingHardware(TrackingHardware), + FSGUnits::CentimetersToMillimeters(GloveWristPositionOffset), + FSGQuatImpl(GloveWristRotationOffset).ToQuat(), + WristPosition, WristRotation); + + OutWristPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(WristPosition)); + OutWristRotation = FSGQuatImpl{MoveTemp(WristRotation)}.ToFQuat(); +} + +FSGSenseGloveInfoImpl FSGSenseGloveImpl::GetGloveInfo() const +{ + FSGSenseGloveInfoImpl GloveInfo{ToSenseGlovePtr()->GetGloveInfo()}; + return GloveInfo; +} + +TArray FSGSenseGloveImpl::GetFingerThimbleOffsets() const +{ + const TArray Offsets{ + FSGArrayUtils::FromStdVector( + ToSenseGlovePtrChecked()->GetFingerThimbleOffsets()) + }; + return Offsets; +} + +void FSGSenseGloveImpl::SetFingerThimbleOffset(const int32 Finger, const FVector& Offset) +{ + ToSenseGlovePtrChecked()->SetFingerThimbleOffset(Finger, FSGVect3DImpl{Offset}.ToVect3D()); +} + +bool FSGSenseGloveImpl::SupportsWristActuator() const +{ + return ToSenseGlovePtrChecked()->SupportsWristActuator(); +} + +bool FSGSenseGloveImpl::GetSensorData(FSGSenseGloveSensorDataImpl& OutSensorData) const +{ + FSGSenseGloveSensorDataImpl::FSenseGloveSensorDataType SensorData; + const bool bResult = ToSenseGlovePtrChecked()->GetSensorData(SensorData); + OutSensorData = FSGSenseGloveSensorDataImpl{MoveTemp(SensorData)}; + return bResult; +} + +bool FSGSenseGloveImpl::GetGlovePose(FSGSenseGlovePoseImpl& OutGlovePose) const +{ + FSGSenseGlovePoseImpl::FSenseGlovePoseType GlovePose; + const bool bResult = ToSenseGlovePtr()->GetGlovePose(GlovePose); + OutGlovePose = FSGSenseGlovePoseImpl{GlovePose}; + return bResult; +} + +bool FSGSenseGloveImpl::GetGlovePose(const FSGSenseGloveSensorDataImpl& SensorData, + FSGSenseGlovePoseImpl& OutGlovePose) const +{ + FSGSenseGlovePoseImpl::FSenseGlovePoseType GlovePose; + const bool bResult = ToSenseGlovePtr()->GetGlovePose(SensorData.ToSenseGloveSensorData(), GlovePose); + OutGlovePose = FSGSenseGlovePoseImpl{GlovePose}; + return bResult; +} + +bool FSGSenseGloveImpl::QueueVibroLevel(const int32 Finger, const float Amplitude) +{ + return ToSenseGlovePtrChecked()->QueueVibroLevel(Finger, Amplitude); +} + +bool FSGSenseGloveImpl::QueueThumperCommand(const ESGSenseGloveThumperCommand Command) +{ + return ToSenseGlovePtrChecked()->QueueThumperCommand(FSGCoreEnumCast::ToESenseGloveThumperCommand(Command)); +} + +FString FSGSenseGloveImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(ToSenseGlovePtrChecked()->ToString().c_str())}; + return String; +} + +FSGSenseGloveImpl::FImpl::FImpl(FSGSenseGloveImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGSenseGloveImpl::FImpl::~FImpl() = default; + +void FSGSenseGloveImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveInfoImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveInfoImpl.cpp new file mode 100644 index 0000000..d3b166a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveInfoImpl.cpp @@ -0,0 +1,314 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveInfoImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveInfo.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGSenseGloveInfoImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FSenseGloveInfoType SenseGloveInfo; + + /************************ + * Owner object + ************************/ + + FSGSenseGloveInfoImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSenseGloveInfoImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +bool FSGSenseGloveInfoImpl::Parse(const FString& ConstantsString, FSGSenseGloveInfoImpl& OutGloveInfo, + const bool bUpdateOldModels) +{ + std::string Constants(TCHAR_TO_UTF8(*ConstantsString)); + FSenseGloveInfoType GloveInfo; + + const bool bResults = FSenseGloveInfoType::Parse(MoveTemp(Constants), GloveInfo, bUpdateOldModels); + OutGloveInfo = FSGSenseGloveInfoImpl(GloveInfo); + + return bResults; +} + +FSGSenseGloveInfoImpl FSGSenseGloveInfoImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized(TCHAR_TO_UTF8(*SerializedString)); + const FSGSenseGloveInfoImpl GloveInfo(FSenseGloveInfoType::Deserialize(MoveTemp(Serialized))); + return GloveInfo; +} + +FSGSenseGloveInfoImpl::FSGSenseGloveInfoImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveInfoImpl::FSGSenseGloveInfoImpl(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, + int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, + const FQuat& ImuCorrection, + const TArray& StartPositions, + const TArray& StartRotations, + const TArray>& GloveLengths, + const TArray& Functions) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::string DeviceIdString(TCHAR_TO_UTF8(*DeviceId)); + std::string HardwareVersionString(TCHAR_TO_UTF8(*HardwareVersion)); + FSGQuatImpl::FQuatType ImuCorrectionQuat(FSGQuatImpl(ImuCorrection).ToQuat()); + + std::vector StartPositionsVector{ + FSGArrayUtils::ToMillimeters(StartPositions) + }; + + std::vector StartRotationsVector{ + FSGArrayUtils::ToStdVector(StartRotations) + }; + + std::vector> GloveLengthsVector{ + FSGArrayUtils::ToMillimeters(GloveLengths) + }; + + std::vector FunctionsVector{FSGArrayUtils::ToStdVector(Functions)}; + + Pimpl->SenseGloveInfo = FSenseGloveInfoType(MoveTemp(DeviceIdString), MoveTemp(HardwareVersionString), + FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, + MoveTemp(ImuCorrectionQuat), + MoveTemp(StartPositionsVector), MoveTemp(StartRotationsVector), + MoveTemp(GloveLengthsVector), MoveTemp(FunctionsVector)); +} + +FSGSenseGloveInfoImpl::FSGSenseGloveInfoImpl(const FSenseGloveInfoType& GloveInfo) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SenseGloveInfo = GloveInfo; +} + +FSGSenseGloveInfoImpl::FSGSenseGloveInfoImpl(const FSGSenseGloveInfoImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGSenseGloveInfoImpl::FSGSenseGloveInfoImpl(FSGSenseGloveInfoImpl&& Rhs) SG_NOEXCEPT = default; + +FSGSenseGloveInfoImpl::~FSGSenseGloveInfoImpl() = default; + +FSGSenseGloveInfoImpl& FSGSenseGloveInfoImpl::operator=(const FSGSenseGloveInfoImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGSenseGloveInfoImpl& FSGSenseGloveInfoImpl::operator=(FSGSenseGloveInfoImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGSenseGloveInfoImpl::FSenseGloveInfoType& FSGSenseGloveInfoImpl::ToSenseGloveInfo() const +{ + return Pimpl->SenseGloveInfo; +} + +FString FSGSenseGloveInfoImpl::GetDeviceId() const +{ + const FString DeviceId{UTF8_TO_TCHAR(Pimpl->SenseGloveInfo.GetDeviceId().c_str())}; + return DeviceId; +} + +FString FSGSenseGloveInfoImpl::GetHardwareVersion() const +{ + const FString HardwareVersion{UTF8_TO_TCHAR(Pimpl->SenseGloveInfo.GetHardwareVersion().c_str())}; + return HardwareVersion; +} + +int32 FSGSenseGloveInfoImpl::GetFirmwareVersion() const +{ + return Pimpl->SenseGloveInfo.GetFirmwareVersion(); +} + +int32 FSGSenseGloveInfoImpl::GetSubFirmwareVersion() const +{ + return Pimpl->SenseGloveInfo.GetSubFirmwareVersion(); +} + +bool FSGSenseGloveInfoImpl::IsRight() const +{ + return Pimpl->SenseGloveInfo.IsRight(); +} + +int32 FSGSenseGloveInfoImpl::GetNumberOfSensors() const +{ + return Pimpl->SenseGloveInfo.GetNumberOfSensors(); +} + +FQuat FSGSenseGloveInfoImpl::GetImuCorrection() const +{ + const FQuat ImuCorrection{FSGQuatImpl(Pimpl->SenseGloveInfo.GetImuCorrection()).ToFQuat()}; + return ImuCorrection; +} + +TArray FSGSenseGloveInfoImpl::GetStartPositions() const +{ + const TArray StartPositionsArray{ + FSGArrayUtils::FromMillimeters( + Pimpl->SenseGloveInfo.GetStartPositions())}; + return StartPositionsArray; +} + +TArray FSGSenseGloveInfoImpl::GetStartRotations() const +{ + const TArray StartRotationsArray{ + FSGArrayUtils::FromStdVector( + Pimpl->SenseGloveInfo.GetStartRotations())}; + return StartRotationsArray; +} + +TArray> FSGSenseGloveInfoImpl::GetGloveLengths() const +{ + const TArray> GloveLengths{ + FSGArrayUtils::FromMillimeters( + Pimpl->SenseGloveInfo.GetGloveLengths()) + }; + return GloveLengths; +} + +TArray FSGSenseGloveInfoImpl::GetFunctions() const +{ + const TArray FunctionsArray{FSGArrayUtils::FromStdVector(Pimpl->SenseGloveInfo.GetFunctions())}; + return FunctionsArray; +} + +FVector FSGSenseGloveInfoImpl::GetStartPosition(const ESGFinger Finger) const +{ + const FVector StartPosition{ + FSGUnits::MillimetersToCentimeters( + Pimpl->SenseGloveInfo.GetStartPosition(FSGCoreEnumCast::ToEFinger(Finger))) + }; + return StartPosition; +} + +FQuat FSGSenseGloveInfoImpl::GetStartRotation(const ESGFinger Finger) const +{ + const FQuat StartRotation( + FSGQuatImpl(Pimpl->SenseGloveInfo.GetStartRotation(FSGCoreEnumCast::ToEFinger(Finger))).ToFQuat()); + return StartRotation; +} + +TArray FSGSenseGloveInfoImpl::GetGloveLengths(const ESGFinger Finger) const +{ + std::vector GloveLengthsVector{ + Pimpl->SenseGloveInfo.GetGloveLengths(FSGCoreEnumCast::ToEFinger(Finger)) + }; + const TArray GloveLengthsArray{ + FSGArrayUtils::FromMillimeters(MoveTemp(GloveLengthsVector)) + }; + return GloveLengthsArray; +} + +TArray> FSGSenseGloveInfoImpl::ToGloveAngles(const TArray>& SensorAngles) const +{ + /// TODO + /// Does the nested float TArray requires translation? If so, how to do that without a Movement value? + std::vector> SensorAnglesVector{ + FSGArrayUtils::ToStdVector(SensorAngles) + }; + const TArray> GloveAngles{ + FSGArrayUtils::FromSenseGloveAngles( + Pimpl->SenseGloveInfo.ToGloveAngles(MoveTemp((SensorAnglesVector)))) + }; + return GloveAngles; +} + +bool FSGSenseGloveInfoImpl::Equals(const FSGSenseGloveInfoImpl& SGSenseGloveInfo, const bool bGeometryOnly) const +{ + return Pimpl->SenseGloveInfo.Equals(SGSenseGloveInfo.ToSenseGloveInfo(), bGeometryOnly); +} + +FString FSGSenseGloveInfoImpl::ToString(const bool bShortNotation) const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->SenseGloveInfo.ToString(bShortNotation).c_str())}; + return String; +} + +FString FSGSenseGloveInfoImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->SenseGloveInfo.ToString().c_str())}; + return String; +} + +FString FSGSenseGloveInfoImpl::Serialize() const +{ + const FString Serialized{UTF8_TO_TCHAR(Pimpl->SenseGloveInfo.Serialize().c_str())}; + return Serialized; +} + +FSGSenseGloveInfoImpl::FImpl::FImpl(FSGSenseGloveInfoImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGSenseGloveInfoImpl::FImpl::~FImpl() = default; + +void FSGSenseGloveInfoImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGlovePoseImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGlovePoseImpl.cpp new file mode 100644 index 0000000..3469171 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGlovePoseImpl.cpp @@ -0,0 +1,248 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGlovePoseImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SenseGlovePose.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGSenseGloveInfoImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGSenseGlovePoseImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FSenseGlovePoseType SenseGlovePose; + + /************************ + * Owner object + ************************/ + + FSGSenseGlovePoseImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSenseGlovePoseImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGSenseGlovePoseImpl FSGSenseGlovePoseImpl::IdlePose(const FSGSenseGloveInfoImpl& GloveInfo) +{ + const FSGSenseGlovePoseImpl GlovePoseImpl{FSenseGlovePoseType::IdlePose(GloveInfo.ToSenseGloveInfo())}; + return GlovePoseImpl; +} + +FSGSenseGlovePoseImpl FSGSenseGlovePoseImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized{TCHAR_TO_UTF8(*SerializedString)}; + const FSGSenseGlovePoseImpl GlovePose{FSenseGlovePoseType::Deserialize(MoveTemp(Serialized))}; + return GlovePose; +} + +FSGSenseGlovePoseImpl::FSGSenseGlovePoseImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGlovePoseImpl::FSGSenseGlovePoseImpl(const bool bRightHanded, const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector> JointPositionsVector{ + FSGArrayUtils::ToMillimeters(JointPositions) + }; + std::vector> JointRotationsVector{ + FSGArrayUtils::ToStdVector(JointRotations) + }; + std::vector> GloveAnglesVector{ + FSGArrayUtils::ToSenseGloveAngles(GloveAngles) + }; + + Pimpl->SenseGlovePose = FSenseGlovePoseType{ + bRightHanded, + MoveTemp(JointPositionsVector), + MoveTemp(JointRotationsVector), + MoveTemp(GloveAnglesVector) + }; +} + +FSGSenseGlovePoseImpl::FSGSenseGlovePoseImpl(const FSenseGlovePoseType& SenseGlovePose) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SenseGlovePose = SenseGlovePose; +} + +FSGSenseGlovePoseImpl::FSGSenseGlovePoseImpl(const FSGSenseGlovePoseImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGSenseGlovePoseImpl::FSGSenseGlovePoseImpl(FSGSenseGlovePoseImpl&& Rhs) SG_NOEXCEPT = default; + +FSGSenseGlovePoseImpl::~FSGSenseGlovePoseImpl() = default; + +FSGSenseGlovePoseImpl& FSGSenseGlovePoseImpl::operator=(const FSGSenseGlovePoseImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGSenseGlovePoseImpl& FSGSenseGlovePoseImpl::operator=(FSGSenseGlovePoseImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGSenseGlovePoseImpl::FSenseGlovePoseType& FSGSenseGlovePoseImpl::ToSenseGlovePose() const +{ + return Pimpl->SenseGlovePose; +} + +bool FSGSenseGlovePoseImpl::IsRight() const +{ + return Pimpl->SenseGlovePose.IsRight(); +} + +TArray> FSGSenseGlovePoseImpl::GetJointPositions() const +{ + const TArray> JointPositions{ + FSGArrayUtils::FromMillimeters( + Pimpl->SenseGlovePose.GetJointPositions()) + }; + return JointPositions; +} + +TArray> FSGSenseGlovePoseImpl::GetJointRotations() const +{ + const TArray> JointRotations{ + FSGArrayUtils::FromStdVector( + Pimpl->SenseGlovePose.GetJointRotations()) + }; + return JointRotations; +} + +TArray> FSGSenseGlovePoseImpl::GetGloveAngles() const +{ + const TArray> GloveAngles{ + FSGArrayUtils::FromSenseGloveAngles( + Pimpl->SenseGlovePose.GetGloveAngles()) + }; + return GloveAngles; +} + +TArray FSGSenseGlovePoseImpl::GetThimblePositions() const +{ + const TArray ThimblePositions{ + FSGArrayUtils::FromMillimeters( + Pimpl->SenseGlovePose.GetThimblePositions()) + }; + return ThimblePositions; +} + +TArray FSGSenseGlovePoseImpl::GetThimbleRotations() const +{ + const TArray ThimbleRotations{ + FSGArrayUtils::FromStdVector( + Pimpl->SenseGlovePose.GetThimbleRotations()) + }; + return ThimbleRotations; +} + +TArray FSGSenseGlovePoseImpl::GetTotalGloveAngles() const +{ + const TArray TotalGloveAngles{ + FSGArrayUtils::FromSenseGloveAngles(Pimpl->SenseGlovePose.GetTotalGloveAngles()) + }; + return TotalGloveAngles; +} + +TArray FSGSenseGlovePoseImpl::CalculateFingertips(const TArray& FingerOffsets) const +{ + std::vector FingerOffsetsVector{ + FSGArrayUtils::ToMillimeters(FingerOffsets) + }; + const TArray Fingertips{ + FSGArrayUtils::FromMillimeters( + Pimpl->SenseGlovePose.CalculateFingertips(MoveTemp(FingerOffsetsVector))) + }; + return Fingertips; +} + +bool FSGSenseGlovePoseImpl::Equals(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl) const +{ + return Pimpl->SenseGlovePose.Equals(SenseGlovePoseImpl.ToSenseGlovePose()); +} + +FString FSGSenseGlovePoseImpl::ToString(const bool bShortFormat) const +{ + const FString String(UTF8_TO_TCHAR(Pimpl->SenseGlovePose.ToString(bShortFormat).c_str())); + return String; +} + +FString FSGSenseGlovePoseImpl::Serialize() const +{ + const FString Serialized(UTF8_TO_TCHAR(Pimpl->SenseGlovePose.Serialize().c_str())); + return Serialized; +} + +FSGSenseGlovePoseImpl::FImpl::FImpl(FSGSenseGlovePoseImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGSenseGlovePoseImpl::FImpl::~FImpl() = default; + +void FSGSenseGlovePoseImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveSensorDataImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveSensorDataImpl.cpp new file mode 100644 index 0000000..a6cd8c2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveSensorDataImpl.cpp @@ -0,0 +1,216 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveSensorDataImpl.h" + +#include +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveSensorData.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGSenseGloveInfoImpl.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGSenseGloveSensorDataImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FSenseGloveSensorDataType SenseGloveSensorData; + + /************************ + * Owner object + ************************/ + + FSGSenseGloveSensorDataImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSenseGloveSensorDataImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +const FSGSenseGloveSensorDataImpl& FSGSenseGloveSensorDataImpl::Empty() +{ + static const FSGSenseGloveSensorDataImpl EmptyData{FSenseGloveSensorDataType::Empty()}; + return EmptyData; +} + +FSGSenseGloveSensorDataImpl FSGSenseGloveSensorDataImpl::Parse(const FString& RawData, + const FSGSenseGloveInfoImpl& GloveInfo) +{ + std::string RawDataString(TCHAR_TO_UTF8(*RawData)); + const FSGSenseGloveSensorDataImpl SensorData{ + FSenseGloveSensorDataType::Parse(MoveTemp(RawDataString), GloveInfo.ToSenseGloveInfo()) + }; + return SensorData; +} + +FSGSenseGloveSensorDataImpl FSGSenseGloveSensorDataImpl::Deserialize(const FString& SerializedString) +{ + std::string Serialized{TCHAR_TO_UTF8(*SerializedString)}; + const FSGSenseGloveSensorDataImpl SensorData{FSenseGloveSensorDataType::Deserialize(MoveTemp(Serialized))}; + return SensorData; +} + +FSGSenseGloveSensorDataImpl::FSGSenseGloveSensorDataImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveSensorDataImpl::FSGSenseGloveSensorDataImpl(const TArray>& SensorAngles, + const FQuat& ImuRotation, + const int32 ParsedValues, const bool bImuParsed) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector> SensorAnglesVector{FSGArrayUtils::ToStdVector(SensorAngles)}; + Pimpl->SenseGloveSensorData = FSenseGloveSensorDataType( + MoveTemp(SensorAnglesVector), FSGQuatImpl(ImuRotation).ToQuat(), ParsedValues, bImuParsed); +} + +FSGSenseGloveSensorDataImpl::FSGSenseGloveSensorDataImpl(const FSenseGloveSensorDataType& SenseGloveSensorData) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SenseGloveSensorData = SenseGloveSensorData; +} + +FSGSenseGloveSensorDataImpl::FSGSenseGloveSensorDataImpl(const FSGSenseGloveSensorDataImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGSenseGloveSensorDataImpl::FSGSenseGloveSensorDataImpl(FSGSenseGloveSensorDataImpl&& Rhs) SG_NOEXCEPT = default; + +FSGSenseGloveSensorDataImpl::~FSGSenseGloveSensorDataImpl() = default; + +FSGSenseGloveSensorDataImpl& FSGSenseGloveSensorDataImpl::operator=(const FSGSenseGloveSensorDataImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGSenseGloveSensorDataImpl& FSGSenseGloveSensorDataImpl::operator=(FSGSenseGloveSensorDataImpl&& Rhs) SG_NOEXCEPT += default; + +const FSGSenseGloveSensorDataImpl::FSenseGloveSensorDataType& FSGSenseGloveSensorDataImpl::ToSenseGloveSensorData( + ) const +{ + return Pimpl->SenseGloveSensorData; +} + +TArray> FSGSenseGloveSensorDataImpl::GetSensorAngles() const +{ + const TArray> SensorAngles{ + FSGArrayUtils::FromSenseGloveAngles(Pimpl->SenseGloveSensorData.GetSensorAngles()) + }; + return SensorAngles; +} + +TArray FSGSenseGloveSensorDataImpl::GetSensorAngles(ESGFinger Finger) const +{ + const TArray SensorAngles{ + FSGArrayUtils::FromStdVector( + Pimpl->SenseGloveSensorData.GetSensorAngles(FSGCoreEnumCast::ToEFinger(Finger))) + }; + return SensorAngles; +} + +TArray FSGSenseGloveSensorDataImpl::GetAngleSequence() const +{ + const TArray AngleSequence{ + FSGArrayUtils::FromStdVector(Pimpl->SenseGloveSensorData.GetAngleSequence()) + }; + return AngleSequence; +} + +FQuat FSGSenseGloveSensorDataImpl::GetImuRotation() const +{ + return FSGQuatImpl(Pimpl->SenseGloveSensorData.GetImuRotation()).ToFQuat(); +} + +int32 FSGSenseGloveSensorDataImpl::GetParsedValues() const +{ + return Pimpl->SenseGloveSensorData.GetParsedValues(); +} + +bool FSGSenseGloveSensorDataImpl::IsImuParsed() const +{ + return Pimpl->SenseGloveSensorData.IsImuParsed(); +} + +bool FSGSenseGloveSensorDataImpl::Equals(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl) const +{ + return Pimpl->SenseGloveSensorData.Equals(SenseGloveSensorDataImpl.ToSenseGloveSensorData()); +} + +FString FSGSenseGloveSensorDataImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->SenseGloveSensorData.ToString().c_str())}; + return String; +} + +FString FSGSenseGloveSensorDataImpl::Serialize() const +{ + const FString Serialized{UTF8_TO_TCHAR(Pimpl->SenseGloveSensorData.Serialize().c_str())}; + return Serialized; +} + +FSGSenseGloveSensorDataImpl::FImpl::FImpl(FSGSenseGloveSensorDataImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGSenseGloveSensorDataImpl::FImpl::~FImpl() = default; + +void FSGSenseGloveSensorDataImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveSensorNormalizerImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveSensorNormalizerImpl.cpp new file mode 100644 index 0000000..8569cda --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveSensorNormalizerImpl.cpp @@ -0,0 +1,137 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h" + +#include "SGBuildHacks/SGInclude_Core_SenseGloveSensorNormalizer.h" +#include "SGCoreImpl/SGSenseGloveInfoImpl.h" + +struct FSGSenseGloveSensorNormalizerImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FSenseGloveSensorNormalizerType SenseGloveSensorNormalizer; + + /************************ + * Owner object + ************************/ + + FSGSenseGloveSensorNormalizerImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSenseGloveSensorNormalizerImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGSenseGloveSensorNormalizerImpl::FSGSenseGloveSensorNormalizerImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSenseGloveSensorNormalizerImpl::FSGSenseGloveSensorNormalizerImpl(const bool bRightHanded) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SenseGloveSensorNormalizer = FSenseGloveSensorNormalizerType(bRightHanded); +} + +FSGSenseGloveSensorNormalizerImpl::FSGSenseGloveSensorNormalizerImpl( + const FSenseGloveSensorNormalizerType& SenseGloveSensorNormalizer) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SenseGloveSensorNormalizer = SenseGloveSensorNormalizer; +} + +FSGSenseGloveSensorNormalizerImpl::FSGSenseGloveSensorNormalizerImpl(const FSGSenseGloveSensorNormalizerImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGSenseGloveSensorNormalizerImpl::FSGSenseGloveSensorNormalizerImpl( + FSGSenseGloveSensorNormalizerImpl&& Rhs) SG_NOEXCEPT = default; + +FSGSenseGloveSensorNormalizerImpl::~FSGSenseGloveSensorNormalizerImpl() = default; + +FSGSenseGloveSensorNormalizerImpl& FSGSenseGloveSensorNormalizerImpl::operator=( + const FSGSenseGloveSensorNormalizerImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGSenseGloveSensorNormalizerImpl& FSGSenseGloveSensorNormalizerImpl::operator=( + FSGSenseGloveSensorNormalizerImpl&& Rhs) SG_NOEXCEPT += default; + +const FSGSenseGloveSensorNormalizerImpl::FSenseGloveSensorNormalizerType& +FSGSenseGloveSensorNormalizerImpl::ToSenseGloveSensorNormalizer() const +{ + return Pimpl->SenseGloveSensorNormalizer; +} + +float FSGSenseGloveSensorNormalizerImpl::NormalizeFlexion(const int32 Finger, const float SumFlexionAngles) const +{ + return Pimpl->SenseGloveSensorNormalizer.NormalizeFlexion(Finger, SumFlexionAngles); +} + +float FSGSenseGloveSensorNormalizerImpl::NormalizeAbduction(const int32 Finger, const float SumAbductionAngles) const +{ + return Pimpl->SenseGloveSensorNormalizer.NormalizeAbduction(Finger, SumAbductionAngles); +} + +FSGSenseGloveSensorNormalizerImpl::FImpl::FImpl(FSGSenseGloveSensorNormalizerImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGSenseGloveSensorNormalizerImpl::FImpl::~FImpl() = default; + +void FSGSenseGloveSensorNormalizerImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveVarsImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveVarsImpl.cpp new file mode 100644 index 0000000..24c70a4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSenseGloveVarsImpl.cpp @@ -0,0 +1,147 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveVarsImpl.h" + +#include + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveInfo.h" +#include "SGBuildHacks/SGInclude_Core_SenseGloveVars.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGSenseGloveInfoImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +FString FSGSenseGloveVarsImpl::GetStandardConstantsString(const FString& HardwareVersion, const float FirmwareVersion, + const bool bRightHanded) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + const FString String{ + UTF8_TO_TCHAR(FSenseGloveVarsType::GetStandardConstantsString( + MoveTemp(HardwareVersionString), FirmwareVersion, bRightHanded).c_str()) + }; + return String; +} + +FString FSGSenseGloveVarsImpl::GetSensorString(const FString& HardwareVersion, const float FirmwareVersion) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + const FString String{ + UTF8_TO_TCHAR(FSenseGloveVarsType::GetSensorString(MoveTemp(HardwareVersionString),FirmwareVersion).c_str()) + }; + return String; +} + +TArray FSGSenseGloveVarsImpl::GetStartPositions(const FString& HardwareVersion, const bool bRightHanded) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + const TArray StartPositions{ + FSGArrayUtils::FromMillimeters( + FSenseGloveVarsType::GetStartPositions(MoveTemp(HardwareVersionString), bRightHanded)) + }; + return StartPositions; +} + +TArray FSGSenseGloveVarsImpl::GetStartRotations(const FString& HardwareVersion, const bool bRightHanded) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + const TArray StartRotations{ + FSGArrayUtils::FromStdVector( + FSenseGloveVarsType::GetStartRotations(MoveTemp(HardwareVersionString), bRightHanded)) + }; + return StartRotations; +} + +TArray> FSGSenseGloveVarsImpl::GetGloveLengths(const FString& HardwareVersion) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + const TArray> GloveLengths{ + FSGArrayUtils::FromMillimeters( + FSenseGloveVarsType::GetGloveLengths(MoveTemp(HardwareVersionString))) + }; + return GloveLengths; +} + +int32 FSGSenseGloveVarsImpl::GetSensors(const FString& HardwareVersion) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + return FSenseGloveVarsType::GetSensors(MoveTemp(HardwareVersionString)); +} + +FQuat FSGSenseGloveVarsImpl::GetImuCorrection(const FString& HardwareVersion, const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + return FSGQuatImpl(FSenseGloveVarsType::GetImuCorrection( + MoveTemp(HardwareVersionString), FirmwareVersion, SubFirmwareVersion)).ToFQuat(); +} + +TArray FSGSenseGloveVarsImpl::GetFunctions(const FString& HardwareVersion, const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + const TArray Functions{FSGArrayUtils::FromStdVector(FSenseGloveVarsType::GetFunctions( + MoveTemp(HardwareVersionString), FirmwareVersion, SubFirmwareVersion)) + }; + return Functions; +} + +FSGSenseGloveInfoImpl FSGSenseGloveVarsImpl::GenerateGloveModel( + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + return FSGSenseGloveInfoImpl{ + FSenseGloveVarsType::GenerateGloveModel( + MoveTemp(HardwareVersionString), FirmwareVersion, SubFirmwareVersion, bRightHanded) + }; +} + +FSGSenseGloveInfoImpl FSGSenseGloveVarsImpl::GenerateGloveModel( + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const FString& CustomId) +{ + std::string HardwareVersionString{TCHAR_TO_UTF8(*HardwareVersion)}; + std::string CustomIdString{TCHAR_TO_UTF8(*CustomId)}; + return FSGSenseGloveInfoImpl{ + FSenseGloveVarsType::GenerateGloveModel( + MoveTemp(HardwareVersionString), FirmwareVersion, SubFirmwareVersion, + bRightHanded, MoveTemp(CustomIdString)) + }; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSensorNormalizationImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSensorNormalizationImpl.cpp new file mode 100644 index 0000000..99b5717 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGSensorNormalizationImpl.cpp @@ -0,0 +1,190 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSensorNormalizationImpl.h" + +#include + +#include "SGBuildHacks/SGInclude_Core_SensorNormalization.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGSensorNormalizationImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FSensorNormalizationType SensorNormalization; + + /************************ + * Owner object + ************************/ + + FSGSensorNormalizationImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSensorNormalizationImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGSensorNormalizationImpl::FSGSensorNormalizationImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSensorNormalizationImpl::FSGSensorNormalizationImpl(const TArray& MovementRanges) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + std::vector MovementRangesVector{FSGArrayUtils::ToStdVector(MovementRanges)}; + + Pimpl->SensorNormalization = FSensorNormalizationType(MoveTemp(MovementRangesVector)); +} + +FSGSensorNormalizationImpl::FSGSensorNormalizationImpl( + const FSensorNormalizationType& SensorNormalization) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->SensorNormalization = SensorNormalization; +} + +FSGSensorNormalizationImpl::FSGSensorNormalizationImpl(const FSGSensorNormalizationImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGSensorNormalizationImpl::FSGSensorNormalizationImpl(FSGSensorNormalizationImpl&& Rhs) SG_NOEXCEPT = default; + +FSGSensorNormalizationImpl::~FSGSensorNormalizationImpl() = default; + +FSGSensorNormalizationImpl& FSGSensorNormalizationImpl::operator=(const FSGSensorNormalizationImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGSensorNormalizationImpl& FSGSensorNormalizationImpl::operator=(FSGSensorNormalizationImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGSensorNormalizationImpl::FSensorNormalizationType& FSGSensorNormalizationImpl::ToSensorNormalization() const +{ + return Pimpl->SensorNormalization; +} + +FSGSensorNormalizationImpl::FSensorNormalizationType& FSGSensorNormalizationImpl::ToSensorNormalization() +{ + return Pimpl->SensorNormalization; +} + +bool FSGSensorNormalizationImpl::CollectsNormalization() const +{ + return Pimpl->SensorNormalization.CollectsNormalization(); +} + +void FSGSensorNormalizationImpl::SetCollectNormalization(const bool bCollectNormalization) +{ + Pimpl->SensorNormalization.SetCollectNormalization(bCollectNormalization); +} + +int32 FSGSensorNormalizationImpl::GetLength() const +{ + return Pimpl->SensorNormalization.GetLength(); +} + +int32 FSGSensorNormalizationImpl::GetMoveCount() const +{ + return Pimpl->SensorNormalization.GetMoveCount(); +} + +bool FSGSensorNormalizationImpl::AllSensorsMoving() const +{ + return Pimpl->SensorNormalization.AllSensorsMoving(); +} + +void FSGSensorNormalizationImpl::ResetNormalization() +{ + Pimpl->SensorNormalization.ResetNormalization(); +} + +void FSGSensorNormalizationImpl::UpdateNormalization(const float Value, const int32 Index) +{ + Pimpl->SensorNormalization.UpdateNormalization(Value, Index); +} + +float FSGSensorNormalizationImpl::NormalizeValue(const float Value, const int32 Index) +{ + return Pimpl->SensorNormalization.NormalizeValue(Value, Index); +} + +TArray FSGSensorNormalizationImpl::NormalizeValues(const TArray& Values) +{ + std::vector ValuesVector{FSGArrayUtils::ToStdVector(Values)}; + const TArray NormalizedValues{ + FSGArrayUtils::FromStdVector(Pimpl->SensorNormalization.NormalizeValues(MoveTemp(ValuesVector))) + }; + return NormalizedValues; +} + +bool FSGSensorNormalizationImpl::MovedEnough(const int32 Index) const +{ + return Pimpl->SensorNormalization.MovedEnough(Index); +} + +float FSGSensorNormalizationImpl::Denormalize(const float Value01, const int32 Index, const float FallbackValue) const +{ + return Pimpl->SensorNormalization.Denormalize(Value01, Index, FallbackValue); +} + +FSGSensorNormalizationImpl::FImpl::FImpl(FSGSensorNormalizationImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGSensorNormalizationImpl::FImpl::~FImpl() = default; + +void FSGSensorNormalizationImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGThresholdCommandImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGThresholdCommandImpl.cpp new file mode 100644 index 0000000..dd633df --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGThresholdCommandImpl.cpp @@ -0,0 +1,188 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGThresholdCommandImpl.h" + +#include + +#include "SGBuildHacks/SGInclude_Core_ThresholdCommand.h" +#include "SGUtils/SGArrayUtils.h" + +struct FSGThresholdCommandImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FThresholdCommandType ThresholdCommand; + + /************************ + * Owner object + ************************/ + + FSGThresholdCommandImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGThresholdCommandImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +FSGThresholdCommandImpl::FSGThresholdCommandImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGThresholdCommandImpl::FSGThresholdCommandImpl( + const TArray& AffectedFingers, const TArray& ThresholdValues) +{ + std::vector AffectedFingersVector{FSGArrayUtils::ToStdVector(AffectedFingers)}; + std::vector ThresholdValuesVector{FSGArrayUtils::ToStdVector(ThresholdValues)}; + + Pimpl->ThresholdCommand = FThresholdCommandType{MoveTemp(AffectedFingersVector), MoveTemp(ThresholdValuesVector)}; +} + +FSGThresholdCommandImpl::FSGThresholdCommandImpl( + const FThresholdCommandType& ThresholdCommand) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->ThresholdCommand = ThresholdCommand; +} + +FSGThresholdCommandImpl::FSGThresholdCommandImpl(const FSGThresholdCommandImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGThresholdCommandImpl::FSGThresholdCommandImpl(FSGThresholdCommandImpl&& Rhs) SG_NOEXCEPT = default; + +FSGThresholdCommandImpl::~FSGThresholdCommandImpl() = default; + +FSGThresholdCommandImpl& FSGThresholdCommandImpl::operator=(const FSGThresholdCommandImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGThresholdCommandImpl& FSGThresholdCommandImpl::operator=(FSGThresholdCommandImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGThresholdCommandImpl::FThresholdCommandType& FSGThresholdCommandImpl::ToThresholdCommand() const +{ + return Pimpl->ThresholdCommand; +} + +FSGThresholdCommandImpl::FThresholdCommandType& FSGThresholdCommandImpl::ToThresholdCommand() +{ + return Pimpl->ThresholdCommand; +} + +float FSGThresholdCommandImpl::GetThreshold(int32 Finger) const +{ + return Pimpl->ThresholdCommand.GetThreshold(Finger); +} + +void FSGThresholdCommandImpl::SetThreshold(const int32 Finger, const float ThresholdValue) +{ + Pimpl->ThresholdCommand.SetThreshold(Finger, ThresholdValue); +} + +TArray FSGThresholdCommandImpl::GetThresholds() const +{ + const TArray Thresholds{FSGArrayUtils::FromStdVector(Pimpl->ThresholdCommand.GetThresholds())}; + return Thresholds; +} + +void FSGThresholdCommandImpl::SetThresholds(const TArray& AffectedFingers, const TArray& ThresholdValues) +{ + std::vector AffectedFingersVector{FSGArrayUtils::ToStdVector(AffectedFingers)}; + std::vector ThresholdValuesVector{FSGArrayUtils::ToStdVector(ThresholdValues)}; + + Pimpl->ThresholdCommand.SetThresholds(MoveTemp(AffectedFingersVector), MoveTemp(ThresholdValuesVector)); +} + +bool FSGThresholdCommandImpl::GetFingerActive(const int32 Finger) const +{ + return Pimpl->ThresholdCommand.GetFingerActive(Finger); +} + +TArray FSGThresholdCommandImpl::GetActiveFingers() const +{ + const TArray ActiveFingers{FSGArrayUtils::FromStdVector(Pimpl->ThresholdCommand.GetActiveFingers())}; + return ActiveFingers; +} + +void FSGThresholdCommandImpl::ClearThreshold(const int32 Finger) +{ + Pimpl->ThresholdCommand.ClearThreshold(Finger); +} + +void FSGThresholdCommandImpl::ClearThresholds() +{ + Pimpl->ThresholdCommand.ClearThresholds(); +} + +bool FSGThresholdCommandImpl::Equals(const FSGThresholdCommandImpl& ThresholdCommand) const +{ + return Pimpl->ThresholdCommand.Equals(ThresholdCommand.ToThresholdCommand()); +} + +FString FSGThresholdCommandImpl::ToString() const +{ + const FString String{UTF8_TO_TCHAR(Pimpl->ThresholdCommand.ToString().c_str())}; + return String; +} + +FSGThresholdCommandImpl::FImpl::FImpl(FSGThresholdCommandImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGThresholdCommandImpl::FImpl::~FImpl() = default; + +void FSGThresholdCommandImpl::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGTrackingImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGTrackingImpl.cpp new file mode 100644 index 0000000..66863ea --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGTrackingImpl.cpp @@ -0,0 +1,594 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGTrackingImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Quat.h" +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" +#include "SGCoreImpl/SGCoreEnumCast.h" +#include "SGCoreImpl/SGQuatImpl.h" +#include "SGCoreImpl/SGVect3DImpl.h" +#include "SGUtils/SGArrayUtils.h" + +void FSGTrackingImpl::CalculateLocation(const FVector& TrackedPosition, const FQuat& TrackedRotation, + const FVector& PositionOffset, const FQuat& RotationOffset, + FVector& OutNewPosition, FQuat& OutNewRotation) +{ + FSGVect3DImpl::FVect3DType TrackedPositionVect3D{ + FSGUnits::CentimetersToMillimeters(TrackedPosition) + }; + FSGQuatImpl::FQuatType TrackedRotationQuat(FSGQuatImpl(TrackedRotation).ToQuat()); + FSGVect3DImpl::FVect3DType PositionOffsetVect3D{ + FSGUnits::CentimetersToMillimeters(PositionOffset) + }; + FSGQuatImpl::FQuatType RotationOffsetQuat(FSGQuatImpl(RotationOffset).ToQuat()); + FSGVect3DImpl::FVect3DType NewPosition; + FSGQuatImpl::FQuatType NewRotation; + + FTrackingType::CalculateLocation(MoveTemp(TrackedPositionVect3D), + MoveTemp(TrackedRotationQuat), + MoveTemp(PositionOffsetVect3D), + MoveTemp(RotationOffsetQuat), + NewPosition, + NewRotation); + + OutNewPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(NewPosition)); + OutNewRotation = FSGQuatImpl(MoveTemp(NewRotation)).ToFQuat(); +} + +const TArray& FSGTrackingImpl::GetSenseGloveFingerToGlovePositionOrigin() +{ + static const TArray GlovePositionOrigin{ + FSGArrayUtils::FromMillimeters( + FTrackingType::GetSenseGloveFingerToGlovePositionOrigin()) + }; + return GlovePositionOrigin; +} + +const TArray& FSGTrackingImpl::GetSenseGloveFingerToGloveRotationOrigin() +{ + static const TArray GloveRotationOrigin{ + FSGArrayUtils::FromStdVector( + FTrackingType::GetSenseGloveFingerToGloveRotationOrigin()) + }; + return GloveRotationOrigin; +} + +const FVector& FSGTrackingImpl::GetSenseGloveWristPositionOffset() +{ + static const FVector Offset{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetSenseGloveWristPositionOffset()) + }; + return Offset; +} + +const FQuat& FSGTrackingImpl::GetSenseGloveWristRotationOffset() +{ + static FQuat Offset{FSGQuatImpl(FTrackingType::GetSenseGloveWristRotationOffset()).ToFQuat()}; + return Offset; +} + +void FSGTrackingImpl::GetSenseGloveMountOffset(const bool bRightHanded, const ESGFinger ToFinger, + FVector& OutIPosition, FQuat& OutIRotation) +{ + FSGVect3DImpl::FVect3DType IPosition; + FSGQuatImpl::FQuatType IRotation; + + FTrackingType::GetSenseGloveMountOffset(bRightHanded, FSGCoreEnumCast::ToEFinger(ToFinger), + IPosition, IRotation); + + OutIPosition = FSGUnits::MillimetersToCentimeters( + MoveTemp(IPosition)); + OutIRotation = FSGQuatImpl(MoveTemp(IRotation)).ToFQuat(); +} + +void FSGTrackingImpl::GetSenseGloveTrackerMountOffset(const ESGPositionalTrackingHardware Hardware, + const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGVect3DImpl::FVect3DType PositionOffset; + FSGQuatImpl::FQuatType RotationOffset; + + FTrackingType::GetSenseGloveTrackerMountOffset(FSGCoreEnumCast::ToEPositionalTrackingHardware(Hardware), + bRightHanded, PositionOffset, RotationOffset); + + OutPositionOffset = FSGUnits::MillimetersToCentimeters( + MoveTemp(PositionOffset)); + OutRotationOffset = FSGQuatImpl(MoveTemp(RotationOffset)).ToFQuat(); +} + +const FVector& FSGTrackingImpl::GetSenseGloveViveToAttachPosition() +{ + static const FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetSenseGloveViveToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetSenseGloveViveToAttachRotation() +{ + static const FQuat Rotation(FSGQuatImpl(FTrackingType::GetSenseGloveViveToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetSenseGloveOculusTouchToAttachPosition() +{ + static const FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetSenseGloveOculusTouchToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetSenseGloveOculusTouchToAttachRotation() +{ + static const FQuat Rotation(FSGQuatImpl(FTrackingType::GetSenseGloveOculusTouchToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetNovaToWristPositionOffset() +{ + static const FVector Offset{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetNovaToWristPositionOffset()) + }; + return Offset; +} + +const FQuat& FSGTrackingImpl::GetNovaToWristRotationOffset() +{ + static FQuat Offset(FSGQuatImpl(FTrackingType::GetNovaToWristRotationOffset()).ToFQuat()); + return Offset; +} + +const FVector& FSGTrackingImpl::GetRightNovaViveToAttachPosition() +{ + static const FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNovaViveToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNovaViveToAttachRotation() +{ + static const FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNovaViveToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNovaViveToAttachPosition() +{ + static const FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNovaViveToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNovaViveToAttachRotation() +{ + static const FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNovaViveToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNovaQuest2ToAttachPosition() +{ + static const FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNovaQuest2ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNovaQuest2ToAttachRotation() +{ + static const FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNovaQuest2ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNovaQuest2ToAttachPosition() +{ + static const FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNovaQuest2ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNovaQuest2ToAttachRotation() +{ + static const FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNovaQuest2ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNovaPico2ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNovaPico2ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNovaPico2ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNovaPico2ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FQuat& FSGTrackingImpl::GetLeftNovaPico2ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNovaPico2ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNovaQuestProToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNovaQuestProToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNovaQuestProToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNovaQuestProToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNovaQuestProToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNovaQuestProToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNovaQuestProToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNovaQuestProToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNovaViveFocus3ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNovaViveFocus3ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNovaViveFocus3ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNovaViveFocus3ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNovaViveFocus3ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNovaViveFocus3ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNovaViveFocus3ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNovaViveFocus3ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNovaQuest3ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNovaQuest3ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNovaQuest3ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNovaQuest3ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNovaQuest3ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNovaQuest3ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNovaQuest3ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNovaQuest3ToAttachRotation()).ToFQuat()); + return Rotation; +} + +void FSGTrackingImpl::GetNovaGloveWristOffset(const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGVect3DImpl::FVect3DType PositionOffset; + FSGQuatImpl::FQuatType RotationOffset; + + FTrackingType::GetNovaGloveWristOffset(bRightHanded, PositionOffset, RotationOffset); + + OutPositionOffset = FSGUnits::MillimetersToCentimeters( + MoveTemp(PositionOffset)); + OutRotationOffset = FSGQuatImpl(MoveTemp(RotationOffset)).ToFQuat(); +} + +void FSGTrackingImpl::GetNovaGloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGVect3DImpl::FVect3DType PositionOffset; + FSGQuatImpl::FQuatType RotationOffset; + + FTrackingType::GetNovaGloveTrackerOffset(FSGCoreEnumCast::ToEPositionalTrackingHardware(Hardware), bRightHanded, + PositionOffset, RotationOffset); + + OutPositionOffset = FSGUnits::MillimetersToCentimeters( + MoveTemp(PositionOffset)); + OutRotationOffset = FSGQuatImpl(MoveTemp(RotationOffset)).ToFQuat(); +} + +const FVector& FSGTrackingImpl::GetRightNova2ToWristPositionOffset() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNova2ToWristPositionOffset()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNova2ToWristRotationOffset() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNova2ToWristRotationOffset()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNova2ToWristPositionOffset() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNova2ToWristPositionOffset()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNova2ToWristRotationOffset() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNova2ToWristRotationOffset()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNova2Quest2ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNova2Quest2ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNova2Quest2ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNova2Quest2ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNova2Quest2ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNova2Quest2ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNova2Quest2ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNova2Quest2ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNova2QuestProToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNova2QuestProToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNova2QuestProToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNova2QuestProToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNova2QuestProToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNova2QuestProToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNova2QuestProToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNova2QuestProToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNova2ViveTrackerToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNova2ViveTrackerToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNova2ViveTrackerToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNova2ViveTrackerToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNova2ViveTrackerToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNova2ViveTrackerToAttachPosition()) + }; + return Position; +} + +const FVector& FSGTrackingImpl::GetRightNova2Quest3ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNova2Quest3ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNova2Quest3ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNova2Quest3ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNova2Quest3ToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNova2Quest3ToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNova2Quest3ToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNova2Quest3ToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FQuat& FSGTrackingImpl::GetLeftNova2ViveTrackerToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNova2ViveTrackerToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetRightNova2ViveWristTrackerToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetRightNova2ViveWristTrackerToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetRightNova2ViveWristTrackerToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetRightNova2ViveWristTrackerToAttachRotation()).ToFQuat()); + return Rotation; +} + +const FVector& FSGTrackingImpl::GetLeftNova2ViveWristTrackerToAttachPosition() +{ + static FVector Position{ + FSGUnits::MillimetersToCentimeters( + FTrackingType::GetLeftNova2ViveWristTrackerToAttachPosition()) + }; + return Position; +} + +const FQuat& FSGTrackingImpl::GetLeftNova2ViveWristTrackerToAttachRotation() +{ + static FQuat Rotation(FSGQuatImpl(FTrackingType::GetLeftNova2ViveWristTrackerToAttachRotation()).ToFQuat()); + return Rotation; +} + +void FSGTrackingImpl::GetNova2GloveWristOffset(const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGVect3DImpl::FVect3DType PositionOffset; + FSGQuatImpl::FQuatType RotationOffset; + + FTrackingType::GetNova2GloveWristOffset(bRightHanded, TCHAR_TO_UTF8(*HardwareVersion), + PositionOffset, RotationOffset); + + OutPositionOffset = FSGUnits::MillimetersToCentimeters( + MoveTemp(PositionOffset)); + OutRotationOffset = FSGQuatImpl(MoveTemp(RotationOffset)).ToFQuat(); +} + +void FSGTrackingImpl::GetNova2GloveTrackerOffset(const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + FSGVect3DImpl::FVect3DType PositionOffset; + FSGQuatImpl::FQuatType RotationOffset; + + FTrackingType::GetNova2GloveTrackerOffset(FSGCoreEnumCast::ToEPositionalTrackingHardware(Hardware), bRightHanded, + TCHAR_TO_UTF8(*HardwareVersion), + PositionOffset, RotationOffset); + + OutPositionOffset = FSGUnits::MillimetersToCentimeters( + MoveTemp(PositionOffset)); + OutRotationOffset = FSGQuatImpl(MoveTemp(RotationOffset)).ToFQuat(); +} + +FString FSGTrackingImpl::ToString(const ESGPositionalTrackingHardware Hardware) +{ + FString String(UTF8_TO_TCHAR( + FTrackingType::ToString(FSGCoreEnumCast::ToEPositionalTrackingHardware(Hardware)).c_str())); + return String; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp new file mode 100644 index 0000000..99569bb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.cpp @@ -0,0 +1,249 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGVect3DImpl.h" + +#include "Containers/StringConv.h" + +#include "SGBuildHacks/SGInclude_Core_Vect3D.h" + +struct FSGVect3DImpl::FImpl +{ + /************************ + * Member variables + ************************/ + + FVect3DType Vect3D; + + /************************ + * Owner object + ************************/ + + FSGVect3DImpl* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGVect3DImpl* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +const FSGVect3DImpl& FSGVect3DImpl::Zero() +{ + static const FSGVect3DImpl Z(FVect3DType::Zero()); + return Z; +} + +bool FSGVect3DImpl::Deserialize(const FString& String, FSGVect3DImpl& OutResult, const ANSICHAR Delimiter) +{ + FVect3DType Vect3D; + const bool bReturn = FVect3DType::Deserialize(TCHAR_TO_UTF8(*String), Vect3D, Delimiter); + OutResult = FSGVect3DImpl(Vect3D); + return bReturn; +} + +FSGVect3DImpl::FSGVect3DImpl() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGVect3DImpl::FSGVect3DImpl(const float X, const float Y, const float Z) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->Vect3D = FVect3DType(X, Y, Z); +} + +FSGVect3DImpl::FSGVect3DImpl(const FVect3DType& Vect3D) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->Vect3D = Vect3D; +} + +FSGVect3DImpl::FSGVect3DImpl(const FVector& Vector) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + /// NOTE + /// Unreal Engine uses a left-handed, z-up world coordinate system, which yealds clockwise rotations: + /// Forward X + /// Right Y + /// Up Z + /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: + /// Forward X + /// Left Y + /// Up Z + + FVect3DType Vect3D(Vector.X, -Vector.Y, Vector.Z); + Pimpl->Vect3D = MoveTemp(Vect3D); +} + +FSGVect3DImpl::FSGVect3DImpl(const FSGVect3DImpl& Rhs) + : Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSGVect3DImpl::FSGVect3DImpl(FSGVect3DImpl&& Rhs) SG_NOEXCEPT = default; + +FSGVect3DImpl::~FSGVect3DImpl() = default; + +FSGVect3DImpl& FSGVect3DImpl::operator=(const FSGVect3DImpl& Rhs) +{ + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSGVect3DImpl& FSGVect3DImpl::operator=(FSGVect3DImpl&& Rhs) SG_NOEXCEPT = default; + +const FSGVect3DImpl::FVect3DType& FSGVect3DImpl::ToVect3D() const +{ + return Pimpl->Vect3D; +} + +FVector FSGVect3DImpl::ToFVector() const +{ + /// NOTE + /// Unreal Engine uses a left-handed, z-up world coordinate system, which yealds clockwise rotations: + /// Forward X + /// Right Y + /// Up Z + /// SenseGlove uses a right-handed, z-up corrdinate systenm, which yealds counter-clockwise rotations: + /// Forward X + /// Left Y + /// Up Z + + FVector Vector(Pimpl->Vect3D.GetX(), -Pimpl->Vect3D.GetY(), Pimpl->Vect3D.GetZ()); + return Vector; +} + +FSGVect3DImpl FSGVect3DImpl::operator+(const FSGVect3DImpl& Vect3DImpl) const +{ + return FSGVect3DImpl(Pimpl->Vect3D.operator+(Vect3DImpl.ToVect3D())); +} + +FSGVect3DImpl FSGVect3DImpl::operator-(const FSGVect3DImpl& Vect3DImpl) const +{ + return FSGVect3DImpl(Pimpl->Vect3D.operator-(Vect3DImpl.ToVect3D())); +} + +FSGVect3DImpl FSGVect3DImpl::operator*(const float& ScaleFactor) const +{ + return FSGVect3DImpl(Pimpl->Vect3D.operator*(ScaleFactor)); +} + +float FSGVect3DImpl::GetX() const +{ + return Pimpl->Vect3D.GetX(); +} + +void FSGVect3DImpl::SetX(const float X) +{ + Pimpl->Vect3D.SetX(X); +} + +float FSGVect3DImpl::GetY() const +{ + return Pimpl->Vect3D.GetY(); +} + +void FSGVect3DImpl::SetY(const float Y) +{ + Pimpl->Vect3D.SetY(Y); +} + +float FSGVect3DImpl::GetZ() const +{ + return Pimpl->Vect3D.GetZ(); +} + +void FSGVect3DImpl::SetZ(const float Z) +{ + Pimpl->Vect3D.SetZ(Z); +} + +float FSGVect3DImpl::Magnitude() const +{ + return Pimpl->Vect3D.Magnitude(); +} + +void FSGVect3DImpl::Normalized() +{ + Pimpl->Vect3D.Normalized(); +} + +void FSGVect3DImpl::Scale(const float Factor) +{ + Pimpl->Vect3D.Scale(Factor); +} + +float FSGVect3DImpl::DistTo(const FSGVect3DImpl& Vect3DImpl) const +{ + return Pimpl->Vect3D.DistTo(Vect3DImpl.ToVect3D()); +} + +bool FSGVect3DImpl::Equals(const FSGVect3DImpl& Vect3DImpl) const +{ + return Pimpl->Vect3D.Equals(Vect3DImpl.ToVect3D()); +} + +FString FSGVect3DImpl::ToString() const +{ + return UTF8_TO_TCHAR(Pimpl->Vect3D.ToString().c_str()); +} + +FString FSGVect3DImpl::Serialize(const ANSICHAR Delimiter) const +{ + return UTF8_TO_TCHAR(Pimpl->Vect3D.Serialize(Delimiter).c_str()); +} + +FSGVect3DImpl::FImpl::FImpl(FSGVect3DImpl* InOwner) + : Owner(InOwner) +{ +} + +FSGVect3DImpl::FImpl::~FImpl() = default; + +void FSGVect3DImpl::FImplDeleter::operator()(const FSGVect3DImpl::FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.h new file mode 100644 index 0000000..cc5b595 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SGCoreImpl/SGVect3DImpl.h @@ -0,0 +1,223 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace Kinematics + { + class Vect3D; + } +} + +class SENSEGLOVECOREIMPL_API FSGVect3DImpl +{ +public: + typedef SGCore::Kinematics::Vect3D FVect3DType; + +public: + /** + * Represents a vector with coordinates (0, 0, 0). + */ + static const FSGVect3DImpl& Zero(); + + /** + * Serialize a FSGVect3DImpl into a string representation. + */ + static bool Deserialize(const FString& String, FSGVect3DImpl& OutResult, ANSICHAR Delimiter); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * Creates an empty vector (0, 0, 0) for internal use. + */ + FSGVect3DImpl(); + + /** + * Create a new instance of a 3D vector. + */ + FSGVect3DImpl(float X, float Y, float Z); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGVect3DImpl(const FVect3DType& Vect3D); + + /** + * The cast from FVector type constructor. + */ + explicit FSGVect3DImpl(const FVector& Vector); + +public: + /** + * The copy constructor. + */ + FSGVect3DImpl(const FSGVect3DImpl& Rhs); + + /** + * The move constructor. + */ + FSGVect3DImpl(FSGVect3DImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGVect3DImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGVect3DImpl& operator=(const FSGVect3DImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGVect3DImpl& operator=(FSGVect3DImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FVect3DType& ToVect3D() const; + + /** + * The cast to FVector type method. + */ + FVector ToFVector() const; + +public: + /** + * Overload + operator to add two SGVect3Impl objects. + */ + FSGVect3DImpl operator+(const FSGVect3DImpl& Vect3DImpl) const; + + /** + * Overload - operator to subtract two SGVect3Impl objects. + */ + FSGVect3DImpl operator-(const FSGVect3DImpl& Vect3DImpl) const; + + /** + * Overload - operator to scale a vector3 by a float. + */ + FSGVect3DImpl operator*(const float& ScaleFactor) const; + +public: + /** + * Get the x-component of the 3D vector in cm. + */ + float GetX() const; + + /** + * Set the x-component of the 3D vector in cm. + */ + void SetX(float X); + + /** + * Get the y-component of the 3D vector in cm. + */ + float GetY() const; + + /** + * Set the y-component of the 3D vector in cm. + */ + void SetY(float Y); + + /** + * Get the z-component of the 3D vector in cm. + */ + float GetZ() const; + + /** + * Set the z-component of the 3D vector in cm. + */ + void SetZ(float Z); + +public: + /** + * Calculate the magnitude or 'length' of this Vector in cm. + */ + float Magnitude() const; + + /** + * Returns this vector normalized to have a Magnitude on 1. + */ + void Normalized(); + + /** + * Scale all elements of this vector by a certain factor. + */ + void Scale(float Factor); + + /** + * Calculate the distance between this Vector and another one in cm. + */ + float DistTo(const FSGVect3DImpl& Vect3DImpl) const; + + /** + * Check if this Vector is roughly equal to another. + */ + bool Equals(const FSGVect3DImpl& Vect3DImpl) const; + + /** + * Create a string representation of this Vector. + */ + FString ToString() const; + +public: + /** + * Convert a serialized FSGVect3DImpl back into its class representation. + */ + FString Serialize(ANSICHAR Delimiter) const; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImpl.cpp new file mode 100644 index 0000000..8eb1f90 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImpl.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreImpl.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveCoreImplModule.h" + +IMPLEMENT_MODULE(FSenseGloveCoreImplModule, SenseGloveCoreImpl) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImpl.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImpl.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImplModule.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImplModule.cpp new file mode 100644 index 0000000..5afcc59 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImplModule.cpp @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreImplModule.h" +#include "Containers/UnrealString.h" +#include "SGCoreImpl/SGLibraryImpl.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveCoreImplModule" + +void FSenseGloveCoreImplModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveCoreImpl module..."); + SGLOG(FString::Printf(TEXT("The low-level implementation of '%s' has been loaded successfully!"), *FSGLibraryImpl:: + Version())); +} + +void FSenseGloveCoreImplModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveCoreImpl module..."); +} + +void FSenseGloveCoreImplModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveCoreImpl module has succeeded!"); +} + +void FSenseGloveCoreImplModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveCoreImpl module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImplModule.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImplModule.h new file mode 100644 index 0000000..fac2e67 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Private/SenseGloveCoreImplModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreImpl" + +class FSenseGloveCoreImplModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGAnatomyImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGAnatomyImpl.h new file mode 100644 index 0000000..b5eb7ea --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGAnatomyImpl.h @@ -0,0 +1,85 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +namespace SGCore +{ + namespace Kinematics + { + class Anatomy; + } +} + +class SENSEGLOVECOREIMPL_API FSGAnatomyImpl final +{ +public: + typedef SGCore::Kinematics::Anatomy FAnatomyType; + +public: + static float GetTotalFingerFlexion(); + + static float GetTotalFingerExtension(); + + static float GetTotalThumbFlexion(); + + static float GetTotalThumbExtension(); + +public: + static float GetFingerJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax); + + static float GetThumbJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax); + + static float ClampJointAngle(float Value, int32 Finger, bool bRightHand, int32 Joint, int32 Movement); + + static float NormalizeFingerFlexion(float FlexionInDegrees); + + static float NormalizeThumbFlexion(float FlexionInDegrees); + +public: + static TArray> GetDefaultHandAngles(bool bRightHanded); + + static TArray> GetFlatHandAngles(bool bRightHanded); + + static TArray> GetThumbsUpHandAngles(bool bRightHanded); + + static TArray> GetFistHandAngles(bool bRightHanded); + +public: + FSGAnatomyImpl() = delete; + virtual ~FSGAnatomyImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGBasicHandModelImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGBasicHandModelImpl.h new file mode 100644 index 0000000..424367c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGBasicHandModelImpl.h @@ -0,0 +1,178 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + namespace Kinematics + { + class BasicHandModel; + } +} + +class SENSEGLOVECOREIMPL_API FSGBasicHandModelImpl final +{ +public: + typedef SGCore::Kinematics::BasicHandModel FBasicHandModelType; + +public: + static FSGBasicHandModelImpl Default(bool bRightHanded); + + static FSGBasicHandModelImpl Deserialize(const FString& SerializedString); + +public: + static const TArray>& GetBaseFingerLengths(); + + static const TArray& GetBaseJointPositions(); + + static const TArray& GetBaseJointAngles(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGBasicHandModelImpl(); + + FSGBasicHandModelImpl(bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions); + + FSGBasicHandModelImpl(bool bRightHanded, const TArray>& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGBasicHandModelImpl(const FBasicHandModelType& BasicHandModel); + +public: + /** + * The copy constructor. + */ + FSGBasicHandModelImpl(const FSGBasicHandModelImpl& Rhs); + + /** + * The move constructor. + */ + FSGBasicHandModelImpl(FSGBasicHandModelImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGBasicHandModelImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGBasicHandModelImpl& operator=(const FSGBasicHandModelImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGBasicHandModelImpl& operator=(FSGBasicHandModelImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FBasicHandModelType& ToBasicHandModel() const; + +public: + bool IsRight() const; + +public: + TArray> GetFingerLengths() const; + + TArray GetFingerLengths(ESGFinger Finger) const; + + void SetFingerLengths(ESGFinger Finger, const TArray& Lengths); + void SetFingerLengths(uint8 Finger, const TArray& Lengths); + + TArray> GetFingerRatios() const; + +public: + TArray GetFingerRatios(ESGFinger Finger) const; + + TArray GetStartJointPositions() const; + + void SetStartJointPosition(ESGFinger Finger, const FVector& Position); + void SetStartJointPosition(uint8 Finger, const FVector& Position); + + TArray GetStartJointRotations() const; + + FVector GetJointPosition(ESGFinger Finger) const; + + void SetJointPosition(const FVector& NewPosition, ESGFinger Finger); + + FQuat GetJointRotation(ESGFinger Finger) const; + + void SetJointRotation(const FQuat& NewRotation, ESGFinger Finger); + + TArray GetTotalLengths() const; + + float GetTotalLength(ESGFinger Finger) const; + +public: + TArray Get3DLengths(ESGFinger Finger) const; + +public: + bool Equals(const FSGBasicHandModelImpl& BasicHandModelImpl) const; + +public: + FString ToString() const; + + FString ToString(bool bLengthsOnly) const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGBetaDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGBetaDeviceImpl.h new file mode 100644 index 0000000..cf0f6ea --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGBetaDeviceImpl.h @@ -0,0 +1,167 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "Containers/UnrealString.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class BetaDevice; +} + +class SENSEGLOVECOREIMPL_API FSGBetaDeviceImpl final : public FSGDeviceImpl +{ +#if ENGINE_MAJOR_VERSION >= 5 + friend class SharedPointerInternals::TIntrusiveReferenceController; +#else + friend class SharedPointerInternals::TIntrusiveReferenceController; +#endif /* ENGINE_MAJOR_VERSION >= 5 */ + +public: + typedef SGCore::BetaDevice FBetaDeviceType; + + typedef std::shared_ptr FBetaDevicePtrType; + typedef std::vector FBetaDevicePtrVectorType; + +public: + static TSharedRef Parse(const FString& String); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGBetaDeviceImpl(); + + FSGBetaDeviceImpl(const FString& ConstantsString, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGBetaDeviceImpl(const FBetaDeviceType BetaDevice); + + /** + * The cast from underlying pointer type constructor. + */ + explicit FSGBetaDeviceImpl(const FBetaDevicePtrType BetaDevice); + +public: + /** + * The copy constructor. + */ + FSGBetaDeviceImpl(const FSGBetaDeviceImpl& Rhs); + + /** + * The move constructor. + */ + FSGBetaDeviceImpl(FSGBetaDeviceImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGBetaDeviceImpl() override; + +public: + /** + * The copy assignment operator. + */ + FSGBetaDeviceImpl& operator=(const FSGBetaDeviceImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGBetaDeviceImpl& operator=(FSGBetaDeviceImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + FBetaDeviceType ToBetaDevice() const; + + /** + * The cast to underlying pointer type method. + */ + FBetaDevicePtrType ToBetaDevicePtr() const; + + /** + * The checked cast to underlying pointer type method. + */ + FBetaDevicePtrType ToBetaDevicePtrChecked() const; + +public: + virtual ESGDeviceType GetDeviceType() const override; + + virtual FString GetDeviceId() const override; + + virtual FString GetHardwareVersion() const override; + + virtual int32 GetFirmwareVersion() const override; + + virtual int32 GetSubFirmwareVersion() const override; + +public: + FString GetConstantsString() const; + + FString GetSensorData() const; + + FString GetLastCommand() const; + +public: + bool SendHaptics(const FString& Command, int32 Channel = 0) const; + +public: + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGCustomWaveformImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGCustomWaveformImpl.h new file mode 100644 index 0000000..d3f9a29 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGCustomWaveformImpl.h @@ -0,0 +1,164 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class CustomWaveform; +} + +class SENSEGLOVECOREIMPL_API FSGCustomWaveformImpl final +{ +public: + typedef SGCore::CustomWaveform FCustomWaveformType; + +public: + static FString ToString(ESGWaveformType Type); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGCustomWaveformImpl(); + + FSGCustomWaveformImpl(float Amplitude, float Duration); + + FSGCustomWaveformImpl(float Amplitude, float Duration, float Frequency); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGCustomWaveformImpl(const FCustomWaveformType& CustomWaveform); + +public: + /** + * The copy constructor. + */ + FSGCustomWaveformImpl(const FSGCustomWaveformImpl& Rhs); + + /** + * The move constructor. + */ + FSGCustomWaveformImpl(FSGCustomWaveformImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGCustomWaveformImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGCustomWaveformImpl& operator=(const FSGCustomWaveformImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGCustomWaveformImpl& operator=(FSGCustomWaveformImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FCustomWaveformType& ToCustomWaveform() const; + + /** + * The cast to underlying type method. + */ + FCustomWaveformType& ToCustomWaveform(); + +public: + float GetAmplitude() const; + void SetAmplitude(float Amplitude); + + ESGWaveformType GetWaveType() const; + void SetWaveType(ESGWaveformType Type); + + bool IsInfinite() const; + void SetInfinite(bool bInfinite); + + int32 GetRepeatAmount() const; + void SetRepeatAmount(int32 Amount); + + float GetAttackTime() const; + void SetAttackTime(float Time); + + float GetSustainTime() const; + void SetSustainTime(float Time); + + float GetDecayTime() const; + void SetDecayTime(float Time); + + float GetFrequencyStart() const; + void SetFrequencyStart(float Frequency); + + float GetFrequencyEnd() const; + void SetFrequencyEnd(float Frequency); + + float GetFrequencySwitchTime() const; + void SetFrequencySwitchTime(float Time); + + float GetFrequencySwitchFactor() const; + void SetFrequencySwitchFactor(float Factor); + +public: + float GetEffectTime() const; + float GetTotalEffectTime() const; + + bool FrequencyJumps() const; + +public: + bool Equals(const FSGCustomWaveformImpl& CustomWaveformImpl) const; + +public: + FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceImpl.h new file mode 100644 index 0000000..ac7e191 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceImpl.h @@ -0,0 +1,221 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "Containers/UnrealString.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class SGDevice; +} + +class FSGBetaDeviceImpl; +class FSGHapticChannelInfoImpl; +class FSGHapticGloveImpl; +class FSGNova2GloveImpl; +class FSGNovaGloveImpl; +class FSGSenseGloveImpl; + +class SENSEGLOVECOREIMPL_API FSGDeviceImpl : public TSharedFromThis +{ +public: + typedef SGCore::SGDevice FSGDeviceType; + + typedef std::shared_ptr FSGDevicePtrType; + typedef std::vector FSGDevicePtrVectorType; + +public: + static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion); + + static bool FirmwareNewerThan(int32 MyFirmwareMain, int32 MyFirmwareSub, + int32 ReferenceMain, int32 ReferenceSub, + bool bInclusive); + static bool FirmwareOlderThan(int32 MyFirmwareMain, int32 MyFirmwareSub, + int32 ReferenceMain, int32 ReferenceSub, + bool bInclusive); + + static FString ToString(ESGDeviceType DeviceType); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGDeviceImpl(); + +public: + /** + * The cast from underlying pointer type constructor. + */ + explicit FSGDeviceImpl(const FSGDevicePtrType SGDevice); + +public: + /** + * The copy constructor. + */ + FSGDeviceImpl(const FSGDeviceImpl& Rhs); + + /** + * The move constructor. + */ + FSGDeviceImpl(FSGDeviceImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGDeviceImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGDeviceImpl& operator=(const FSGDeviceImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGDeviceImpl& operator=(FSGDeviceImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying pointer type method. + */ + FSGDevicePtrType ToSGDevicePtr() const; + + /** + * The checked cast to underlying pointer type method. + */ + FSGDevicePtrType ToSGDevicePtrChecked() const; + +public: + /** + * The cast to base TSharedRef type method. + */ + TSharedRef ToSGDeviceImplRef(); + + /** + * The cast to derived TSharedRef type method. + */ + TSharedRef ToBetaDeviceImplRef(); + + /** + * The cast to derived TSharedRef type method. + */ + TSharedRef ToHapticGloveImplRef(); + + /** + * The cast to derived TSharedRef type method. + */ + TSharedRef ToNova2GloveImplRef(); + + /** + * The cast to derived TSharedRef type method. + */ + TSharedRef ToNovaGloveImplRef(); + + /** + * The cast to derived TSharedRef type method. + */ + TSharedRef ToSenseGloveImplRef(); + +public: + bool IsABetaDevice() const; + bool IsAHapticGlove() const; + bool IsANova2Glove() const; + bool IsANovaGlove() const; + bool IsASenseGlove() const; + +public: + TSharedPtr AsBetaDevice() const; + TSharedPtr AsHapticGlove() const; + TSharedPtr AsNova2Glove() const; + TSharedPtr AsNovaGlove() const; + TSharedPtr AsSenseGlove() const; + +public: + virtual ESGDeviceType GetDeviceType() const; + + virtual FString GetDeviceId() const; + + virtual FString GetHardwareVersion() const; + virtual int32 GetFirmwareVersion() const; + virtual int32 GetSubFirmwareVersion() const; + virtual FString GetFirmwareString() const; + + bool FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + bool FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + FString GetAddress() const; + + bool IsConnected() const; + ESGConnectionType GetConnectionType() const; + + int32 PacketsPerSecondReceived() const; + int32 PacketsPerSecondSent() const; + + int32 GetDeviceIndex() const; + virtual void SetDeviceIndex(int32 NewIndex); + + virtual bool IsWireless() const; + + virtual bool HasBattery() const; + virtual bool IsCharging(); + virtual bool GetBatteryLevel(float& OutLevel); + +public: + virtual void SetHapticChannels(const FSGHapticChannelInfoImpl& Channels); + + int32 GetHapticChannelCount() const; + int32 GetHapticChannelCount(ESGHapticChannelType ChannelType) const; + +public: + virtual FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceListImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceListImpl.h new file mode 100644 index 0000000..46f8b03 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceListImpl.h @@ -0,0 +1,123 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class DeviceList; +} + +class SENSEGLOVECOREIMPL_API FSGDeviceListImpl final +{ +public: + typedef SGCore::DeviceList FDeviceListType; + +public: + static int32 ActiveDevices(); + + static bool SenseComRunning(); + + static void Dispose(); + + static void Reinitialize(); + + static TArray> GetDevices(); + + template + static TArray> GetDevices() + { + ESGDeviceType TargetType = ESGDeviceType::Unknown; + + if constexpr (std::is_same_v) + { + TargetType = ESGDeviceType::Nova2; + } + else if constexpr (std::is_same_v) + { + TargetType = ESGDeviceType::Nova; + } + else if constexpr (std::is_same_v) + { + TargetType = ESGDeviceType::SenseGlove; + } + else if constexpr (std::is_same_v) + { + TargetType = ESGDeviceType::BetaDevice; + } + else + { + static_assert(!sizeof(T), "Unsupported device type in GetDevices()"); + } + + const TArray> CurrentDevices = GetDevices(); + TArray> Devices; + + for (TSharedRef Device : CurrentDevices) + { + if (Device->GetDeviceType() == TargetType) + { + Devices.Push(Device); + } + } + + return Devices; + } + + static bool GetSensorDataString(int32 IpcIndex, const FString& IpcAddress, FString& OutString); + + static bool SendHaptics(int32 IpcIndex, const FString& IpcAddress, int32 ChannelIndex, const FString& Commands); + + static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index); + + static FString GetAddress(int32 IpcIndex, const FString& IpcAddress); + + static ESGConnectionType GetConnectionType(int32 IpcIndex, const FString& IpcAddress); + + static bool IsConnected(int32 IpcIndex, const FString& IpcAddress); + + static int32 PacketsPerSecondReceived(int32 IpcIndex, const FString& IpcAddress); + + static int32 PacketsPerSecondSent(int32 IpcIndex, const FString& IpcAddress); + +public: + FSGDeviceListImpl() = delete; + virtual ~FSGDeviceListImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceModelImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceModelImpl.h new file mode 100644 index 0000000..e10a299 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGDeviceModelImpl.h @@ -0,0 +1,127 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + class DeviceModel; +} + +class SENSEGLOVECOREIMPL_API FSGDeviceModelImpl final +{ +public: + typedef SGCore::DeviceModel FDeviceModelType; + +public: + static TArray ParseFunctions(int32 Value, int32 Size); + + static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGDeviceModelImpl(); + + FSGDeviceModelImpl(const FString& Id, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGDeviceModelImpl(const FDeviceModelType& DeviceModel); + +public: + /** + * The copy constructor. + */ + FSGDeviceModelImpl(const FSGDeviceModelImpl& Rhs); + + /** + * The move constructor. + */ + FSGDeviceModelImpl(FSGDeviceModelImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGDeviceModelImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGDeviceModelImpl& operator=(const FSGDeviceModelImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGDeviceModelImpl& operator=(FSGDeviceModelImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FDeviceModelType& ToDeviceModel() const; + +public: + FString GetDeviceId() const; + + FString GetHardwareVersion() const; + + int32 GetFirmwareVersion() const; + + int32 GetSubFirmwareVersion() const; + +public: + bool FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + bool FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h new file mode 100644 index 0000000..8fe71d6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGExportedFunctions.h @@ -0,0 +1,3151 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + +/* Defines a C++ like static_assert. */ +#if ! __cplusplus +#include +#endif /* ! __cplusplus */ + +/* Contains __bool_true_false_are_defined macro that can be used in order to + check whether boolean type is supported by the compiler or not. */ +#include + +#include "CoreTypes.h" + +/* Check at compile time whether the C compiler has support for bool, true, + and false macros. */ +static_assert(__bool_true_false_are_defined, "Error: bool, true, and false are not defined!"); + +#if defined ( SENSEGLOVE_BUILDING_CORE_IMPL_MODULE ) +#define SENSEGLOVECOREIMPL_PUBLIC_API DLLEXPORT +#else +#define SENSEGLOVECOREIMPL_PUBLIC_API DLLIMPORT +#endif /* defined ( SENSEGLOVE_BUILDING_CORE_IMPL_MODULE ) */ + +/* If C++ is used, switch to C mode in order to prevent the C++ name mangling of + method names. */ +#if __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/******************************************************************************* + * Exceptional function calls + ******************************************************************************/ + +#if PLATFORM_ANDROID +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_Android_Initialize( + void* InEnv, + void* InClass, + void* InActiveDevicesMethodID, + void* InGetDeviceStringMethodID, + void* InGetSensorStringMethodID, + void* InWriteHapticsMethodID, + void* StoragePath); +#endif /* PLATFORM_ANDROID */ + +/******************************************************************************* + * SGAnatomyImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_GetTotalFingerFlexion(); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_GetTotalFingerExtension(); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_GetTotalThumbFlexion(); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_GetTotalThumbExtension(); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_GetFingerJointLimit( + bool bRightHanded, + int32 Joint, + int32 Movement, + bool bMax); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_GetThumbJointLimit( + bool bRightHanded, + int32 Joint, + int32 Movement, + bool bMax); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_ClampJointAngle( + float Value, + int32 Finger, + bool bRightHand, + int32 Joint, + int32 Movement); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_NormalizeFingerFlexion( + float FlexionInDegrees); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGAnatomyImpl_NormalizeThumbFlexion( + float FlexionInDegrees); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGAnatomyImpl_GetDefaultHandAngles( + void* OutAngles, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGAnatomyImpl_GetFlatHandAngles( + void* OutAngles, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGAnatomyImpl_GetThumbsUpHandAngles( + void* OutAngles, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGAnatomyImpl_GetFistHandAngles( + void* OutAngles, + bool bRightHanded); + +/******************************************************************************* + * SGBasicHandModelImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_Default( + void* OutBasicHandModelImpl, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_Deserialize( + void* OutBasicHandModelImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetBaseFingerLengths( + void* OutLengths); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointPositions( + void* OutPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetBaseJointAngles( + void* OutRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_ctor( + void* OutBasicHandModelImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPosition( + void* OutBasicHandModelImpl, + bool bRightHanded, + void* Lengths, + void* StartPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGBasicHandModelImpl_ctor_bRightHanded_Lengths_StartPositions_StartRotations( + void* OutBasicHandModelImpl, + bool bRightHanded, + void* Lengths, + void* StartPositions, + void* StartRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_ctor_copy( + void* OutBasicHandModelImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_ctor_copy_assignment( + void* OutBasicHandModelImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGBasicHandModelImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths( + void* Instance, + void* OutLengths); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetFingerLengths_Finger( + void* Instance, + void* OutLengths, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_SetFingerLengths_ESGFinger( + void* Instance, + void* Finger, + void* Lengths); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_SetFingerLengths_uint8Finger( + void* Instance, + uint8 Finger, + void* Lengths); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios( + void* Instance, + void* OutRatios); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetFingerRatios_Finger( + void* Instance, + void* OutRatios, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetStartJointPositions( + void* Instance, + void* OutPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_SetStartJointPosition_ESGFinger( + void* Instance, + void* Finger, + void* Position); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_SetStartJointPosition_uin8Finger( + void* Instance, + uint8 Finger, + void* Position); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetStartJointRotations( + void* Instance, + void* OutRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetJointPosition( + void* Instance, + void* OutPosition, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_SetJointPosition( + void* Instance, + void* NewPosition, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetJointRotation( + void* Instance, + void* OutRotation, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_SetJointRotation( + void* Instance, + void* NewRotation, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_GetTotalLengths( + void* Instance, + void* OutLengths); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGBasicHandModelImpl_GetTotalLength( + void* Instance, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_Get3DLengths( + void* Instance, + void* OutLengths, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGBasicHandModelImpl_Equals( + void* Instance, + void* BasicHandModelImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_ToString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_ToString_bLengthsOnly( + void* Instance, + void* OutString, + bool bLengthsOnly); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBasicHandModelImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGBetaDeviceImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_Parse( + void* OutBetaDevice, + void* String); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_ctor( + void* OutBetaDeviceImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGBetaDeviceImpl_ctor_ConstantsString_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion( + void* OutBetaDeviceImpl, + void* ConstantsString, + void* DeviceId, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGBetaDeviceImpl_ctor_ConstantsString_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_MakeShared( + void* OutSharedPtr, + void* ConstantsString, + void* DeviceId, + void* HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_ctor_MakeShared( + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_ctor_copy( + void* OutBetaDeviceImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_ctor_copy_assignment( + void* OutBetaDeviceImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_GetDeviceType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGBetaDeviceImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGBetaDeviceImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_GetConstantsString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_GetSensorData( + void* Instance, + void* OutData); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_GetLastCommand( + void* Instance, + void* OutCommand); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGBetaDeviceImpl_SendHaptics( + void* Instance, + void* Command); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGBetaDeviceImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGCustomWaveformImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ToString_Type( + void* OutString, + void* Type); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ctor( + void* OutCustomWaveformImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration( + void* OutCustomWaveformImpl, + float Amplitude, + float Duration); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ctor_Amplitude_Duration_Frequency( + void* OutCustomWaveformImpl, + float Amplitude, + float Duration, + float Frequency); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ctor_copy( + void* OutCustomWaveformImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ctor_copy_assignment( + void* OutCustomWaveformImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetAmplitude( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetAmplitude( + void* Instance, + float Amplitude); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_GetWaveType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetWaveType( + void* Instance, + void* Type); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGCustomWaveformImpl_IsInfinite( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetInfinite( + void* Instance, + bool bInfinite); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGCustomWaveformImpl_GetRepeatAmount( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetRepeatAmount( + void* Instance, + int32 Amount); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetAttackTime( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetAttackTime( + void* Instance, + float Time); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetSustainTime( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetSustainTime( + void* Instance, + float Time); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetDecayTime( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetDecayTime( + void* Instance, + float Time); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyStart( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyStart( + void* Instance, + float Frequency); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencyEnd( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencyEnd( + void* Instance, + float Frequency); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchTime( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchTime( + void* Instance, + float Time); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetFrequencySwitchFactor( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_SetFrequencySwitchFactor( + void* Instance, + float Factor); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetEffectTime( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGCustomWaveformImpl_GetTotalEffectTime( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGCustomWaveformImpl_FrequencyJumps( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGCustomWaveformImpl_Equals( + void* Instance, + void* CustomWaveformImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGCustomWaveformImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGDeviceImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ParseFirmware( + void* RawFirmware, + int32* OutMainVersion, + int32* OutSubVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API bool +SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive( + int32 MyFirmwareMain, + int32 MyFirmwareSub, + int32 ReferenceMain, + int32 ReferenceSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API bool +SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_ReferenceMain_ReferenceSub_bInclusive( + int32 MyFirmwareMain, + int32 MyFirmwareSub, + int32 ReferenceMain, + int32 ReferenceSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToString_DeviceType( + void* DeviceType, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ctor( + void* OutSGDeviceImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ctor_MakeShared( + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ctor_copy( + void* OutSGDeviceImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ctor_copy_assignment( + void* OutSGDeviceImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToSGDeviceImplRef( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToBetaDeviceImplRef( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToHapticGloveImplRef( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToNova2GloveImplRef( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToNovaGloveImplRef( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToSenseGloveImplRef( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsABetaDevice( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsAHapticGlove( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsANova2Glove( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsANovaGlove( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsASenseGlove( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_AsBetaDevice( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_AsHapticGlove( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_AsNova2Glove( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_AsNovaGlove( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_AsSenseGlove( + void* Instance, + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_GetDeviceType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_GetFirmwareString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_FirmwareNewerThan_MyFirmwareMain_MyFirmwareSub_bInclusive( + void* Instance, + int32 MyFirmwareMain, + int32 MyFirmwareSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_FirmwareOlderThan_MyFirmwareMain_MyFirmwareSub_bInclusive( + void* Instance, + int32 MyFirmwareMain, + int32 MyFirmwareSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_GetAddress( + void* Instance, + void* Address); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsConnected( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_GetConnectionType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_PacketsPerSecondReceived( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_PacketsPerSecondSent( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_GetDeviceIndex( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_SetDeviceIndex( + void* Instance, + int32 NewIndex); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsWireless( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_HasBattery( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_IsCharging( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceImpl_GetBatteryLevel( + void* Instance, + float* OutLevel); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_SetHapticChannels( + void* Instance, + void* Channels); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceImpl_GetHapticChannelCount_ChannelType( + void* Instance, + void* ChannelType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGDeviceListImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceListImpl_ActiveDevices(); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceListImpl_SenseComRunning(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceListImpl_Dispose(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceListImpl_Reinitialize(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceListImpl_GetDevices( + void* OutDevices); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceListImpl_GetSensorDataString( + int32 IpcIndex, + void* IpcAddress, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceListImpl_SendHaptics( + int32 IpcIndex, + void* IpcAddress, + int32 ChannelIndex, + void* Commands); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceListImpl_GetDeviceStringAt( + void* OutString, + int32 IpcIndex, + void* IpcAddress, + int32 Index); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceListImpl_GetAddress( + void* OutAddress, + int32 IpcIndex, + void* IpcAddress); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceListImpl_GetConnectionType( + void* OutType, + int32 IpcIndex, + void* IpcAddress); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceListImpl_IsConnected( + int32 IpcIndex, + void* IpcAddress); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondReceived( + int32 IpcIndex, + void* IpcAddress); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceListImpl_PacketsPerSecondSent( + int32 IpcIndex, + void* IpcAddress); + +/******************************************************************************* + * SGDeviceModelImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ParseFunctions( + void* OutParseFunctions, + int32 Value, + int32 Size); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ParseFirmware( + void* RawFirmware, + int32* OutMainVersion, + int32* OutSubVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ctor( + void* OutDeviceModelImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGDeviceModelImpl_ctor_Id_HardwareVersion_FirmwareVersion_SubFirmwareVersion( + void* OutDeviceModelImpl, + void* Id, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ctor_copy( + void* OutDeviceModelImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_ctor_copy_assignment( + void* OutDeviceModelImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGDeviceModelImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceModelImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGDeviceModelImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceModelImpl_FirmwareNewerThan( + void* Instance, + int32 FirmwareMain, + int32 FirmwareSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGDeviceModelImpl_FirmwareOlderThan( + void* Instance, + int32 FirmwareMain, + int32 FirmwareSub, + bool bInclusive); + +/******************************************************************************* + * SGHandInterpolatorImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_Deserialize( + void* OutHandInterpolatorImpl, + void* SerializedString, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_ctor( + void* OutHandInterpolatorImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_ctor_bRightHanded( + void* OutHandInterpolatorImpl, + const bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_ctor_copy( + void* OutHandInterpolatorImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_ctor_copy_assignment( + void* OutHandInterpolatorImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API float +SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGFingerMovement_Value_bApplyLimits( + void* Instance, + void* Movement, + float Value, + bool bApplyLimits); + +SENSEGLOVECOREIMPL_PUBLIC_API float +SGCoreImpl_FSGHandInterpolatorImpl_CalculateAngle_ESGThumbMovement_Value_bApplyLimits( + void* Instance, + void* Movement, + float Value, + bool bApplyLimits); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_InterpolateHandAngles( + void* Instance, + void* OutAngles, + void* Flexions, + void* Abductions, + float CmcTwist); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandInterpolatorImpl_Equals( + void* Instance, + void* HandInterpolatorImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandInterpolatorImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGHandLayerImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_DeviceConnected( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_GetDeviceType( + void* OutDeviceType, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_GetFirstGloveHandedness(); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHandLayerImpl_GlovesConnected(); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_GetGloveInstance( + bool bRightHanded, + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_GetCalibrationState( + void* OutHapticGloveCalibrationState, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_GetCalibrationInstructions( + void* OutString, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_ResetCalibration( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_EndCalibration( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_GetHandPose( + bool bRightHanded, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_GetWristLocation( + bool bRightHanded, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandLayerImpl_StopAllHaptics( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_SendHaptics( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_SupportsCustomWaveform( + bool bRightHanded, + void* AtLocation); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_SendCustomWaveform( + bool bRightHanded, + void* OutWaveform, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevels( + bool bRightHanded, + void* Levels01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_ForceFeedbackLevel( + bool bRightHanded, + int32 Finger, + float Level01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevels( + bool bRightHanded, + void* Levels01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool + SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_Finger_Level0_bSendImmediate( + bool bRightHanded, + int32 Finger, + float Level01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool + SGCoreImpl_FSGHandLayerImpl_QueueCommand_VibroLevel_bRightHanded_AtLocation_Level01_bSendImmediate( + bool bRightHanded, + void* AtLocation, + float Level01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_SupportsWristSqueeze( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_WristSqueeze( + bool bRightHanded, + float SqueezeLevel01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_SupportsFlexionLocks( + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_FlexionLock( + bool bRightHanded, + int32 Finger, + float Flexion01, + bool bSendImmediate); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandLayerImpl_QueueCommand_ClearFlexionLock( + bool bRightHanded, + int32 Finger, + bool bSendImmediate); + +/******************************************************************************* + * SGHandPoseImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_Deserialize( + void* OutHandPoseImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + void* HandAngles, + bool bRightHanded, + void* HandDimensions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_FromHandAngles_HandAngles_bRightHanded( + void* OutHandPoseImpl, + void* HandAngles, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_DefaultIdle_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + bool bRightHanded, + void* HandDimensions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_DefaultIdle_bRightHanded( + void* OutHandPoseImpl, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_FlatHand_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + bool bRightHanded, + void* HandDimensions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_FlatHand_bRightHanded( + void* OutHandPoseImpl, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_ThumbsUp_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + bool bRightHanded, + void* HandDimensions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_ThumbsUp_bRightHanded( + void* OutHandPoseImpl, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_Fist_bRightHanded_HandDimensions( + void* OutHandPoseImpl, + bool bRightHanded, + void* HandDimensions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_Fist_bRightHanded( + void* OutHandPoseImpl, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_ctor( + void* OutHandPoseImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGHandPoseImpl_ctor_bRightHanded_JointPositions_JointRotations_HandAngles( + void* OutHandPoseImpl, + bool bRightHanded, + void* JointPositions, + void* JointRotations, + void* HandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_ctor_copy( + void* OutHandPoseImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_ctor_copy_assignment( + void* OutHandPoseImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandPoseImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_GetJointPositions( + void* Instance, + void* OutPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_GetJointRotations( + void* Instance, + void* OutRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_GetHandAngles( + void* Instance, + void* OutAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHandPoseImpl_Equals( + void* Instance, + void* HandPoseImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_Finger_bClamp01( + void* Instance, + void* Finger, + bool bClamp01); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_GetNormalizedFlexion_bClamp01( + void* Instance, + void* OutFlexion, + bool bClamp01); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_ToString( + void* Instance, + void* OutString, + bool bShortFormat); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHandPoseImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGHapticChannelInfoImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_GenerateAddress( + void* OutString, + int32 DeviceIndex, + int32 ChannelIndex); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_Parse( + void* OutHapticChannelInfoImpl, + void* IpcString); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamingType(); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetType(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_ctor( + void* OutHapticChannelInfoImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_ctor_StreamIndex_FireAndForgetIndex( + void* OutHapticChannelInfoImpl, + void* StreamIndex, + void* FireAndForgetIndex); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy( + void* OutHapticChannelInfoImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_ctor_copy_assignment( + void* OutHapticChannelInfoImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetStreamChannelCount( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetFireAndForgetChannelCount( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticChannelInfoImpl_GetTotalChannelCount( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_GetAddress_Unguarded( + void* Instance, + void* OutString, + void* Type, + int32 TypeIndex); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_GetIpcParams_Unguarded( + void* Instance, + void* Type, + int32 TypeIndex, + int32* OutIndex, + void* OutAddressString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_RegenerateAddresses( + void* Instance, + int32 ForDeviceIndex); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticChannelInfoImpl_GetAllAddresses( + void* Instance, + void* OutArray); + +/******************************************************************************* + * SGHapticGloveImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetHapticGloves( + void* OutGloves, + bool bConnectedOnly); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_GetGlove_OutGlove( + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_GetGlove_bRightHanded_OutGlove( + bool bRightHanded, + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ToString_State( + void* OutString, + void* State); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ToString_Location( + void* OutString, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ctor( + void* OutHapticGloveImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ctor_MakeShared( + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ctor_copy( + void* OutHapticGloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ctor_copy_assignment( + void* OutHapticGloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetDeviceType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticGloveImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGHapticGloveImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_GetImuRotation( + void* Instance, + void* OutImu); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_GetHandPose_HandGeometry_OutHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_GetHandPose_OutHandPose( + void* Instance, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_GetHandAngles_OutHandAngles( + void* Instance, + void* OutHandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetHandGeometry( + void* Instance, + void* OutBasicHandModel); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_SetHandGeometry( + void* Instance, + void* HandGeometry); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_EndCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ResetCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetCalibrationInstruction( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_StopHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_StopVibrations( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_SendHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_SupportsCustomWaveform( + void* Instance, + void* AtLocation); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_SendCustomWaveform( + void* Instance, + void* OutWaveform, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_QueueForceFeedbackLevel( + void* Instance, + int32 Finger, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevels( + void* Instance, + void* Levels01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGHapticGloveImpl_QueueVibroLevel( + void* Instance, + void* Location, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetWristLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_GetGloveLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGHapticGloveImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGInterpolationSetImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_Deserialize( + void* OutInterpolationSetImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ctor( + void* OutInterpolationSetImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2( + void* OutInterpolationSetImpl, + float From1, + float From2, + float To1, + float To2); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ctor_From1_From2_To1_To2_Min_Max( + void* OutInterpolationSetImpl, + float From1, + float From2, + float To1, + float To2, + float Min, + float Max); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ctor_copy( + void* OutInterpolationSetImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ctor_copy_assignment( + void* OutInterpolationSetImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_GetX0( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_SetX0( + void* Instance, + float X0); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_GetX1( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_SetX1( + void* Instance, + float X1); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_GetY0( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_SetY0( + void* Instance, + float Y0); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_GetY1( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_SetY1( + void* Instance, + float Y1); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_GetMin( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_SetMin( + void* Instance, + float Min); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_GetMax( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_SetMax( + void* Instance, + float Max); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGInterpolationSetImpl_Get( + void* Instance, + float Value, + bool bLimit, + bool bNormalizeAngle); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGInterpolationSetImpl_Equals( + void* Instance, + void* InterpolationSetImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ToString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_ToString_bLimits( + void* Instance, + void* OutString, + bool bLimits); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGInterpolationSetImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGJointKinematicsImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API bool +SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_StartPosition_StartRotation_JointLengths_JointAngles_OutNewPositions_OutNewRotations( + void* StartPosition, + void* StartRotation, + void* JointLengths, + void* JointAngles, + void* OutNewPositions, + void* OutNewRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API bool +SGCoreImpl_FSGJointKinematicsImpl_ForwardKinematics_Profile_Finger_JointAngles_OutNewPositions_OutNewRotations( + void* Profile, + void* Finger, + void* JointAngles, + void* OutNewPositions, + void* OutNewRotations); + +/******************************************************************************* + * SGLibraryImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGLibraryImpl_Version( + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGLibraryImpl_GetBackendType( + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGLibraryImpl_BackendVersion( + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGLibraryImpl_SGConnectVersion( + void* OutVersion); + +/******************************************************************************* + * SGNova2GloveImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_Parse( + void* OutNova2GloveImpl, + void* ConstantsString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetNova2Gloves( + void* OutGloves); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetNova2Glove_OutGlove( + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetNova2Glove_bRightHanded_OutGlove( + bool bRightHanded, + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_CalculateGloveLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + bool bRightHanded, + void* HardwareVersion, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_CalculateWristLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + bool bRightHanded, + void* HardwareVersion, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API ANSICHAR SGCoreImpl_FSGNova2GloveImpl_GetStreamByte(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetNova2SensorRanges( + void* OutNova2SensorRanges); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ToNormalizedValues_SensorData( + void* OutNormalizedValues, + void* SensorData); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ToNormalizedValues_SensorData_OutSensorNormalizer( + void* OutNormalizedValues, + void* SensorData, + void* OutSensorNormalizer); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_CalculateHandAngles( + void* OutHandAngles, + void* NormalizedValues, + void* Interpolator, + bool bInfluenceIndex); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ToNormalizedAngles( + void* OutNormalizedAngles, + void* NormalizedData, + void* GloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor( + void* OutNova2GloveImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor_MakeShared( + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor_DeviceInfo( + void* OutNova2GloveImpl, + void* DeviceInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor_DeviceInfo_MakeShared( + void* OutSharedPtr, + void* DeviceInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor_copy( + void* OutNova2GloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ctor_copy_assignment( + void* OutNova2GloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetDeviceType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNova2GloveImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNova2GloveImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_HasBattery( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_IsCharging( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetBatteryLevel( + void* Instance, + float* OutBatteryLevel); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetImuRotation( + void* Instance, + void* OutImu); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_EndCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ResetCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_StopHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_StopVibrations( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SendHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SupportsCustomWaveform( + void* Instance, + void* AtLocation); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SendCustomWaveform( + void* Instance, + void* OutWaveform, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_QueueForceFeedbackLevel( + void* Instance, + int32 Finger, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_QueueVibroLevels( + void* Instance, + void* Amplitudes); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_QueueVibroLevel( + void* Instance, + void* Location, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_QueueSqueezeLevel( + void* Instance, + float SqueezeLevel01); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetGloveLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetWristLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_GetGloveInfo( + void* Instance, + void* OutGloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_DoesIndexInfluenceOthers( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_SetIndexInfluencesOthers( + void* Instance, + bool bInfluenceOthers); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SupportsOnBoardNormalization( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetSensorData( + void* Instance, + void* OutSensorData); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_GetNormalizedInput( + void* Instance, + void* OutNormalizedValues); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SendRawData( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SendNormalizedData( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ToNovaMotor( + void* Instance, + void* OutNova2Motor, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNova2GloveImpl_ChannelIndex( + void* Instance, + void* Motor); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ValidateWaveform( + void* Instance, + void* OutWaveform, + void* Motor); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveImpl_SendCustomWaveform_Nova2( + void* Instance, + void* OutWaveform, + void* Motor, + bool bValidateWaveform); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGNova2GloveSensorDataImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_Parse( + void* OutNova2GloveSensorDataImpl, + void* RawData, + void* GloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor( + void* OutNova2GloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_NormalizationState_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + void* OutNova2GloveSensorDataImpl, + void* NormalizationState, + void* Values, + const int32 ParsedValues, + void* ImuRotation, + const bool bImuParsed, + const float BatteryLevel, + const bool bCharging); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_copy( + void* OutNova2GloveSensorDataImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_ctor_copy_assignment( + void* OutNova2GloveSensorDataImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorState( + void* Instance, + void* OutNormalizationState); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorValues( + void* Instance, + void* OutValues); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGNova2GloveSensorDataImpl_GetSensorValue( + void* Instance, + void* Finger, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNova2GloveSensorDataImpl_GetParsedValues( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_GetImuRotation( + void* Instance, + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveSensorDataImpl_IsImuParsed( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGNova2GloveSensorDataImpl_GetBatteryLevel( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveSensorDataImpl_IsCharging( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNova2GloveSensorDataImpl_Equals( + void* Instance, + void* Nova2GloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNova2GloveSensorDataImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGNovaGloveImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_Parse( + void* OutNovaGloveImpl, + void* ConstantsString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetNovaGloves( + void* OutGloves); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetNovaGlove_OutGlove( + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetNovaGlove_bRightHanded_OutGlove( + bool bRightHanded, + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_CalculateGloveLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + bool bRightHanded, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_CalculateWristLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + bool bRightHanded, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API ANSICHAR SGCoreImpl_FSGNovaGloveImpl_GetHapticsByte(); + +SENSEGLOVECOREIMPL_PUBLIC_API ANSICHAR SGCoreImpl_FSGNovaGloveImpl_GetThresholdsByte(); + +SENSEGLOVECOREIMPL_PUBLIC_API ANSICHAR SGCoreImpl_FSGNovaGloveImpl_GetIgnoreThresholdsByte(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetNovaSensorRanges( + void* OutNovaSensorRanges); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToNormalizedValues_SensorData( + void* OutNormalizedValues, + void* SensorData); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToNormalizedValues_SensorData_OutSensorNormalizer( + void* OutNormalizedValues, + void* SensorData, + void* OutSensorNormalizer); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_CalculateHandAngles( + void* OutHandAngles, + void* NormalizedValues, + void* Interpolator); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToNovaCommandAsFlexion( + void* OutString, + void* Thresholds); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToNovaCommandAsRaw( + void* OutString, + void* Thresholds, + void* Interpolator); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor( + void* OutNovaGloveImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor_MakeShared( + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor_DeviceInfo( + void* OutNovaGloveImpl, + void* DeviceInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor_DeviceInfo_MakeShared( + void* OutSharedPtr, + void* DeviceInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor_copy( + void* OutNovaGloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ctor_copy_assignment( + void* OutNovaGloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetDeviceType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_SetDeviceIndex( + void* Instance, + int32 Index); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_HasBattery( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_IsCharging( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetBatteryLevel( + void* Instance, + float* OutBatteryLevel); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetImuRotation( + void* Instance, + void* OutImu); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_EndCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ResetCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_StopHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_StopVibrations( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SendHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SupportsCustomWaveform( + void* Instance, + void* AtLocation); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SendCustomWaveform( + void* Instance, + void* OutWaveform, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueForceFeedbackLevel( + void* Instance, + int32 Finger, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevels( + void* Instance, + void* Amplitudes); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevel_Localtion_Level01( + void* Instance, + void* Location, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetGloveLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetWristLocation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_GetGloveInfo( + void* Instance, + void* OutGloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SupportsThresholds( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SupportsCustomWaveforms( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SupportsOnBoardNormalization( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetSensorData( + void* Instance, + void* OutSensorData); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_GetNormalizedInput( + void* Instance, + void* OutNormalizedValues); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToNovaCommand( + void* Instance, + void* OutString, + void* ForceFeedbackLevels, + void* BuzzLevels, + float WristLevel); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueVibroLevel_Finger_Amplitude( + void* Instance, + int32 Finger, + float Amplitude); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueWristLevel( + void* Instance, + float Amplitude); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToNovaMotor( + void* Instance, + void* OutNovaMotor, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveImpl_ChannelIndex( + void* Instance, + void* Motor); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ValidateWaveform( + void* Instance, + void* OutWaveform, + void* Motor); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_SendCustomWaveform_Nova( + void* Instance, + void* OutWaveform, + void* Motor, + bool bValidateWaveform); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueThresholdCommand_Flexion( + void* Instance, + int32 Finger, + float FlexionThreshold); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveImpl_QueueClearThreshold( + void* Instance, + int32 Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGNovaGloveInfoImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveInfoImpl_Parse( + void* ConstantsString, + void* OutGloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_Deserialize( + void* OutNovaGloveInfoImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_ctor( + void* OutNovaGloveInfoImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGNovaGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_ImuCorrection_NumberOfSensors( + void* OutNovaGloveInfoImpl, + void* DeviceId, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion, + bool bRightHanded, + void* ImuCorrection, + int32 NumberOfSensors); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_ctor_copy( + void* OutNovaGloveInfoImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_ctor_copy_assignment( + void* OutNovaGloveInfoImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveInfoImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveInfoImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveInfoImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_GetImuCorrection( + void* Instance, + void* OutCorrection); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveInfoImpl_GetNumberOfSensors( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveInfoImpl_FirmwareNewerThan( + void* Instance, + int32 FirmwareMain, + int32 FirmwareSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveInfoImpl_FirmwareOlderThan( + void* Instance, + int32 FirmwareMain, + int32 FirmwareSub, + bool bInclusive); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveInfoImpl_Equals( + void* Instance, + void* NovaGloveInfoImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_ToString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveInfoImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGNovaGloveSensorDataImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_Empty( + void* OutNovaGloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_Parse( + void* OutNovaGloveSensorDataImpl, + void* RawData, + void* GloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_Deserialize( + void* OutNovaGloveSensorDataImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor( + void* OutNovaGloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_Values_ParsedValues_ImuRotation_bImuParsed_BatteryLevel_bCharging( + void* OutNovaGloveSensorDataImpl, + void* Values, + int32 ParsedValues, + void* ImuRotation, + bool bImuParsed, + float BatteryLevel, + bool bCharging); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_copy( + void* OutNovaGloveSensorDataImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_ctor_copy_assignment( + void* OutNovaGloveSensorDataImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_GetSensorValues( + void* Instance, + void* OutValues); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGNovaGloveSensorDataImpl_GetSensorValue( + void* Instance, + void* Finger, + void* Location); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGNovaGloveSensorDataImpl_GetParsedValues( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_GetImuRotation( + void* Instance, + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveSensorDataImpl_IsImuParsed( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGNovaGloveSensorDataImpl_GetBatteryLevel( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveSensorDataImpl_IsCharging( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGNovaGloveSensorDataImpl_Equals( + void* Instance, + void* NovaGloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_ToString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGNovaGloveSensorDataImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGSenseComImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseComImpl_RegisterExe(); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseComImpl_RegisterExe_ExePath( + void* ExePath); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseComImpl_GetExePath( + void* OutExePath); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseComImpl_ScanningActive(); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseComImpl_GetCurrentExeDirectory( + void* OutDirectory); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseComImpl_StartupSenseCom(); + +/******************************************************************************* + * SGSenseGloveImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_Parse( + void* OutSenseGloveImpl, + void* ConstantsString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetSenseGloves( + void* OutGloves); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetSenseGlove_OutGlove( + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetSenseGlove_bRightHanded_OutGlove( + bool bRightHanded, + void* OutGlove); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_CalculateGloveLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + bool bRightHanded, + void* MountedOn, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_CalculateWristLocation( + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + bool bRightHanded, + void* MountedOn, + void* GloveWristPositionOffset, + void* GloveWristRotationOffset, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API ANSICHAR SGCoreImpl_FSGSenseGloveImpl_GetHapticsByte(); + +SENSEGLOVECOREIMPL_PUBLIC_API ANSICHAR SGCoreImpl_FSGSenseGloveImpl_GetThumperByte(); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetDefaultThimbleOffset( + void* OutOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_CalculateGlovePose_SensorData_GloveModel( + void* OutPose, + void* SensorData, + void* GloveModel); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_CalculateGlovePose_GloveAngles_GloveModel( + void* OutPose, + void* GloveAngles, + void* GloveModel); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_NormalizeValues( + void* SumAngles, + void* Normalizer, + void* OutFlexions, + void* OutAbductions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_CalculateHandAngles( + void* GlovePose, + void* Normalizer, + void* NormalizedToAngles, + void* OutHandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_CalculateHandPose( + void* GlovePose, + void* HandModel, + void* Normalizer, + void* NormalizedToAngles, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor( + void* OutSenseGloveImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor_MakeShared( + void* OutSharedPtr); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor_Model( + void* OutSenseGloveImpl, + void* Model); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor_Model_MakeShared( + void* OutSharedPtr, + void* Model); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor_copy( + void* OutSenseGloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor_copy_MakeShared( + void* OutSharedPtr, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ctor_copy_assignment( + void* OutSenseGloveImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetDeviceType( + void* Instance, + void* OutType); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetImuRotation( + void* Instance, + void* OutImu); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetHandPose( + void* Instance, + void* HandGeometry, + void* OutHandPose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetHandAngles( + void* Instance, + void* OutHandAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetCalibrationState( + void* Instance, + void* OutHapticGloveCalibrationState); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_EndCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ResetCalibration( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_StopHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_StopVibrations( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_SendHaptics( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_QueueForceFeedbackLevels( + void* Instance, + void* Levels01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_QueueForceFeedbackLevel( + void* Instance, + int32 Finger, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevels( + void* Instance, + void* Amplitudes); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevel_Location_Level01( + void* Instance, + void* Location, + float Level01); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutGlovePosition_OutGloveRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveImpl_GetGloveLocation_ReferencePosition_ReferenceRotation_TrackingHardware_MountedOn_OutGlovePosition_OutGloveRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* MountedOn, + void* OutGlovePosition, + void* OutGloveRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_OutWristPosition_OutWristRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveImpl_GetWristLocation_ReferencePosition_ReferenceRotation_TrackingHardware_GloveWristPositionOffset_GloveWristRotationOffset_OutWristPosition_OutWristRotation( + void* Instance, + void* ReferencePosition, + void* ReferenceRotation, + void* TrackingHardware, + void* GloveWristPositionOffset, + void* GloveWristRotationOffset, + void* OutWristPosition, + void* OutWristRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetGloveInfo( + void* Instance, + void* OutGloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_GetFingerThimbleOffsets( + void* Instance, + void* OutFingerThimbleOffsets); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_SetFingerThimbleOffset( + void* Instance, + int32 Finger, + void* Offset); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_SupportsWristActuator( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetSensorData( + void* Instance, + void* OutSensorData); + + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_OutGlovePose( + void* Instance, + void* OutGlovePose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_GetGlovePose_SensorData_OutGlovePose( + void* Instance, + void* SensorData, + void* OutGlovePose); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_QueueVibroLevel_Finger_Amplitude( + void* Instance, + int32 Finger, + float Amplitude); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveImpl_QueueThumperCommand( + void* Instance, + void* Command); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGSenseGloveInfoImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveInfoImpl_Parse( + void* ConstantsString, + void* OutGloveInfo, + bool bUpdateOldModels); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_Deserialize( + void* OutSenseGloveInfoImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_ctor( + void* OutSenseGloveInfoImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveInfoImpl_ctor_DeviceId_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_NumberOfSensors_ImuCorrection_StartPositions_StartRotations_GloveLengths_Functions( + void* OutSenseGloveInfoImpl, + void* DeviceId, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion, + bool bRightHanded, + int32 NumberOfSensors, + void* ImuCorrection, + void* StartPositions, + void* StartRotations, + void* GloveLengths, + void* Functions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy( + void* OutSenseGloveInfoImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_ctor_copy_assignment( + void* OutSenseGloveInfoImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetDeviceId( + void* Instance, + void* OutId); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetHardwareVersion( + void* Instance, + void* OutVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveInfoImpl_GetFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveInfoImpl_GetSubFirmwareVersion( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveInfoImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveInfoImpl_GetNumberOfSensors( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetImuCorrection( + void* Instance, + void* OutCorrection); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPositions( + void* Instance, + void* OutPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotations( + void* Instance, + void* OutRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths( + void* Instance, + void* OutLengths); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetFunctions( + void* Instance, + void* OutFunctions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartPosition( + void* Instance, + void* OutPosition, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetStartRotation( + void* Instance, + void* OutRotation, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_GetGloveLengths_Finger( + void* Instance, + void* OutLengths, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_ToGloveAngles( + void* Instance, + void* OutAngles, + void* SensorAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveInfoImpl_Equals( + void* Instance, + void* SenseGloveInfoImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_ToString_bShortNotation( + void* Instance, + void* OutString, + bool bShortNotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_ToString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveInfoImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGSenseGlovePoseImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_IdlePose( + void* OutSenseGlovePoseImpl, + void* GloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_Deserialize( + void* OutSenseGlovePoseImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_ctor( + void* OutSenseGlovePoseImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGlovePoseImpl_ctor_bRightHanded_JointPositions_JointRotations_GloveAngles( + void* OutSenseGlovePoseImpl, + bool bRightHanded, + void* JointPositions, + void* JointRotations, + void* GloveAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_ctor_copy( + void* OutSenseGlovePoseImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_ctor_copy_assignment( + void* OutSenseGlovePoseImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGlovePoseImpl_IsRight( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetJointPositions( + void* Instance, + void* OutPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetJointRotations( + void* Instance, + void* OutRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetGloveAngles( + void* Instance, + void* OutAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetThimblePositions( + void* Instance, + void* OutPositions); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetThimbleRotations( + void* Instance, + void* OutRotations); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_GetTotalGloveAngles( + void* Instance, + void* OutAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_CalculateFingertips( + void* Instance, + void* OutFingertips, + void* FingerOffsets); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGlovePoseImpl_Equals( + void* Instance, + void* SenseGlovePoseImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_ToString( + void* Instance, + void* OutString, + bool bShortFormat); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGlovePoseImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGSenseGloveSensorDataImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_Empty( + void* OutSenseGloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_Parse( + void* OutSenseGloveSensorDataImpl, + void* RawData, + void* GloveInfo); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_Deserialize( + void* OutSenseGloveSensorDataImpl, + void* SerializedString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor( + void* OutSenseGloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_SensorAngles_ImuRotation_ParsedValues_bImuParsed( + void* OutSenseGloveSensorDataImpl, + void* SensorAngles, + void* ImuRotation, + int32 ParsedValues, + bool bImuParsed); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_copy( + void* OutSenseGloveSensorDataImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_ctor_copy_assignment( + void* OutSenseGloveSensorDataImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetSensorAngles( + void* Instance, + void* OutAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetSensorAngles_Finger( + void* Instance, + void* OutAngles, + void* Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetAngleSequence( + void* Instance, + void* OutSequence); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_GetImuRotation( + void* Instance, + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveSensorDataImpl_GetParsedValues( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveSensorDataImpl_IsImuParsed( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSenseGloveSensorDataImpl_Equals( + void* Instance, + void* SenseGloveSensorDataImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_ToString( + void* Instance, + void* OutString); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorDataImpl_Serialize( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGSenseGloveSensorNormalizerImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor( + void* OutSenseGloveSensorNormalizerImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_bRightHanded( + void* OutSenseGloveSensorNormalizerImpl, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_copy( + void* OutSenseGloveSensorNormalizerImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_ctor_copy_assignment( + void* OutSenseGloveSensorNormalizerImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_NormalizeFlexion( + void* Instance, + int32 Finger, + float SumFlexionAngles); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGSenseGloveSensorNormalizerImpl_NormalizeAbduction( + void* Instance, + int32 Finger, + float SumAbductionAngles); + +/******************************************************************************* + * SGSenseGloveVarsImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetStandardConstantsString( + void* OutString, + void* HardwareVersion, + float FirmwareVersion, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetSensorString( + void* OutString, + void* HardwareVersion, + float FirmwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetStartPositions( + void* OutPositions, + void* HardwareVersion, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetStartRotations( + void* OutRotations, + void* HardwareVersion, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetGloveLengths( + void* OutLengths, + void* HardwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSenseGloveVarsImpl_GetSensors( + void* HardwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetImuCorrection( + void* OutCorrection, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSenseGloveVarsImpl_GetFunctions( + void* OutFunctions, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveVarsImpl_GenerateGloveModel_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded +( + void* OutModel, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion, + bool bRightHanded); + +SENSEGLOVECOREIMPL_PUBLIC_API void +SGCoreImpl_FSGSenseGloveVarsImpl_GenerateGloveModel_HardwareVersion_FirmwareVersion_SubFirmwareVersion_bRightHanded_CustomId +( + void* OutModel, + void* HardwareVersion, + int32 FirmwareVersion, + int32 SubFirmwareVersion, + bool bRightHanded, + void* CustomId); + +/******************************************************************************* + * SGSensorNormalizationImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_ctor( + void* OutSensorNormalizationImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_ctor_MovementRanges( + void* OutSensorNormalizationImpl, + void* MovementRanges); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_ctor_copy( + void* OutSensorNormalizationImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_ctor_copy_assignment( + void* OutSensorNormalizationImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSensorNormalizationImpl_CollectsNormalization( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_SetCollectNormalization( + void* Instance, + bool bCollectNormalization); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSensorNormalizationImpl_GetLength( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API int32 SGCoreImpl_FSGSensorNormalizationImpl_GetMoveCount( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSensorNormalizationImpl_AllSensorsMoving( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_ResetNormalization( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_UpdateNormalization( + void* Instance, + float Value, + int32 Index); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGSensorNormalizationImpl_NormalizeValue( + void* Instance, + float Value, + int32 Index); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGSensorNormalizationImpl_NormalizeValues( + void* Instance, + void* Values, + void* OutNormalizedValues); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGSensorNormalizationImpl_MovedEnough( + void* Instance, + int32 Index); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGSensorNormalizationImpl_Denormalize( + void* Instance, + float Value01, + int32 Index, + float FallbackValue); + +/******************************************************************************* + * SGThresholdCommandImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ctor( + void* OutThresholdCommandImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ctor_AffectedFingers_ThresholdValues( + void* OutThresholdCommandImpl, + void* AffectedFingers, + void* ThresholdValues); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ctor_copy( + void* OutThresholdCommandImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ctor_copy_assignment( + void* OutThresholdCommandImpl, + void* Rhs); + +SENSEGLOVECOREIMPL_PUBLIC_API float SGCoreImpl_FSGThresholdCommandImpl_GetThreshold( + void* Instance, + int32 Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_SetThreshold( + void* Instance, + int32 Finger, + float ThresholdValue); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_GetThresholds( + void* Instance, + void* OutThresholds); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_SetThresholds( + void* Instance, + void* AffectedFingers, + void* ThresholdValues); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGThresholdCommandImpl_GetFingerActive( + void* Instance, + int32 Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_GetActiveFingers( + void* Instance, + void* OutActiveFingers); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ClearThreshold( + void* Instance, + int32 Finger); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ClearThresholds( + void* Instance); + +SENSEGLOVECOREIMPL_PUBLIC_API bool SGCoreImpl_FSGThresholdCommandImpl_Equals( + void* Instance, + void* ThresholdCommandImpl); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGThresholdCommandImpl_ToString( + void* Instance, + void* OutString); + +/******************************************************************************* + * SGTrackingImpl.h + ******************************************************************************/ + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_CalculateLocation( + void* TrackedPosition, + void* TrackedRotation, + void* PositionOffset, + void* RotationOffset, + void* OutNewPosition, + void* OutNewRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGlovePositionOrigin( + void* OutOrigin); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveFingerToGloveRotationOrigin( + void* OutOrigin); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristPositionOffset( + void* OutOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveWristRotationOffset( + void* OutOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveMountOffset( + bool bRightHanded, + void* ToFinger, + void* OutIPosition, + void* OutIRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveTrackerMountOffset( + void* Hardware, + bool bRightHanded, + void* OutPositionOffset, + void* OutRotationOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveViveToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetSenseGloveOculusTouchToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetNovaToWristPositionOffset( + void* OutOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetNovaToWristRotationOffset( + void* OutOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest2ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest2ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaPico2ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaPico2ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuestProToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuestProToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaViveFocus3ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaViveFocus3ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNovaQuest3ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNovaQuest3ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetNovaGloveWristOffset( + bool bRightHanded, + void* OutPositionOffset, + void* OutRotationOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetNovaGloveTrackerOffset( + void* Hardware, + bool bRightHanded, + void* OutPositionOffset, + void* OutRotationOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristPositionOffset( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2ToWristRotationOffset( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristPositionOffset( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ToWristRotationOffset( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest2ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest2ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2QuestProToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2QuestProToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2QuestProToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2QuestProToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveTrackerToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveTrackerToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2ViveWristTrackerToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2ViveWristTrackerToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetRightNova2Quest3ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachPosition( + void* OutPosition); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetLeftNova2Quest3ToAttachRotation( + void* OutRotation); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetNova2GloveWristOffset( + bool bRightHanded, + void* HardwareVersion, + void* OutPositionOffset, + void* OutRotationOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_GetNova2GloveTrackerOffset( + void* Hardware, + bool bRightHanded, + void* HardwareVersion, + void* OutPositionOffset, + void* OutRotationOffset); + +SENSEGLOVECOREIMPL_PUBLIC_API void SGCoreImpl_FSGTrackingImpl_ToString( + void* OutString, + void* Hardware); + +/******************************************************************************* + ******************************************************************************/ + +#if __cplusplus +} +#endif /* __cplusplus */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandInterpolatorImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandInterpolatorImpl.h new file mode 100644 index 0000000..85af4df --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandInterpolatorImpl.h @@ -0,0 +1,134 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +class FSGInterpolationSetImpl; + +namespace SGCore +{ + namespace Kinematics + { + class HandInterpolator; + } +} + +class SENSEGLOVECOREIMPL_API FSGHandInterpolatorImpl final +{ +public: + typedef SGCore::Kinematics::HandInterpolator FHandInterpolatorType; + +public: + static FSGHandInterpolatorImpl Deserialize(const FString& SerializedString, bool bRightHanded = true); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGHandInterpolatorImpl(); + + explicit FSGHandInterpolatorImpl(bool bRightHanded); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGHandInterpolatorImpl(const FHandInterpolatorType& HandInterpolator); + +public: + /** + * The copy constructor. + */ + FSGHandInterpolatorImpl(const FSGHandInterpolatorImpl& Rhs); + + /** + * The move constructor. + */ + FSGHandInterpolatorImpl(FSGHandInterpolatorImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGHandInterpolatorImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGHandInterpolatorImpl& operator=(const FSGHandInterpolatorImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGHandInterpolatorImpl& operator=(FSGHandInterpolatorImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FHandInterpolatorType& ToHandInterpolator() const; + +public: + float CalculateAngle(ESGFingerMovement Movement, float Value, bool bApplyLimits = true) const; + + float CalculateAngle(ESGThumbMovement Movement, float Value, bool bApplyLimits = true) const; + +public: + TArray> InterpolateHandAngles( + const TArray>& Flexions, const TArray& Abductions, float CmcTwist); + +public: + bool Equals(const FSGHandInterpolatorImpl& HandInterpolatorImpl) const; + +public: + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandLayerImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandLayerImpl.h new file mode 100644 index 0000000..78482d5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandLayerImpl.h @@ -0,0 +1,121 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Templates/SharedPointer.h" + +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class HandLayer; +} + +class FSGCustomWaveformImpl; +class FSGHandPoseImpl; +class FSGHapticGloveImpl; + +class SENSEGLOVECOREIMPL_API FSGHandLayerImpl final +{ +public: + typedef SGCore::HandLayer FHandLayerType; + +public: + static bool DeviceConnected(bool bRightHanded); + + static ESGDeviceType GetDeviceType(bool bRightHanded); + + static bool GetFirstGloveHandedness(); + + static int32 GlovesConnected(); + + static bool GetGloveInstance(bool bRightHanded, TSharedPtr& OutGlove); + + static ESGHapticGloveCalibrationState GetCalibrationState(bool bRightHanded); + + static FString GetCalibrationInstructions(bool bRightHanded); + + static void ResetCalibration(bool bRightHanded); + + static void EndCalibration(bool bRightHanded); + + static bool GetHandPose(bool bRightHanded, FSGHandPoseImpl& OutHandPose); + + static void GetWristLocation( + bool bRightHanded, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + static void StopAllHaptics(bool bRightHanded); + + static bool SendHaptics(bool bRightHanded); + + static bool SupportsCustomWaveform(bool bRightHanded, ESGHapticLocation AtLocation); + + static bool SendCustomWaveform(bool bRightHanded, FSGCustomWaveformImpl& OutWaveform, ESGHapticLocation Location); + + static bool QueueCommand_ForceFeedbackLevels( + bool bRightHanded, const TArray& Levels01, bool bSendImmediate); + + static bool QueueCommand_ForceFeedbackLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate); + + static bool QueueCommand_VibroLevels(bool bRightHanded, const TArray& Levels01, bool bSendImmediate); + + static bool QueueCommand_VibroLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate); + + static bool QueueCommand_VibroLevel( + bool bRightHanded, ESGHapticLocation AtLocation, float Level01, bool bSendImmediate); + + static bool SupportsWristSqueeze(bool bRightHanded); + + static bool QueueCommand_WristSqueeze(bool bRightHanded, float SqueezeLevel01, bool bSendImmediate); + + static bool SupportsFlexionLocks(bool bRightHanded); + + static bool QueueCommand_FlexionLock(bool bRightHanded, int32 Finger, float Flexion01, bool bSendImmediate); + + static bool QueueCommand_ClearFlexionLock(bool bRightHanded, int32 Finger, bool bSendImmediate); + +public: + FSGHandLayerImpl() = delete; + virtual ~FSGHandLayerImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandPoseImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandPoseImpl.h new file mode 100644 index 0000000..0e43b8c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHandPoseImpl.h @@ -0,0 +1,160 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +class FSGHandInterpolatorImpl; + +namespace SGCore +{ + class HandPose; +} + +class FSGBasicHandModelImpl; + +class SENSEGLOVECOREIMPL_API FSGHandPoseImpl final +{ +public: + typedef SGCore::HandPose FHandPoseType; + +public: + static FSGHandPoseImpl Deserialize(const FString& SerializedString); + + static FSGHandPoseImpl FromHandAngles(const TArray>& HandAngles, bool bRightHanded, + const FSGBasicHandModelImpl& HandDimensions); + + static FSGHandPoseImpl FromHandAngles(const TArray>& HandAngles, bool bRightHanded); + + static FSGHandPoseImpl DefaultIdle(bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions); + + static FSGHandPoseImpl DefaultIdle(bool bRightHanded); + + static FSGHandPoseImpl FlatHand(bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions); + + static FSGHandPoseImpl FlatHand(bool bRightHanded); + + static FSGHandPoseImpl ThumbsUp(bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions); + + static FSGHandPoseImpl ThumbsUp(bool bRightHanded); + + static FSGHandPoseImpl Fist(bool bRightHanded, const FSGBasicHandModelImpl& HandDimensions); + + static FSGHandPoseImpl Fist(bool bRightHanded); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGHandPoseImpl(); + + FSGHandPoseImpl(bool bRightHanded, const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& HandAngles); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGHandPoseImpl(const FHandPoseType& SenseGloveHandPose); + +public: + /** + * The copy constructor. + */ + FSGHandPoseImpl(const FSGHandPoseImpl& Rhs); + + /** + * The move constructor. + */ + FSGHandPoseImpl(FSGHandPoseImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGHandPoseImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGHandPoseImpl& operator=(const FSGHandPoseImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGHandPoseImpl& operator=(FSGHandPoseImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FHandPoseType& ToHandPose() const; + +public: + bool IsRight() const; + + TArray> GetJointPositions() const; + + TArray> GetJointRotations() const; + + TArray> GetHandAngles() const; + +public: + bool Equals(const FSGHandPoseImpl& HandPoseImpl) const; + + float GetNormalizedFlexion(ESGFinger Finger, bool bClamp01 = true) const; + + TArray GetNormalizedFlexion(bool bClamp01 = true) const; + +public: + FString ToString(bool bShortFormat = false) const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHapticChannelInfoImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHapticChannelInfoImpl.h new file mode 100644 index 0000000..69a9d19 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHapticChannelInfoImpl.h @@ -0,0 +1,133 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "HAL/Platform.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class HapticChannelInfo; +} + +class SENSEGLOVECOREIMPL_API FSGHapticChannelInfoImpl final +{ +public: + typedef SGCore::HapticChannelInfo FHapticChannelInfoType; + +public: + static FString GenerateAddress(int32 DeviceIndex, int32 ChannelIndex); + + static FSGHapticChannelInfoImpl Parse(const FString& IpcString); + +public: + static int32 GetStreamingType(); + static int32 GetFireAndForgetType(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGHapticChannelInfoImpl(); + + FSGHapticChannelInfoImpl(const TArray& StreamIndex, const TArray& FireAndForgetIndex); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGHapticChannelInfoImpl(const FHapticChannelInfoType& HapticChannelInfo); + +public: + /** + * The copy constructor. + */ + FSGHapticChannelInfoImpl(const FSGHapticChannelInfoImpl& Rhs); + + /** + * The move constructor. + */ + FSGHapticChannelInfoImpl(FSGHapticChannelInfoImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGHapticChannelInfoImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGHapticChannelInfoImpl& operator=(const FSGHapticChannelInfoImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGHapticChannelInfoImpl& operator=(FSGHapticChannelInfoImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FHapticChannelInfoType& ToHapticChannelInfo() const; + +public: + int32 GetStreamChannelCount() const; + int32 GetFireAndForgetChannelCount() const; + int32 GetTotalChannelCount() const; + + FString GetAddress_Unguarded(ESGHapticChannelType Type, int32 TypeIndex) const; + + void GetIpcParams_Unguarded(ESGHapticChannelType Type, int32 TypeIndex, + int32& OutIndex, FString& OutAddressString) const; + + void RegenerateAddresses(int32 ForDeviceIndex); + + TArray GetAllAddresses() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHapticGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHapticGloveImpl.h new file mode 100644 index 0000000..236acbf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGHapticGloveImpl.h @@ -0,0 +1,209 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "Containers/Array.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGCoreImpl/SGDeviceImpl.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class HapticGlove; +} + +class FSGBasicHandModelImpl; +class FSGCustomWaveformImpl; +class FSGHandPoseImpl; + +class SENSEGLOVECOREIMPL_API FSGHapticGloveImpl : public FSGDeviceImpl +{ +#if ENGINE_MAJOR_VERSION >= 5 + friend class SharedPointerInternals::TIntrusiveReferenceController; +#else + friend class SharedPointerInternals::TIntrusiveReferenceController; +#endif /* ENGINE_MAJOR_VERSION >= 5 */ + +public: + typedef SGCore::HapticGlove FHapticGloveType; + +public: + typedef std::shared_ptr FHapticGlovePtrType; + typedef std::vector FHapticGlovePtrVectorType; + +public: + static TArray> GetHapticGloves(bool bConnectedOnly = true); + + static bool GetGlove(TSharedPtr& OutGlove); + + static bool GetGlove(bool bRightHanded, TSharedPtr& OutGlove); + +public: + static FString ToString(ESGHapticGloveCalibrationState State); + + static FString ToString(ESGHapticLocation Location); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGHapticGloveImpl(); + +public: + /** + * The cast from underlying pointer type constructor. + */ + explicit FSGHapticGloveImpl(const FHapticGlovePtrType HapticGlove); + +public: + /** + * The copy constructor. + */ + FSGHapticGloveImpl(const FSGHapticGloveImpl& Rhs); + + /** + * The move constructor. + */ + FSGHapticGloveImpl(FSGHapticGloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGHapticGloveImpl() override; + +public: + /** + * The copy assignment operator. + */ + FSGHapticGloveImpl& operator=(const FSGHapticGloveImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGHapticGloveImpl& operator=(FSGHapticGloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying pointer type method. + */ + FHapticGlovePtrType ToHapticGlovePtr() const; + + /** + * The checked cast to underlying pointer type method. + */ + FHapticGlovePtrType ToHapticGlovePtrChecked() const; + +public: + virtual ESGDeviceType GetDeviceType() const override; + virtual FString GetDeviceId() const override; + + virtual FString GetHardwareVersion() const override; + virtual int32 GetFirmwareVersion() const override; + virtual int32 GetSubFirmwareVersion() const override; + +public: + virtual bool IsRight() const; + + virtual bool GetImuRotation(FQuat& OutImu); + + virtual bool GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const; + + virtual bool GetHandPose(FSGHandPoseImpl& OutHandPose); + + virtual bool GetHandAngles(TArray>& OutHandAngles) const; + + FSGBasicHandModelImpl GetHandGeometry() const; + void SetHandGeometry(const FSGBasicHandModelImpl& HandGeometry); + +public: + virtual ESGHapticGloveCalibrationState GetCalibrationState() const; + + virtual void EndCalibration(); + + virtual void ResetCalibration(); + + virtual FString GetCalibrationInstruction() const; + +public: + virtual void StopHaptics(); + + virtual void StopVibrations(); + + virtual bool SendHaptics(); + +public: + virtual bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const; + + virtual bool SendCustomWaveform(FSGCustomWaveformImpl& OutWaveform, ESGHapticLocation Location); + + virtual bool QueueForceFeedbackLevels(const TArray& Levels01); + + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01); + + virtual bool QueueVibroLevels(const TArray& Levels01); + + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01); + +public: + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const; + + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const; + +public: + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGInterpolationSetImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGInterpolationSetImpl.h new file mode 100644 index 0000000..76637b9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGInterpolationSetImpl.h @@ -0,0 +1,154 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace Kinematics + { + class InterpolationSet; + } +} + +class SENSEGLOVECOREIMPL_API FSGInterpolationSetImpl final +{ +public: + typedef SGCore::Kinematics::InterpolationSet FInterpolationSetType; + +public: + static FSGInterpolationSetImpl Deserialize(const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGInterpolationSetImpl(); + + FSGInterpolationSetImpl(float From1, float From2, float To1, float To2); + + FSGInterpolationSetImpl(float From1, float From2, float To1, float To2, float Min, float Max); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGInterpolationSetImpl(const FInterpolationSetType& InterpolationSet); + +public: + /** + * The copy constructor. + */ + FSGInterpolationSetImpl(const FSGInterpolationSetImpl& Rhs); + + /** + * The move constructor. + */ + FSGInterpolationSetImpl(FSGInterpolationSetImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGInterpolationSetImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGInterpolationSetImpl& operator=(const FSGInterpolationSetImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGInterpolationSetImpl& operator=(FSGInterpolationSetImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FInterpolationSetType& ToInterpolationSet() const; + +public: + float GetX0() const; + + void SetX0(float X0); + + float GetX1() const; + + void SetX1(float X1); + + float GetY0() const; + + void SetY0(float Y0); + + float GetY1() const; + + void SetY1(float Y1); + + float GetMin() const; + + void SetMin(float Min); + + float GetMax() const; + + void SetMax(float Max); + +public: + float Get(float Value, bool bLimit, bool bNormalizeAngle = false) const; + +public: + bool Equals(const FSGInterpolationSetImpl& InterpolationSetImpl) const; + +public: + FString ToString() const; + + FString ToString(bool bLimits) const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGJointKinematicsImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGJointKinematicsImpl.h new file mode 100644 index 0000000..b5a268b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGJointKinematicsImpl.h @@ -0,0 +1,71 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Quat.h" +#include "Math/Vector.h" + +#include "SGTypes/SGCoreTypes.h" + +class FSGBasicHandModelImpl; + +namespace SGCore +{ + namespace Kinematics + { + class JointKinematics; + } +} + +class SENSEGLOVECOREIMPL_API FSGJointKinematicsImpl final +{ +public: + typedef SGCore::Kinematics::JointKinematics FJointKinematicsType; + +public: + static bool ForwardKinematics(const FVector& StartPosition, const FQuat& StartRotation, + const TArray& JointLengths, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + static bool ForwardKinematics( + const FSGBasicHandModelImpl& Profile, ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + +public: + FSGJointKinematicsImpl() = delete; + virtual ~FSGJointKinematicsImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGLibraryImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGLibraryImpl.h new file mode 100644 index 0000000..9abbeab --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGLibraryImpl.h @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + class Library; +} + +class SENSEGLOVECOREIMPL_API FSGLibraryImpl final +{ +public: + typedef SGCore::Library FLibraryType; + +public: + static FString Version(); + + static ESGBackendType GetBackendType(); + + static FString BackendVersion(); + + static FString SGConnectVersion(); + +public: + FSGLibraryImpl() = delete; + virtual ~FSGLibraryImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNova2GloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNova2GloveImpl.h new file mode 100644 index 0000000..af1fb66 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNova2GloveImpl.h @@ -0,0 +1,288 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" + +namespace SGCore +{ + namespace Nova + { + class Nova2Glove; + } +} + +class FSGBasicHandModelImpl; +class FSGHandInterpolatorImpl; +class FSGHandPoseImpl; +class FSGNova2GloveHandProfileImpl; +class FSGNova2GloveSensorDataImpl; +class FSGNovaGloveInfoImpl; +class FSGSensorNormalizationImpl; + +class SENSEGLOVECOREIMPL_API FSGNova2GloveImpl final : public FSGHapticGloveImpl +{ +#if ENGINE_MAJOR_VERSION >= 5 + friend class SharedPointerInternals::TIntrusiveReferenceController; +#else + friend class SharedPointerInternals::TIntrusiveReferenceController; +#endif /* ENGINE_MAJOR_VERSION >= 5 */ + +public: + typedef SGCore::Nova::Nova2Glove FNova2GloveType; + + typedef std::vector FNova2GloveVectorType; + + typedef std::shared_ptr FNova2GlovePtrType; + typedef std::vector FNova2GlovePtrVectorType; + +public: + static TSharedRef Parse(const FString& ConstantsString); + + static TArray GetNova2Gloves(); + + static bool GetNova2Glove(FSGNova2GloveImpl& OutGlove); + + static bool GetNova2Glove(bool bRightHanded, FSGNova2GloveImpl& OutGlove); + +public: + static void CalculateGloveLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + static void CalculateWristLocation( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FQuat& OutWristRotation); + +public: + static ANSICHAR GetStreamByte(); + + static const TArray& GetNova2SensorRanges(); + +public: + static TArray ToNormalizedValues(const FSGNova2GloveSensorDataImpl& SensorData); + + static TArray ToNormalizedValues( + const FSGNova2GloveSensorDataImpl& SensorData, FSGSensorNormalizationImpl& OutSensorNormalizer); + +public: + static TArray> CalculateHandAngles( + const TArray& NormalizedValues, const FSGHandInterpolatorImpl& Interpolator, bool bInfluenceIndex); + + static TArray> ToNormalizedAngles( + const TArray& NormalizedData, const FSGNovaGloveInfoImpl& GloveInfo); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGNova2GloveImpl(); + + explicit FSGNova2GloveImpl(const FSGNovaGloveInfoImpl& DeviceInfo); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGNova2GloveImpl(const FNova2GloveType Nova2Glove); + + /** + * The cast from underlying pointer type constructor. + */ + explicit FSGNova2GloveImpl(const FNova2GlovePtrType Nova2Glove); + +public: + /** + * The copy constructor. + */ + FSGNova2GloveImpl(const FSGNova2GloveImpl& Rhs); + + /** + * The move constructor. + */ + FSGNova2GloveImpl(FSGNova2GloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGNova2GloveImpl() override; + +public: + /** + * The copy assignment operator. + */ + FSGNova2GloveImpl& operator=(const FSGNova2GloveImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGNova2GloveImpl& operator=(FSGNova2GloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FNova2GloveType& ToNova2Glove() const; + + /** + * The cast to underlying pointer type method. + */ + FNova2GlovePtrType ToNova2GlovePtr() const; + + /** + * The checked cast to underlying pointer type method. + */ + FNova2GlovePtrType ToNova2GlovePtrChecked() const; + +public: + virtual ESGDeviceType GetDeviceType() const override; + + virtual FString GetDeviceId() const override; + + virtual FString GetHardwareVersion() const override; + + virtual int32 GetFirmwareVersion() const override; + + virtual int32 GetSubFirmwareVersion() const override; + +public: + virtual bool HasBattery() const override; + + virtual bool IsCharging() override; + + virtual bool GetBatteryLevel(float& OutBatteryLevel) override; + +public: + virtual bool IsRight() const override; + + virtual bool GetImuRotation(FQuat& OutImu) override; + + virtual bool GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const override; + + virtual bool GetHandAngles(TArray>& OutHandAngles) const override; + +public: + virtual ESGHapticGloveCalibrationState GetCalibrationState() const override; + + virtual void EndCalibration() override; + + virtual void ResetCalibration() override; + +public: + virtual void StopHaptics() override; + + virtual void StopVibrations() override; + + virtual bool SendHaptics() override; + +public: + virtual bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const override; + + virtual bool SendCustomWaveform(FSGCustomWaveformImpl& OutWaveform, ESGHapticLocation Location) override; + +public: + virtual bool QueueForceFeedbackLevels(const TArray& Levels01) override; + + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01) override; + + virtual bool QueueVibroLevels(const TArray& Amplitudes) override; + + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01) override; + + virtual bool QueueSqueezeLevel(float SqueezeLevel01); + +public: + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const override; + +public: + FSGNovaGloveInfoImpl GetGloveInfo() const; + + bool DoesIndexInfluenceOthers() const; + + void SetIndexInfluencesOthers(bool bInfluenceOthers); + + bool SupportsOnBoardNormalization() const; + +public: + bool GetSensorData(FSGNova2GloveSensorDataImpl& OutSensorData) const; + + bool GetNormalizedInput(TArray& OutNormalizedValues) const; + + virtual bool SendRawData(); + + virtual bool SendNormalizedData(); + +public: + virtual ESGNova2VibroMotor ToNovaMotor(ESGHapticLocation Location) const; + + virtual int32 ChannelIndex(ESGNova2VibroMotor Motor) const; + + virtual void ValidateWaveform(FSGCustomWaveformImpl& OutWaveform, ESGNova2VibroMotor Motor) const; + + virtual bool SendCustomWaveform_Nova2(FSGCustomWaveformImpl& OutWaveform, ESGNova2VibroMotor Motor, + bool bValidateWaveform = true); + +public: + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNova2GloveSensorDataImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNova2GloveSensorDataImpl.h new file mode 100644 index 0000000..f326833 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNova2GloveSensorDataImpl.h @@ -0,0 +1,143 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + namespace Nova + { + class Nova2GloveSensorData; + } +} + +class FSGNovaGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGNova2GloveSensorDataImpl final +{ +public: + typedef SGCore::Nova::Nova2GloveSensorData FNova2GloveSensorDataType; + +public: + static FSGNova2GloveSensorDataImpl Parse(const FString& RawData, const FSGNovaGloveInfoImpl& GloveInfo); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGNova2GloveSensorDataImpl(); + + FSGNova2GloveSensorDataImpl(const ESGNormalizationState NormalizationState, + const TArray>& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGNova2GloveSensorDataImpl(const FNova2GloveSensorDataType& Nova2GloveSensorData); + +public: + /** + * The copy constructor. + */ + FSGNova2GloveSensorDataImpl(const FSGNova2GloveSensorDataImpl& Rhs); + + /** + * The move constructor. + */ + FSGNova2GloveSensorDataImpl(FSGNova2GloveSensorDataImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGNova2GloveSensorDataImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGNova2GloveSensorDataImpl& operator=(const FSGNova2GloveSensorDataImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGNova2GloveSensorDataImpl& operator=(FSGNova2GloveSensorDataImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FNova2GloveSensorDataType& ToNova2GloveSensorData() const; + +public: + ESGNormalizationState GetSensorState() const; + + TArray> GetSensorValues() const; + float GetSensorValue(ESGFinger Finger, ESGNova2SensorLocation Location) const; + + int32 GetParsedValues() const; + + FQuat GetImuRotation() const; + + bool IsImuParsed() const; + +public: + float GetBatteryLevel() const; + + bool IsCharging() const; + +public: + bool Equals(const FSGNova2GloveSensorDataImpl& Nova2GloveSensorDataImpl) const; + +public: + FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveImpl.h new file mode 100644 index 0000000..f3ff6f8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveImpl.h @@ -0,0 +1,305 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" + +namespace SGCore +{ + namespace Nova + { + class NovaGlove; + } +} + +class FSGBasicHandModelImpl; +class FSGHandInterpolatorImpl; +class FSGHandPoseImpl; +class FSGNovaGloveHandProfileImpl; +class FSGNovaGloveInfoImpl; +class FSGNovaGloveSensorDataImpl; +class FSGSensorNormalizationImpl; +class FSGThresholdCommandImpl; + +class SENSEGLOVECOREIMPL_API FSGNovaGloveImpl final : public FSGHapticGloveImpl +{ +#if ENGINE_MAJOR_VERSION >= 5 + friend class SharedPointerInternals::TIntrusiveReferenceController; +#else + friend class SharedPointerInternals::TIntrusiveReferenceController; +#endif /* ENGINE_MAJOR_VERSION >= 5 */ + +public: + typedef SGCore::Nova::NovaGlove FNovaGloveType; + + typedef std::vector FNovaGloveVectorType; + + typedef std::shared_ptr FNovaGlovePtrType; + typedef std::vector FNovaGlovePtrVectorType; + +public: + static TSharedRef Parse(const FString& ConstantsString); + + static TArray GetNovaGloves(); + + static bool GetNovaGlove(FSGNovaGloveImpl& OutGlove); + + static bool GetNovaGlove(bool bRightHanded, FSGNovaGloveImpl& OutGlove); + +public: + static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutWristPosition, FQuat& OutWristRotation); + +public: + static ANSICHAR GetHapticsByte(); + + static ANSICHAR GetThresholdsByte(); + + static ANSICHAR GetIgnoreThresholdsByte(); + + static const TArray& GetNovaSensorRanges(); + +public: + static TArray ToNormalizedValues(const FSGNovaGloveSensorDataImpl& SensorData); + + static TArray ToNormalizedValues( + const FSGNovaGloveSensorDataImpl& SensorData, FSGSensorNormalizationImpl& OutSensorNormalizer); + +public: + static TArray> CalculateHandAngles( + const TArray& NormalizedValues, const FSGHandInterpolatorImpl& Interpolator); + +public: + static FString ToNovaCommandAsFlexion(const FSGThresholdCommandImpl& Thresholds); + + static FString ToNovaCommandAsRaw( + const FSGThresholdCommandImpl& Thresholds, const FSGSensorNormalizationImpl& Interpolator); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGNovaGloveImpl(); + + explicit FSGNovaGloveImpl(const FSGNovaGloveInfoImpl& DeviceInfo); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGNovaGloveImpl(const FNovaGloveType NovaGlove); + + /** + * The cast from underlying pointer type constructor. + */ + explicit FSGNovaGloveImpl(const FNovaGlovePtrType NovaGlove); + +public: + /** + * The copy constructor. + */ + FSGNovaGloveImpl(const FSGNovaGloveImpl& Rhs); + + /** + * The move constructor. + */ + FSGNovaGloveImpl(FSGNovaGloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGNovaGloveImpl() override; + +public: + /** + * The copy assignment operator. + */ + FSGNovaGloveImpl& operator=(const FSGNovaGloveImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGNovaGloveImpl& operator=(FSGNovaGloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FNovaGloveType& ToNovaGlove() const; + + /** + * The cast to underlying pointer type method. + */ + FNovaGlovePtrType ToNovaGlovePtr() const; + + /** + * The checked cast to underlying pointer type method. + */ + FNovaGlovePtrType ToNovaGlovePtrChecked() const; + +public: + virtual ESGDeviceType GetDeviceType() const override; + + virtual FString GetDeviceId() const override; + + virtual FString GetHardwareVersion() const override; + + virtual int32 GetFirmwareVersion() const override; + + virtual int32 GetSubFirmwareVersion() const override; + +public: + virtual void SetDeviceIndex(int32 NewIndex) override; + +public: + virtual bool HasBattery() const override; + + virtual bool IsCharging() override; + + virtual bool GetBatteryLevel(float& OutBatteryLevel) override; + +public: + virtual bool IsRight() const override; + + virtual bool GetImuRotation(FQuat& OutImu) override; + + virtual bool GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const override; + + virtual bool GetHandAngles(TArray>& OutHandAngles) const override; + +public: + virtual ESGHapticGloveCalibrationState GetCalibrationState() const override; + + virtual void EndCalibration() override; + + virtual void ResetCalibration() override; + +public: + virtual void StopHaptics() override; + + virtual void StopVibrations() override; + + virtual bool SendHaptics() override; + +public: + virtual bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const override; + + virtual bool SendCustomWaveform(FSGCustomWaveformImpl& OutWaveform, ESGHapticLocation Location) override; + +public: + virtual bool QueueForceFeedbackLevels(const TArray& Levels01) override; + + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01) override; + + virtual bool QueueVibroLevels(const TArray& Amplitudes) override; + + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01) override; + +public: + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const override; + +public: + FSGNovaGloveInfoImpl GetGloveInfo() const; + + bool SupportsThresholds() const; + + bool SupportsCustomWaveforms() const; + + bool SupportsOnBoardNormalization() const; + +public: + bool GetSensorData(FSGNovaGloveSensorDataImpl& OutSensorData) const; + + bool GetNormalizedInput(TArray& OutNormalizedValues) const; + +public: + virtual FString ToNovaCommand( + const TArray& ForceFeedbackLevels, const TArray& BuzzLevels, float WristLevel) const; + + virtual bool QueueVibroLevel(int32 Finger, float Amplitude); + + virtual bool QueueWristLevel(float Amplitude); + +public: + virtual ESGNovaVibroMotor ToNovaMotor(ESGHapticLocation Location) const; + + virtual int32 ChannelIndex(ESGNovaVibroMotor Motor) const; + + virtual void ValidateWaveform(FSGCustomWaveformImpl& OutWaveform, ESGNovaVibroMotor Motor) const; + + virtual bool SendCustomWaveform_Nova(FSGCustomWaveformImpl& OutWaveform, ESGNovaVibroMotor Motor, + bool bValidateWaveform = true); + +public: + bool QueueThresholdCommand_Flexion(int32 Finger, float FlexionThreshold); + + virtual bool QueueClearThreshold(int32 Finger); + +public: + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveInfoImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveInfoImpl.h new file mode 100644 index 0000000..95ebf52 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveInfoImpl.h @@ -0,0 +1,146 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace Nova + { + class NovaGloveInfo; + } +} + +class SENSEGLOVECOREIMPL_API FSGNovaGloveInfoImpl final +{ +public: + typedef SGCore::Nova::NovaGloveInfo FNovaGloveInfoType; + +public: + static bool Parse(const FString& ConstantsString, FSGNovaGloveInfoImpl& OutGloveInfo); + + static FSGNovaGloveInfoImpl Deserialize(const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGNovaGloveInfoImpl(); + + FSGNovaGloveInfoImpl(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGNovaGloveInfoImpl(const FNovaGloveInfoType& GloveInfo); + +public: + /** + * The copy constructor. + */ + FSGNovaGloveInfoImpl(const FSGNovaGloveInfoImpl& Rhs); + + /** + * The move constructor. + */ + FSGNovaGloveInfoImpl(FSGNovaGloveInfoImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGNovaGloveInfoImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGNovaGloveInfoImpl& operator=(const FSGNovaGloveInfoImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGNovaGloveInfoImpl& operator=(FSGNovaGloveInfoImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FNovaGloveInfoType& ToNovaGloveInfo() const; + +public: + FString GetDeviceId() const; + + FString GetHardwareVersion() const; + + int32 GetFirmwareVersion() const; + + int32 GetSubFirmwareVersion() const; + + bool IsRight() const; + + FQuat GetImuCorrection() const; + + int32 GetNumberOfSensors() const; + +public: + bool FirmwareNewerThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + bool FirmwareOlderThan(int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + +public: + bool Equals(const FSGNovaGloveInfoImpl& SGNovaGloveInfo) const; + +public: + FString ToString() const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveSensorDataImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveSensorDataImpl.h new file mode 100644 index 0000000..545e64e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGNovaGloveSensorDataImpl.h @@ -0,0 +1,149 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + namespace Nova + { + class NovaGloveSensorData; + } +} + +class FSGNovaGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGNovaGloveSensorDataImpl final +{ +public: + typedef SGCore::Nova::NovaGloveSensorData FNovaGloveSensorDataType; + +public: + static const FSGNovaGloveSensorDataImpl& Empty(); + + static FSGNovaGloveSensorDataImpl Parse(const FString& RawData, const FSGNovaGloveInfoImpl& GloveInfo); + + static FSGNovaGloveSensorDataImpl Deserialize(const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGNovaGloveSensorDataImpl(); + + FSGNovaGloveSensorDataImpl(const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGNovaGloveSensorDataImpl(const FNovaGloveSensorDataType& NovaGloveSensorData); + +public: + /** + * The copy constructor. + */ + FSGNovaGloveSensorDataImpl(const FSGNovaGloveSensorDataImpl& Rhs); + + /** + * The move constructor. + */ + FSGNovaGloveSensorDataImpl(FSGNovaGloveSensorDataImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGNovaGloveSensorDataImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGNovaGloveSensorDataImpl& operator=(const FSGNovaGloveSensorDataImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGNovaGloveSensorDataImpl& operator=(FSGNovaGloveSensorDataImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FNovaGloveSensorDataType& ToNovaGloveSensorData() const; + +public: + ESGNormalizationState GetSensorState() const; + + TArray GetSensorValues() const; + float GetSensorValue(ESGFinger Finger, ESGNovaSensorLocation Location) const; + + int32 GetParsedValues() const; + +public: + FQuat GetImuRotation() const; + + bool IsImuParsed() const; + +public: + float GetBatteryLevel() const; + + bool IsCharging() const; + +public: + bool Equals(const FSGNovaGloveSensorDataImpl& NovaGloveSensorDataImpl) const; + +public: + FString ToString() const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseComImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseComImpl.h new file mode 100644 index 0000000..20ba435 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseComImpl.h @@ -0,0 +1,66 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +namespace SGCore +{ + class SenseCom; +} + +class SENSEGLOVECOREIMPL_API FSGSenseComImpl final +{ +public: + typedef SGCore::SenseCom FSenseComType; + +public: + static bool RegisterExe(); + + static bool RegisterExe(const FString& ExePath); + + static bool GetExePath(FString& OutExePath); + + static bool ScanningActive(); + + static bool GetCurrentExeDirectory(FString& OutDirectory); + + static bool StartupSenseCom(); + +public: + FSGSenseComImpl() = delete; + virtual ~FSGSenseComImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h new file mode 100644 index 0000000..2455d8e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveImpl.h @@ -0,0 +1,290 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "Math/Quat.h" +#include "Math/Vector.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGCoreImpl/SGHapticGloveImpl.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + namespace SG + { + class SenseGlove; + } +} + +class FSGBasicHandModelImpl; +class FSGHandInterpolatorImpl; +class FSGHandPoseImpl; +class FSGSenseGloveHandProfileImpl; +class FSGSenseGloveInfoImpl; +class FSGSenseGlovePoseImpl; +class FSGSenseGloveSensorDataImpl; +class FSGSenseGloveSensorNormalizerImpl; + +class SENSEGLOVECOREIMPL_API FSGSenseGloveImpl final : public FSGHapticGloveImpl +{ +#if ENGINE_MAJOR_VERSION >= 5 + friend class SharedPointerInternals::TIntrusiveReferenceController; +#else + friend class SharedPointerInternals::TIntrusiveReferenceController; +#endif /* ENGINE_MAJOR_VERSION >= 5 */ + +public: + typedef SGCore::SG::SenseGlove FSenseGloveType; + + typedef std::vector FSenseGloveVectorType; + + typedef std::shared_ptr FSenseGlovePtrType; + typedef std::vector FSenseGlovePtrVectorType; + +public: + static TSharedRef Parse(const FString& ConstantsString); + + static TArray GetSenseGloves(); + + static bool GetSenseGlove(FSGSenseGloveImpl& OutGlove); + + static bool GetSenseGlove(bool bRightHanded, FSGSenseGloveImpl& OutGlove); + +public: + static void CalculateGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + bool bRightHanded, ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + static void CalculateWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + bool bRightHanded, ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation); + +public: + static ANSICHAR GetHapticsByte(); + + static ANSICHAR GetThumperByte(); + + static const FVector& GetDefaultThimbleOffset(); + +public: + static FSGSenseGlovePoseImpl CalculateGlovePose(const FSGSenseGloveSensorDataImpl& SensorData, + const FSGSenseGloveInfoImpl& GloveModel); + + static FSGSenseGlovePoseImpl CalculateGlovePose(const TArray>& GloveAngles, + const FSGSenseGloveInfoImpl& GloveModel); + + static void NormalizeValues(const TArray& SumAngles, + const FSGSenseGloveSensorNormalizerImpl& Normalizer, + TArray& OutFlexions, TArray& OutAbductions); + +public: + static void CalculateHandAngles( + const FSGSenseGlovePoseImpl& GlovePose, const FSGSenseGloveSensorNormalizerImpl& Normalizer, + const FSGHandInterpolatorImpl& NormalizedToAngles, + TArray>& OutHandAngles); + + static void CalculateHandPose(const FSGSenseGlovePoseImpl& GlovePose, const FSGBasicHandModelImpl& HandModel, + const FSGSenseGloveSensorNormalizerImpl& Normalizer, + const FSGHandInterpolatorImpl& NormalizedToAngles, FSGHandPoseImpl& OutHandPose); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSenseGloveImpl(); + + explicit FSGSenseGloveImpl(const FSGSenseGloveInfoImpl& Model); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGSenseGloveImpl(const FSenseGloveType SenseGlove); + + /** + * The cast from underlying pointer type constructor. + */ + explicit FSGSenseGloveImpl(const FSenseGlovePtrType SenseGlove); + +public: + /** + * The copy constructor. + */ + FSGSenseGloveImpl(const FSGSenseGloveImpl& Rhs); + + /** + * The move constructor. + */ + FSGSenseGloveImpl(FSGSenseGloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGSenseGloveImpl() override; + +public: + /** + * The copy assignment operator. + */ + FSGSenseGloveImpl& operator=(const FSGSenseGloveImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGSenseGloveImpl& operator=(FSGSenseGloveImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FSenseGloveType& ToSenseGlove() const; + + /** + * The cast to underlying pointer type method. + */ + FSenseGlovePtrType ToSenseGlovePtr() const; + + /** + * The checked cast to underlying pointer type method. + */ + FSenseGlovePtrType ToSenseGlovePtrChecked() const; + +public: + virtual ESGDeviceType GetDeviceType() const override; + + virtual FString GetDeviceId() const override; + + virtual FString GetHardwareVersion() const override; + + virtual int32 GetFirmwareVersion() const override; + + virtual int32 GetSubFirmwareVersion() const override; + +public: + virtual bool IsRight() const override; + + virtual bool GetImuRotation(FQuat& OutImu) override; + + virtual bool GetHandPose(const FSGBasicHandModelImpl& HandGeometry, FSGHandPoseImpl& OutHandPose) const override; + + virtual bool GetHandAngles(TArray>& OutHandAngles) const override; + +public: + virtual ESGHapticGloveCalibrationState GetCalibrationState() const override; + + virtual void EndCalibration() override; + + virtual void ResetCalibration() override; + +public: + virtual void StopHaptics() override; + + virtual void StopVibrations() override; + + virtual bool SendHaptics() override; + +public: + virtual bool QueueForceFeedbackLevels(const TArray& Levels01) override; + + virtual bool QueueForceFeedbackLevel(int32 Finger, float Level01) override; + + virtual bool QueueVibroLevels(const TArray& Amplitudes) override; + + virtual bool QueueVibroLevel(ESGHapticLocation Location, float Level01) override; + +public: + virtual void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const override; + + void GetGloveLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) const; + + virtual void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) const override; + + void GetWristLocation(const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) const; + +public: + FSGSenseGloveInfoImpl GetGloveInfo() const; + + TArray GetFingerThimbleOffsets() const; + + void SetFingerThimbleOffset(int32 Finger, const FVector& Offset); + + bool SupportsWristActuator() const; + +public: + bool GetSensorData(FSGSenseGloveSensorDataImpl& OutSensorData) const; + + bool GetGlovePose(FSGSenseGlovePoseImpl& OutGlovePose) const; + + bool GetGlovePose(const FSGSenseGloveSensorDataImpl& SensorData, FSGSenseGlovePoseImpl& OutGlovePose) const; + +public: + virtual bool QueueVibroLevel(int32 Finger, float Amplitude); + + virtual bool QueueThumperCommand(ESGSenseGloveThumperCommand Command); + +public: + virtual FString ToString() const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveInfoImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveInfoImpl.h new file mode 100644 index 0000000..939cc13 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveInfoImpl.h @@ -0,0 +1,168 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + namespace SG + { + class SenseGloveInfo; + } +} + +class SENSEGLOVECOREIMPL_API FSGSenseGloveInfoImpl final +{ +public: + typedef SGCore::SG::SenseGloveInfo FSenseGloveInfoType; + +public: + static bool Parse(const FString& ConstantsString, FSGSenseGloveInfoImpl& OutGloveInfo, + bool bUpdateOldModels = true); + + static FSGSenseGloveInfoImpl Deserialize(const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSenseGloveInfoImpl(); + + FSGSenseGloveInfoImpl(const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, + const FQuat& ImuCorrection, + const TArray& StartPositions, + const TArray& StartRotations, + const TArray>& GloveLengths, + const TArray& Functions); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGSenseGloveInfoImpl(const FSenseGloveInfoType& GloveInfo); + +public: + /** + * The copy constructor. + */ + FSGSenseGloveInfoImpl(const FSGSenseGloveInfoImpl& Rhs); + + /** + * The move constructor. + */ + FSGSenseGloveInfoImpl(FSGSenseGloveInfoImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGSenseGloveInfoImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGSenseGloveInfoImpl& operator=(const FSGSenseGloveInfoImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGSenseGloveInfoImpl& operator=(FSGSenseGloveInfoImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FSenseGloveInfoType& ToSenseGloveInfo() const; + +public: + FString GetDeviceId() const; + + FString GetHardwareVersion() const; + + int32 GetFirmwareVersion() const; + + int32 GetSubFirmwareVersion() const; + + bool IsRight() const; + + int32 GetNumberOfSensors() const; + + FQuat GetImuCorrection() const; + + TArray GetStartPositions() const; + + TArray GetStartRotations() const; + + TArray> GetGloveLengths() const; + + TArray GetFunctions() const; + +public: + FVector GetStartPosition(ESGFinger Finger) const; + + FQuat GetStartRotation(ESGFinger Finger) const; + + TArray GetGloveLengths(ESGFinger Finger) const; + +public: + TArray> ToGloveAngles(const TArray>& SensorAngles) const; + + bool Equals(const FSGSenseGloveInfoImpl& SGSenseGloveInfo, bool bGeometryOnly = false) const; + +public: + FString ToString(bool bShortNotation) const; + + FString ToString() const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGlovePoseImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGlovePoseImpl.h new file mode 100644 index 0000000..b31ac12 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGlovePoseImpl.h @@ -0,0 +1,148 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Vector.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace SG + { + class SenseGlovePose; + } +} + +class FSGSenseGloveHandProfileImpl; +class FSGSenseGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGSenseGlovePoseImpl final +{ +public: + typedef SGCore::SG::SenseGlovePose FSenseGlovePoseType; + +public: + static FSGSenseGlovePoseImpl IdlePose(const FSGSenseGloveInfoImpl& GloveInfo); + + static FSGSenseGlovePoseImpl Deserialize(const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSenseGlovePoseImpl(); + + FSGSenseGlovePoseImpl(bool bRightHanded, + const TArray>& JointPositions, + const TArray>& JointRotations, + const TArray>& GloveAngles); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGSenseGlovePoseImpl(const FSenseGlovePoseType& SenseGlovePose); + +public: + /** + * The copy constructor. + */ + FSGSenseGlovePoseImpl(const FSGSenseGlovePoseImpl& Rhs); + + /** + * The move constructor. + */ + FSGSenseGlovePoseImpl(FSGSenseGlovePoseImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGSenseGlovePoseImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGSenseGlovePoseImpl& operator=(const FSGSenseGlovePoseImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGSenseGlovePoseImpl& operator=(FSGSenseGlovePoseImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FSenseGlovePoseType& ToSenseGlovePose() const; + +public: + bool IsRight() const; + + TArray> GetJointPositions() const; + + TArray> GetJointRotations() const; + + TArray> GetGloveAngles() const; + +public: + TArray GetThimblePositions() const; + + TArray GetThimbleRotations() const; + + TArray GetTotalGloveAngles() const; + + TArray CalculateFingertips(const TArray& FingerOffsets) const; + + bool Equals(const FSGSenseGlovePoseImpl& SenseGlovePoseImpl) const; + +public: + FString ToString(bool bShortFormat = true) const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveSensorDataImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveSensorDataImpl.h new file mode 100644 index 0000000..88a6c33 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveSensorDataImpl.h @@ -0,0 +1,144 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" +#include "SGTypes/SGCoreTypes.h" + +namespace SGCore +{ + namespace SG + { + class SenseGloveSensorData; + } +} + +class FSGSenseGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGSenseGloveSensorDataImpl final +{ +public: + typedef SGCore::SG::SenseGloveSensorData FSenseGloveSensorDataType; + +public: + static const FSGSenseGloveSensorDataImpl& Empty(); + + static FSGSenseGloveSensorDataImpl Parse(const FString& RawData, const FSGSenseGloveInfoImpl& GloveInfo); + + static FSGSenseGloveSensorDataImpl Deserialize(const FString& SerializedString); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSenseGloveSensorDataImpl(); + + FSGSenseGloveSensorDataImpl(const TArray>& SensorAngles, const FQuat& ImuRotation, + int32 ParsedValues, bool bImuParsed); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGSenseGloveSensorDataImpl(const FSenseGloveSensorDataType& SenseGloveSensorData); + +public: + /** + * The copy constructor. + */ + FSGSenseGloveSensorDataImpl(const FSGSenseGloveSensorDataImpl& Rhs); + + /** + * The move constructor. + */ + FSGSenseGloveSensorDataImpl(FSGSenseGloveSensorDataImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGSenseGloveSensorDataImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGSenseGloveSensorDataImpl& operator=(const FSGSenseGloveSensorDataImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGSenseGloveSensorDataImpl& operator=(FSGSenseGloveSensorDataImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FSenseGloveSensorDataType& ToSenseGloveSensorData() const; + +public: + TArray> GetSensorAngles() const; + + TArray GetSensorAngles(ESGFinger Finger) const; + + TArray GetAngleSequence() const; + + FQuat GetImuRotation() const; + + int32 GetParsedValues() const; + +public: + bool IsImuParsed() const; + +public: + bool Equals(const FSGSenseGloveSensorDataImpl& SenseGloveSensorDataImpl) const; + +public: + FString ToString() const; + + FString Serialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h new file mode 100644 index 0000000..01ac6d8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h @@ -0,0 +1,117 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace SG + { + class SenseGloveSensorNormalizer; + } +} + +class FSGSenseGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGSenseGloveSensorNormalizerImpl final +{ +public: + typedef SGCore::SG::SenseGloveSensorNormalizer FSenseGloveSensorNormalizerType; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSenseGloveSensorNormalizerImpl(); + + explicit FSGSenseGloveSensorNormalizerImpl(bool bRightHanded); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGSenseGloveSensorNormalizerImpl(const FSenseGloveSensorNormalizerType& SenseGloveSensorNormalizer); + +public: + /** + * The copy constructor. + */ + FSGSenseGloveSensorNormalizerImpl(const FSGSenseGloveSensorNormalizerImpl& Rhs); + + /** + * The move constructor. + */ + FSGSenseGloveSensorNormalizerImpl(FSGSenseGloveSensorNormalizerImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGSenseGloveSensorNormalizerImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGSenseGloveSensorNormalizerImpl& operator=(const FSGSenseGloveSensorNormalizerImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGSenseGloveSensorNormalizerImpl& operator=(FSGSenseGloveSensorNormalizerImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FSenseGloveSensorNormalizerType& ToSenseGloveSensorNormalizer() const; + +public: + float NormalizeFlexion(int32 Finger, float SumFlexionAngles) const; + + float NormalizeAbduction(int32 Finger, float SumAbductionAngles) const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveVarsImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveVarsImpl.h new file mode 100644 index 0000000..730e7dc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSenseGloveVarsImpl.h @@ -0,0 +1,85 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" + +class FSGSenseGloveInfoImpl; + +namespace SGCore +{ + namespace SG + { + class SenseGloveVars; + } +} + +class SENSEGLOVECOREIMPL_API FSGSenseGloveVarsImpl final +{ +public: + typedef SGCore::SG::SenseGloveVars FSenseGloveVarsType; + +public: + static FString GetStandardConstantsString(const FString& HardwareVersion, float FirmwareVersion, bool bRightHanded); + + static FString GetSensorString(const FString& HardwareVersion, float FirmwareVersion); + + static TArray GetStartPositions(const FString& HardwareVersion, bool bRightHanded); + + static TArray GetStartRotations(const FString& HardwareVersion, bool bRightHanded); + + static TArray> GetGloveLengths(const FString& HardwareVersion); + + static int32 GetSensors(const FString& HardwareVersion); + + static FQuat GetImuCorrection(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + static TArray GetFunctions(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + static FSGSenseGloveInfoImpl GenerateGloveModel(const FString& HardwareVersion, int32 FirmwareVersion, + int32 SubFirmwareVersion, bool bRightHanded); + + static FSGSenseGloveInfoImpl GenerateGloveModel(const FString& HardwareVersion, int32 FirmwareVersion, + int32 SubFirmwareVersion, bool bRightHanded, + const FString& CustomId); + +public: + FSGSenseGloveVarsImpl() = delete; + virtual ~FSGSenseGloveVarsImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSensorNormalizationImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSensorNormalizationImpl.h new file mode 100644 index 0000000..a05a0ef --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGSensorNormalizationImpl.h @@ -0,0 +1,142 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace Util + { + class SensorNormalization; + } +} + +class FSGSenseGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGSensorNormalizationImpl final +{ +public: + typedef SGCore::Util::SensorNormalization FSensorNormalizationType; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSensorNormalizationImpl(); + + explicit FSGSensorNormalizationImpl(const TArray& MovementRanges); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGSensorNormalizationImpl(const FSensorNormalizationType& SensorNormalization); + +public: + /** + * The copy constructor. + */ + FSGSensorNormalizationImpl(const FSGSensorNormalizationImpl& Rhs); + + /** + * The move constructor. + */ + FSGSensorNormalizationImpl(FSGSensorNormalizationImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGSensorNormalizationImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGSensorNormalizationImpl& operator=(const FSGSensorNormalizationImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGSensorNormalizationImpl& operator=(FSGSensorNormalizationImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FSensorNormalizationType& ToSensorNormalization() const; + + /** + * The cast to underlying type method. + */ + FSensorNormalizationType& ToSensorNormalization(); + +public: + bool CollectsNormalization() const; + + void SetCollectNormalization(bool bCollectNormalization); + +public: + int32 GetLength() const; + + int32 GetMoveCount() const; + + bool AllSensorsMoving() const; + + void ResetNormalization(); + + void UpdateNormalization(float Value, int32 Index); + + float NormalizeValue(float Value, int32 Index); + + TArray NormalizeValues(const TArray& Values); + + bool MovedEnough(int32 Index) const; + + float Denormalize(float Value01, int32 Index, float FallbackValue = 1.0f) const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGThresholdCommandImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGThresholdCommandImpl.h new file mode 100644 index 0000000..de30db9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGThresholdCommandImpl.h @@ -0,0 +1,141 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +namespace SGCore +{ + namespace Haptics + { + class ThresholdCommand; + } +} + +class FSGSenseGloveInfoImpl; + +class SENSEGLOVECOREIMPL_API FSGThresholdCommandImpl final +{ +public: + typedef SGCore::Haptics::ThresholdCommand FThresholdCommandType; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGThresholdCommandImpl(); + FSGThresholdCommandImpl(const TArray& AffectedFingers, const TArray& ThresholdValues); + +public: + /** + * The cast from underlying type constructor. + */ + explicit FSGThresholdCommandImpl(const FThresholdCommandType& ThresholdCommand); + +public: + /** + * The copy constructor. + */ + FSGThresholdCommandImpl(const FSGThresholdCommandImpl& Rhs); + + /** + * The move constructor. + */ + FSGThresholdCommandImpl(FSGThresholdCommandImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGThresholdCommandImpl(); + +public: + /** + * The copy assignment operator. + */ + FSGThresholdCommandImpl& operator=(const FSGThresholdCommandImpl& Rhs); + + /** + * The move assignment operator. + */ + FSGThresholdCommandImpl& operator=(FSGThresholdCommandImpl&& Rhs) SG_NOEXCEPT; + +public: + /** + * The cast to underlying type method. + */ + const FThresholdCommandType& ToThresholdCommand() const; + + /** + * The cast to underlying type method. + */ + FThresholdCommandType& ToThresholdCommand(); + +public: + float GetThreshold(int32 Finger) const; + + void SetThreshold(int32 Finger, float ThresholdValue); + + TArray GetThresholds() const; + + void SetThresholds(const TArray& AffectedFingers, const TArray& ThresholdValues); + + bool GetFingerActive(int32 Finger) const; + + TArray GetActiveFingers() const; + + void ClearThreshold(int32 Finger); + + void ClearThresholds(); + +public: + bool Equals(const FSGThresholdCommandImpl& ThresholdCommand) const; + +public: + FString ToString() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGTrackingImpl.h b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGTrackingImpl.h new file mode 100644 index 0000000..3847ce0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/Public/SGCoreImpl/SGTrackingImpl.h @@ -0,0 +1,168 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "Math/Quat.h" +#include "Math/Vector.h" + +#include "SGBuildHacks/SGInclude_Core_Tracking.h" +#include "SGTypes/SGCoreTypes.h" + +class SENSEGLOVECOREIMPL_API FSGTrackingImpl +{ +public: + typedef SGCore::Tracking FTrackingType; + +public: + static void CalculateLocation( + const FVector& TrackedPosition, const FQuat& TrackedRotation, + const FVector& PositionOffset, const FQuat& RotationOffset, + FVector& OutNewPosition, FQuat& OutNewRotation); + + static const TArray& GetSenseGloveFingerToGlovePositionOrigin(); + + static const TArray& GetSenseGloveFingerToGloveRotationOrigin(); + + static const FVector& GetSenseGloveWristPositionOffset(); + + static const FQuat& GetSenseGloveWristRotationOffset(); + + static void GetSenseGloveMountOffset(bool bRightHanded, ESGFinger ToFinger, + FVector& OutIPosition, FQuat& OutIRotation); + + static void GetSenseGloveTrackerMountOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + static const FVector& GetSenseGloveViveToAttachPosition(); + static const FQuat& GetSenseGloveViveToAttachRotation(); + + static const FVector& GetSenseGloveOculusTouchToAttachPosition(); + static const FQuat& GetSenseGloveOculusTouchToAttachRotation(); + + static const FVector& GetNovaToWristPositionOffset(); + static const FQuat& GetNovaToWristRotationOffset(); + + static const FVector& GetRightNovaViveToAttachPosition(); + static const FQuat& GetRightNovaViveToAttachRotation(); + + static const FVector& GetLeftNovaViveToAttachPosition(); + static const FQuat& GetLeftNovaViveToAttachRotation(); + + static const FVector& GetRightNovaQuest2ToAttachPosition(); + static const FQuat& GetRightNovaQuest2ToAttachRotation(); + + static const FVector& GetLeftNovaQuest2ToAttachPosition(); + static const FQuat& GetLeftNovaQuest2ToAttachRotation(); + + static const FVector& GetRightNovaPico2ToAttachPosition(); + static const FQuat& GetRightNovaPico2ToAttachRotation(); + + static const FQuat& GetLeftNovaPico2ToAttachRotation(); + + static const FVector& GetRightNovaQuestProToAttachPosition(); + static const FQuat& GetRightNovaQuestProToAttachRotation(); + + static const FVector& GetLeftNovaQuestProToAttachPosition(); + static const FQuat& GetLeftNovaQuestProToAttachRotation(); + + static const FVector& GetRightNovaViveFocus3ToAttachPosition(); + static const FQuat& GetRightNovaViveFocus3ToAttachRotation(); + + static const FVector& GetLeftNovaViveFocus3ToAttachPosition(); + static const FQuat& GetLeftNovaViveFocus3ToAttachRotation(); + + static const FVector& GetRightNovaQuest3ToAttachPosition(); + static const FQuat& GetRightNovaQuest3ToAttachRotation(); + + static const FVector& GetLeftNovaQuest3ToAttachPosition(); + static const FQuat& GetLeftNovaQuest3ToAttachRotation(); + + static void GetNovaGloveWristOffset(bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset); + + static void GetNovaGloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + static const FVector& GetRightNova2ToWristPositionOffset(); + static const FQuat& GetRightNova2ToWristRotationOffset(); + + static const FVector& GetLeftNova2ToWristPositionOffset(); + static const FQuat& GetLeftNova2ToWristRotationOffset(); + + static const FVector& GetRightNova2Quest2ToAttachPosition(); + static const FQuat& GetRightNova2Quest2ToAttachRotation(); + + static const FVector& GetLeftNova2Quest2ToAttachPosition(); + static const FQuat& GetLeftNova2Quest2ToAttachRotation(); + + static const FVector& GetRightNova2QuestProToAttachPosition(); + static const FQuat& GetRightNova2QuestProToAttachRotation(); + + static const FVector& GetLeftNova2QuestProToAttachPosition(); + static const FQuat& GetLeftNova2QuestProToAttachRotation(); + + static const FVector& GetRightNova2ViveTrackerToAttachPosition(); + static const FQuat& GetRightNova2ViveTrackerToAttachRotation(); + + static const FVector& GetLeftNova2ViveTrackerToAttachPosition(); + static const FQuat& GetLeftNova2ViveTrackerToAttachRotation(); + + static const FVector& GetRightNova2ViveWristTrackerToAttachPosition(); + static const FQuat& GetRightNova2ViveWristTrackerToAttachRotation(); + + static const FVector& GetRightNova2Quest3ToAttachPosition(); + static const FQuat& GetRightNova2Quest3ToAttachRotation(); + + static const FVector& GetLeftNova2Quest3ToAttachPosition(); + static const FQuat& GetLeftNova2Quest3ToAttachRotation(); + + static const FVector& GetLeftNova2ViveWristTrackerToAttachPosition(); + static const FQuat& GetLeftNova2ViveWristTrackerToAttachRotation(); + + static void GetNova2GloveWristOffset(bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + static void GetNova2GloveTrackerOffset(ESGPositionalTrackingHardware Hardware, bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, + FQuat& OutRotationOffset); + + static FString ToString(ESGPositionalTrackingHardware Hardware); + +public: + FSGTrackingImpl() = delete; + virtual ~FSGTrackingImpl() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs new file mode 100644 index 0000000..6f87f2a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreImpl/SenseGloveCoreImpl.Build.cs @@ -0,0 +1,89 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveCoreImpl : ModuleRules +{ + public SenseGloveCoreImpl(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + bEnableExceptions = false; + bUseRTTI = false; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SGCommonThirdPartyLibs", + "SGCoreShmThirdPartyLibs", + "SGCoreThirdPartyLibs", + "SGLogThirdPartyLibs", + "SGFmtThirdPartyLibs", + "SGLoguruThirdPartyLibs", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveTypes", + "SenseGloveUtils", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + "SenseGloveInterop", + } + ); + + PublicDefinitions.Add("SENSEGLOVE_BUILDING_CORE_IMPL_MODULE"); + PublicDefinitions.Add("SENSEGLOVE_UNREAL_ENGINE_PLUGIN"); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGAnatomyKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGAnatomyKismetLibrary.cpp new file mode 100644 index 0000000..59593d7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGAnatomyKismetLibrary.cpp @@ -0,0 +1,107 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGAnatomyKismetLibrary.h" + +#include "SGCore/SGAnatomy.h" +#include "SGUtils/SGArrayUtils.h" + +float USGAnatomyKismetLibrary::GetTotalFingerFlexion() +{ + return FSGAnatomy::GetTotalFingerFlexion(); +} + +float USGAnatomyKismetLibrary::GetTotalFingerExtension() +{ + return FSGAnatomy::GetTotalFingerExtension(); +} + +float USGAnatomyKismetLibrary::GetTotalThumbFlexion() +{ + return FSGAnatomy::GetTotalThumbFlexion(); +} + +float USGAnatomyKismetLibrary::GetTotalThumbExtension() +{ + return FSGAnatomy::GetTotalThumbExtension(); +} + +float USGAnatomyKismetLibrary::GetFingerJointLimit(const bool bRightHanded, const int32 Joint, const int32 Movement, + const bool bMax) +{ + return FSGAnatomy::GetFingerJointLimit(bRightHanded, Joint, Movement, bMax); +} + +float USGAnatomyKismetLibrary::GetThumbJointLimit(const bool bRightHanded, const int32 Joint, const int32 Movement, + const bool bMax) +{ + return FSGAnatomy::GetThumbJointLimit(bRightHanded, Joint, Movement, bMax); +} + +float USGAnatomyKismetLibrary::ClampJointAngle( + const float Value, const int32 Finger, const bool bRightHand, const int32 Joint, const int32 Movement) +{ + return FSGAnatomy::ClampJointAngle(Value, Finger, bRightHand, Joint, Movement); +} + +float USGAnatomyKismetLibrary::NormalizeFingerFlexion(const float FlexionInDegrees) +{ + return FSGAnatomy::NormalizeFingerFlexion(FlexionInDegrees); +} + +float USGAnatomyKismetLibrary::NormalizeThumbFlexion(const float FlexionInDegrees) +{ + return FSGAnatomy::NormalizeThumbFlexion(FlexionInDegrees); +} + +TArray USGAnatomyKismetLibrary::GetDefaultHandAngles(const bool bRightHanded) +{ + return FSGArrayUtils::ToNestedBPArray(FSGAnatomy::GetDefaultHandAngles(bRightHanded)); +} + +TArray USGAnatomyKismetLibrary::GetFlatHandAngles(const bool bRightHanded) +{ + return FSGArrayUtils::ToNestedBPArray(FSGAnatomy::GetFlatHandAngles(bRightHanded)); +} + +TArray USGAnatomyKismetLibrary::GetThumbsUpHandAngles(const bool bRightHanded) +{ + return FSGArrayUtils::ToNestedBPArray(FSGAnatomy::GetThumbsUpHandAngles(bRightHanded)); +} + +TArray USGAnatomyKismetLibrary::GetFistHandAngles(const bool bRightHanded) +{ + return FSGArrayUtils::ToNestedBPArray(FSGAnatomy::GetFistHandAngles(bRightHanded)); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGBasicHandModelKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGBasicHandModelKismetLibrary.cpp new file mode 100644 index 0000000..b5b3d26 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGBasicHandModelKismetLibrary.cpp @@ -0,0 +1,237 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGBasicHandModelKismetLibrary.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGUtils/SGArrayUtils.h" + +USGBasicHandModel* USGBasicHandModelKismetLibrary::MakeBasicHandModel(UObject* WorldContextObject) +{ + return USGBasicHandModel::NewBasicHandModel(WorldContextObject); +} + +USGBasicHandModel* USGBasicHandModelKismetLibrary::MakeBasicHandModel_bRH_L_SP( + UObject* WorldContextObject, + const bool bRightHanded, const TArray& Lengths, const TArray& StartPositions) +{ + return USGBasicHandModel::NewBasicHandModel(WorldContextObject, bRightHanded, Lengths, StartPositions); +} + +USGBasicHandModel* USGBasicHandModelKismetLibrary::MakeBasicHandModel_bRH_L_SP_TArrayFQuat_SR( + UObject* WorldContextObject, + const bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations) +{ + return USGBasicHandModel::NewBasicHandModel(WorldContextObject, bRightHanded, Lengths, + StartPositions, StartRotations); +} + +USGBasicHandModel* USGBasicHandModelKismetLibrary::MakeBasicHandModel_bRH_L_SP_TArrayFRotator_SR( + UObject* WorldContextObject, + const bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations) +{ + return USGBasicHandModel::NewBasicHandModel(WorldContextObject, bRightHanded, Lengths, + StartPositions, StartRotations); +} + +USGBasicHandModel* USGBasicHandModelKismetLibrary::Default(UObject* WorldContextObject, const bool bRightHanded) +{ + return USGBasicHandModel::Default(WorldContextObject, bRightHanded); +} + +USGBasicHandModel* USGBasicHandModelKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGBasicHandModel::Deserialize(WorldContextObject, SerializedString); +} + +TArray USGBasicHandModelKismetLibrary::GetBaseFingerLengths() +{ + return FSGArrayUtils::ToNestedBPArray(USGBasicHandModel::GetBaseFingerLengths()); +} + +TArray USGBasicHandModelKismetLibrary::GetBaseJointPositions() +{ + return USGBasicHandModel::GetBaseJointPositions(); +} + +TArray USGBasicHandModelKismetLibrary::GetBaseJointAngles() +{ + return USGBasicHandModel::GetBaseJointAngles(); +} + +bool USGBasicHandModelKismetLibrary::IsRight(const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->IsRight(); +} + +TArray USGBasicHandModelKismetLibrary::GetFingerLengths(const USGBasicHandModel* BasicHandModel) +{ + return FSGArrayUtils::ToNestedBPArray(BasicHandModel->GetFingerLengths()); +} + +TArray USGBasicHandModelKismetLibrary::GetFingerLengths_F(const USGBasicHandModel* BasicHandModel, + const ESGFinger Finger) +{ + return BasicHandModel->GetFingerLengths(Finger); +} + +void USGBasicHandModelKismetLibrary::SetFingerLengths_ESGFinger_F_L(USGBasicHandModel* BasicHandModel, + const ESGFinger Finger, + const TArray& Lengths) +{ + BasicHandModel->SetFingerLengths(Finger, Lengths); +} + +void USGBasicHandModelKismetLibrary::SetFingerLengths_uint8_F_L(USGBasicHandModel* BasicHandModel, + const uint8 Finger, const TArray& Lengths) +{ + BasicHandModel->SetFingerLengths(Finger, Lengths); +} + +TArray USGBasicHandModelKismetLibrary::GetFingerRatios(const USGBasicHandModel* BasicHandModel) const +{ + return FSGArrayUtils::ToNestedBPArray(BasicHandModel->GetFingerRatios()); +} + +TArray USGBasicHandModelKismetLibrary::GetFingerRatios_F(const USGBasicHandModel* BasicHandModel, + const ESGFinger Finger) +{ + return BasicHandModel->GetFingerRatios(Finger); +} + +TArray USGBasicHandModelKismetLibrary::GetStartJointPositions(const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->GetStartJointPositions(); +} + +void USGBasicHandModelKismetLibrary::SetStartJointPosition_ESGFinger_F_P(USGBasicHandModel* BasicHandModel, + const ESGFinger Finger, + const FVector& Position) +{ + BasicHandModel->SetStartJointPosition(Finger, Position); +} + +void USGBasicHandModelKismetLibrary::SetStartJointPosition_uint8_F_P(USGBasicHandModel* BasicHandModel, + const uint8 Finger, const FVector& Position) +{ + BasicHandModel->SetStartJointPosition(Finger, Position); +} + +TArray USGBasicHandModelKismetLibrary::GetStartJointRotations_TArrayFQuat( + const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->GetStartJointRotationsQ(); +} + +TArray USGBasicHandModelKismetLibrary::GetStartJointRotations_TArrayFRotator( + const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->GetStartJointRotations(); +} + +FVector USGBasicHandModelKismetLibrary::GetJointPosition(const USGBasicHandModel* BasicHandModel, + const ESGFinger Finger) +{ + return BasicHandModel->GetJointPosition(Finger); +} + +void USGBasicHandModelKismetLibrary::SetJointPosition(USGBasicHandModel* BasicHandModel, const FVector& NewPosition, + const ESGFinger Finger) +{ + return BasicHandModel->SetJointPosition(NewPosition, Finger); +} + +FQuat USGBasicHandModelKismetLibrary::GetJointRotation_FQuat(const USGBasicHandModel* BasicHandModel, + const ESGFinger Finger) +{ + return BasicHandModel->GetJointRotationQ(Finger); +} + +FRotator USGBasicHandModelKismetLibrary::GetJointRotation_FRotator(const USGBasicHandModel* BasicHandModel, + const ESGFinger Finger) +{ + return BasicHandModel->GetJointRotation(Finger); +} + +void USGBasicHandModelKismetLibrary::SetJointRotation_FQuat_NR_F(USGBasicHandModel* BasicHandModel, + const FQuat& NewRotation, const ESGFinger Finger) +{ + return BasicHandModel->SetJointRotation(NewRotation, Finger); +} + +void USGBasicHandModelKismetLibrary::SetJointRotation_FRotator_NR_F(USGBasicHandModel* BasicHandModel, + const FRotator& NewRotation, const ESGFinger Finger) +{ + return BasicHandModel->SetJointRotation(NewRotation, Finger); +} + +TArray USGBasicHandModelKismetLibrary::GetTotalLengths(const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->GetTotalLengths(); +} + +float USGBasicHandModelKismetLibrary::GetTotalLength(const USGBasicHandModel* BasicHandModel, const ESGFinger Finger) +{ + return BasicHandModel->GetTotalLength(Finger); +} + +TArray USGBasicHandModelKismetLibrary::Get3DLengths(const USGBasicHandModel* BasicHandModel, + const ESGFinger Finger) +{ + return BasicHandModel->Get3DLengths(Finger); +} + +bool USGBasicHandModelKismetLibrary::Equals(const USGBasicHandModel* A, const USGBasicHandModel* B) +{ + return A->Equals(B); +} + +FString USGBasicHandModelKismetLibrary::ToString(const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->ToString(); +} + +FString USGBasicHandModelKismetLibrary::ToString_bLO(const USGBasicHandModel* BasicHandModel, const bool bLengthsOnly) +{ + return BasicHandModel->ToString(bLengthsOnly); +} + +FString USGBasicHandModelKismetLibrary::SGSerialize(const USGBasicHandModel* BasicHandModel) +{ + return BasicHandModel->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGBetaDeviceKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGBetaDeviceKismetLibrary.cpp new file mode 100644 index 0000000..c0c16f6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGBetaDeviceKismetLibrary.cpp @@ -0,0 +1,93 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGBetaDeviceKismetLibrary.h" + +#include "SGCore/SGBetaDevice.h" + +USGBetaDevice* USGBetaDeviceKismetLibrary::Parse(UObject* WorldContextObject, const FString& String) +{ + return USGBetaDevice::Parse(WorldContextObject, String); +} + +ESGDeviceType USGBetaDeviceKismetLibrary::GetDeviceType(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetDeviceType(); +} + +FString USGBetaDeviceKismetLibrary::GetDeviceId(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetDeviceId(); +} + +FString USGBetaDeviceKismetLibrary::GetHardwareVersion(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetHardwareVersion(); +} + +int32 USGBetaDeviceKismetLibrary::GetFirmwareVersion(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetFirmwareVersion(); +} + +int32 USGBetaDeviceKismetLibrary::GetSubFirmwareVersion(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetSubFirmwareVersion(); +} + +FString USGBetaDeviceKismetLibrary::GetConstantsString(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetConstantsString(); +} + +FString USGBetaDeviceKismetLibrary::GetSensorData(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetSensorData(); +} + +FString USGBetaDeviceKismetLibrary::GetLastCommand(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->GetLastCommand(); +} + +bool USGBetaDeviceKismetLibrary::SendHaptics(const USGBetaDevice* BetaDevice, const FString& Command) +{ + return BetaDevice->SendHaptics(Command); +} + +FString USGBetaDeviceKismetLibrary::ToString(const USGBetaDevice* BetaDevice) +{ + return BetaDevice->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGCustomWaveformKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGCustomWaveformKismetLibrary.cpp new file mode 100644 index 0000000..a9f7beb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGCustomWaveformKismetLibrary.cpp @@ -0,0 +1,195 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGCustomWaveformKismetLibrary.h" + +#include "SGCore/SGCustomWaveform.h" + +USGCustomWaveform* USGCustomWaveformKismetLibrary::MakeCustomWaveform(UObject* WorldContextObject) +{ + return USGCustomWaveform::NewCustomWaveform(WorldContextObject); +} + +USGCustomWaveform* USGCustomWaveformKismetLibrary::MakeCustomWaveform_A_D( + UObject* WorldContextObject, const float Amplitude, const float Duration) +{ + return USGCustomWaveform::NewCustomWaveform(WorldContextObject, Amplitude, Duration); +} + +USGCustomWaveform* USGCustomWaveformKismetLibrary::MakeCustomWaveform_A_D_F( + UObject* WorldContextObject, const float Amplitude, const float Duration, const float Frequency) +{ + return USGCustomWaveform::NewCustomWaveform(WorldContextObject, Amplitude, Duration, Frequency); +} + +FString USGCustomWaveformKismetLibrary::ToString_T(const ESGWaveformType Type) +{ + return USGCustomWaveform::ToString(Type); +} + +float USGCustomWaveformKismetLibrary::GetAmplitude(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetAmplitude(); +} + +void USGCustomWaveformKismetLibrary::SetAmplitude(USGCustomWaveform* CustomWaveform, const float Amplitude) +{ + CustomWaveform->SetAmplitude(Amplitude); +} + +ESGWaveformType USGCustomWaveformKismetLibrary::GetWaveType(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetWaveType(); +} + +void USGCustomWaveformKismetLibrary::SetWaveType(USGCustomWaveform* CustomWaveform, const ESGWaveformType Type) +{ + CustomWaveform->SetWaveType(Type); +} + +bool USGCustomWaveformKismetLibrary::IsInfinite(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->IsInfinite(); +} + +void USGCustomWaveformKismetLibrary::SetInfinite(USGCustomWaveform* CustomWaveform, const bool bInfinite) +{ + CustomWaveform->SetInfinite(bInfinite); +} + +int32 USGCustomWaveformKismetLibrary::GetRepeatAmount(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetRepeatAmount(); +} + +void USGCustomWaveformKismetLibrary::SetRepeatAmount(USGCustomWaveform* CustomWaveform, const int32 Amount) +{ + CustomWaveform->SetRepeatAmount(Amount); +} + +float USGCustomWaveformKismetLibrary::GetAttackTime(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetAttackTime(); +} + +void USGCustomWaveformKismetLibrary::SetAttackTime(USGCustomWaveform* CustomWaveform, const float Time) +{ + CustomWaveform->SetAttackTime(Time); +} + +float USGCustomWaveformKismetLibrary::GetSustainTime(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetSustainTime(); +} + +void USGCustomWaveformKismetLibrary::SetSustainTime(USGCustomWaveform* CustomWaveform, const float Time) +{ + CustomWaveform->SetSustainTime(Time); +} + +float USGCustomWaveformKismetLibrary::GetDecayTime(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetDecayTime(); +} + +void USGCustomWaveformKismetLibrary::SetDecayTime(USGCustomWaveform* CustomWaveform, const float Time) +{ + CustomWaveform->SetDecayTime(Time); +} + +float USGCustomWaveformKismetLibrary::GetFrequencyStart(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetFrequencyStart(); +} + +void USGCustomWaveformKismetLibrary::SetFrequencyStart(USGCustomWaveform* CustomWaveform, const float Frequency) +{ + CustomWaveform->SetFrequencyStart(Frequency); +} + +float USGCustomWaveformKismetLibrary::GetFrequencyEnd(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetFrequencyEnd(); +} + +void USGCustomWaveformKismetLibrary::SetFrequencyEnd(USGCustomWaveform* CustomWaveform, const float Frequency) +{ + CustomWaveform->SetFrequencyEnd(Frequency); +} + +float USGCustomWaveformKismetLibrary::GetFrequencySwitchTime(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetFrequencySwitchTime(); +} + +void USGCustomWaveformKismetLibrary::SetFrequencySwitchTime(USGCustomWaveform* CustomWaveform, const float Time) +{ + CustomWaveform->SetFrequencySwitchTime(Time); +} + +float USGCustomWaveformKismetLibrary::GetFrequencySwitchFactor(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetFrequencySwitchFactor(); +} + +void USGCustomWaveformKismetLibrary::SetFrequencySwitchFactor(USGCustomWaveform* CustomWaveform, const float Time) +{ + CustomWaveform->SetFrequencySwitchFactor(Time); +} + +float USGCustomWaveformKismetLibrary::GetEffectTime(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetEffectTime(); +} + +float USGCustomWaveformKismetLibrary::GetTotalEffectTime(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->GetTotalEffectTime(); +} + +bool USGCustomWaveformKismetLibrary::FrequencyJumps(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->FrequencyJumps(); +} + +bool USGCustomWaveformKismetLibrary::Equals(const USGCustomWaveform* A, const USGCustomWaveform* B) +{ + return A->Equals(B); +} + +FString USGCustomWaveformKismetLibrary::ToString(const USGCustomWaveform* CustomWaveform) +{ + return CustomWaveform->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceKismetLibrary.cpp new file mode 100644 index 0000000..9c14052 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceKismetLibrary.cpp @@ -0,0 +1,182 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGDeviceKismetLibrary.h" + +#include "SGCore/SGDevice.h" +#include "SGCore/SGHapticChannelInfo.h" + +void USGDeviceKismetLibrary::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion) +{ + return USGDevice::ParseFirmware(RawFirmware, OutMainVersion, OutSubVersion); +} + +bool USGDeviceKismetLibrary::FirmwareNewerThan_MF_MF_RM_RS_bI(const int32 MyFirmwareMain, const int32 MyFirmwareSub, + const int32 ReferenceMain, const int32 ReferenceSub, + const bool bInclusive) +{ + return USGDevice::FirmwareNewerThan(MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive); +} + +bool USGDeviceKismetLibrary::FirmwareOlderThan_MF_MF_RM_RS_bI(const int32 MyFirmwareMain, const int32 MyFirmwareSub, + const int32 ReferenceMain, const int32 ReferenceSub, + const bool bInclusive) +{ + return USGDevice::FirmwareOlderThan(MyFirmwareMain, MyFirmwareSub, ReferenceMain, ReferenceSub, bInclusive); +} + +FString USGDeviceKismetLibrary::ToString_DT(const ESGDeviceType DeviceType) +{ + return USGDevice::ToString(DeviceType); +} + +ESGDeviceType USGDeviceKismetLibrary::GetDeviceType(const USGDevice* SGDevice) +{ + return SGDevice->GetDeviceType(); +} + +FString USGDeviceKismetLibrary::GetDeviceId(const USGDevice* SGDevice) +{ + return SGDevice->GetDeviceId(); +} + +FString USGDeviceKismetLibrary::GetHardwareVersion(const USGDevice* SGDevice) +{ + return SGDevice->GetHardwareVersion(); +} + +int32 USGDeviceKismetLibrary::GetFirmwareVersion(const USGDevice* SGDevice) +{ + return SGDevice->GetFirmwareVersion(); +} + +int32 USGDeviceKismetLibrary::GetSubFirmwareVersion(const USGDevice* SGDevice) +{ + return SGDevice->GetSubFirmwareVersion(); +} + +FString USGDeviceKismetLibrary::GetFirmwareString(const USGDevice* SGDevice) +{ + return SGDevice->GetFirmwareString(); +} + +bool USGDeviceKismetLibrary::FirmwareNewerThan_FM_FS_bI(const USGDevice* SGDevice, + const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) +{ + return SGDevice->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGDeviceKismetLibrary::FirmwareOlderThan_FM_FS_bI(const USGDevice* SGDevice, + const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) +{ + return SGDevice->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive); +} + +FString USGDeviceKismetLibrary::GetAddress(const USGDevice* SGDevice) +{ + return SGDevice->GetAddress(); +} + +bool USGDeviceKismetLibrary::IsConnected(const USGDevice* SGDevice) +{ + return SGDevice->IsConnected(); +} + +ESGConnectionType USGDeviceKismetLibrary::GetConnectionType(const USGDevice* SGDevice) +{ + return SGDevice->GetConnectionType(); +} + +int32 USGDeviceKismetLibrary::PacketsPerSecondReceived(const USGDevice* SGDevice) +{ + return SGDevice->PacketsPerSecondReceived(); +} + +int32 USGDeviceKismetLibrary::PacketsPerSecondSent(const USGDevice* SGDevice) +{ + return SGDevice->PacketsPerSecondSent(); +} + +int32 USGDeviceKismetLibrary::GetDeviceIndex(const USGDevice* SGDevice) +{ + return SGDevice->GetDeviceIndex(); +} + +void USGDeviceKismetLibrary::SetDeviceIndex(USGDevice* SGDevice, const int32 NewIndex) +{ + SGDevice->SetDeviceIndex(NewIndex); +} + +bool USGDeviceKismetLibrary::IsWireless(const USGDevice* SGDevice) +{ + return SGDevice->IsWireless(); +} + +bool USGDeviceKismetLibrary::HasBattery(const USGDevice* SGDevice) +{ + return SGDevice->HasBattery(); +} + +bool USGDeviceKismetLibrary::IsCharging(USGDevice* SGDevice) +{ + return SGDevice->IsCharging(); +} + +bool USGDeviceKismetLibrary::GetBatteryLevel(USGDevice* SGDevice, float& OutLevel) +{ + return SGDevice->GetBatteryLevel(OutLevel); +} + +void USGDeviceKismetLibrary::SetHapticChannels(USGDevice* SGDevice, const USGHapticChannelInfo* Channels) +{ + SGDevice->SetHapticChannels(Channels); +} + +int32 USGDeviceKismetLibrary::GetHapticChannelCount(const USGDevice* SGDevice) +{ + return SGDevice->GetHapticChannelCount(); +} + +int32 USGDeviceKismetLibrary::GetHapticChannelCount_CT(const USGDevice* SGDevice, ESGHapticChannelType ChannelType) +{ + return SGDevice->GetHapticChannelCount(ChannelType); +} + +FString USGDeviceKismetLibrary::ToString(const USGDevice* SGDevice) +{ + return SGDevice->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceListKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceListKismetLibrary.cpp new file mode 100644 index 0000000..a297dc3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceListKismetLibrary.cpp @@ -0,0 +1,119 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGDeviceListKismetLibrary.h" + +#include "SGCore/SGDevice.h" +#include "SGCore/SGDeviceList.h" + +int32 USGDeviceListKismetLibrary::ActiveDevices() +{ + return FSGDeviceList::ActiveDevices(); +} + +bool USGDeviceListKismetLibrary::SenseComRunning() +{ + return FSGDeviceList::SenseComRunning(); +} + +void USGDeviceListKismetLibrary::Dispose() +{ + FSGDeviceList::Dispose(); +} + +void USGDeviceListKismetLibrary::Reinitialize() +{ + FSGDeviceList::Reinitialize(); +} + +TArray USGDeviceListKismetLibrary::GetDevices(UObject* WorldContextObject) +{ + return FSGDeviceList::GetDevices(WorldContextObject); +} + +TArray USGDeviceListKismetLibrary::GetDevices_TSubclassOfUSGDevice_DT( + UObject* WorldContextObject, const TSubclassOf& DeviceType) +{ + return FSGDeviceList::GetDevices(WorldContextObject, DeviceType); +} + +TArray USGDeviceListKismetLibrary::GetDevices_ESGDeviceType_DT( + UObject* WorldContextObject, const ESGDeviceType DeviceType) +{ + return FSGDeviceList::GetDevices(WorldContextObject, DeviceType); +} + +bool USGDeviceListKismetLibrary::GetSensorDataString(const int32 IpcIndex, const FString& IpcAddress, + FString& OutString) +{ + return FSGDeviceList::GetSensorDataString(IpcIndex, IpcAddress, OutString); +} + +bool USGDeviceListKismetLibrary::SendHaptics( + const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands) +{ + return FSGDeviceList::SendHaptics(IpcIndex, IpcAddress, ChannelIndex, Commands); +} + +FString USGDeviceListKismetLibrary::GetDeviceStringAt(const int32 IpcIndex, const FString& IpcAddress, + const int32 Index) +{ + return FSGDeviceList::GetDeviceStringAt(IpcIndex, IpcAddress, Index); +} + +FString USGDeviceListKismetLibrary::GetAddress(const int32 IpcIndex, const FString& IpcAddress) +{ + return FSGDeviceList::GetAddress(IpcIndex, IpcAddress); +} + +ESGConnectionType USGDeviceListKismetLibrary::GetConnectionType(const int32 IpcIndex, const FString& IpcAddress) +{ + return FSGDeviceList::GetConnectionType(IpcIndex, IpcAddress); +} + +bool USGDeviceListKismetLibrary::IsConnected(const int32 IpcIndex, const FString& IpcAddress) +{ + return FSGDeviceList::IsConnected(IpcIndex, IpcAddress); +} + +int32 USGDeviceListKismetLibrary::PacketsPerSecondReceived(const int32 IpcIndex, const FString& IpcAddress) +{ + return FSGDeviceList::PacketsPerSecondReceived(IpcIndex, IpcAddress); +} + +int32 USGDeviceListKismetLibrary::PacketsPerSecondSent(const int32 IpcIndex, const FString& IpcAddress) +{ + return FSGDeviceList::PacketsPerSecondSent(IpcIndex, IpcAddress); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceModelKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceModelKismetLibrary.cpp new file mode 100644 index 0000000..9f416c5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGDeviceModelKismetLibrary.cpp @@ -0,0 +1,94 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGDeviceModelKismetLibrary.h" + +#include "SGCore/SGDeviceModel.h" + +USGDeviceModel* USGDeviceModelKismetLibrary::MakeDeviceModel(UObject* WorldContextObject) +{ + return USGDeviceModel::NewDeviceModel(WorldContextObject); +} + +USGDeviceModel* USGDeviceModelKismetLibrary::MakeDeviceModel_I_HV_FV_SFV( + UObject* WorldContextObject, + const FString& Id, const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + return USGDeviceModel::NewDeviceModel(WorldContextObject, Id, HardwareVersion, FirmwareVersion, SubFirmwareVersion); +} + +TArray USGDeviceModelKismetLibrary::ParseFunctions(const int32 Value, const int32 Size) +{ + return USGDeviceModel::ParseFunctions(Value, Size); +} + +void USGDeviceModelKismetLibrary::ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion) +{ + USGDeviceModel::ParseFirmware(RawFirmware, OutMainVersion, OutSubVersion); +} + +FString USGDeviceModelKismetLibrary::GetDeviceId(const USGDeviceModel* DeviceModel) +{ + return DeviceModel->GetDeviceId(); +} + +FString USGDeviceModelKismetLibrary::GetHardwareVersion(const USGDeviceModel* DeviceModel) +{ + return DeviceModel->GetHardwareVersion(); +} + +int32 USGDeviceModelKismetLibrary::GetFirmwareVersion(const USGDeviceModel* DeviceModel) +{ + return DeviceModel->GetFirmwareVersion(); +} + +int32 USGDeviceModelKismetLibrary::GetSubFirmwareVersion(const USGDeviceModel* DeviceModel) +{ + return DeviceModel->GetSubFirmwareVersion(); +} + +bool USGDeviceModelKismetLibrary::FirmwareNewerThan(const USGDeviceModel* DeviceModel, + const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) +{ + return DeviceModel->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGDeviceModelKismetLibrary::FirmwareOlderThan(const USGDeviceModel* DeviceModel, + const int32 FirmwareMain, const int32 FirmwareSub, + const bool bInclusive) +{ + return DeviceModel->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandInterpolatorKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandInterpolatorKismetLibrary.cpp new file mode 100644 index 0000000..1d574d6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandInterpolatorKismetLibrary.cpp @@ -0,0 +1,97 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGHandInterpolatorKismetLibrary.h" + +#include "SGCore/SGHandInterpolator.h" +#include "SGUtils/SGArrayUtils.h" + +USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator(UObject* WorldContextObject) +{ + return USGHandInterpolator::NewHandInterpolator(WorldContextObject); +} + +USGHandInterpolator* USGHandInterpolatorKismetLibrary::MakeHandInterpolator_bRH( + UObject* WorldContextObject, const bool bRightHanded) +{ + return USGHandInterpolator::NewHandInterpolator(WorldContextObject, bRightHanded); +} + +USGHandInterpolator* USGHandInterpolatorKismetLibrary::Deserialize( + UObject* WorldContextObject, const FString& SerializedString, const bool bRightHanded) +{ + return USGHandInterpolator::Deserialize(WorldContextObject, SerializedString, bRightHanded); +} + +float USGHandInterpolatorKismetLibrary::CalculateAngle_M_ESGFingerMovement_V_bAL( + const USGHandInterpolator* HandInterpolator, + const ESGFingerMovement Movement, const float Value, const bool bApplyLimits) +{ + return HandInterpolator->CalculateAngle(Movement, Value, bApplyLimits); +} + +float USGHandInterpolatorKismetLibrary::CalculateAngle_M_ESGFingerMovement_V_bAL( + const USGHandInterpolator* HandInterpolator, + const ESGThumbMovement Movement, const float Value, const bool bApplyLimits) +{ + return HandInterpolator->CalculateAngle(Movement, Value, bApplyLimits); +} + +TArray USGHandInterpolatorKismetLibrary::InterpolateHandAngles( + const USGHandInterpolator* HandInterpolator, + const TArray& Flexions, const TArray& Abductions, const float CmcTwist) const +{ + TArray> FlexionsNestedArray{ + FSGArrayUtils::FromNestedBPArray< + float, FSGFloatArray, &FSGFloatArray::FloatArray>(Flexions) + }; + + const TArray Angles{ + FSGArrayUtils::ToNestedBPArray( + HandInterpolator->InterpolateHandAngles(MoveTemp(FlexionsNestedArray), Abductions, CmcTwist)) + }; + + return Angles; +} + +bool USGHandInterpolatorKismetLibrary::Equals(const USGHandInterpolator* A, const USGHandInterpolator* B) +{ + return A->Equals(B); +} + +FString USGHandInterpolatorKismetLibrary::SGSerialize(const USGHandInterpolator* HandInterpolator) +{ + return HandInterpolator->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandLayerKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandLayerKismetLibrary.cpp new file mode 100644 index 0000000..9a54e13 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandLayerKismetLibrary.cpp @@ -0,0 +1,191 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGHandLayerKismetLibrary.h" + +#include "SGCore/SGCustomWaveform.h" +#include "SGCore/SGHandLayer.h" +#include "SGCore/SGHandPose.h" + +bool USGHandLayerKismetLibrary::DeviceConnected(const bool bRightHanded) +{ + return FSGHandLayer::DeviceConnected(bRightHanded); +} + +ESGDeviceType USGHandLayerKismetLibrary::GetDeviceType(const bool bRightHanded) +{ + return FSGHandLayer::GetDeviceType(bRightHanded); +} + +bool USGHandLayerKismetLibrary::GetFirstGloveHandedness() +{ + return FSGHandLayer::GetFirstGloveHandedness(); +} + +int32 USGHandLayerKismetLibrary::GlovesConnected() +{ + return FSGHandLayer::GlovesConnected(); +} + +bool USGHandLayerKismetLibrary::GetGloveInstance(UObject* WorldContextObject, + const bool bRightHanded, USGHapticGlove*& OutGlove) +{ + return FSGHandLayer::GetGloveInstance(WorldContextObject, bRightHanded, OutGlove); +} + +ESGHapticGloveCalibrationState USGHandLayerKismetLibrary::GetCalibrationState(const bool bRightHanded) +{ + return FSGHandLayer::GetCalibrationState(bRightHanded); +} + +FString USGHandLayerKismetLibrary::GetCalibrationInstructions(const bool bRightHanded) +{ + return FSGHandLayer::GetCalibrationInstructions(bRightHanded); +} + +void USGHandLayerKismetLibrary::ResetCalibration(const bool bRightHanded) +{ + FSGHandLayer::ResetCalibration(bRightHanded); +} + +void USGHandLayerKismetLibrary::EndCalibration(const bool bRightHanded) +{ + FSGHandLayer::EndCalibration(bRightHanded); +} + +bool USGHandLayerKismetLibrary::GetHandPose(UObject* WorldContextObject, + const bool bRightHanded, USGHandPose*& OutHandPose) +{ + return FSGHandLayer::GetHandPose(WorldContextObject, bRightHanded, OutHandPose); +} + +void USGHandLayerKismetLibrary::GetWristLocation_bRH_FQuat_RR_TH_OutWP_OutWR( + const bool bRightHanded, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + FSGHandLayer::GetWristLocation(bRightHanded, ReferencePosition, ReferenceRotation, TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGHandLayerKismetLibrary::GetWristLocation_bRH_RP_FRotator_RR_TH_OutWP_OutWR( + const bool bRightHanded, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + FSGHandLayer::GetWristLocation(bRightHanded, ReferencePosition, ReferenceRotation, TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGHandLayerKismetLibrary::StopAllHaptics(const bool bRightHanded) +{ + FSGHandLayer::StopAllHaptics(bRightHanded); +} + +bool USGHandLayerKismetLibrary::SendHaptics(const bool bRightHanded) +{ + return FSGHandLayer::SendHaptics(bRightHanded); +} + +bool USGHandLayerKismetLibrary::SupportsCustomWaveform(const bool bRightHanded, const ESGHapticLocation AtLocation) +{ + return FSGHandLayer::SupportsCustomWaveform(bRightHanded, AtLocation); +} + +bool USGHandLayerKismetLibrary::SendCustomWaveform( + const bool bRightHanded, USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + return FSGHandLayer::SendCustomWaveform(bRightHanded, OutWaveform, Location); +} + +bool USGHandLayerKismetLibrary::QueueCommand_ForceFeedbackLevels( + const bool bRightHanded, const TArray& Levels01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_ForceFeedbackLevels(bRightHanded, Levels01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::QueueCommand_ForceFeedbackLevel( + const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_ForceFeedbackLevel(bRightHanded, Finger, Level01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::QueueCommand_VibroLevels( + const bool bRightHanded, const TArray& Levels01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_VibroLevels(bRightHanded, Levels01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::QueueCommand_VibroLevel_bRH_F_L01_bSI( + const bool bRightHanded, const int32 Finger, const float Level01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_VibroLevel(bRightHanded, Finger, Level01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::QueueCommand_VibroLevel_bRH_AL_L01_bSI( + const bool bRightHanded, const ESGHapticLocation AtLocation, const float Level01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_VibroLevel(bRightHanded, AtLocation, Level01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::SupportsWristSqueeze(const bool bRightHanded) +{ + return FSGHandLayer::SupportsWristSqueeze(bRightHanded); +} + +bool USGHandLayerKismetLibrary::QueueCommand_WristSqueeze( + const bool bRightHanded, const float SqueezeLevel01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_WristSqueeze(bRightHanded, SqueezeLevel01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::SupportsFlexionLocks(const bool bRightHanded) +{ + return FSGHandLayer::SupportsFlexionLocks(bRightHanded); +} + +bool USGHandLayerKismetLibrary::QueueCommand_FlexionLock( + const bool bRightHanded, const int32 Finger, const float Flexion01, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_FlexionLock(bRightHanded, Finger, Flexion01, bSendImmediate); +} + +bool USGHandLayerKismetLibrary::QueueCommand_ClearFlexionLock( + const bool bRightHanded, const int32 Finger, const bool bSendImmediate) +{ + return FSGHandLayer::QueueCommand_ClearFlexionLock(bRightHanded, Finger, bSendImmediate); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandPoseKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandPoseKismetLibrary.cpp new file mode 100644 index 0000000..d2dfcc5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHandPoseKismetLibrary.cpp @@ -0,0 +1,183 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGHandPoseKismetLibrary.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGHandPose.h" +#include "SGUtils/SGArrayUtils.h" + +USGHandPose* USGHandPoseKismetLibrary::MakeHandPose(UObject* WorldContextObject) +{ + return USGHandPose::NewHandPose(WorldContextObject); +} + +USGHandPose* USGHandPoseKismetLibrary::MakeHandPose_bRH_JP_FSGQuatArray_JR_HA( + UObject* WorldContextObject, + const bool bRightHanded, const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles) +{ + return USGHandPose::NewHandPose(WorldContextObject, bRightHanded, JointPositions, JointRotations, HandAngles); +} + +USGHandPose* USGHandPoseKismetLibrary::MakeHandPose_bRH_JP_FSGRotatorArray_JR_HA( + UObject* WorldContextObject, + const bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles) +{ + return USGHandPose::NewHandPose(WorldContextObject, bRightHanded, JointPositions, JointRotations, HandAngles); +} + +USGHandPose* USGHandPoseKismetLibrary::Deserialize(UObject* WorldContextObject, const FString& SerializedString) +{ + return USGHandPose::Deserialize(WorldContextObject, SerializedString); +} + +USGHandPose* USGHandPoseKismetLibrary::FromHandAngles_HA_bRH_HD( + UObject* WorldContextObject, + const TArray& HandAngles, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + TArray> HandAnglesNestedArray{ + FSGArrayUtils::FromNestedBPArray(HandAngles) + }; + return USGHandPose::FromHandAngles(WorldContextObject, MoveTemp(HandAnglesNestedArray), bRightHanded, + HandDimensions); +} + +USGHandPose* USGHandPoseKismetLibrary::FromHandAngles_HA_bRH( + UObject* WorldContextObject, const TArray& HandAngles, const bool bRightHanded) +{ + TArray> HandAnglesNestedArray{ + FSGArrayUtils::FromNestedBPArray(HandAngles) + }; + return USGHandPose::FromHandAngles(WorldContextObject, MoveTemp(HandAnglesNestedArray), bRightHanded); +} + +USGHandPose* USGHandPoseKismetLibrary::DefaultIdle_bRH_HD( + UObject* WorldContextObject, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + return USGHandPose::DefaultIdle(WorldContextObject, bRightHanded, HandDimensions); +} + +USGHandPose* USGHandPoseKismetLibrary::DefaultIdle_bRH(UObject* WorldContextObject, const bool bRightHanded) +{ + return USGHandPose::DefaultIdle(WorldContextObject, bRightHanded); +} + +USGHandPose* USGHandPoseKismetLibrary::FlatHand_bRH_HD( + UObject* WorldContextObject, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + return USGHandPose::FlatHand(WorldContextObject, bRightHanded, HandDimensions); +} + +USGHandPose* USGHandPoseKismetLibrary::FlatHand_bRH(UObject* WorldContextObject, const bool bRightHanded) +{ + return USGHandPose::FlatHand(WorldContextObject, bRightHanded); +} + +USGHandPose* USGHandPoseKismetLibrary::ThumbsUp_bRH_HD( + UObject* WorldContextObject, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + return USGHandPose::ThumbsUp(WorldContextObject, bRightHanded, HandDimensions); +} + +USGHandPose* USGHandPoseKismetLibrary::ThumbsUp_bRH(UObject* WorldContextObject, const bool bRightHanded) +{ + return USGHandPose::ThumbsUp(WorldContextObject, bRightHanded); +} + +USGHandPose* USGHandPoseKismetLibrary::Fist_bRH_HD( + UObject* WorldContextObject, const bool bRightHanded, const USGBasicHandModel* HandDimensions) +{ + return USGHandPose::Fist(WorldContextObject, bRightHanded, HandDimensions); +} + +USGHandPose* USGHandPoseKismetLibrary::Fist_bRH(UObject* WorldContextObject, const bool bRightHanded) +{ + return USGHandPose::Fist(WorldContextObject, bRightHanded); +} + +bool USGHandPoseKismetLibrary::IsRight(const USGHandPose* HandPose) +{ + return HandPose->IsRight(); +} + +TArray USGHandPoseKismetLibrary::GetJointPositions(const USGHandPose* HandPose) +{ + return FSGArrayUtils::ToNestedBPArray(HandPose->GetJointPositions()); +} + +TArray USGHandPoseKismetLibrary::GetJointRotationsQ(const USGHandPose* HandPose) +{ + return FSGArrayUtils::ToNestedBPArray(HandPose->GetJointRotationsQ()); +} + +TArray USGHandPoseKismetLibrary::GetJointRotations(const USGHandPose* HandPose) +{ + return FSGArrayUtils::ToNestedBPArray(HandPose->GetJointRotations()); +} + +TArray USGHandPoseKismetLibrary::GetHandAngles(const USGHandPose* HandPose) +{ + return FSGArrayUtils::ToNestedBPArray(HandPose->GetHandAngles()); +} + +bool USGHandPoseKismetLibrary::Equals(const USGHandPose* A, const USGHandPose* B) +{ + return A->Equals(B); +} + +float USGHandPoseKismetLibrary::GetNormalizedFlexion_F_bC01( + const USGHandPose* HandPose, const ESGFinger Finger, const bool bClamp01) +{ + return HandPose->GetNormalizedFlexion(Finger, bClamp01); +} + +TArray USGHandPoseKismetLibrary::GetNormalizedFlexion_bC01( + const USGHandPose* HandPose, const bool bClamp01) +{ + return HandPose->GetNormalizedFlexion(bClamp01); +} + +FString USGHandPoseKismetLibrary::ToString(const USGHandPose* HandPose, const bool bShortFormat) +{ + return HandPose->ToString(bShortFormat); +} + +FString USGHandPoseKismetLibrary::SGSerialize(const USGHandPose* HandPose) +{ + return HandPose->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHapticChannelInfoKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHapticChannelInfoKismetLibrary.cpp new file mode 100644 index 0000000..c3dd5ad --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHapticChannelInfoKismetLibrary.cpp @@ -0,0 +1,109 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGHapticChannelInfoKismetLibrary.h" + +#include "SGCore/SGHapticChannelInfo.h" + +USGHapticChannelInfo* USGHapticChannelInfoKismetLibrary::MakeHapticChannelInfo(UObject* WorldContextObject) +{ + return USGHapticChannelInfo::NewHapticChannelInfo(WorldContextObject); +} + +USGHapticChannelInfo* USGHapticChannelInfoKismetLibrary::MakeHapticChannelInfo_SI_FAFI( + UObject* WorldContextObject, + const TArray& StreamIndex, const TArray& FireAndForgetIndex) +{ + return USGHapticChannelInfo::NewHapticChannelInfo(WorldContextObject, StreamIndex, FireAndForgetIndex); +} + +FString USGHapticChannelInfoKismetLibrary::GenerateAddress(const int32 DeviceIndex, const int32 ChannelIndex) +{ + return USGHapticChannelInfo::GenerateAddress(DeviceIndex, ChannelIndex); +} + +USGHapticChannelInfo* USGHapticChannelInfoKismetLibrary::Parse(UObject* WorldContextObject, const FString& IpcString) +{ + return USGHapticChannelInfo::Parse(WorldContextObject, IpcString); +} + +int32 USGHapticChannelInfoKismetLibrary::GetStreamingType() +{ + return USGHapticChannelInfo::GetStreamingType(); +} + +int32 USGHapticChannelInfoKismetLibrary::GetFireAndForgetType() +{ + return USGHapticChannelInfo::GetFireAndForgetType(); +} + +int32 USGHapticChannelInfoKismetLibrary::GetStreamChannelCount(const USGHapticChannelInfo* HapticChannelInfo) +{ + return HapticChannelInfo->GetStreamChannelCount(); +} + +int32 USGHapticChannelInfoKismetLibrary::GetFireAndForgetChannelCount(const USGHapticChannelInfo* HapticChannelInfo) +{ + return HapticChannelInfo->GetFireAndForgetChannelCount(); +} + +int32 USGHapticChannelInfoKismetLibrary::GetTotalChannelCount(const USGHapticChannelInfo* HapticChannelInfo) +{ + return HapticChannelInfo->GetTotalChannelCount(); +} + +FString USGHapticChannelInfoKismetLibrary::GetAddress_Unguarded(const USGHapticChannelInfo* HapticChannelInfo, + const ESGHapticChannelType Type, const int32 TypeIndex) +{ + return HapticChannelInfo->GetAddress_Unguarded(Type, TypeIndex); +} + +void USGHapticChannelInfoKismetLibrary::GetIpcParams_Unguarded(USGHapticChannelInfo* HapticChannelInfo, + const ESGHapticChannelType Type, const int32 TypeIndex, + int32& OutIndex, FString& OutAddressString) +{ + HapticChannelInfo->GetIpcParams_Unguarded(Type, TypeIndex, OutIndex, OutAddressString); +} + +void USGHapticChannelInfoKismetLibrary::RegenerateAddresses(USGHapticChannelInfo* HapticChannelInfo, + const int32 ForDeviceIndex) +{ + HapticChannelInfo->RegenerateAddresses(ForDeviceIndex); +} + +TArray USGHapticChannelInfoKismetLibrary::GetAllAddresses(const USGHapticChannelInfo* HapticChannelInfo) +{ + return HapticChannelInfo->GetAllAddresses(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHapticGloveKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHapticGloveKismetLibrary.cpp new file mode 100644 index 0000000..0a494f3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGHapticGloveKismetLibrary.cpp @@ -0,0 +1,259 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGHapticGloveKismetLibrary.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGHapticGlove.h" +#include "SGUtils/SGArrayUtils.h" + +TArray USGHapticGloveKismetLibrary::GetHapticGloves(UObject* WorldContextObject, + const bool bConnectedOnly) +{ + return USGHapticGlove::GetHapticGloves(WorldContextObject, bConnectedOnly); +} + +bool USGHapticGloveKismetLibrary::GetGlove_OutG(UObject* WorldContextObject, USGHapticGlove*& OutGlove) +{ + return USGHapticGlove::GetGlove(WorldContextObject, OutGlove); +} + +bool USGHapticGloveKismetLibrary::GetGlove_bRH_OutG(UObject* WorldContextObject, + const bool bRightHanded, USGHapticGlove*& OutGlove) +{ + return USGHapticGlove::GetGlove(WorldContextObject, bRightHanded, OutGlove); +} + +FString USGHapticGloveKismetLibrary::ToString_S(const ESGHapticGloveCalibrationState State) +{ + return USGHapticGlove::ToString(State); +} + +FString USGHapticGloveKismetLibrary::ToString_L(const ESGHapticLocation Location) +{ + return USGHapticGlove::ToString(Location); +} + +ESGDeviceType USGHapticGloveKismetLibrary::GetDeviceType(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetDeviceType(); +} + +FString USGHapticGloveKismetLibrary::GetDeviceId(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetDeviceId(); +} + +FString USGHapticGloveKismetLibrary::GetHardwareVersion(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetHardwareVersion(); +} + +int32 USGHapticGloveKismetLibrary::GetFirmwareVersion(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetFirmwareVersion(); +} + +int32 USGHapticGloveKismetLibrary::GetSubFirmwareVersion(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetSubFirmwareVersion(); +} + +bool USGHapticGloveKismetLibrary::IsRight(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->IsRight(); +} + +bool USGHapticGloveKismetLibrary::GetImuRotation_FQuat_OutI(USGHapticGlove* HapticGlove, FQuat& OutImu) +{ + return HapticGlove->GetImuRotation(OutImu); +} + +bool USGHapticGloveKismetLibrary::GetImuRotation_FRotator_OutI(USGHapticGlove* HapticGlove, FRotator& OutImu) +{ + return HapticGlove->GetImuRotation(OutImu); +} + +bool USGHapticGloveKismetLibrary::GetHandPose_HG_OutHP( + UObject* WorldContextObject, + const USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry, USGHandPose*& OutHandPose) +{ + return HapticGlove->GetHandPose(WorldContextObject, HandGeometry, OutHandPose); +} + +bool USGHapticGloveKismetLibrary::GetHandPose_OutHP( + UObject* WorldContextObject, USGHapticGlove* HapticGlove, USGHandPose*& OutHandPose) +{ + return HapticGlove->GetHandPose(WorldContextObject, OutHandPose); +} + +bool USGHapticGloveKismetLibrary::GetHandAngles(const USGHapticGlove* HapticGlove, + TArray& OutHandAngles) +{ + TArray> HandAnglesNestedArray; + const bool bResult = HapticGlove->GetHandAngles(HandAnglesNestedArray); + OutHandAngles = FSGArrayUtils::ToNestedBPArray(MoveTemp(HandAnglesNestedArray)); + return bResult; +} + +USGBasicHandModel* USGHapticGloveKismetLibrary::GetHandGeometry(UObject* WorldContextObject, + const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetHandGeometry(WorldContextObject); +} + +void USGHapticGloveKismetLibrary::SetHandGeometry(USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry) +{ + HapticGlove->SetHandGeometry(HandGeometry); +} + +ESGHapticGloveCalibrationState USGHapticGloveKismetLibrary::GetCalibrationState(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetCalibrationState(); +} + +void USGHapticGloveKismetLibrary::EndCalibration(USGHapticGlove* HapticGlove) +{ + HapticGlove->EndCalibration(); +} + +void USGHapticGloveKismetLibrary::ResetCalibration(USGHapticGlove* HapticGlove) +{ + HapticGlove->ResetCalibration(); +} + +FString USGHapticGloveKismetLibrary::GetCalibrationInstruction(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->GetCalibrationInstruction(); +} + +void USGHapticGloveKismetLibrary::StopHaptics(USGHapticGlove* HapticGlove) +{ + return HapticGlove->StopHaptics(); +} + +void USGHapticGloveKismetLibrary::StopVibrations(USGHapticGlove* HapticGlove) +{ + return HapticGlove->StopVibrations(); +} + +bool USGHapticGloveKismetLibrary::SendHaptics(USGHapticGlove* HapticGlove) +{ + return HapticGlove->SendHaptics(); +} + +bool USGHapticGloveKismetLibrary::SupportsCustomWaveform(const USGHapticGlove* HapticGlove, + const ESGHapticLocation AtLocation) +{ + return HapticGlove->SupportsCustomWaveform(AtLocation); +} + +bool USGHapticGloveKismetLibrary::SendCustomWaveform(USGHapticGlove* HapticGlove, + USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + return HapticGlove->SendCustomWaveform(OutWaveform, Location); +} + +bool USGHapticGloveKismetLibrary::QueueForceFeedbackLevels(USGHapticGlove* HapticGlove, const TArray& Levels01) +{ + return HapticGlove->QueueForceFeedbackLevels(Levels01); +} + +bool USGHapticGloveKismetLibrary::QueueForceFeedbackLevel(USGHapticGlove* HapticGlove, + const int32 Finger, const float Level01) +{ + return HapticGlove->QueueForceFeedbackLevel(Finger, Level01); +} + +bool USGHapticGloveKismetLibrary::QueueVibroLevels(USGHapticGlove* HapticGlove, const TArray& Levels01) +{ + return HapticGlove->QueueVibroLevels(Levels01); +} + +bool USGHapticGloveKismetLibrary::QueueVibroLevel(USGHapticGlove* HapticGlove, + const ESGHapticLocation Location, const float Level01) +{ + return HapticGlove->QueueVibroLevel(Location, Level01); +} + +void USGHapticGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_OutWR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + HapticGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGHapticGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_OutWR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + HapticGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGHapticGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_OutGR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + HapticGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGHapticGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_OutGR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + HapticGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +FString USGHapticGloveKismetLibrary::ToString(const USGHapticGlove* HapticGlove) +{ + return HapticGlove->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGInterpolationSetKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGInterpolationSetKismetLibrary.cpp new file mode 100644 index 0000000..1320ac0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGInterpolationSetKismetLibrary.cpp @@ -0,0 +1,148 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGInterpolationSetKismetLibrary.h" + +#include "SGCore/SGInterpolationSet.h" + +USGInterpolationSet* USGInterpolationSetKismetLibrary::MakeInterpolationSet(UObject* WorldContextObject) +{ + return USGInterpolationSet::NewInterpolationSet(WorldContextObject); +} + +USGInterpolationSet* USGInterpolationSetKismetLibrary::MakeInterpolationSet_F1_F2_T1_T2( + UObject* WorldContextObject, const float From1, const float From2, const float To1, const float To2) +{ + return USGInterpolationSet::NewInterpolationSet(WorldContextObject, From1, From2, To1, To2); +} + +USGInterpolationSet* USGInterpolationSetKismetLibrary::MakeInterpolationSet_F1_F2_T1_T2_M_M( + UObject* WorldContextObject, + const float From1, const float From2, const float To1, const float To2, const float Min, const float Max) +{ + return USGInterpolationSet::NewInterpolationSet(WorldContextObject, From1, From2, To1, To2, Min, Max); +} + +USGInterpolationSet* USGInterpolationSetKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGInterpolationSet::Deserialize(WorldContextObject, SerializedString); +} + +float USGInterpolationSetKismetLibrary::GetX0(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->GetX0(); +} + +void USGInterpolationSetKismetLibrary::SetX0(USGInterpolationSet* InterpolationSet, const float X0) +{ + InterpolationSet->SetX0(X0); +} + +float USGInterpolationSetKismetLibrary::GetX1(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->GetX1(); +} + +void USGInterpolationSetKismetLibrary::SetX1(USGInterpolationSet* InterpolationSet, const float X1) +{ + InterpolationSet->SetX1(X1); +} + +float USGInterpolationSetKismetLibrary::GetY0(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->GetY0(); +} + +void USGInterpolationSetKismetLibrary::SetY0(USGInterpolationSet* InterpolationSet, const float Y0) +{ + InterpolationSet->SetY0(Y0); +} + +float USGInterpolationSetKismetLibrary::GetY1(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->GetY1(); +} + +void USGInterpolationSetKismetLibrary::SetY1(USGInterpolationSet* InterpolationSet, const float Y1) +{ + InterpolationSet->SetY1(Y1); +} + +float USGInterpolationSetKismetLibrary::GetMin(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->GetMin(); +} + +void USGInterpolationSetKismetLibrary::SetMin(USGInterpolationSet* InterpolationSet, const float Min) +{ + InterpolationSet->SetMin(Min); +} + +float USGInterpolationSetKismetLibrary::GetMax(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->GetMax(); +} + +void USGInterpolationSetKismetLibrary::SetMax(USGInterpolationSet* InterpolationSet, const float Max) +{ + InterpolationSet->SetMax(Max); +} + +int32 USGInterpolationSetKismetLibrary::Get(const USGInterpolationSet* InterpolationSet, const float Value, + const bool bLimit, const bool bNormalizeAngle) +{ + return InterpolationSet->Get(Value, bLimit, bNormalizeAngle); +} + +bool USGInterpolationSetKismetLibrary::Equals(const USGInterpolationSet* A, const USGInterpolationSet* B) +{ + return A->Equals(B); +} + +FString USGInterpolationSetKismetLibrary::ToString(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->ToString(); +} + +FString USGInterpolationSetKismetLibrary::ToString_bL(const USGInterpolationSet* InterpolationSet, const bool bLimits) +{ + return InterpolationSet->ToString(bLimits); +} + +FString USGInterpolationSetKismetLibrary::SGSerialize(const USGInterpolationSet* InterpolationSet) +{ + return InterpolationSet->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGJointKinematicsKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGJointKinematicsKismetLibrary.cpp new file mode 100644 index 0000000..a8073dc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGJointKinematicsKismetLibrary.cpp @@ -0,0 +1,70 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGJointKinematicsKismetLibrary.h" + +#include "SGCore/SGJointKinematics.h" + +bool USGJointKinematicsKismetLibrary::ForwardKinematics_SP_FQuat_SR_JL_JA_OutNP_TArrayFQuat_OutNR( + const FVector& StartPosition, const FQuat& StartRotation, const TArray& JointLengths, + const TArray& JointAngles, TArray& OutNewPositions, TArray& OutNewRotations) +{ + return FSGJointKinematics::ForwardKinematics(StartPosition, StartRotation, JointLengths, JointAngles, + OutNewPositions, OutNewRotations); +} + +bool USGJointKinematicsKismetLibrary::ForwardKinematics_SP_FRotator_SR_JL_JA_OutNP_TArrayFRotator_OutNR( + const FVector& StartPosition, const FRotator& StartRotation, const TArray& JointLengths, + const TArray& JointAngles, TArray& OutNewPositions, TArray& OutNewRotations) +{ + return FSGJointKinematics::ForwardKinematics(StartPosition, StartRotation, JointLengths, JointAngles, + OutNewPositions, OutNewRotations); +} + +bool +USGJointKinematicsKismetLibrary::ForwardKinematics_P_F_JA_OutNP_TArrayFQuat_OutNR( + const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations) +{ + return FSGJointKinematics::ForwardKinematics(Profile, Finger, JointAngles, OutNewPositions, OutNewRotations); +} + +bool +USGJointKinematicsKismetLibrary::ForwardKinematics_P_F_JA_OutNP_TArrayFRotator_OutNR( + const USGBasicHandModel* Profile, const ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations) +{ + return FSGJointKinematics::ForwardKinematics(Profile, Finger, JointAngles, OutNewPositions, OutNewRotations); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGLibraryKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGLibraryKismetLibrary.cpp new file mode 100644 index 0000000..1831725 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGLibraryKismetLibrary.cpp @@ -0,0 +1,53 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGLibraryKismetLibrary.h" + +#include "SGCore/SGLibrary.h" + +FString USGLibraryKismetLibrary::GetVersion() +{ + return FSGLibrary::GetVersion(); +} + +FString USGLibraryKismetLibrary::GetBackendVersion() +{ + return FSGLibrary::GetBackendVersion(); +} + +FString USGLibraryKismetLibrary::GetSGConnectVersion() +{ + return FSGLibrary::GetSGConnectVersion(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNova2GloveKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNova2GloveKismetLibrary.cpp new file mode 100644 index 0000000..0366b0f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNova2GloveKismetLibrary.cpp @@ -0,0 +1,389 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGNova2GloveKismetLibrary.h" + +#include "SGCore/SGHandPose.h" +#include "SGCore/SGNova2Glove.h" +#include "SGCore/SGNova2GloveSensorData.h" +#include "SGUtils/SGArrayUtils.h" + +USGDevice* USGNova2GloveKismetLibrary::Parse(UObject* WorldContextObject, const FString& ConstantsString) +{ + return USGNova2Glove::Parse(WorldContextObject, ConstantsString); +} + +TArray USGNova2GloveKismetLibrary::GetNova2Gloves(UObject* WorldContextObject) +{ + return USGNova2Glove::GetNova2Gloves(WorldContextObject); +} + +bool USGNova2GloveKismetLibrary::GetNova2Glove_OutG(UObject* WorldContextObject, USGNova2Glove*& OutGlove) +{ + return USGNova2Glove::GetNova2Glove(WorldContextObject, OutGlove); +} + +bool USGNova2GloveKismetLibrary::GetNova2Glove_bRH_OutG(UObject* WorldContextObject, + const bool bRightHanded, USGNova2Glove*& OutGlove) +{ + return USGNova2Glove::GetNova2Glove(WorldContextObject, bRightHanded, OutGlove); +} + +void USGNova2GloveKismetLibrary::CalculateGloveLocation_RP_FQuat_RR_TH_bRH_HW_OutGP_OutGR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + USGNova2Glove::CalculateGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, HardwareVersion, + OutGlovePosition, OutGloveRotation); +} + +void USGNova2GloveKismetLibrary::CalculateGloveLocation_RP_FRotator_RR_TH_bRH_HW_OutGP_OutGR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + USGNova2Glove::CalculateGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, HardwareVersion, + OutGlovePosition, OutGloveRotation); +} + +void USGNova2GloveKismetLibrary::CalculateWristLocation_RP_FQuat_RR_TH_bRH_HW_OutWP_OutWR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + USGNova2Glove::CalculateWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, HardwareVersion, + OutWristPosition, OutWristRotation); +} + +void USGNova2GloveKismetLibrary::CalculateWristLocation_RP_FRotator_RR_TH_bRH_HW_OutWP_OutWR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + USGNova2Glove::CalculateWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, HardwareVersion, + OutWristPosition, OutWristRotation); +} + +FString USGNova2GloveKismetLibrary::GetStreamByte() +{ + return FString::Printf(TEXT("%c"), USGNova2Glove::GetStreamByte()); +} + +TArray USGNova2GloveKismetLibrary::GetNova2SensorRanges() +{ + return USGNova2Glove::GetNova2SensorRanges(); +} + +TArray USGNova2GloveKismetLibrary::ToNormalizedValues_SD(const USGNova2GloveSensorData* SensorData) +{ + return USGNova2Glove::ToNormalizedValues(SensorData); +} + +TArray USGNova2GloveKismetLibrary::ToNormalizedValues_SD_OutSN( + UObject* WorldContextObject, + const USGNova2GloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer) +{ + return USGNova2Glove::ToNormalizedValues(WorldContextObject, SensorData, OutSensorNormalizer); +} + +TArray USGNova2GloveKismetLibrary::CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator, const bool bInfluenceIndex) +{ + const TArray HandAngles{ + FSGArrayUtils::ToNestedBPArray( + USGNova2Glove::CalculateHandAngles(NormalizedValues, Interpolator, bInfluenceIndex)) + }; + return HandAngles; +} + +TArray USGNova2GloveKismetLibrary::ToNormalizedAngles( + const TArray& NormalizedData, const USGNovaGloveInfo* GloveInfo) +{ + return FSGArrayUtils::ToNestedBPArray( + USGNova2Glove::ToNormalizedAngles(NormalizedData, GloveInfo)); +} + +ESGDeviceType USGNova2GloveKismetLibrary::GetDeviceType(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetDeviceType(); +} + +FString USGNova2GloveKismetLibrary::GetDeviceId(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetDeviceId(); +} + +FString USGNova2GloveKismetLibrary::GetHardwareVersion(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetHardwareVersion(); +} + +int32 USGNova2GloveKismetLibrary::GetFirmwareVersion(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetFirmwareVersion(); +} + +int32 USGNova2GloveKismetLibrary::GetSubFirmwareVersion(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetSubFirmwareVersion(); +} + +bool USGNova2GloveKismetLibrary::HasBattery(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->HasBattery(); +} + +bool USGNova2GloveKismetLibrary::IsCharging(USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->IsCharging(); +} + +bool USGNova2GloveKismetLibrary::GetBatteryLevel(USGNova2Glove* Nova2Glove, float& OutBatteryLevel) +{ + return Nova2Glove->GetBatteryLevel(OutBatteryLevel); +} + +bool USGNova2GloveKismetLibrary::IsRight(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->IsRight(); +} + +bool USGNova2GloveKismetLibrary::GetImuRotation_FQuat_OutI(USGNova2Glove* Nova2Glove, FQuat& OutImu) +{ + return Nova2Glove->GetImuRotation(OutImu); +} + +bool USGNova2GloveKismetLibrary::GetImuRotation_FRotator_OutI(USGNova2Glove* Nova2Glove, FRotator& OutImu) +{ + return Nova2Glove->GetImuRotation(OutImu); +} + +bool USGNova2GloveKismetLibrary::GetHandPose( + UObject* WorldContextObject, + USGNova2Glove* Nova2Glove, const USGBasicHandModel* HandModel, USGHandPose*& OutHandPose) +{ + return Nova2Glove->GetHandPose(WorldContextObject, HandModel, OutHandPose); +} + +bool USGNova2GloveKismetLibrary::GetHandAngles(const USGNova2Glove* Nova2Glove, TArray& OutHandAngles) +{ + TArray> HandAnglesNestedArray; + const bool bResult = Nova2Glove->GetHandAngles(HandAnglesNestedArray); + OutHandAngles = FSGArrayUtils::ToNestedBPArray(MoveTemp(HandAnglesNestedArray)); + return bResult; +} + +ESGHapticGloveCalibrationState USGNova2GloveKismetLibrary::GetCalibrationState(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetCalibrationState(); +} + +void USGNova2GloveKismetLibrary::EndCalibration(USGNova2Glove* Nova2Glove) +{ + Nova2Glove->EndCalibration(); +} + +void USGNova2GloveKismetLibrary::ResetCalibration(USGNova2Glove* Nova2Glove) +{ + Nova2Glove->ResetCalibration(); +} + +void USGNova2GloveKismetLibrary::StopHaptics(USGNova2Glove* Nova2Glove) +{ + Nova2Glove->StopHaptics(); +} + +void USGNova2GloveKismetLibrary::StopVibrations(USGNova2Glove* Nova2Glove) +{ + Nova2Glove->StopVibrations(); +} + +bool USGNova2GloveKismetLibrary::SendHaptics(USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->SendHaptics(); +} + +bool USGNova2GloveKismetLibrary::SupportsCustomWaveform(const USGNova2Glove* Nova2Glove, + const ESGHapticLocation AtLocation) +{ + return Nova2Glove->SupportsCustomWaveform(AtLocation); +} + +bool USGNova2GloveKismetLibrary::SendCustomWaveform(USGNova2Glove* Nova2Glove, + USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + return Nova2Glove->SendCustomWaveform(OutWaveform, Location); +} + +bool USGNova2GloveKismetLibrary::QueueForceFeedbackLevels(USGNova2Glove* Nova2Glove, const TArray& Levels01) +{ + return Nova2Glove->QueueForceFeedbackLevels(Levels01); +} + +bool USGNova2GloveKismetLibrary::QueueForceFeedbackLevel( + USGNova2Glove* Nova2Glove, const int32 Finger, const float Level01) +{ + return Nova2Glove->QueueForceFeedbackLevel(Finger, Level01); +} + +bool USGNova2GloveKismetLibrary::QueueVibroLevels(USGNova2Glove* Nova2Glove, const TArray& Amplitudes) +{ + return Nova2Glove->QueueVibroLevels(Amplitudes); +} + +bool USGNova2GloveKismetLibrary::QueueVibroLevel(USGNova2Glove* Nova2Glove, + const ESGHapticLocation Location, const float Level01) +{ + return Nova2Glove->QueueVibroLevel(Location, Level01); +} + +void USGNova2GloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + Nova2Glove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGNova2GloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + Nova2Glove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGNova2GloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + Nova2Glove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGNova2GloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + Nova2Glove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +USGNovaGloveInfo* USGNova2GloveKismetLibrary::GetGloveInfo(UObject* WorldContextObject, const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->GetGloveInfo(WorldContextObject); +} + +bool USGNova2GloveKismetLibrary::DoesIndexInfluenceOthers(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->DoesIndexInfluenceOthers(); +} + +void USGNova2GloveKismetLibrary::SetIndexInfluencesOthers(USGNova2Glove* Nova2Glove, const bool bInfluenceOthers) +{ + Nova2Glove->SetIndexInfluencesOthers(bInfluenceOthers); +} + +bool USGNova2GloveKismetLibrary::SupportsOnBoardNormalization(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->SupportsOnBoardNormalization(); +} + +bool USGNova2GloveKismetLibrary::GetSensorData( + UObject* WorldContextObject, USGNova2Glove* Nova2Glove, USGNova2GloveSensorData*& OutSensorData) +{ + return Nova2Glove->GetSensorData(WorldContextObject, OutSensorData); +} + +bool USGNova2GloveKismetLibrary::GetNormalizedInput(const USGNova2Glove* Nova2Glove, TArray& OutNormalizedValues) +{ + return Nova2Glove->GetNormalizedInput(OutNormalizedValues); +} + +bool USGNova2GloveKismetLibrary::SendRawData(USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->SendRawData(); +} + +bool USGNova2GloveKismetLibrary::SendNormalizedData(USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->SendNormalizedData(); +} + +ESGNova2VibroMotor USGNova2GloveKismetLibrary::ToNovaMotor(const USGNova2Glove* Nova2Glove, + const ESGHapticLocation Location) +{ + return Nova2Glove->ToNovaMotor(Location); +} + +int32 USGNova2GloveKismetLibrary::ChannelIndex(const USGNova2Glove* Nova2Glove, const ESGNova2VibroMotor Motor) +{ + return Nova2Glove->ChannelIndex(Motor); +} + +void USGNova2GloveKismetLibrary::ValidateWaveform(const USGNova2Glove* Nova2Glove, + USGCustomWaveform* OutWaveform, const ESGNova2VibroMotor Motor) +{ + Nova2Glove->ValidateWaveform(OutWaveform, Motor); +} + +bool USGNova2GloveKismetLibrary::SendCustomWaveform_Nova2( + USGNova2Glove* Nova2Glove, + USGCustomWaveform* OutWaveform, const ESGNova2VibroMotor Motor, const bool bValidateWaveform) +{ + return Nova2Glove->SendCustomWaveform_Nova2(OutWaveform, Motor, bValidateWaveform); +} + +FString USGNova2GloveKismetLibrary::ToString(const USGNova2Glove* Nova2Glove) +{ + return Nova2Glove->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.cpp new file mode 100644 index 0000000..d83513e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.cpp @@ -0,0 +1,131 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.h" + +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCore/SGNova2GloveSensorData.h" +#include "SGUtils/SGArrayUtils.h" + +USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::MakeNova2GloveSensorData(UObject* WorldContextObject) +{ + return USGNova2GloveSensorData::NewNova2GloveSensorData(WorldContextObject); +} + +USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::MakeNova2GloveSensorData_NS_V_PV_FQuat_IR_bIP_BL_bC( + UObject* WorldContextObject, const ESGNormalizationState NormalizationState, + const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + return USGNova2GloveSensorData::NewNova2GloveSensorData( + WorldContextObject, + NormalizationState, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging); +} + +USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::MakeNova2GloveSensorData_NS_V_PV_FRotator_IR_bIP_BL_b( + UObject* WorldContextObject, const ESGNormalizationState NormalizationState, + const TArray& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + return USGNova2GloveSensorData::NewNova2GloveSensorData( + WorldContextObject, + NormalizationState, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging); +} + +USGNova2GloveSensorData* USGNova2GloveSensorDataKismetLibrary::Parse( + UObject* WorldContextObject, const FString& RawData, const USGNovaGloveInfo* GloveInfo) +{ + return USGNova2GloveSensorData::Parse(WorldContextObject, RawData, GloveInfo); +} + +ESGNormalizationState USGNova2GloveSensorDataKismetLibrary::GetSensorState( + const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->GetSensorState(); +} + +TArray USGNova2GloveSensorDataKismetLibrary::GetSensorValues( + const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return FSGArrayUtils::ToNestedBPArray(Nova2GloveSensorData->GetSensorValues()); +} + +float USGNova2GloveSensorDataKismetLibrary::GetSensorValue( + const USGNova2GloveSensorData* Nova2GloveSensorData, + const ESGFinger Finger, const ESGNova2SensorLocation Location) +{ + return Nova2GloveSensorData->GetSensorValue(Finger, Location); +} + +int32 USGNova2GloveSensorDataKismetLibrary::GetParsedValues(const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->GetParsedValues(); +} + +FQuat USGNova2GloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->GetImuRotationQ(); +} + +FRotator USGNova2GloveSensorDataKismetLibrary::GetImuRotation_FRotator( + const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->GetImuRotation(); +} + +bool USGNova2GloveSensorDataKismetLibrary::IsImuParsed(const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->IsImuParsed(); +} + +float USGNova2GloveSensorDataKismetLibrary::GetBatteryLevel(const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->GetBatteryLevel(); +} + +bool USGNova2GloveSensorDataKismetLibrary::IsCharging(const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->IsCharging(); +} + +bool USGNova2GloveSensorDataKismetLibrary::Equals(const USGNova2GloveSensorData* A, const USGNova2GloveSensorData* B) +{ + return A->Equals(B); +} + +FString USGNova2GloveSensorDataKismetLibrary::ToString(const USGNova2GloveSensorData* Nova2GloveSensorData) +{ + return Nova2GloveSensorData->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveInfoKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveInfoKismetLibrary.cpp new file mode 100644 index 0000000..31a820c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveInfoKismetLibrary.cpp @@ -0,0 +1,135 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGNovaGloveInfoKismetLibrary.h" + +#include "SGCore/SGNovaGloveInfo.h" + +USGNovaGloveInfo* USGNovaGloveInfoKismetLibrary::MakeNovaGloveInfo(UObject* WorldContextObject) +{ + return USGNovaGloveInfo::NewNovaGloveInfo(WorldContextObject); +} + +USGNovaGloveInfo* USGNovaGloveInfoKismetLibrary::MakeNovaGloveInfo_DI_HV_FV_SFV_bRH_IC_NOS( + UObject* WorldContextObject, + const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const FQuat& ImuCorrection, const int32 NumberOfSensors) +{ + return USGNovaGloveInfo::NewNovaGloveInfo(WorldContextObject, + DeviceId, HardwareVersion, FirmwareVersion, SubFirmwareVersion, + bRightHanded, ImuCorrection, NumberOfSensors); +} + +bool USGNovaGloveInfoKismetLibrary::Parse(UObject* WorldContextObject, + const FString& ConstantsString, USGNovaGloveInfo*& OutGloveInfo) +{ + return USGNovaGloveInfo::Parse(WorldContextObject, ConstantsString, OutGloveInfo); +} + +USGNovaGloveInfo* USGNovaGloveInfoKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGNovaGloveInfo::Deserialize(WorldContextObject, SerializedString); +} + +FString USGNovaGloveInfoKismetLibrary::GetDeviceId(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetDeviceId(); +} + +FString USGNovaGloveInfoKismetLibrary::GetHardwareVersion(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetHardwareVersion(); +} + +int32 USGNovaGloveInfoKismetLibrary::GetFirmwareVersion(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetFirmwareVersion(); +} + +int32 USGNovaGloveInfoKismetLibrary::GetSubFirmwareVersion(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetSubFirmwareVersion(); +} + +bool USGNovaGloveInfoKismetLibrary::IsRight(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->IsRight(); +} + +FQuat USGNovaGloveInfoKismetLibrary::GetImuCorrection_FQuat(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetImuCorrectionQ(); +} + +FRotator USGNovaGloveInfoKismetLibrary::GetImuCorrection_FRotator(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetImuCorrection(); +} + +int32 USGNovaGloveInfoKismetLibrary::GetNumberOfSensors(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->GetNumberOfSensors(); +} + +bool USGNovaGloveInfoKismetLibrary::FirmwareNewerThan( + const USGNovaGloveInfo* NovaGloveInfo, + const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + return NovaGloveInfo->FirmwareNewerThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGNovaGloveInfoKismetLibrary::FirmwareOlderThan( + const USGNovaGloveInfo* NovaGloveInfo, + const int32 FirmwareMain, const int32 FirmwareSub, const bool bInclusive) const +{ + return NovaGloveInfo->FirmwareOlderThan(FirmwareMain, FirmwareSub, bInclusive); +} + +bool USGNovaGloveInfoKismetLibrary::Equals(const USGNovaGloveInfo* A, const USGNovaGloveInfo* B) +{ + return A->Equals(B); +} + +FString USGNovaGloveInfoKismetLibrary::ToString(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->ToString(); +} + +FString USGNovaGloveInfoKismetLibrary::SGSerialize(const USGNovaGloveInfo* NovaGloveInfo) +{ + return NovaGloveInfo->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveKismetLibrary.cpp new file mode 100644 index 0000000..deeefb5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveKismetLibrary.cpp @@ -0,0 +1,421 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGNovaGloveKismetLibrary.h" + +#include "SGCore/SGHandPose.h" +#include "SGCore/SGNovaGlove.h" +#include "SGCore/SGNovaGloveSensorData.h" +#include "SGUtils/SGArrayUtils.h" + +USGDevice* USGNovaGloveKismetLibrary::Parse(UObject* WorldContextObject, const FString& ConstantsString) +{ + return USGNovaGlove::Parse(WorldContextObject, ConstantsString); +} + +TArray USGNovaGloveKismetLibrary::GetNovaGloves(UObject* WorldContextObject) +{ + return USGNovaGlove::GetNovaGloves(WorldContextObject); +} + +bool USGNovaGloveKismetLibrary::GetNovaGlove_OutG(UObject* WorldContextObject, USGNovaGlove*& OutGlove) +{ + return USGNovaGlove::GetNovaGlove(WorldContextObject, OutGlove); +} + +bool USGNovaGloveKismetLibrary::GetNovaGlove_bRH_OutG(UObject* WorldContextObject, + const bool bRightHanded, USGNovaGlove*& OutGlove) +{ + return USGNovaGlove::GetNovaGlove(WorldContextObject, bRightHanded, OutGlove); +} + +void USGNovaGloveKismetLibrary::CalculateGloveLocation_RP_FQuat_RR_TH_bRH_OutGP_OutGR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + USGNovaGlove::CalculateGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, + OutGlovePosition, OutGloveRotation); +} + +void USGNovaGloveKismetLibrary::CalculateGloveLocation_RP_FRotator_RR_TH_bRH_OutGP_OutGR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + USGNovaGlove::CalculateGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, + OutGlovePosition, OutGloveRotation); +} + +void USGNovaGloveKismetLibrary::CalculateWristLocation_RP_FQuat_RR_TH_bRH_OutWP_OutWR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + USGNovaGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, + OutWristPosition, OutWristRotation); +} + +void USGNovaGloveKismetLibrary::CalculateWristLocation_RP_FRotator_RR_TH_bRH_OutWP_OutWR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + USGNovaGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, + OutWristPosition, OutWristRotation); +} + +FString USGNovaGloveKismetLibrary::GetHapticsByte() +{ + return FString::Printf(TEXT("%c"), USGNovaGlove::GetHapticsByte()); +} + +FString USGNovaGloveKismetLibrary::GetThresholdsByte() +{ + return FString::Printf(TEXT("%c"), USGNovaGlove::GetThresholdsByte()); +} + +FString USGNovaGloveKismetLibrary::GetIgnoreThresholdsByte() +{ + return FString::Printf(TEXT("%c"), USGNovaGlove::GetIgnoreThresholdsByte()); +} + +TArray USGNovaGloveKismetLibrary::GetNovaSensorRanges() +{ + return USGNovaGlove::GetNovaSensorRanges(); +} + +TArray USGNovaGloveKismetLibrary::ToNormalizedValues_SD(const USGNovaGloveSensorData* SensorData) +{ + return USGNovaGlove::ToNormalizedValues(SensorData); +} + +TArray USGNovaGloveKismetLibrary::ToNormalizedValues_SD_OutSN( + UObject* WorldContextObject, + const USGNovaGloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer) +{ + return USGNovaGlove::ToNormalizedValues(WorldContextObject, SensorData, OutSensorNormalizer); +} + +TArray USGNovaGloveKismetLibrary::CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator) +{ + const TArray HandAngles{ + FSGArrayUtils::ToNestedBPArray( + USGNovaGlove::CalculateHandAngles(NormalizedValues, Interpolator)) + }; + return HandAngles; +} + +FString USGNovaGloveKismetLibrary::ToNovaCommandAsFlexion(const USGThresholdCommand* Thresholds) +{ + return USGNovaGlove::ToNovaCommandAsFlexion(Thresholds); +} + +FString USGNovaGloveKismetLibrary::ToNovaCommandAsRaw( + const USGThresholdCommand* Thresholds, const USGSensorNormalization* Interpolator) +{ + return USGNovaGlove::ToNovaCommandAsRaw(Thresholds, Interpolator); +} + +ESGDeviceType USGNovaGloveKismetLibrary::GetDeviceType(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetDeviceType(); +} + +FString USGNovaGloveKismetLibrary::GetDeviceId(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetDeviceId(); +} + +FString USGNovaGloveKismetLibrary::GetHardwareVersion(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetHardwareVersion(); +} + +int32 USGNovaGloveKismetLibrary::GetFirmwareVersion(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetFirmwareVersion(); +} + +int32 USGNovaGloveKismetLibrary::GetSubFirmwareVersion(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetSubFirmwareVersion(); +} + +void USGNovaGloveKismetLibrary::SetDeviceIndex(USGNovaGlove* NovaGlove, const int32 NewIndex) +{ + NovaGlove->SetDeviceIndex(NewIndex); +} + +bool USGNovaGloveKismetLibrary::HasBattery(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->HasBattery(); +} + +bool USGNovaGloveKismetLibrary::IsCharging(USGNovaGlove* NovaGlove) +{ + return NovaGlove->IsCharging(); +} + +bool USGNovaGloveKismetLibrary::GetBatteryLevel(USGNovaGlove* NovaGlove, float& OutBatteryLevel) +{ + return NovaGlove->GetBatteryLevel(OutBatteryLevel); +} + +bool USGNovaGloveKismetLibrary::IsRight(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->IsRight(); +} + +bool USGNovaGloveKismetLibrary::GetImuRotation_FQuat_OutI(USGNovaGlove* NovaGlove, FQuat& OutImu) +{ + return NovaGlove->GetImuRotation(OutImu); +} + +bool USGNovaGloveKismetLibrary::GetImuRotation_FRotator_OutI(USGNovaGlove* NovaGlove, FRotator& OutImu) +{ + return NovaGlove->GetImuRotation(OutImu); +} + +bool USGNovaGloveKismetLibrary::GetHandPose( + UObject* WorldContextObject, + USGNovaGlove* NovaGlove, const USGBasicHandModel* HandModel, USGHandPose*& OutHandPose) +{ + return NovaGlove->GetHandPose(WorldContextObject, HandModel, OutHandPose); +} + +bool USGNovaGloveKismetLibrary::GetHandAngles(const USGNovaGlove* NovaGlove, TArray& OutHandAngles) +{ + TArray> HandAnglesNestedArray; + const bool bResult = NovaGlove->GetHandAngles(HandAnglesNestedArray); + OutHandAngles = FSGArrayUtils::ToNestedBPArray(MoveTemp(HandAnglesNestedArray)); + return bResult; +} + +ESGHapticGloveCalibrationState USGNovaGloveKismetLibrary::GetCalibrationState(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetCalibrationState(); +} + +void USGNovaGloveKismetLibrary::EndCalibration(USGNovaGlove* NovaGlove) +{ + NovaGlove->EndCalibration(); +} + +void USGNovaGloveKismetLibrary::ResetCalibration(USGNovaGlove* NovaGlove) +{ + NovaGlove->ResetCalibration(); +} + +void USGNovaGloveKismetLibrary::StopHaptics(USGNovaGlove* NovaGlove) +{ + NovaGlove->StopHaptics(); +} + +void USGNovaGloveKismetLibrary::StopVibrations(USGNovaGlove* NovaGlove) +{ + NovaGlove->StopVibrations(); +} + +bool USGNovaGloveKismetLibrary::SendHaptics(USGNovaGlove* NovaGlove) +{ + return NovaGlove->SendHaptics(); +} + +bool USGNovaGloveKismetLibrary::SupportsCustomWaveform(const USGNovaGlove* NovaGlove, + const ESGHapticLocation AtLocation) +{ + return NovaGlove->SupportsCustomWaveform(AtLocation); +} + +bool USGNovaGloveKismetLibrary::SendCustomWaveform(USGNovaGlove* NovaGlove, + USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + return NovaGlove->SendCustomWaveform(OutWaveform, Location); +} + +bool USGNovaGloveKismetLibrary::QueueForceFeedbackLevels(USGNovaGlove* NovaGlove, const TArray& Levels01) +{ + return NovaGlove->QueueForceFeedbackLevels(Levels01); +} + +bool USGNovaGloveKismetLibrary::QueueForceFeedbackLevel( + USGNovaGlove* NovaGlove, const int32 Finger, const float Level01) +{ + return NovaGlove->QueueForceFeedbackLevel(Finger, Level01); +} + +bool USGNovaGloveKismetLibrary::QueueVibroLevels(USGNovaGlove* NovaGlove, const TArray& Amplitudes) +{ + return NovaGlove->QueueVibroLevels(Amplitudes); +} + +bool USGNovaGloveKismetLibrary::QueueVibroLevel_L_L(USGNovaGlove* NovaGlove, + const ESGHapticLocation Location, const float Level01) +{ + return NovaGlove->QueueVibroLevel(Location, Level01); +} + +void USGNovaGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGNovaGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + NovaGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGNovaGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGNovaGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + NovaGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +USGNovaGloveInfo* USGNovaGloveKismetLibrary::GetGloveInfo(UObject* WorldContextObject, const USGNovaGlove* NovaGlove) +{ + return NovaGlove->GetGloveInfo(WorldContextObject); +} + +bool USGNovaGloveKismetLibrary::SupportsThresholds(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->SupportsThresholds(); +} + +bool USGNovaGloveKismetLibrary::SupportsCustomWaveforms(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->SupportsCustomWaveforms(); +} + +bool USGNovaGloveKismetLibrary::SupportsOnBoardNormalization(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->SupportsOnBoardNormalization(); +} + +bool USGNovaGloveKismetLibrary::GetSensorData( + UObject* WorldContextObject, USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData) +{ + return NovaGlove->GetSensorData(WorldContextObject, OutSensorData); +} + +FString USGNovaGloveKismetLibrary::ToNovaCommand( + const USGNovaGlove* NovaGlove, + const TArray& ForceFeedbackLevels, const TArray& BuzzLevels, const float WristLevel) +{ + return NovaGlove->ToNovaCommand(ForceFeedbackLevels, BuzzLevels, WristLevel); +} + +bool USGNovaGloveKismetLibrary::QueueVibroLevel_F_A(USGNovaGlove* NovaGlove, const int32 Finger, const float Amplitude) +{ + return NovaGlove->QueueVibroLevel(Finger, Amplitude); +} + +bool USGNovaGloveKismetLibrary::QueueWristLevel(USGNovaGlove* NovaGlove, const float Amplitude) +{ + return NovaGlove->QueueWristLevel(Amplitude); +} + +ESGNovaVibroMotor USGNovaGloveKismetLibrary::ToNovaMotor(const USGNovaGlove* NovaGlove, + const ESGHapticLocation Location) +{ + return NovaGlove->ToNovaMotor(Location); +} + +int32 USGNovaGloveKismetLibrary::ChannelIndex(const USGNovaGlove* NovaGlove, const ESGNovaVibroMotor Motor) +{ + return NovaGlove->ChannelIndex(Motor); +} + +void USGNovaGloveKismetLibrary::ValidateWaveform(const USGNovaGlove* NovaGlove, + USGCustomWaveform* OutWaveform, const ESGNovaVibroMotor Motor) +{ + NovaGlove->ValidateWaveform(OutWaveform, Motor); +} + +bool USGNovaGloveKismetLibrary::SendCustomWaveform_Nova( + USGNovaGlove* NovaGlove, + USGCustomWaveform* OutWaveform, const ESGNovaVibroMotor Motor, const bool bValidateWaveform) +{ + return NovaGlove->SendCustomWaveform_Nova(OutWaveform, Motor, bValidateWaveform); +} + +bool USGNovaGloveKismetLibrary::QueueThresholdCommand_Flexion(USGNovaGlove* NovaGlove, + const int32 Finger, const float FlexionThreshold) +{ + return NovaGlove->QueueThresholdCommand_Flexion(Finger, FlexionThreshold); +} + +bool USGNovaGloveKismetLibrary::QueueClearThreshold(USGNovaGlove* NovaGlove, const int32 Finger) +{ + return NovaGlove->QueueClearThreshold(Finger); +} + +FString USGNovaGloveKismetLibrary::ToString(const USGNovaGlove* NovaGlove) +{ + return NovaGlove->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.cpp new file mode 100644 index 0000000..f4f411e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.cpp @@ -0,0 +1,134 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.h" + +#include "SGCore/SGNovaGloveInfo.h" +#include "SGCore/SGNovaGloveSensorData.h" + +USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::MakeNovaGloveSensorData(UObject* WorldContextObject) +{ + return USGNovaGloveSensorData::NewNovaGloveSensorData(WorldContextObject); +} + +USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::MakeNovaGloveSensorData_V_PV_FQuat_IR_bIP_BL_bC( + UObject* WorldContextObject, const TArray& Values, const int32 ParsedValues, + const FQuat& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + return USGNovaGloveSensorData::NewNovaGloveSensorData( + WorldContextObject, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging); +} + +USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::MakeNovaGloveSensorData_V_PV_FRotator_IR_bIP_BL_b( + UObject* WorldContextObject, const TArray& Values, const int32 ParsedValues, + const FRotator& ImuRotation, const bool bImuParsed, const float BatteryLevel, const bool bCharging) +{ + return USGNovaGloveSensorData::NewNovaGloveSensorData( + WorldContextObject, Values, ParsedValues, ImuRotation, bImuParsed, BatteryLevel, bCharging); +} + +USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::Empty(UObject* WorldContextObject) +{ + return USGNovaGloveSensorData::Empty(WorldContextObject); +} + +USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::Parse( + UObject* WorldContextObject, const FString& RawData, const USGNovaGloveInfo* GloveInfo) +{ + return USGNovaGloveSensorData::Parse(WorldContextObject, RawData, GloveInfo); +} + +USGNovaGloveSensorData* USGNovaGloveSensorDataKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGNovaGloveSensorData::Deserialize(WorldContextObject, SerializedString); +} + +TArray USGNovaGloveSensorDataKismetLibrary::GetSensorValues( + const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->GetSensorValues(); +} + +float USGNovaGloveSensorDataKismetLibrary::GetSensorValue(const USGNovaGloveSensorData* NovaGloveSensorData, + const ESGFinger Finger, const ESGNovaSensorLocation Location) +{ + return NovaGloveSensorData->GetSensorValue(Finger, Location); +} + +int32 USGNovaGloveSensorDataKismetLibrary::GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->GetParsedValues(); +} + +FQuat USGNovaGloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->GetImuRotationQ(); +} + +FRotator USGNovaGloveSensorDataKismetLibrary::GetImuRotation_FRotator(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->GetImuRotation(); +} + +bool USGNovaGloveSensorDataKismetLibrary::IsImuParsed(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->IsImuParsed(); +} + +float USGNovaGloveSensorDataKismetLibrary::GetBatteryLevel(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->GetBatteryLevel(); +} + +bool USGNovaGloveSensorDataKismetLibrary::IsCharging(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->IsCharging(); +} + +bool USGNovaGloveSensorDataKismetLibrary::Equals(const USGNovaGloveSensorData* A, const USGNovaGloveSensorData* B) +{ + return A->Equals(B); +} + +FString USGNovaGloveSensorDataKismetLibrary::ToString(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->ToString(); +} + +FString USGNovaGloveSensorDataKismetLibrary::SGSerialize(const USGNovaGloveSensorData* NovaGloveSensorData) +{ + return NovaGloveSensorData->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseComKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseComKismetLibrary.cpp new file mode 100644 index 0000000..5c27d3e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseComKismetLibrary.cpp @@ -0,0 +1,68 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseComKismetLibrary.h" + +#include "SGCore/SGSenseCom.h" + +bool USGSenseComKismetLibrary::RegisterExe() +{ + return FSGSenseCom::RegisterExe(); +} + +bool USGSenseComKismetLibrary::RegisterExe_EP(const FString& ExePath) +{ + return FSGSenseCom::RegisterExe(ExePath); +} + +bool USGSenseComKismetLibrary::GetExePath(FString& OutExePath) +{ + return FSGSenseCom::GetExePath(OutExePath); +} + +bool USGSenseComKismetLibrary::ScanningActive() +{ + return FSGSenseCom::ScanningActive(); +} + +bool USGSenseComKismetLibrary::GetCurrentExeDirectory(FString& OutDirectory) +{ + return FSGSenseCom::GetCurrentExeDirectory(OutDirectory); +} + +bool USGSenseComKismetLibrary::StartupSenseCom() +{ + return FSGSenseCom::StartupSenseCom(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveInfoKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveInfoKismetLibrary.cpp new file mode 100644 index 0000000..f4359db --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveInfoKismetLibrary.cpp @@ -0,0 +1,211 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseGloveInfoKismetLibrary.h" + +#include "SGCore/SGSenseGloveInfo.h" +#include "SGUtils/SGArrayUtils.h" + +USGSenseGloveInfo* USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo(UObject* WorldContextObject) +{ + return USGSenseGloveInfo::NewSenseGloveInfo(WorldContextObject); +} + +USGSenseGloveInfo* +USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo_DI_HV_FV_SFV_bRH_NOS_FQuat_IC_SP_TArrayFQuat_SR_GL_F( + UObject* WorldContextObject, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions) +{ + return USGSenseGloveInfo::NewSenseGloveInfo(WorldContextObject, DeviceId, + HardwareVersion, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, ImuCorrection, + StartPositions, StartRotations, + GloveLengths, Functions); +} + +USGSenseGloveInfo* +USGSenseGloveInfoKismetLibrary::MakeSenseGloveInfo_DI_HV_FV_SFV_bRH_NOS_FRotator_IC_SP_TArrayFRotator_SR_GL_F( + UObject* WorldContextObject, const FString& DeviceId, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions) +{ + return USGSenseGloveInfo::NewSenseGloveInfo(WorldContextObject, DeviceId, + HardwareVersion, FirmwareVersion, SubFirmwareVersion, + bRightHanded, NumberOfSensors, ImuCorrection, + StartPositions, StartRotations, + GloveLengths, Functions); +} + +bool USGSenseGloveInfoKismetLibrary::Parse(UObject* WorldContextObject, + const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo, + const bool bUpdateOldModels) +{ + return USGSenseGloveInfo::Parse(WorldContextObject, ConstantsString, OutGloveInfo, bUpdateOldModels); +} + +USGSenseGloveInfo* USGSenseGloveInfoKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGSenseGloveInfo::Deserialize(WorldContextObject, SerializedString); +} + +FString USGSenseGloveInfoKismetLibrary::GetDeviceId(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetDeviceId(); +} + +FString USGSenseGloveInfoKismetLibrary::GetHardwareVersion(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetHardwareVersion(); +} + +int32 USGSenseGloveInfoKismetLibrary::GetFirmwareVersion(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetFirmwareVersion(); +} + +int32 USGSenseGloveInfoKismetLibrary::GetSubFirmwareVersion(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetSubFirmwareVersion(); +} + +bool USGSenseGloveInfoKismetLibrary::IsRight(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->IsRight(); +} + +int32 USGSenseGloveInfoKismetLibrary::GetNumberOfSensors(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetNumberOfSensors(); +} + +FQuat USGSenseGloveInfoKismetLibrary::GetImuCorrection_FQuat(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetImuCorrectionQ(); +} + +FRotator USGSenseGloveInfoKismetLibrary::GetImuCorrection_FRotator(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetImuCorrection(); +} + +TArray USGSenseGloveInfoKismetLibrary::GetStartPositions(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetStartPositions(); +} + +TArray USGSenseGloveInfoKismetLibrary::GetStartRotations_TArrayFQuat(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetStartRotationsQ(); +} + +TArray USGSenseGloveInfoKismetLibrary::GetStartRotations_TArrayFRotator( + const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetStartRotations(); +} + +TArray USGSenseGloveInfoKismetLibrary::GetGloveLengths(const USGSenseGloveInfo* SenseGloveInfo) +{ + return FSGArrayUtils::ToNestedBPArray(SenseGloveInfo->GetGloveLengths()); +} + +TArray USGSenseGloveInfoKismetLibrary::GetFunctions(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->GetFunctions(); +} + +FVector USGSenseGloveInfoKismetLibrary::GetStartPosition(const USGSenseGloveInfo* SenseGloveInfo, + const ESGFinger Finger) +{ + return SenseGloveInfo->GetStartPosition(Finger); +} + +FQuat USGSenseGloveInfoKismetLibrary::GetStartRotation_FQuat(const USGSenseGloveInfo* SenseGloveInfo, + const ESGFinger Finger) +{ + return SenseGloveInfo->GetStartRotationQ(Finger); +} + +FRotator USGSenseGloveInfoKismetLibrary::GetStartRotation_FRotator(const USGSenseGloveInfo* SenseGloveInfo, + const ESGFinger Finger) +{ + return SenseGloveInfo->GetStartRotation(Finger); +} + +TArray USGSenseGloveInfoKismetLibrary::GetGloveLengths_F(const USGSenseGloveInfo* SenseGloveInfo, + const ESGFinger Finger) +{ + return SenseGloveInfo->GetGloveLengths(Finger); +} + +TArray USGSenseGloveInfoKismetLibrary::ToGloveAngles(const USGSenseGloveInfo* SenseGloveInfo, + const TArray& SensorAngles) +{ + TArray> SensorAnglesNestedArray{ + FSGArrayUtils::FromNestedBPArray< + float, FSGFloatArray, &FSGFloatArray::FloatArray>(SensorAngles) + }; + const TArray GloveAngles{ + FSGArrayUtils::ToNestedBPArray( + SenseGloveInfo->ToGloveAngles(MoveTemp(SensorAnglesNestedArray))) + }; + return GloveAngles; +} + +bool USGSenseGloveInfoKismetLibrary::Equals(const USGSenseGloveInfo* A, const USGSenseGloveInfo* B) +{ + return A->Equals(B); +} + +FString USGSenseGloveInfoKismetLibrary::ToString_bSN(const USGSenseGloveInfo* SenseGloveInfo, const bool bShortNotation) +{ + return SenseGloveInfo->ToString(bShortNotation); +} + +FString USGSenseGloveInfoKismetLibrary::ToString(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->ToString(); +} + +FString USGSenseGloveInfoKismetLibrary::SGSerialize(const USGSenseGloveInfo* SenseGloveInfo) +{ + return SenseGloveInfo->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp new file mode 100644 index 0000000..31841bc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveKismetLibrary.cpp @@ -0,0 +1,430 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseGloveKismetLibrary.h" + +#include "SGCore/SGDevice.h" +#include "SGCore/SGHandInterpolator.h" +#include "SGCore/SGHandPose.h" +#include "SGCore/SGSenseGlove.h" +#include "SGCore/SGSenseGloveSensorNormalizer.h" +#include "SGUtils/SGArrayUtils.h" + +USGDevice* USGSenseGloveKismetLibrary::Parse(UObject* WorldContextObject, const FString& ConstantsString) +{ + return USGSenseGlove::Parse(WorldContextObject, ConstantsString); +} + +TArray USGSenseGloveKismetLibrary::GetSenseGloves(UObject* WorldContextObject) +{ + return USGSenseGlove::GetSenseGloves(WorldContextObject); +} + +bool USGSenseGloveKismetLibrary::GetSenseGlove_OutG(UObject* WorldContextObject, USGSenseGlove*& OutGlove) +{ + return USGSenseGlove::GetSenseGlove(WorldContextObject, OutGlove); +} + +bool USGSenseGloveKismetLibrary::GetSenseGlove_bRH_OutG(UObject* WorldContextObject, + const bool bRightHanded, USGSenseGlove*& OutGlove) +{ + return USGSenseGlove::GetSenseGlove(WorldContextObject, bRightHanded, OutGlove); +} + +void USGSenseGloveKismetLibrary::CalculateGloveLocation_RP_FQuat_RR_TH_bRH_MO_OutGP_FQuat_OutGR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + USGSenseGlove::CalculateGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, MountedOn, + OutGlovePosition, OutGloveRotation); +} + +void USGSenseGloveKismetLibrary::CalculateGloveLocation_RP_FRotator_RR_TH_bRH_MO_OutGP_FRotator_OutGR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + USGSenseGlove::CalculateGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, MountedOn, + OutGlovePosition, OutGloveRotation); +} + +void USGSenseGloveKismetLibrary::CalculateWristLocation_RP_FQuat_RR_TH_bRH_MO_GWPOffset_FQuat_GWRO_OutWP_FQuat_OutWR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + USGSenseGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, MountedOn, + GloveWristPositionOffset, GloveWristRotationOffset, + OutWristPosition, OutWristRotation); +} + +void +USGSenseGloveKismetLibrary::CalculateWristLocation_RP_FRotator_RR_TH_bRH_MO_GWPOffset_FRotator_GWRO_OutWP_FRotator_OutWR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const bool bRightHanded, const ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + USGSenseGlove::CalculateWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, bRightHanded, MountedOn, + GloveWristPositionOffset, GloveWristRotationOffset, + OutWristPosition, OutWristRotation); +} + +FString USGSenseGloveKismetLibrary::GetHapticsByte() +{ + return FString::Printf(TEXT("%c"), USGSenseGlove::GetHapticsByte()); +} + +FString USGSenseGloveKismetLibrary::GetThumperByte() +{ + return FString::Printf(TEXT("%c"), USGSenseGlove::GetThumperByte()); +} + +FVector USGSenseGloveKismetLibrary::GetDefaultThimbleOffset() +{ + return USGSenseGlove::GetDefaultThimbleOffset(); +} + +USGSenseGlovePose* USGSenseGloveKismetLibrary::CalculateGlovePose_SD_GM( + UObject* WorldContextObject, + const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel) +{ + return USGSenseGlove::CalculateGlovePose(WorldContextObject, SensorData, GloveModel); +} + +USGSenseGlovePose* USGSenseGloveKismetLibrary::CalculateGlovePose_GA_GM( + UObject* WorldContextObject, + const TArray& GloveAngles, const USGSenseGloveInfo* GloveModel) +{ + TArray> GloveAnglesNestedArray{ + FSGArrayUtils::FromNestedBPArray(GloveAngles) + }; + return USGSenseGlove::CalculateGlovePose(WorldContextObject, MoveTemp(GloveAnglesNestedArray), GloveModel); +} + +void USGSenseGloveKismetLibrary::NormalizeValues( + const TArray& SumAngles, const USGSenseGloveSensorNormalizer* Normalizer, + TArray& OutFlexions, TArray& OutAbductions) +{ + USGSenseGlove::NormalizeValues(SumAngles, Normalizer, OutFlexions, OutAbductions); +} + +void USGSenseGloveKismetLibrary::CalculateHandAngles( + const USGSenseGlovePose* GlovePose, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + TArray& OutHandAngles) +{ + TArray> OutHandAnglesArray; + USGSenseGlove::CalculateHandAngles(GlovePose, Normalizer, NormalizedToAngles, OutHandAnglesArray); + + TArray OutHandHandAnglesNestedArray{ + FSGArrayUtils::ToNestedBPArray(OutHandAnglesArray) + }; + OutHandAngles = MoveTemp(OutHandHandAnglesNestedArray); +} + +void USGSenseGloveKismetLibrary::CalculateHandPose( + UObject* WorldContextObject, + const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + USGHandPose*& OutHandPose) +{ + USGSenseGlove::CalculateHandPose( + WorldContextObject, + GlovePose, HandModel, Normalizer, NormalizedToAngles, OutHandPose); +} + +ESGDeviceType USGSenseGloveKismetLibrary::GetDeviceType(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetDeviceType(); +} + +FString USGSenseGloveKismetLibrary::GetDeviceId(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetDeviceId(); +} + +FString USGSenseGloveKismetLibrary::GetHardwareVersion(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetHardwareVersion(); +} + +int32 USGSenseGloveKismetLibrary::GetFirmwareVersion(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetFirmwareVersion(); +} + +int32 USGSenseGloveKismetLibrary::GetSubFirmwareVersion(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetSubFirmwareVersion(); +} + +bool USGSenseGloveKismetLibrary::IsRight(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->IsRight(); +} + +bool USGSenseGloveKismetLibrary::GetImuRotation_FQuat_OutI(USGSenseGlove* SenseGlove, FQuat& OutImu) +{ + return SenseGlove->GetImuRotation(OutImu); +} + +bool USGSenseGloveKismetLibrary::GetImuRotation_FRotator_OutI(USGSenseGlove* SenseGlove, FRotator& OutImu) +{ + return SenseGlove->GetImuRotation(OutImu); +} + +bool USGSenseGloveKismetLibrary::GetHandPose( + UObject* WorldContextObject, USGSenseGlove* SenseGlove, const USGBasicHandModel* HandModel, + USGHandPose*& OutHandPose) +{ + return SenseGlove->GetHandPose(WorldContextObject, HandModel, OutHandPose); +} + +bool USGSenseGloveKismetLibrary::GetHandAngles(const USGSenseGlove* SenseGlove, TArray& OutHandAngles) +{ + TArray> HandAnglesNestedArray; + const bool bResult = SenseGlove->GetHandAngles(HandAnglesNestedArray); + OutHandAngles = FSGArrayUtils::ToNestedBPArray(MoveTemp(HandAnglesNestedArray)); + return bResult; +} + +ESGHapticGloveCalibrationState USGSenseGloveKismetLibrary::GetCalibrationState(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetCalibrationState(); +} + +void USGSenseGloveKismetLibrary::EndCalibration(USGSenseGlove* SenseGlove) +{ + SenseGlove->EndCalibration(); +} + +void USGSenseGloveKismetLibrary::ResetCalibration(USGSenseGlove* SenseGlove) +{ + SenseGlove->ResetCalibration(); +} + +void USGSenseGloveKismetLibrary::StopHaptics(USGSenseGlove* SenseGlove) +{ + SenseGlove->StopHaptics(); +} + +void USGSenseGloveKismetLibrary::StopVibrations(USGSenseGlove* SenseGlove) +{ + SenseGlove->StopVibrations(); +} + +bool USGSenseGloveKismetLibrary::SendHaptics(USGSenseGlove* SenseGlove) +{ + return SenseGlove->SendHaptics(); +} + +bool USGSenseGloveKismetLibrary::QueueForceFeedbackLevels(USGSenseGlove* SenseGlove, const TArray& Levels01) +{ + return SenseGlove->QueueForceFeedbackLevels(Levels01); +} + +bool USGSenseGloveKismetLibrary::QueueForceFeedbackLevel(USGSenseGlove* SenseGlove, + const int32 Finger, const float Level01) +{ + return SenseGlove->QueueForceFeedbackLevel(Finger, Level01); +} + +bool USGSenseGloveKismetLibrary::QueueVibroLevels(USGSenseGlove* SenseGlove, const TArray& Amplitudes) +{ + return SenseGlove->QueueVibroLevels(Amplitudes); +} + +bool USGSenseGloveKismetLibrary::QueueVibroLevel_L_L(USGSenseGlove* SenseGlove, + const ESGHapticLocation Location, const float Level01) +{ + return SenseGlove->QueueVibroLevel(Location, Level01); +} + +void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation) +{ + SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutGlovePosition, OutGloveRotation); +} + +void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FQuat_RR_TH_MO_OutGP_FQuat_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation) +{ + SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, MountedOn, + OutGlovePosition, OutGloveRotation); +} + +void USGSenseGloveKismetLibrary::GetGloveLocation_RP_FRotator_RR_TH_MO_OutGP_FRotator_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, const ESGFinger MountedOn, FVector& OutGlovePosition, + FRotator& OutGloveRotation) +{ + SenseGlove->GetGloveLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, MountedOn, + OutGlovePosition, OutGloveRotation); +} + +void USGSenseGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGSenseGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + OutWristPosition, OutWristRotation); +} + +void USGSenseGloveKismetLibrary::GetWristLocation_RP_FQuat_RR_TH_GWPO_FQuat_GWRO_OutWP_FQuat_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation) +{ + SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + GloveWristPositionOffset, GloveWristRotationOffset, + OutWristPosition, OutWristRotation); +} + +void USGSenseGloveKismetLibrary::GetWristLocation_RP_FRotator_RR_TH_GWPO_FRotator_GWRO_OutWP_FRotator_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + const ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation) +{ + SenseGlove->GetWristLocation(ReferencePosition, ReferenceRotation, + TrackingHardware, + GloveWristPositionOffset, GloveWristRotationOffset, + OutWristPosition, OutWristRotation); +} + +USGSenseGloveInfo* USGSenseGloveKismetLibrary::GetGloveInfo( + UObject* WorldContextObject, const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetGloveInfo(WorldContextObject); +} + +TArray USGSenseGloveKismetLibrary::GetFingerThimbleOffsets(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->GetFingerThimbleOffsets(); +} + +void USGSenseGloveKismetLibrary::SetFingerThimbleOffset(USGSenseGlove* SenseGlove, + const int32 Finger, const FVector& Offset) +{ + SenseGlove->SetFingerThimbleOffset(Finger, Offset); +} + +bool USGSenseGloveKismetLibrary::SupportsWristActuator(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->SupportsWristActuator(); +} + +bool USGSenseGloveKismetLibrary::GetSensorData(UObject* WorldContextObject, const USGSenseGlove* SenseGlove, + USGSenseGloveSensorData*& OutSensorData) +{ + return SenseGlove->GetSensorData(WorldContextObject, OutSensorData); +} + +bool USGSenseGloveKismetLibrary::GetGlovePose_OutGP(UObject* WorldContextObject, USGSenseGlove* SenseGlove, + USGSenseGlovePose*& OutGlovePose) +{ + return SenseGlove->GetGlovePose(WorldContextObject, OutGlovePose); +} + +bool USGSenseGloveKismetLibrary::GetGlovePose_SD_OutGP( + UObject* WorldContextObject, USGSenseGlove* SenseGlove, + const USGSenseGloveSensorData* SensorData, USGSenseGlovePose*& OutGlovePose) +{ + return SenseGlove->GetGlovePose(WorldContextObject, SensorData, OutGlovePose); +} + +bool USGSenseGloveKismetLibrary::QueueVibroLevel_F_A(USGSenseGlove* SenseGlove, const int32 Finger, + const float Amplitude) +{ + return SenseGlove->QueueVibroLevel(Finger, Amplitude); +} + +bool USGSenseGloveKismetLibrary::QueueThumperCommand(USGSenseGlove* SenseGlove, + const ESGSenseGloveThumperCommand Command) +{ + return SenseGlove->QueueThumperCommand(Command); +} + +FString USGSenseGloveKismetLibrary::ToString(const USGSenseGlove* SenseGlove) +{ + return SenseGlove->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGlovePoseKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGlovePoseKismetLibrary.cpp new file mode 100644 index 0000000..637f059 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGlovePoseKismetLibrary.cpp @@ -0,0 +1,142 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseGlovePoseKismetLibrary.h" + +#include "SGCore/SGSenseGlovePose.h" +#include "SGUtils/SGArrayUtils.h" + +USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose(UObject* WorldContextObject) +{ + return USGSenseGlovePose::NewSenseGlovePose(WorldContextObject); +} + +USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose_bRH_JP_TArrayFSGQuatArray_JR_GA( + UObject* WorldContextObject, const bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& GloveAngles) +{ + return USGSenseGlovePose::NewSenseGlovePose(WorldContextObject, bRightHanded, + JointPositions, JointRotations, GloveAngles); +} + +USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::MakeSenseGlovePose_bRH_JP_TArrayFSGRotatorArray_JR_GA( + UObject* WorldContextObject, const bool bRightHanded, + const TArray& JointPositions, const TArray& JointRotations, + const TArray& GloveAngles) +{ + return USGSenseGlovePose::NewSenseGlovePose(WorldContextObject, bRightHanded, + JointPositions, JointRotations, GloveAngles); +} + +USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::IdlePose(UObject* WorldContextObject, + const USGSenseGloveInfo* GloveInfo) +{ + return USGSenseGlovePose::IdlePose(WorldContextObject, GloveInfo); +} + +USGSenseGlovePose* USGSenseGlovePoseKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGSenseGlovePose::Deserialize(WorldContextObject, SerializedString); +} + +bool USGSenseGlovePoseKismetLibrary::IsRight(const USGSenseGlovePose* SenseGlovePose) +{ + return SenseGlovePose->IsRight(); +} + +TArray USGSenseGlovePoseKismetLibrary::GetJointPositions(const USGSenseGlovePose* SenseGlovePose) +{ + return FSGArrayUtils::ToNestedBPArray(SenseGlovePose->GetJointPositions()); +} + +TArray USGSenseGlovePoseKismetLibrary::GetJointRotations_TArrayFSGQuatArray( + const USGSenseGlovePose* SenseGlovePose) +{ + return FSGArrayUtils::ToNestedBPArray(SenseGlovePose->GetJointRotationsQ()); +} + +TArray USGSenseGlovePoseKismetLibrary::GetJointRotations_TArrayFSGRotatorArray( + const USGSenseGlovePose* SenseGlovePose) +{ + return FSGArrayUtils::ToNestedBPArray(SenseGlovePose->GetJointRotations()); +} + +TArray USGSenseGlovePoseKismetLibrary::GetGloveAngles(const USGSenseGlovePose* SenseGlovePose) +{ + return FSGArrayUtils::ToNestedBPArray(SenseGlovePose->GetGloveAngles()); +} + +TArray USGSenseGlovePoseKismetLibrary::GetThimblePositions(const USGSenseGlovePose* SenseGlovePose) +{ + return SenseGlovePose->GetThimblePositions(); +} + +TArray USGSenseGlovePoseKismetLibrary::GetThimbleRotations_FQuat(const USGSenseGlovePose* SenseGlovePose) +{ + return SenseGlovePose->GetThimbleRotationsQ(); +} + +TArray USGSenseGlovePoseKismetLibrary::GetThimbleRotations_FRotator(const USGSenseGlovePose* SenseGlovePose) +{ + return SenseGlovePose->GetThimbleRotations(); +} + +TArray USGSenseGlovePoseKismetLibrary::GetTotalGloveAngles(const USGSenseGlovePose* SenseGlovePose) +{ + return SenseGlovePose->GetTotalGloveAngles(); +} + +TArray USGSenseGlovePoseKismetLibrary::CalculateFingertips( + const USGSenseGlovePose* SenseGlovePose, const TArray& FingerOffsets) +{ + return SenseGlovePose->CalculateFingertips(FingerOffsets); +} + +bool USGSenseGlovePoseKismetLibrary::Equals(const USGSenseGlovePose* A, const USGSenseGlovePose* B) +{ + return A->Equals(B); +} + +FString USGSenseGlovePoseKismetLibrary::ToString(const USGSenseGlovePose* SenseGlovePose, const bool bShortFormat) +{ + return SenseGlovePose->ToString(bShortFormat); +} + +FString USGSenseGlovePoseKismetLibrary::SGSerialize(const USGSenseGlovePose* SenseGlovePose) +{ + return SenseGlovePose->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.cpp new file mode 100644 index 0000000..0c68e77 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.cpp @@ -0,0 +1,134 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.h" + +#include "SGCore/SGSenseGloveSensorData.h" +#include "SGUtils/SGArrayUtils.h" + +USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData(UObject* WorldContextObject) +{ + return USGSenseGloveSensorData::NewSenseGloveSensorData(WorldContextObject); +} + +USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData_SA_FQuatImuRotation_PV_bIP( + UObject* WorldContextObject, + const TArray& SensorAngles, + const FQuat& ImuRotation, const int32 ParsedValues, const bool bImuParsed) +{ + return USGSenseGloveSensorData::NewSenseGloveSensorData(WorldContextObject, SensorAngles, + ImuRotation, ParsedValues, bImuParsed); +} + +USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::MakeSenseGloveSensorData_SA_FRotatorImuRotation_PV_bIP( + UObject* WorldContextObject, + const TArray& SensorAngles, + const FRotator& ImuRotation, const int32 ParsedValues, const bool bImuParsed) +{ + return USGSenseGloveSensorData::NewSenseGloveSensorData(WorldContextObject, SensorAngles, + ImuRotation, ParsedValues, bImuParsed); +} + +USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::Empty(UObject* WorldContextObject) +{ + return USGSenseGloveSensorData::Empty(WorldContextObject); +} + +USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::Parse( + UObject* WorldContextObject, + const FString& RawData, const USGSenseGloveInfo* GloveInfo) +{ + return USGSenseGloveSensorData::Parse(WorldContextObject, RawData, GloveInfo); +} + +USGSenseGloveSensorData* USGSenseGloveSensorDataKismetLibrary::Deserialize(UObject* WorldContextObject, + const FString& SerializedString) +{ + return USGSenseGloveSensorData::Deserialize(WorldContextObject, SerializedString); +} + +TArray USGSenseGloveSensorDataKismetLibrary::GetSensorAngles( + const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return FSGArrayUtils::ToNestedBPArray(SenseGloveSensorData->GetSensorAngles()); +} + +TArray USGSenseGloveSensorDataKismetLibrary::GetSensorAngles_F( + const USGSenseGloveSensorData* SenseGloveSensorData, const ESGFinger Finger) +{ + return SenseGloveSensorData->GetSensorAngles(Finger); +} + +TArray USGSenseGloveSensorDataKismetLibrary::GetAngleSequence( + const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->GetAngleSequence(); +} + +FQuat USGSenseGloveSensorDataKismetLibrary::GetImuRotation_FQuat(const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->GetImuRotationQ(); +} + +FRotator USGSenseGloveSensorDataKismetLibrary::GetImuRotation_FRotator( + const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->GetImuRotation(); +} + +int32 USGSenseGloveSensorDataKismetLibrary::GetParsedValues(const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->GetParsedValues(); +} + +bool USGSenseGloveSensorDataKismetLibrary::IsImuParsed(const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->IsImuParsed(); +} + +bool USGSenseGloveSensorDataKismetLibrary::Equals(const USGSenseGloveSensorData* A, const USGSenseGloveSensorData* B) +{ + return A->Equals(B); +} + +FString USGSenseGloveSensorDataKismetLibrary::ToString(const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->ToString(); +} + +FString USGSenseGloveSensorDataKismetLibrary::SGSerialize(const USGSenseGloveSensorData* SenseGloveSensorData) +{ + return SenseGloveSensorData->SGSerialize(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.cpp new file mode 100644 index 0000000..ad78150 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.h" + +#include "SGCore/SGSenseGloveSensorNormalizer.h" + +USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizerKismetLibrary::MakeSenseGloveSensorNormalizer( + UObject* WorldContextObject) +{ + return USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer(WorldContextObject); +} + +USGSenseGloveSensorNormalizer* USGSenseGloveSensorNormalizerKismetLibrary::MakeSenseGloveSensorNormalizer_bRH( + UObject* WorldContextObject, const bool bRightHanded) +{ + return USGSenseGloveSensorNormalizer::NewSenseGloveSensorNormalizer(WorldContextObject, bRightHanded); +} + +float USGSenseGloveSensorNormalizerKismetLibrary::NormalizeFlexion( + const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer, const int32 Finger, const float SumFlexionAngles) +{ + return SenseGloveSensorNormalizer->NormalizeFlexion(Finger, SumFlexionAngles); +} + +float USGSenseGloveSensorNormalizerKismetLibrary::NormalizeAbduction( + const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer, const int32 Finger, const float SumAbductionAngles) +{ + return SenseGloveSensorNormalizer->NormalizeFlexion(Finger, SumAbductionAngles); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveVarsKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveVarsKismetLibrary.cpp new file mode 100644 index 0000000..043cc82 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSenseGloveVarsKismetLibrary.cpp @@ -0,0 +1,117 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSenseGloveVarsKismetLibrary.h" + +#include "SGCore/SGSenseGloveInfo.h" +#include "SGCore/SGSenseGloveVars.h" +#include "SGUtils/SGArrayUtils.h" + +FString USGSenseGloveVarsKismetLibrary::GetStandardConstantsString(const FString& HardwareVersion, + const float FirmwareVersion, const bool bRightHanded) +{ + return FSGSenseGloveVars::GetStandardConstantsString(HardwareVersion, FirmwareVersion, bRightHanded); +} + +FString USGSenseGloveVarsKismetLibrary::GetSensorString(const FString& HardwareVersion, const float FirmwareVersion) +{ + return FSGSenseGloveVars::GetSensorString(HardwareVersion, FirmwareVersion); +} + +TArray USGSenseGloveVarsKismetLibrary::GetStartPositions(const FString& HardwareVersion, + const bool bRightHanded) +{ + return FSGSenseGloveVars::GetStartPositions(HardwareVersion, bRightHanded); +} + +TArray USGSenseGloveVarsKismetLibrary::GetStartRotations_TArrayFQuat( + const FString& HardwareVersion, const bool bRightHanded) +{ + return FSGSenseGloveVars::GetStartRotationsQ(HardwareVersion, bRightHanded); +} + +TArray USGSenseGloveVarsKismetLibrary::GetStartRotations_TArrayFRotator( + const FString& HardwareVersion, const bool bRightHanded) +{ + return FSGSenseGloveVars::GetStartRotations(HardwareVersion, bRightHanded); +} + +TArray USGSenseGloveVarsKismetLibrary::GetGloveLengths(const FString& HardwareVersion) +{ + return FSGArrayUtils::ToNestedBPArray(FSGSenseGloveVars::GetGloveLengths(HardwareVersion)); +} + +int32 USGSenseGloveVarsKismetLibrary::GetSensors(const FString& HardwareVersion) +{ + return FSGSenseGloveVars::GetSensors(HardwareVersion); +} + +FQuat USGSenseGloveVarsKismetLibrary::GetImuCorrection_FQuat(const FString& HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + return FSGSenseGloveVars::GetImuCorrectionQ(HardwareVersion, FirmwareVersion, SubFirmwareVersion); +} + +FRotator USGSenseGloveVarsKismetLibrary::GetImuCorrection_FRotator(const FString& HardwareVersion, + const int32 FirmwareVersion, + const int32 SubFirmwareVersion) +{ + return FSGSenseGloveVars::GetImuCorrection(HardwareVersion, FirmwareVersion, SubFirmwareVersion); +} + +TArray USGSenseGloveVarsKismetLibrary::GetFunctions(const FString& HardwareVersion, + const int32 FirmwareVersion, const int32 SubFirmwareVersion) +{ + return FSGSenseGloveVars::GetFunctions(HardwareVersion, FirmwareVersion, SubFirmwareVersion); +} + +USGSenseGloveInfo* USGSenseGloveVarsKismetLibrary::GenerateGloveModel_HV_FV_SFV_bRH( + UObject* WorldContextObject, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded) +{ + return FSGSenseGloveVars::GenerateGloveModel(WorldContextObject, + HardwareVersion, FirmwareVersion, SubFirmwareVersion, bRightHanded); +} + +USGSenseGloveInfo* USGSenseGloveVarsKismetLibrary::GenerateGloveModel_HV_FV_SFV_bRH_CI( + UObject* WorldContextObject, + const FString& HardwareVersion, const int32 FirmwareVersion, const int32 SubFirmwareVersion, + const bool bRightHanded, const FString& CustomId) +{ + return FSGSenseGloveVars::GenerateGloveModel( + WorldContextObject, HardwareVersion, FirmwareVersion, SubFirmwareVersion, bRightHanded, CustomId); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSensorNormalizationKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSensorNormalizationKismetLibrary.cpp new file mode 100644 index 0000000..e0fc7d0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGSensorNormalizationKismetLibrary.cpp @@ -0,0 +1,111 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGSensorNormalizationKismetLibrary.h" + +#include "SGCore/SGSensorNormalization.h" + +USGSensorNormalization* USGSensorNormalizationKismetLibrary::MakeSensorNormalization(UObject* WorldContextObject) +{ + return USGSensorNormalization::NewSensorNormalization(WorldContextObject); +} + +USGSensorNormalization* USGSensorNormalizationKismetLibrary::MakeSensorNormalization_MR( + UObject* WorldContextObject, const TArray& MovementRanges) +{ + return USGSensorNormalization::NewSensorNormalization(WorldContextObject, MovementRanges); +} + +bool USGSensorNormalizationKismetLibrary::CollectsNormalization(const USGSensorNormalization* SensorNormalization) +{ + return SensorNormalization->CollectsNormalization(); +} + +void USGSensorNormalizationKismetLibrary::SetCollectNormalization(USGSensorNormalization* SensorNormalization, + const bool bCollectNormalization) +{ + SensorNormalization->SetCollectNormalization(bCollectNormalization); +} + +int32 USGSensorNormalizationKismetLibrary::GetLength(const USGSensorNormalization* SensorNormalization) +{ + return SensorNormalization->GetLength(); +} + +int32 USGSensorNormalizationKismetLibrary::GetMoveCount(const USGSensorNormalization* SensorNormalization) +{ + return SensorNormalization->GetMoveCount(); +} + +bool USGSensorNormalizationKismetLibrary::AllSensorsMoving(const USGSensorNormalization* SensorNormalization) +{ + return SensorNormalization->AllSensorsMoving(); +} + +void USGSensorNormalizationKismetLibrary::ResetNormalization(USGSensorNormalization* SensorNormalization) +{ + SensorNormalization->ResetNormalization(); +} + +void USGSensorNormalizationKismetLibrary::UpdateNormalization(USGSensorNormalization* SensorNormalization, + const float Value, const int32 Index) +{ + SensorNormalization->UpdateNormalization(Value, Index); +} + +float USGSensorNormalizationKismetLibrary::NormalizeValue(USGSensorNormalization* SensorNormalization, + const float Value, const int32 Index) +{ + return SensorNormalization->NormalizeValue(Value, Index); +} + +TArray USGSensorNormalizationKismetLibrary::NormalizeValues(USGSensorNormalization* SensorNormalization, + const TArray& Values) +{ + return SensorNormalization->NormalizeValues(Values); +} + +bool USGSensorNormalizationKismetLibrary::MovedEnough(const USGSensorNormalization* SensorNormalization, + const int32 Index) +{ + return SensorNormalization->MovedEnough(Index); +} + +float USGSensorNormalizationKismetLibrary::Denormalize( + const USGSensorNormalization* SensorNormalization, + const float Value01, const int32 Index, const float FallbackValue) +{ + return SensorNormalization->Denormalize(Value01, Index, FallbackValue); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGThresholdCommandKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGThresholdCommandKismetLibrary.cpp new file mode 100644 index 0000000..1a5970e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGThresholdCommandKismetLibrary.cpp @@ -0,0 +1,103 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGThresholdCommandKismetLibrary.h" + +#include "SGCore/SGThresholdCommand.h" + +USGThresholdCommand* USGThresholdCommandKismetLibrary::MakeThresholdCommand(UObject* WorldContextObject) +{ + return USGThresholdCommand::NewThresholdCommand(WorldContextObject); +} + +USGThresholdCommand* USGThresholdCommandKismetLibrary::MakeThresholdCommand_AF_TV( + UObject* WorldContextObject, + const TArray& AffectedFingers, const TArray& ThresholdValues) +{ + return USGThresholdCommand::NewThresholdCommand(WorldContextObject, AffectedFingers, ThresholdValues); +} + +float USGThresholdCommandKismetLibrary::GetThreshold(const USGThresholdCommand* ThresholdCommand, const int32 Finger) +{ + return ThresholdCommand->GetThreshold(Finger); +} + +void USGThresholdCommandKismetLibrary::SetThreshold(USGThresholdCommand* ThresholdCommand, + const int32 Finger, const float ThresholdValue) +{ + ThresholdCommand->SetThreshold(Finger, ThresholdValue); +} + +TArray USGThresholdCommandKismetLibrary::GetThresholds(const USGThresholdCommand* ThresholdCommand) +{ + return ThresholdCommand->GetThresholds(); +} + +void USGThresholdCommandKismetLibrary::SetThresholds( + USGThresholdCommand* ThresholdCommand, + const TArray& AffectedFingers, const TArray& ThresholdValues) +{ + ThresholdCommand->SetThresholds(AffectedFingers, ThresholdValues); +} + +bool USGThresholdCommandKismetLibrary::GetFingerActive(const USGThresholdCommand* ThresholdCommand, const int32 Finger) +{ + return ThresholdCommand->GetFingerActive(Finger); +} + +TArray USGThresholdCommandKismetLibrary::GetActiveFingers(const USGThresholdCommand* ThresholdCommand) +{ + return ThresholdCommand->GetActiveFingers(); +} + +void USGThresholdCommandKismetLibrary::ClearThreshold(USGThresholdCommand* ThresholdCommand, const int32 Finger) +{ + ThresholdCommand->ClearThreshold(Finger); +} + +void USGThresholdCommandKismetLibrary::ClearThresholds(USGThresholdCommand* ThresholdCommand) +{ + ThresholdCommand->ClearThresholds(); +} + +bool USGThresholdCommandKismetLibrary::Equals(const USGThresholdCommand* A, const USGThresholdCommand* B) +{ + return A->Equals(B); +} + +FString USGThresholdCommandKismetLibrary::ToString(const USGThresholdCommand* ThresholdCommand) +{ + return ThresholdCommand->ToString(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGTrackingKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGTrackingKismetLibrary.cpp new file mode 100644 index 0000000..260370e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGTrackingKismetLibrary.cpp @@ -0,0 +1,580 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreKismet/SGTrackingKismetLibrary.h" + +#include "SGCore/SGTracking.h" + +void USGTrackingKismetLibrary::CalculateLocation_TP_FQuat_TR_PO_FQuat_RO_OutNP_FQuat_OutNR( + const FVector& TrackedPosition, const FQuat& TrackedRotation, + const FVector& PositionOffset, const FQuat& RotationOffset, + FVector& OutNewPosition, FQuat& OutNewRotation) +{ + return FSGTracking::CalculateLocation(TrackedPosition, TrackedRotation, PositionOffset, RotationOffset, + OutNewPosition, OutNewRotation); +} + +void USGTrackingKismetLibrary::CalculateLocation_TP_FRotator_TR_PO_FRotator_RO_OutNP_FRotator_OutNR( + const FVector& TrackedPosition, const FRotator& TrackedRotation, + const FVector& PositionOffset, const FRotator& RotationOffset, + FVector& OutNewPosition, FRotator& OutNewRotation) +{ + return FSGTracking::CalculateLocation(TrackedPosition, TrackedRotation, PositionOffset, RotationOffset, + OutNewPosition, OutNewRotation); +} + +TArray USGTrackingKismetLibrary::GetSenseGloveFingerToGlovePositionOrigin() +{ + return FSGTracking::GetSenseGloveFingerToGlovePositionOrigin(); +} + +TArray USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin_TArrayFQuat() +{ + return FSGTracking::GetSenseGloveFingerToGloveRotationOriginQ(); +} + +TArray USGTrackingKismetLibrary::GetSenseGloveFingerToGloveRotationOrigin_TArrayFRotator() +{ + return FSGTracking::GetSenseGloveFingerToGloveRotationOrigin(); +} + +FVector USGTrackingKismetLibrary::GetSenseGloveWristPositionOffset() +{ + return FSGTracking::GetSenseGloveWristPositionOffset(); +} + +FQuat USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset_FQuat() +{ + return FSGTracking::GetSenseGloveWristRotationOffsetQ(); +} + +FRotator USGTrackingKismetLibrary::GetSenseGloveWristRotationOffset_FRotator() +{ + return FSGTracking::GetSenseGloveWristRotationOffset(); +} + +void USGTrackingKismetLibrary::GetSenseGloveMountOffset_bRH_TF_OutIP_FQuat_OutIR( + const bool bRightHanded, const ESGFinger ToFinger, + FVector& OutIPosition, FQuat& OutIRotation) +{ + return FSGTracking::GetSenseGloveMountOffset(bRightHanded, ToFinger, OutIPosition, OutIRotation); +} + +void USGTrackingKismetLibrary::GetSenseGloveMountOffset_bRH_TF_OutIP_FRotator_OutIR( + const bool bRightHanded, const ESGFinger ToFinger, + FVector& OutIPosition, FRotator& OutIRotation) +{ + return FSGTracking::GetSenseGloveMountOffset(bRightHanded, ToFinger, OutIPosition, OutIRotation); +} + +void USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset_H_bRH_OutPO_FQuat_OutRO( + const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + return FSGTracking::GetSenseGloveTrackerMountOffset(Hardware, bRightHanded, + OutPositionOffset, OutRotationOffset); +} + +void USGTrackingKismetLibrary::GetSenseGloveTrackerMountOffset_H_bRH_OutPO_FRotator_OutRO( + const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + return FSGTracking::GetSenseGloveTrackerMountOffset(Hardware, bRightHanded, + OutPositionOffset, OutRotationOffset); +} + +FVector USGTrackingKismetLibrary::GetSenseGloveViveToAttachPosition() +{ + return FSGTracking::GetSenseGloveViveToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetSenseGloveViveToAttachRotation_FQuat() +{ + return FSGTracking::GetSenseGloveViveToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetSenseGloveViveToAttachRotation_FRotator() +{ + return FSGTracking::GetSenseGloveViveToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachPosition() +{ + return FSGTracking::GetSenseGloveOculusTouchToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation_FQuat() +{ + return FSGTracking::GetSenseGloveOculusTouchToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetSenseGloveOculusTouchToAttachRotation_FRotator() +{ + return FSGTracking::GetSenseGloveOculusTouchToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetNovaToWristPositionOffset() +{ + return FSGTracking::GetNovaToWristPositionOffset(); +} + +FQuat USGTrackingKismetLibrary::GetNovaToWristRotationOffset_FQuat() +{ + return FSGTracking::GetNovaToWristRotationOffsetQ(); +} + +FRotator USGTrackingKismetLibrary::GetNovaToWristRotationOffset_FRotator() +{ + return FSGTracking::GetNovaToWristRotationOffset(); +} + +FVector USGTrackingKismetLibrary::GetRightNovaViveToAttachPosition() +{ + return FSGTracking::GetRightNovaViveToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNovaViveToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNovaViveToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNovaViveToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNovaViveToAttachPosition() +{ + return FSGTracking::GetLeftNovaViveToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNovaViveToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNovaViveToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNovaViveToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachPosition() +{ + return FSGTracking::GetRightNovaQuest2ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNovaQuest2ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNovaQuest2ToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNovaQuest2ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachPosition() +{ + return FSGTracking::GetLeftNovaQuest2ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNovaQuest2ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNovaQuest2ToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNovaQuest2ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNovaPico2ToAttachPosition() +{ + return FSGTracking::GetRightNovaPico2ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNovaPico2ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNovaPico2ToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNovaPico2ToAttachRotation(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNovaPico2ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNovaPico2ToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNovaPico2ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNovaQuestProToAttachPosition() +{ + return FSGTracking::GetRightNovaQuestProToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNovaQuestProToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNovaQuestProToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNovaQuestProToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNovaQuestProToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNovaQuestProToAttachPosition() +{ + return FSGTracking::GetLeftNovaQuestProToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNovaQuestProToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNovaQuestProToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNovaQuestProToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNovaQuestProToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNovaViveFocus3ToAttachPosition() +{ + return FSGTracking::GetRightNovaViveFocus3ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNovaViveFocus3ToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNovaViveFocus3ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNovaViveFocus3ToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNovaViveFocus3ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNovaViveFocus3ToAttachPosition() +{ + return FSGTracking::GetLeftNovaViveFocus3ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNovaViveFocus3ToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNovaViveFocus3ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNovaViveFocus3ToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNovaViveFocus3ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNovaQuest3ToAttachPosition() +{ + return FSGTracking::GetRightNovaQuest3ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNovaQuest3ToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNovaQuest3ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNovaQuest3ToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNovaQuest3ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNovaQuest3ToAttachPosition() +{ + return FSGTracking::GetLeftNovaQuest3ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNovaQuest3ToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNovaQuest3ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNovaQuest3ToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNovaQuest3ToAttachRotation(); +} + +void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRH_OutPO_FQuat_OutRO( + const bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset); +} + +void USGTrackingKismetLibrary::GetNovaGloveWristOffset_bRH_OutPO_FRotator_OutRO( + const bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + return FSGTracking::GetNovaGloveWristOffset(bRightHanded, OutPositionOffset, OutRotationOffset); +} + +void USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_H_bRH_OutPO_FQuat_OutRO( + const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + return FSGTracking::GetNovaGloveTrackerOffset(Hardware, bRightHanded, OutPositionOffset, OutRotationOffset); +} + +void +USGTrackingKismetLibrary::GetNovaGloveTrackerOffset_H_bRH_OutPO_FRotator_OutRO( + const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + return FSGTracking::GetNovaGloveTrackerOffset(Hardware, bRightHanded, OutPositionOffset, OutRotationOffset); +} + +FVector USGTrackingKismetLibrary::GetRightNova2ToWristPositionOffset() +{ + return FSGTracking::GetRightNova2ToWristPositionOffset(); +} + +FQuat USGTrackingKismetLibrary::GetRightNova2ToWristRotationOffset_FQuat() +{ + return FSGTracking::GetRightNova2ToWristRotationOffsetQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNova2ToWristRotationOffset_FRotator() +{ + return FSGTracking::GetRightNova2ToWristRotationOffset(); +} + +FVector USGTrackingKismetLibrary::GetLeftNova2ToWristPositionOffset() +{ + return FSGTracking::GetLeftNova2ToWristPositionOffset(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNova2ToWristRotationOffset_FQuat() +{ + return FSGTracking::GetLeftNova2ToWristRotationOffsetQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNova2ToWristRotationOffset_FRotator() +{ + return FSGTracking::GetLeftNova2ToWristRotationOffset(); +} + +FVector USGTrackingKismetLibrary::GetRightNova2Quest2ToAttachPosition() +{ + return FSGTracking::GetRightNova2Quest2ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNova2Quest2ToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNova2Quest2ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNova2Quest2ToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNova2Quest2ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNova2Quest2ToAttachPosition() +{ + return FSGTracking::GetLeftNova2Quest2ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNova2Quest2ToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNova2Quest2ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNova2Quest2ToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNova2Quest2ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNova2QuestProToAttachPosition() +{ + return FSGTracking::GetRightNova2QuestProToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNova2QuestProToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNova2QuestProToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNova2QuestProToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNova2QuestProToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNova2QuestProToAttachPosition() +{ + return FSGTracking::GetLeftNova2QuestProToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNova2QuestProToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNova2QuestProToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNova2QuestProToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNova2QuestProToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNova2ViveTrackerToAttachPosition() +{ + return FSGTracking::GetRightNova2ViveTrackerToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNova2ViveTrackerToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNova2ViveTrackerToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNova2ViveTrackerToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNova2ViveTrackerToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNova2ViveTrackerToAttachPosition() +{ + return FSGTracking::GetLeftNova2ViveTrackerToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNova2ViveTrackerToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNova2ViveTrackerToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNova2ViveTrackerToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNova2ViveTrackerToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNova2ViveWristTrackerToAttachPosition() +{ + return FSGTracking::GetRightNova2ViveWristTrackerToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNova2ViveWristTrackerToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNova2ViveWristTrackerToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNova2ViveWristTrackerToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNova2ViveWristTrackerToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNova2ViveWristTrackerToAttachPosition() +{ + return FSGTracking::GetLeftNova2ViveWristTrackerToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNova2ViveWristTrackerToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNova2ViveWristTrackerToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNova2ViveWristTrackerToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNova2ViveWristTrackerToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetRightNova2Quest3ToAttachPosition() +{ + return FSGTracking::GetRightNova2Quest3ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetRightNova2Quest3ToAttachRotation_FQuat() +{ + return FSGTracking::GetRightNova2Quest3ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetRightNova2Quest3ToAttachRotation_FRotator() +{ + return FSGTracking::GetRightNova2Quest3ToAttachRotation(); +} + +FVector USGTrackingKismetLibrary::GetLeftNova2Quest3ToAttachPosition() +{ + return FSGTracking::GetLeftNova2Quest3ToAttachPosition(); +} + +FQuat USGTrackingKismetLibrary::GetLeftNova2Quest3ToAttachRotation_FQuat() +{ + return FSGTracking::GetLeftNova2Quest3ToAttachRotationQ(); +} + +FRotator USGTrackingKismetLibrary::GetLeftNova2Quest3ToAttachRotation_FRotator() +{ + return FSGTracking::GetLeftNova2Quest3ToAttachRotation(); +} + +void USGTrackingKismetLibrary::GetNova2GloveWristOffset_bRH_HW_OutPO_FQuat_OutRO( + const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + return FSGTracking::GetNova2GloveWristOffset(bRightHanded, HardwareVersion, + OutPositionOffset, OutRotationOffset); +} + +void USGTrackingKismetLibrary::GetNova2GloveWristOffset_bRH_HW_OutPO_FRotator_OutRO( + const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + return FSGTracking::GetNova2GloveWristOffset(bRightHanded, HardwareVersion, + OutPositionOffset, OutRotationOffset); +} + +void USGTrackingKismetLibrary::GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FQuat_OutRO( + const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset) +{ + return FSGTracking::GetNova2GloveTrackerOffset(Hardware, bRightHanded, HardwareVersion, + OutPositionOffset, OutRotationOffset); +} + +void USGTrackingKismetLibrary::GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FRotator_OutRO( + const ESGPositionalTrackingHardware Hardware, const bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset) +{ + return FSGTracking::GetNova2GloveTrackerOffset(Hardware, bRightHanded, HardwareVersion, + OutPositionOffset, OutRotationOffset); +} + +FString USGTrackingKismetLibrary::ToString(const ESGPositionalTrackingHardware Hardware) +{ + return FSGTracking::ToString(Hardware); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismet.cpp new file mode 100644 index 0000000..6d635d9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveCoreKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveCoreKismetModule, SenseGloveCoreKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismet.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismet.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismetModule.cpp new file mode 100644 index 0000000..ec67878 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismetModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreKismetModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveCoreKismetModule" + +void FSenseGloveCoreKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveCoreKismet module..."); +} + +void FSenseGloveCoreKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveCoreKismet module..."); +} + +void FSenseGloveCoreKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveCoreKismet module has succeeded!"); +} + +void FSenseGloveCoreKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveCoreKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismetModule.h new file mode 100644 index 0000000..8cc1584 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Private/SenseGloveCoreKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveCoreKismet" + +class FSenseGloveCoreKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGAnatomyKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGAnatomyKismetLibrary.h new file mode 100644 index 0000000..611d086 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGAnatomyKismetLibrary.h @@ -0,0 +1,133 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Hard-Coded Database that is used in calibration and in solving. + * Values herein are used to limit outputs within 'natural' ranges. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "HAL/Platform.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGAnatomyKismetLibrary.generated.h" + +/** + * "Database" of anatomical values, such as joint limits. + */ +UCLASS(meta=(ScriptName = "SenseGloveAnatomyKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGAnatomyKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Total sum of all finger flexion that would be considered "total flexion". + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float GetTotalFingerFlexion(); + + /** + * Total sum of all finger flexion that would be considered "total extension". + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float GetTotalFingerExtension(); + + /** + * Total sum of all thumb flexion that would be considered "total flexion". + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float GetTotalThumbFlexion(); + + /** + * Total sum of all thumb flexion that would be considered "total extension". + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float GetTotalThumbExtension(); + + /** + * Retrieve one of the limits of a finger joint's movement. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float GetFingerJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax); + + /** + * Retrieve one of the limits of a thumb joint's movement. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float GetThumbJointLimit(bool bRightHanded, int32 Joint, int32 Movement, bool bMax); + + /* + * Limit a value between specific joint angles. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float ClampJointAngle(float Value, int32 Finger, bool bRightHand, int32 Joint, int32 Movement); + + /** + * Convert a total finger flexion in degrees. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float NormalizeFingerFlexion(float FlexionInDegrees); + + /** + * Convert a total thumb flexion in degrees. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static float NormalizeThumbFlexion(float FlexionInDegrees); + + /** + * Get Hand Angles that would make a Default (Idle) Pose. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static TArray GetDefaultHandAngles(bool bRightHanded); + + /** + * Get Hand Angles that would make a flat hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static TArray GetFlatHandAngles(bool bRightHanded); + + /** + * Get hand angles that would make a thumbs up. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static TArray GetThumbsUpHandAngles(bool bRightHanded); + + /** + * Get Hand Angles that would make a fist. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Anatomy") + static TArray GetFistHandAngles(bool bRightHanded); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGBasicHandModelKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGBasicHandModelKismetLibrary.h new file mode 100644 index 0000000..0e84968 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGBasicHandModelKismetLibrary.h @@ -0,0 +1,304 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A data class containing the minimum required data for a hand's forward + * kinematics. + * Used in both kinematics and calibration. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGFloatArray.h" + +#include "SGBasicHandModelKismetLibrary.generated.h" + +class USGBasicHandModel; + +/** + * Represents data of a user's hand required for forward kinematics. + */ +UCLASS(meta=(ScriptName = "SenseGloveBasicHandModelKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGBasicHandModelKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The basic class constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model", + meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* MakeBasicHandModel(UObject* WorldContextObject); + + /** + * Create a new BasicHandModel with no starting rotations. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Basic Hand Model", + Category="SenseGlove | Core | Kinematics | Basic Hand Model", + meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* MakeBasicHandModel_bRH_L_SP( + UObject* WorldContextObject, + bool bRightHanded, const TArray& Lengths, const TArray& StartPositions); + + /** + * Create a new BasicHandModel. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Basic Hand Model", + Category="SenseGlove | Core | Kinematics | Basic Hand Model", + meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* MakeBasicHandModel_bRH_L_SP_TArrayFQuat_SR( + UObject* WorldContextObject, + bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Create a new BasicHandModel. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Basic Hand Model", + Category="SenseGlove | Core | Kinematics | Basic Hand Model", + meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* MakeBasicHandModel_bRH_L_SP_TArrayFRotator_SR( + UObject* WorldContextObject, + bool bRightHanded, const TArray& Lengths, + const TArray& StartPositions, const TArray& StartRotations); + + /** + * Retrieve a default left or right hand model. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model", + meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* Default(UObject* WorldContextObject, bool bRightHanded); + + /** + * Convert a serialized HandModel back into its class representation. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model", + meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Default finger lengths (based on right hand). + * + * @remarks Any missing fingers are replaced with their respective value. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetBaseFingerLengths(); + + /** + * Default joint positions (based on right hand). + * + * @remarks Any missing positions are replaced with their respective value. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetBaseJointPositions(); + + /** + * Default joint angles (based on right hand). + * + * @remarks Any missing angles are replaced with their respective value. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetBaseJointAngles(); + + /** + * Whether or not this BasicHandModel was created for a left- or right hand. Used for validation. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static bool IsRight(const USGBasicHandModel* BasicHandModel); + + /** + * The length of individual finger phalangers in mm, sorted per finger. Generally 5x3. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetFingerLengths(const USGBasicHandModel* BasicHandModel); + + /** + * Retrieve the finger lengths of a specific finger in cm. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Finger Lengths", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetFingerLengths_F(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Set the finger lengths of a specific finger in cm. + */ + UFUNCTION(BlueprintCallable, DisplayName="Set Finger Lengths", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetFingerLengths_ESGFinger_F_L(UPARAM(ref) USGBasicHandModel* BasicHandModel, ESGFinger Finger, + const TArray& Lengths); + + /** + * Set the finger lengths of a specific finger in cm. + */ + UFUNCTION(BlueprintCallable, DisplayName="Set Finger Lengths", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetFingerLengths_uint8_F_L(UPARAM(ref) USGBasicHandModel* BasicHandModel, uint8 Finger, + const TArray& Lengths); + + /** + * Get the finger ratios of all fingers. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + TArray GetFingerRatios(const USGBasicHandModel* BasicHandModel) const; + + /** + * Get the finger ratios of a specific finger. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Finger Ratios", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetFingerRatios_F(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Starting joint positions relative to the device Origin. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetStartJointPositions(const USGBasicHandModel* BasicHandModel); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Set Start Joint Position", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetStartJointPosition_ESGFinger_F_P(UPARAM(ref) USGBasicHandModel* BasicHandModel, ESGFinger Finger, + const FVector& Position); + + /** + * + */ + UFUNCTION(BlueprintPure, DisplayName="Set Start Joint Position", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetStartJointPosition_uint8_F_P(UPARAM(ref) USGBasicHandModel* BasicHandModel, uint8 Finger, + const FVector& Position); + + /** + * Starting joint rotations relative to the device Origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Start Joint Rotations", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetStartJointRotations_TArrayFQuat(const USGBasicHandModel* BasicHandModel); + + /** + * Starting joint rotations relative to the device Origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Start Joint Rotations", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetStartJointRotations_TArrayFRotator(const USGBasicHandModel* BasicHandModel); + + /** + * Retrieve the start position of a specific finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static FVector GetJointPosition(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Set the start position of a specific finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetJointPosition(UPARAM(ref) USGBasicHandModel* BasicHandModel, const FVector& NewPosition, + ESGFinger Finger); + + /** + * Retrieve the start rotation of a specific finger. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotation", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static FQuat GetJointRotation_FQuat(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Retrieve the start rotation of a specific finger. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotation", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static FRotator GetJointRotation_FRotator(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Set the start rotation of a specific finger. + */ + UFUNCTION(BlueprintCallable, DisplayName="Set Joint Rotation", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetJointRotation_FQuat_NR_F( + UPARAM(ref) USGBasicHandModel* BasicHandModel, const FQuat& NewRotation, ESGFinger Finger); + + /** + * Set the start rotation of a specific finger. + */ + UFUNCTION(BlueprintCallable, DisplayName="Set Joint Rotation", + Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static void SetJointRotation_FRotator_NR_F( + UPARAM(ref) USGBasicHandModel* BasicHandModel, const FRotator& NewRotation, ESGFinger Finger); + + /** + * Get the total lengths of fingers, in cm. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray GetTotalLengths(const USGBasicHandModel* BasicHandModel); + + /** + * Get the total length of a specific finger, in mm. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static float GetTotalLength(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Retrieve the lengths of a specific finger, as BasicHandModel representation (L, 0, 0). + * + * @remarks Used for forwards kinematics. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static TArray Get3DLengths(const USGBasicHandModel* BasicHandModel, ESGFinger Finger); + + /** + * Check if this BasicHandModel has the same values as another BasicHandModel. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static bool Equals(const USGBasicHandModel* A, const USGBasicHandModel* B); + + /** + * Convert this handModel into a string notation, readable for humans. Does not include starting positions / rotations. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static FString ToString(const USGBasicHandModel* BasicHandModel); + + /** + * Convert this handModel into a string notation, readable for humans. Optionally includes starting positions / rotations. + */ + UFUNCTION(BlueprintPure, DisplayName="To String", Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static FString ToString_bLO(const USGBasicHandModel* BasicHandModel, bool bLengthsOnly); + + /** + * Serialize this HandModel into a string representation. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Kinematics | Basic Hand Model") + static FString SGSerialize(const USGBasicHandModel* BasicHandModel); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGBetaDeviceKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGBetaDeviceKismetLibrary.h new file mode 100644 index 0000000..4f2a697 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGBetaDeviceKismetLibrary.h @@ -0,0 +1,122 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Represents a Sense Glove Device that has no specific class within the API. + * Used to test different iterations of the same product before integrating it + * into the Core API. + * Allows access to raw sensor values and commands of such a device. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGBetaDeviceKismetLibrary.generated.h" + +class USGBetaDevice; + +/** + * A Device that adheres to the SenseGlove communications protocol, but which has no implementation in this API. + */ +UCLASS(meta=(ScriptName = "SenseGloveBetaDeviceKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGBetaDeviceKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Deserialize a beta device from its basic constants string. Returns nullptr is unsuccessful. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Beta Device", meta=(WorldContext="WorldContextObject")) + static USGBetaDevice* Parse(UObject* WorldContextObject, const FString& String); + + /** + * Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static ESGDeviceType GetDeviceType(const USGBetaDevice* BetaDevice); + + /** + * Get the unique identifier of this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static FString GetDeviceId(const USGBetaDevice* BetaDevice); + + /** + * Retrieve this device's hardware version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static FString GetHardwareVersion(const USGBetaDevice* BetaDevice); + + /** + * Retrieve this device's firmware version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static int32 GetFirmwareVersion(const USGBetaDevice* BetaDevice); + + /** + * Retrieve this device's sub-firmware version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static int32 GetSubFirmwareVersion(const USGBetaDevice* BetaDevice); + + /** + * Retrieve the constants string for additional processing. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static FString GetConstantsString(const USGBetaDevice* BetaDevice); + + /** + * Retrieve a raw sensor string from this Beta Device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static FString GetSensorData(const USGBetaDevice* BetaDevice); + + /** + * Retrieve the last command retrieved from this Beta Device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static FString GetLastCommand(const USGBetaDevice* BetaDevice); + + /** + * Send a raw string command to this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static bool SendHaptics(const USGBetaDevice* BetaDevice, const FString& Command); + + /** + * Create a string representation of this device for reporting purposes. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Beta Device") + static FString ToString(const USGBetaDevice* BetaDevice); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGCustomWaveformKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGCustomWaveformKismetLibrary.h new file mode 100644 index 0000000..18b93dc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGCustomWaveformKismetLibrary.h @@ -0,0 +1,267 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Describes a vibration based on a number of parameters. Is sent to Nova Gloves + * to be generated on the hardware and played. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGCustomWaveformKismetLibrary.generated.h" + +class USGBasicHandModel; +class USGCustomWaveform; + +/** + * A single vibration pulse for Nova Gloves. + */ +UCLASS(meta=(ScriptName = "SenseGloveCustomWaveformKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGCustomWaveformKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform", + meta=(WorldContext="WorldContextObject")) + static USGCustomWaveform* MakeCustomWaveform(UObject* WorldContextObject); + + /** + * Create a new instance of CustomWaveform. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Custom Waveform", Category="SenseGlove | Core | CV | Custom Waveform", + meta=(WorldContext="WorldContextObject")) + static USGCustomWaveform* MakeCustomWaveform_A_D( + UObject* WorldContextObject, + float Amplitude, float Duration); + + /** + * Create a new instance of CustomWaveform. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Custom Waveform", Category="SenseGlove | Core | CV | Custom Waveform", + meta=(WorldContext="WorldContextObject")) + static USGCustomWaveform* MakeCustomWaveform_A_D_F( + UObject* WorldContextObject, + float Amplitude, float Duration, float Frequency); + + /** + * Creates a string representation of the ESGWaveformType. + */ + UFUNCTION(BlueprintCallable, DisplayName="ToString", Category="SenseGlove | Core | CV | Custom Waveform") + static FString ToString_T(ESGWaveformType Type); + + /** + * Get the total amplitude of the wave-from, represented by 0 (off) or 1 (maximum value). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetAmplitude(const USGCustomWaveform* CustomWaveform); + + /** + * Set the total amplitude of the wave-from, represented by 0 (off) or 1 (maximum value). + * @param Amplitude + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetAmplitude(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Amplitude); + + /** + * Get the Type of waveform pattern that is used. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + ESGWaveformType GetWaveType(const USGCustomWaveform* CustomWaveform); + + /** + * Set the Type of waveform pattern that is used. + * @param Type + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetWaveType(UPARAM(ref) USGCustomWaveform* CustomWaveform, ESGWaveformType Type); + + /** + * Get whether or not this Waveform is infinitely repeating. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static bool IsInfinite(const USGCustomWaveform* CustomWaveform); + + /** + * Set whether or not this Waveform is infinitely repeating. + * @param bInfinite + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetInfinite(UPARAM(ref) USGCustomWaveform* CustomWaveform, bool bInfinite); + + /** + * Get the amount of times to repeat this waveform. 1 is the default. If set to 0, repeats indefinitely. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform", meta=(WorldContext="WorldContextObject")) + int32 GetRepeatAmount(const USGCustomWaveform* CustomWaveform); + + /** + * Set the amount of times to repeat this waveform. 1 is the default. If set to 0, repeats indefinitely. + * @param Amount + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetRepeatAmount(UPARAM(ref) USGCustomWaveform* CustomWaveform, int32 Amount); + + /** + * Get time, in seconds, before the signal reaches its maximum amplitude. Limited to 0.01 - 1s. Set to 0 for an + * instant start. Linear only. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetAttackTime(const USGCustomWaveform* CustomWaveform); + + /** + * Set time, in seconds, before the signal reaches its maximum amplitude. Limited to 0.01 - 1s. Set to 0 for an + * instant start. Linear only. + * @param Time + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetAttackTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time); + + /** + * Get time, in seconds, to keep the signal at one Amplitude. Limited to 0.01 - 1s. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetSustainTime(const USGCustomWaveform* CustomWaveform); + + /** + * Set time, in seconds, to keep the signal at one Amplitude. Limited to 0.01 - 1s. + * @param Time + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetSustainTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time); + + /** + * Get time it takes for the effect to fade out after AttackTime+SustainTime has passed. Limited to 0.01 - 1s. Set + * to 0 for instant stop. Linear only. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetDecayTime(const USGCustomWaveform* CustomWaveform); + + /** + * Set time it takes for the effect to fade out after AttackTime+SustainTime has passed. Limited to 0.01 - 1s. Set + * to 0 for instant stop. Linear only. + * @param Time + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetDecayTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time); + + /** + * Get the Wave-from Frequency at the start of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetFrequencyStart(const USGCustomWaveform* CustomWaveform); + + /** + * Set the Wave-from Frequency at the start of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + * @param Frequency + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetFrequencyStart(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Frequency); + + /** + * Get the Wave-from Frequency at the end of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform", + meta=(WorldContext="WorldContextObject")) + static float GetFrequencyEnd(const USGCustomWaveform* CustomWaveform); + + /** + * Set the Wave-from Frequency at the end of the wave-from. Limited between [10 - 500Hz] for Nova Gloves. + * @param Frequency + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform", + meta=(WorldContext="WorldContextObject")) + static void SetFrequencyEnd(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Frequency); + + /** + * Get value of [0..1], representing a percentage of total time (attack+sustain+decay). After that moment passes, + * we increase the frequency by FrequencySwitch factor. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetFrequencySwitchTime(const USGCustomWaveform* CustomWaveform); + + /** + * Set value of [0..1], representing a percentage of total time (attack+sustain+decay). After that moment passes, + * we increase the frequency by FrequencySwitch factor. + * @param Time + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetFrequencySwitchTime(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time); + + /** + * After a certain % of the waveform (FrequencySwitchTime) plays, multiply the frequency by this factor [1x .. 3x]. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetFrequencySwitchFactor(const USGCustomWaveform* CustomWaveform); + + /** + * After a certain % of the waveform (FrequencySwitchTime) plays, multiply the frequency by this factor [1x .. 3x]. + * param Time + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | CV | Custom Waveform") + static void SetFrequencySwitchFactor(UPARAM(ref) USGCustomWaveform* CustomWaveform, float Time); + + /** + * The total command time of a single play of this pattern (not taking into account the RepeatAmount). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetEffectTime(const USGCustomWaveform* CustomWaveform); + + /** + * Total time for the entire effect (effect time multiplied by the repeat amount). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static float GetTotalEffectTime(const USGCustomWaveform* CustomWaveform); + + /** + * If true, the frequency of this waveform jumps at any time during its playtime by FrequencySwitchFactor. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static bool FrequencyJumps(const USGCustomWaveform* CustomWaveform); + + /** + * Check if this CustomWaveform is roughly equal to another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static bool Equals(const USGCustomWaveform* A, const USGCustomWaveform* B); + + /** + * Create a string representation of this CustomWaveform. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | CV | Custom Waveform") + static FString ToString(const USGCustomWaveform* CustomWaveform); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceKismetLibrary.h new file mode 100644 index 0000000..069e855 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceKismetLibrary.h @@ -0,0 +1,239 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Represents a Device built by the Sense Glove company that is compatible with + * our Communications Protocol. All such devices derive from this abstract + * class. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGDeviceKismetLibrary.generated.h" + +class USGDevice; +class USGHapticChannelInfo; + +UCLASS(meta=(ScriptName = "SenseGloveSGDeviceKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGDeviceKismetLibrary : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Parse a main and sub firmware version from its raw (v4.12) notation + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice") + static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion); + + /** + * If true, my firmware is newer than the reference firmware. + * @param MyFirmwareMain + * @param MyFirmwareSub + * @param ReferenceMain + * @param ReferenceSub + * @param bInclusive + */ + UFUNCTION(BlueprintCallable, DisplayName="Firmware Newer Than", Category="SenseGlove | Core | SGDevice") + static bool FirmwareNewerThan_MF_MF_RM_RS_bI(int32 MyFirmwareMain, int32 MyFirmwareSub, + int32 ReferenceMain, int32 ReferenceSub, + bool bInclusive); + + /** + * If true, my firmware is older than the reference firmware. + * @param MyFirmwareMain + * @param MyFirmwareSub + * @param ReferenceMain + * @param ReferenceSub + * @param bInclusive + */ + UFUNCTION(BlueprintCallable, DisplayName="Firmware Older Than", Category="SenseGlove | Core | SGDevice") + static bool FirmwareOlderThan_MF_MF_RM_RS_bI(int32 MyFirmwareMain, int32 MyFirmwareSub, + int32 ReferenceMain, int32 ReferenceSub, + bool bInclusive); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="To String", Category="SenseGlove | Core | SGDevice") + static FString ToString_DT(ESGDeviceType DeviceType); + + /** + * Check which DeviceType this class belongs to. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static ESGDeviceType GetDeviceType(const USGDevice* SGDevice); + + /** + * Retrieve this device's unique identifier. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static FString GetDeviceId(const USGDevice* SGDevice); + + /** + * Retrieve this device's hardware version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static FString GetHardwareVersion(const USGDevice* SGDevice); + + /** + * Retrieve this device's main firmware version. v4.12 returns 4. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static int32 GetFirmwareVersion(const USGDevice* SGDevice); + + /** + * Retrieve this device's sub firmware version. v4.12 returns 12. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static int32 GetSubFirmwareVersion(const USGDevice* SGDevice); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static FString GetFirmwareString(const USGDevice* SGDevice); + + /** + * Returns true if this glove's firmware is newer than certain version. + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + UFUNCTION(BlueprintPure, DisplayName="Firmware Newer Than", Category="SenseGlove | Core | SGDevice") + bool FirmwareNewerThan_FM_FS_bI(const USGDevice* SGDevice, + int32 FirmwareMain, int32 FirmwareSub, bool bInclusive); + + /** + * Returns true if this glove's firmware is older than certain version. + * @param FirmwareMain + * @param FirmwareSub + * @param bInclusive + */ + UFUNCTION(BlueprintPure, DisplayName="Firmware Older Than", Category="SenseGlove | Core | SGDevice") + static bool FirmwareOlderThan_FM_FS_bI(const USGDevice* SGDevice, + int32 FirmwareMain, int32 FirmwareSub, bool bInclusive); + + /** + * Retrieve this Device's Serial/Bluetooth address. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static FString GetAddress(const USGDevice* SGDevice); + + /** + * Check if this device is currently connected to the system. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static bool IsConnected(const USGDevice* SGDevice); + + /** + * Retrieve the connection type of this Sense Glove. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static ESGConnectionType GetConnectionType(const USGDevice* SGDevice); + + /** + * Retrieve the device's Packets per Second Variable. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static int32 PacketsPerSecondReceived(const USGDevice* SGDevice); + + /** + * Retrieve the device's Packets per Second Variable. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static int32 PacketsPerSecondSent(const USGDevice* SGDevice); + + /** + * Retrieve the index of this device within SenseCom. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static int32 GetDeviceIndex(const USGDevice* SGDevice); + + /** + * Change this device's index within the SenseCom. Warning: Can cause errors. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice") + static void SetDeviceIndex(UPARAM(ref) USGDevice* SGDevice, int32 NewIndex); + + /** + * Returns true if this device is connected over a connection other than usb cable. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static bool IsWireless(const USGDevice* SGDevice); + + /** + * Returns true if this device operates on a battery. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static bool HasBattery(const USGDevice* SGDevice); + + /** + * Returns true if this device is currently charging. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice") + static bool IsCharging(UPARAM(ref) USGDevice* SGDevice); + + /** + * Returns the device's battery level, as a value between 0 (empty) and 1 (full). + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice") + static bool GetBatteryLevel(UPARAM(ref) USGDevice* SGDevice, float& OutLevel); + + /** + * Assign this Device's Haptic Channels. Should not be done outside the API unless you know what you're doing. + * @param Channels + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SGDevice") + static void SetHapticChannels(UPARAM(ref) USGDevice* SGDevice, const USGHapticChannelInfo* Channels); + + /** + * The number of haptic channels this device can support. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Haptic Channel Index", Category="SenseGlove | Core | SGDevice") + static int32 GetHapticChannelCount(const USGDevice* SGDevice); + + /** + * How many channels of a specific type this SGDevice possesses. + * @param ChannelType + */ + UFUNCTION(BlueprintPure, DisplayName="Get Haptic Channel Index", Category="SenseGlove | Core | SGDevice") + static int32 GetHapticChannelCount_CT(const USGDevice* SGDevice, ESGHapticChannelType ChannelType); + + /** + * Get a string representation of this SGDevice, used for debugging. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SGDevice") + static FString ToString(const USGDevice* SGDevice); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceListKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceListKismetLibrary.h new file mode 100644 index 0000000..269a75d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceListKismetLibrary.h @@ -0,0 +1,151 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Interface for SenseCom, allows the retrieval of Devices and Data, but only + * as. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "HAL/Platform.h" +#include "Templates/SubclassOf.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGDeviceListKismetLibrary.generated.h" + +class USGDevice; + +/** + * Interface for SenseCom, allows the retrieval of Devices and Data. + */ +UCLASS(meta=(ScriptName = "SenseGloveDeviceListKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGDeviceListKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Retrieve the number of devices that have been detected by the SenseCom executable. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static int32 ActiveDevices(); + + /** + * Returns true if the SenseCom program is running. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static bool SenseComRunning(); + + /** + * Clear the device list, and block any further attempt to add to it until ReInitialize is called. + * + * @remarks Useful if your IDE has troubles unloading dlls (cough, Unity, Cough). + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static void Dispose(); + + /** + * When you've accidentally disposed of the list before you meant to. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static void Reinitialize(); + + /** + * Retrieve all Sense Glove Devices connected to this system. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List", meta=(WorldContext="WorldContextObject")) + static TArray GetDevices(UObject* WorldContextObject); + + /** + * Retrieve a list of SGDevices of a specific class. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Devices", Category="SenseGlove | Core | Device List", + meta=(WorldContext="WorldContextObject")) + static TArray GetDevices_TSubclassOfUSGDevice_DT(UObject* WorldContextObject, + const TSubclassOf& DeviceType); + + /** + * Retrieve a list of SGDevices of a specific type. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Devices", Category="SenseGlove | Core | Device List", + meta=(WorldContext="WorldContextObject")) + static TArray GetDevices_ESGDeviceType_DT(UObject* WorldContextObject, ESGDeviceType DeviceType); + + /** + * Retrieve the latest (raw) sensor data from a specific device in our list. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static bool GetSensorDataString(int32 IpcIndex, const FString& IpcAddress, FString& OutString); + + /** + * Send a (raw) command to a specific device in the list. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static bool SendHaptics( + const int32 IpcIndex, const FString& IpcAddress, const int32 ChannelIndex, const FString& Commands); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static FString GetDeviceStringAt(int32 IpcIndex, const FString& IpcAddress, int32 Index); + + /** + * Retrieve Device Address. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static FString GetAddress(int32 IpcIndex, const FString& IpcAddress); + + /** + * Retieve this device's connectionType. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static ESGConnectionType GetConnectionType(int32 IpcIndex, const FString& IpcAddress); + + /** + * Returns true if the device at this connection side is properly connected. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static bool IsConnected(int32 IpcIndex, const FString& IpcAddress); + + /** + * Retrieve the device's Packets per Second Variable. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static int32 PacketsPerSecondReceived(int32 IpcIndex, const FString& IpcAddress); + + /** + * Retrieve the device's Packets per Second sent Variable. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device List") + static int32 PacketsPerSecondSent(int32 IpcIndex, const FString& IpcAddress); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceModelKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceModelKismetLibrary.h new file mode 100644 index 0000000..610efa8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGDeviceModelKismetLibrary.h @@ -0,0 +1,119 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Base class for Device Models containing the minimum amount of data gathered + * through Communications Protocol. Used for shared functionality. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGDeviceModelKismetLibrary.generated.h" + +class USGDeviceModel; + +/** + * Base class containing the minimum amount of data for device models. + */ +UCLASS(meta=(ScriptName = "SenseGloveDeviceModelKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGDeviceModelKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Empty constructor to be used by child classes. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device Model", meta=(WorldContext="WorldContextObject")) + static USGDeviceModel* MakeDeviceModel(UObject* WorldContextObject); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Device Model", Category="SenseGlove | Core | Device Model", + meta=(WorldContext="WorldContextObject")) + static USGDeviceModel* MakeDeviceModel_I_HV_FV_SFV( + UObject* WorldContextObject, + const FString& Id, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Parse a 32-bit integer value into a set of booleans (010010011) that indicate which (optional) functions this device has. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device Model") + static TArray ParseFunctions(int32 Value, int32 Size); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Device Model") + static void ParseFirmware(const FString& RawFirmware, int32& OutMainVersion, int32& OutSubVersion); + + /** + * Retrieve the Unique identifier of this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model") + static FString GetDeviceId(const USGDeviceModel* DeviceModel); + + /** + * Retrieve the Hardware (sub) version of this Sense Glove Device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model") + static FString GetHardwareVersion(const USGDeviceModel* DeviceModel); + + /** + * Firmware version running on the device's MicroController. (as v4.12, this is the 4). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model") + static int32 GetFirmwareVersion(const USGDeviceModel* DeviceModel); + + /** + * Sub firmware version running on the device's microcontroller (as v4.12, this is the 12). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model") + static int32 GetSubFirmwareVersion(const USGDeviceModel* DeviceModel); + + /** + * Returns true if this glove's firmware is newer than certain version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model") + static bool FirmwareNewerThan(const USGDeviceModel* DeviceModel, + int32 FirmwareMain, int32 FirmwareSub, bool bInclusive); + + /** + * Returns true if this glove's firmware is older than certain version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Device Model") + static bool FirmwareOlderThan(const USGDeviceModel* DeviceModel, + int32 FirmwareMain, int32 FirmwareSub, bool bInclusive); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandInterpolatorKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandInterpolatorKismetLibrary.h new file mode 100644 index 0000000..4b28526 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandInterpolatorKismetLibrary.h @@ -0,0 +1,117 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains interpolation sets for all hand joint movements that can be + * calculated using the Sense Glove. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGFloatArray.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGHandInterpolatorKismetLibrary.generated.h" + +class USGHandInterpolator; + +/** + * Contains interpolation sets of all joint movements that can be calculated into a HandPose. + */ +UCLASS(meta=(ScriptName = "SenseGloveHandInterpolatorKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGHandInterpolatorKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The basic constructor. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator", + Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject")) + static USGHandInterpolator* MakeHandInterpolator(UObject* WorldContextObject); + + /** + * Create a new basic HandInterpolator. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Hand Interpolator", + Category="SenseGlove | Core | Kinematics | Hand Interpolator", meta=(WorldContext="WorldContextObject")) + static USGHandInterpolator* MakeHandInterpolator_bRH(UObject* WorldContextObject, bool bRightHanded); + + /** + * Convert a serialized HandInterpolator back into a class representation. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Hand Interpolator", + meta=(WorldContext="WorldContextObject")) + static USGHandInterpolator* Deserialize(UObject* WorldContextObject, + const FString& SerializedString, bool bRightHanded = true); + + /** + * Calculate a finger movement's rotation, using an input value. + * + * WARNING: This method is for internal use only. Avoid using it! + */ + static float CalculateAngle_M_ESGFingerMovement_V_bAL(const USGHandInterpolator* HandInterpolator, + ESGFingerMovement Movement, float Value, + bool bApplyLimits = true); + + /** + * Calculate a thumb movement's rotation, using an input value. + * + * WARNING: This method is for internal use only. Avoid using it! + */ + static float CalculateAngle_M_ESGFingerMovement_V_bAL(const USGHandInterpolator* HandInterpolator, + ESGThumbMovement Movement, float Value, + bool bApplyLimits = true); + + /** + * Calculate all hand angles based on an interpolator and normalized input. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Hand Interpolator", + meta=(WorldContext="WorldContextObject")) + TArray InterpolateHandAngles(const USGHandInterpolator* HandInterpolator, + const TArray& Flexions, const TArray& Abductions, + float CmcTwist) const; + + /** + * Check if this handInterpolator matches another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Hand Interpolator") + static bool Equals(const USGHandInterpolator* A, const USGHandInterpolator* B); + + /** + * Serialize this HandInterpolator into a string representation. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Kinematics | Hand Interpolator") + static FString SGSerialize(const USGHandInterpolator* HandInterpolator); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandLayerKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandLayerKismetLibrary.h new file mode 100644 index 0000000..69b10b2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandLayerKismetLibrary.h @@ -0,0 +1,237 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A way to access all sorts of Hand Tracking and -Haptics without needing to + * cache any device instances. + * Use this layer if you don't care where a HandPose is coming from, and are + * fine with calling generic haptic functions. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGHandLayerKismetLibrary.generated.h" + +class USGCustomWaveform; +class USGHandPose; + +/** + * A way to access all sorts of Hand Tracking and -Haptics without needing to cache any device instances. + */ +UCLASS(meta=(ScriptName = "SenseGloveHandLayerKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGHandLayerKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Returns true if there is a HapticGlove Device connected that corresponds to the chosen hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool DeviceConnected(bool bRightHanded); + + /** + * Returns the Device Type of the right / left hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static ESGDeviceType GetDeviceType(bool bRightHanded); + + /** + * Returns the handedness of the first device you can find; true for right, false for left. Use this for testing a + * single glove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool GetFirstGloveHandedness(); + + /** + * Returns the number of Haptic Gloves connected to the system. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static int32 GlovesConnected(); + + /** + * Retrieve a Glove Instance for the right- or left hand to do more complicated, device-specific stuff. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer", + meta=(WorldContext="WorldContextObject")) + static bool GetGloveInstance(UObject* WorldContextObject, bool bRightHanded, USGHapticGlove*& OutGlove); + + /** + * Returns the calibration state of the chosen hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static ESGHapticGloveCalibrationState GetCalibrationState(bool bRightHanded); + + /** + * Returns the Calibration Instructions for the chosen hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static FString GetCalibrationInstructions(bool bRightHanded); + + /** + * Reset the calibration of the left/right hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static void ResetCalibration(bool bRightHanded); + + /** + * Reset the calibration of the left/right hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static void EndCalibration(bool bRightHanded); + + /** + * Attempt to get the HandPose through any of our gloves. You don't care which one is on the other side, as long as + * you get one. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer", + meta=(WorldContext="WorldContextObject")) + static bool GetHandPose(UObject* WorldContextObject, bool bRightHanded, USGHandPose*& OutHandPose); + + /** + * Calculate the Wrist Location of the chosen hand, based on a reference location and tracking hardware. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Hand Layer") + static void GetWristLocation_bRH_FQuat_RR_TH_OutWP_OutWR( + bool bRightHanded, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Calculate the Wrist Location of the chosen hand, based on a reference location and tracking hardware. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Hand Layer") + static void GetWristLocation_bRH_RP_FRotator_RR_TH_OutWP_OutWR( + bool bRightHanded, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Stop all haptics on the chosen hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static void StopAllHaptics(bool bRightHanded); + + /** + * Sends all haptics in the queue for the Left / Right hand. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool SendHaptics(bool bRightHanded); + + /** + * Returns true if the glove for this hand supports a custom waveform vibration on said location. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool SupportsCustomWaveform(bool bRightHanded, ESGHapticLocation AtLocation); + + /** + * Send a Custom Waveform to a glove at a specific location. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool SendCustomWaveform(bool bRightHanded, USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Queue Force Feedback for multiple fingers. Up to 5. Make sure the value is not NULL. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_ForceFeedbackLevels( + bool bRightHanded, const TArray& Levels01, bool bSendImmediate); + + /** + * Tell a specific hand to hold the force-feedback at a certain level. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_ForceFeedbackLevel(bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate); + + /** + * Queue a command to set the vibration level(s) of a Haptic Glove's finger. Note: This is only for Nova 1.0 and + * DK1.0. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_VibroLevels(bool bRightHanded, const TArray& Levels01, bool bSendImmediate); + + /** + * Queue a command to set the vibration level(s) of a Haptic Glove's finger. Note: This is only for Nova 1.0 and + * DK1.0. + */ + UFUNCTION(BlueprintCallable, DisplayName="Queue Command Vibro Level", Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_VibroLevel_bRH_F_L01_bSI( + bool bRightHanded, int32 Finger, float Level01, bool bSendImmediate); + + /** + * Queue a vibration level command for a specific HapticLocation. If the gloves has this vibration motor installed. + * Cross-compatible with Nova 2.0. + * + * @param bRightHanded + * @param AtLocation + * @param Level01 + * @param bSendImmediate + */ + UFUNCTION(BlueprintCallable, DisplayName="Queue Command Vibro Level", Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_VibroLevel_bRH_AL_L01_bSI( + bool bRightHanded, ESGHapticLocation AtLocation, float Level01, bool bSendImmediate); + + /** + * Returns true if the chosen glove supports active contact feedback on the Wrist. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool SupportsWristSqueeze(bool bRightHanded); + + /** + * Queue a command to set a squeeze level on the wrist, and optionally send it right away. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_WristSqueeze(bool bRightHanded, float SqueezeLevel01, bool bSendImmediate); + + /** + * Returns true is the chosen hand supports flexion locking; automatic locking of FFB when flexed beyond a specific + * point. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool SupportsFlexionLocks(bool bRightHanded); + + /** + * If the flexion exceeds a particular value, turn on the Force-Feedback. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_FlexionLock(bool bRightHanded, int32 Finger, float Flexion01, bool bSendImmediate); + + /** + * Stop any Flexion Threshold active on the chosen finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Layer") + static bool QueueCommand_ClearFlexionLock(bool bRightHanded, int32 Finger, bool bSendImmediate); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandPoseKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandPoseKismetLibrary.h new file mode 100644 index 0000000..f2e1076 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHandPoseKismetLibrary.h @@ -0,0 +1,231 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Data class containing all variables to draw or analyze a virtual hand in + * different formats. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGQuatArray.h" +#include "SGTypes/SGRotatorArray.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGHandPoseKismetLibrary.generated.h" + +class USGBasicHandModel; +class USGHandPose; + +/** + * Contains all variables required to draw or analyze a virtual hand. + */ +UCLASS(meta=(ScriptName = "SenseGloveHandPoseKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGHandPoseKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Pose", meta=(WorldContext="WorldContextObject")) + static USGHandPose* MakeHandPose(UObject* WorldContextObject); + + /** + * Create a new instance of HandPose. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Hand Pose", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* MakeHandPose_bRH_JP_FSGQuatArray_JR_HA( + UObject* WorldContextObject, + bool bRightHanded, const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles); + + /** + * Create a new instance of HandPose. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Hand Pose", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* MakeHandPose_bRH_JP_FSGRotatorArray_JR_HA( + UObject* WorldContextObject, + bool bRightHanded, const TArray& JointPositions, const TArray& JointRotations, + const TArray& HandAngles); + + /** + * Deserialize a HandPose back into usable values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Hand Pose", meta=(WorldContext="WorldContextObject")) + static USGHandPose* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Generate a HandPose based on articulation angles (handAngles). + */ + UFUNCTION(BlueprintCallable, DisplayName="From Hand Angles", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* FromHandAngles_HA_bRH_HD( + UObject* WorldContextObject, + const TArray& HandAngles, bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Generate a HandPose based on articulation angles (handAngles), with a default HandModel. + */ + UFUNCTION(BlueprintCallable, DisplayName="From Hand Angles", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* FromHandAngles_HA_bRH(UObject* WorldContextObject, + const TArray& HandAngles, bool bRightHanded); + + /** + * Create a new instance of a left or right handed Pose that is "idle"; in a neutral position. + */ + UFUNCTION(BlueprintCallable, DisplayName="Default Idle", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* DefaultIdle_bRH_HD(UObject* WorldContextObject, + bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Create a new instance of a left or right handed Pose that is "idle"; in a neutral position. + */ + UFUNCTION(BlueprintCallable, DisplayName="Default Idle", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* DefaultIdle_bRH(UObject* WorldContextObject, bool bRightHanded); + + /** + * Generates a HandPose representing an 'open hand', used in calibration to determine finger extension. + */ + UFUNCTION(BlueprintCallable, DisplayName="Flat Hand", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* FlatHand_bRH_HD(UObject* WorldContextObject, + bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Generates a HandPose representing an 'open hand', used in calibration to determine finger extension. + */ + UFUNCTION(BlueprintCallable, DisplayName="Flat Hand", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* FlatHand_bRH(UObject* WorldContextObject, bool bRightHanded); + + /** + * Generates a HandPose representing a 'thumbs up', used in calibration to determine finger flexion, thumb extension and adduction. + */ + UFUNCTION(BlueprintCallable, DisplayName="Thumbs Up", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* ThumbsUp_bRH_HD(UObject* WorldContextObject, bool bRightHanded, + const USGBasicHandModel* HandDimensions); + + /** + * Generates a HandPose representing a 'thumbs up', used in calibration to determine finger flexion, thumb extension and adduction. + */ + UFUNCTION(BlueprintCallable, DisplayName="Thumbs Up", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* ThumbsUp_bRH(UObject* WorldContextObject, bool bRightHanded); + + /** + * Generates a HandPose representing a 'fist', used in calibration to determine, thumb flexion and abduction. + */ + UFUNCTION(BlueprintCallable, DisplayName="Fist", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* Fist_bRH_HD(UObject* WorldContextObject, + bool bRightHanded, const USGBasicHandModel* HandDimensions); + + /** + * Generates a HandPose representing a 'fist', used in calibration to determine, thumb flexion and abduction. + */ + UFUNCTION(BlueprintCallable, DisplayName="Fist", Category="SenseGlove | Core | Hand Pose", + meta=(WorldContext="WorldContextObject")) + static USGHandPose* Fist_bRH(UObject* WorldContextObject, bool bRightHanded); + + /** + * Whether this HandPose was created to be a right- or left hand. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose") + static bool IsRight(const USGHandPose* HandPose); + + /** + * Positions of all hand joints relative to the Sense Glove origin. From thumb to pinky, proximal to distal. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose") + static TArray GetJointPositions(const USGHandPose* HandPose); + + /** + * Quaternion rotations of all hand joints. From thumb to pinky, proximal to distal. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | Hand Pose") + static TArray GetJointRotationsQ(const USGHandPose* HandPose); + + /** + * Rotations of all hand joints. From thumb to pinky, proximal to distal. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | Hand Pose") + static TArray GetJointRotations(const USGHandPose* HandPose); + + /** + * Euler representations of all possible hand angles. From thumb to pinky, proximal to distal. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose") + static TArray GetHandAngles(const USGHandPose* HandPose); + + /** + * Returns true of these two hand poses are roughly equal. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose") + static bool Equals(const USGHandPose* A, const USGHandPose* B); + + /** + * Returns the total flexion of a specific finger as a value between 0 (fully extended) and 1 (fully flexed). + * + * @remarks Useful for animation or for detecting gestures. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Normalized Flexion", Category="SenseGlove | Core | Hand Pose") + static float GetNormalizedFlexion_F_bC01(const USGHandPose* HandPose, ESGFinger Finger, bool bClamp01 = true); + + /** + * Returns the total flexion of a specific finger as a value between 0 (fully extended) and 1 (fully flexed). + * + * @remarks Useful for animation or for detecting gestures. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Normalized Flexion", Category="SenseGlove | Core | Hand Pose") + static TArray GetNormalizedFlexion_bC01(const USGHandPose* HandPose, bool bClamp01 = true); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Hand Pose") + static FString ToString(const USGHandPose* HandPose, bool bShortFormat = false); + + /** + * Serialize this HandPose into a string representation. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Hand Pose") + static FString SGSerialize(const USGHandPose* HandPose); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHapticChannelInfoKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHapticChannelInfoKismetLibrary.h new file mode 100644 index 0000000..6deae8c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHapticChannelInfoKismetLibrary.h @@ -0,0 +1,152 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains information on Haptic channels available to this device for IPC. + * Some devices have different "Haptic Channels". This info is exposed via IPC + * to SGCore. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGHapticChannelInfoKismetLibrary.generated.h" + +class USGBasicHandModel; +class USGHapticChannelInfo; + +/** + * Contains information on Haptic channels available to this device for IPC. + */ +UCLASS(meta=(ScriptName = "SenseGloveHapticChannelInfoKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGHapticChannelInfoKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Creates a default HapticChannelInfo, with solely a single streaming haptic Channel. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info", + meta=(WorldContext="WorldContextObject")) + static USGHapticChannelInfo* MakeHapticChannelInfo(UObject* WorldContextObject); + + /** + * Create a new instance of HapticChannelInfo. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Haptic Channel Info", + Category="SenseGlove | Core | Haptic Channel Info", meta=(WorldContext="WorldContextObject")) + static USGHapticChannelInfo* MakeHapticChannelInfo_SI_FAFI( + UObject* WorldContextObject, + const TArray& StreamIndex, const TArray& FireAndForgetIndex); + + /** + * Generate a single IPCAddress for an address. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info") + static FString GenerateAddress(int32 DeviceIndex, int32 ChannelIndex); + + /** + * Parse HapticChannelInfo received through IPC into usable data. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info", + meta=(WorldContext="WorldContextObject")) + static USGHapticChannelInfo* Parse(UObject* WorldContextObject, const FString& IpcString); + + /** + * Byte used to identify streaming channels. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info") + static int32 GetStreamingType(); + + /** + * Byte used to indicate fire-and-forget channels. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info") + static int32 GetFireAndForgetType(); + + /** + * Returns the amount of streaming channels available for haptics. Will indicate if a device can support the + * haptics you're trying to send through it. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info") + static int32 GetStreamChannelCount(const USGHapticChannelInfo* HapticChannelInfo); + + /** + * Returns the amount of fire-and-forget channels available for haptics. Will indicate if a device can support the + * haptics you're trying to send through it. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info") + static int32 GetFireAndForgetChannelCount(const USGHapticChannelInfo* HapticChannelInfo); + + /** + * Retrieve the total amount of channels for this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info") + static int32 GetTotalChannelCount(const USGHapticChannelInfo* HapticChannelInfo); + + /** + * Returns the address that corresponds to the nth channel of a specific type. It's unguarded, which means I don't + * check the validity of index - could result in an exception. Optimized piece of code for for loops. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info") + static FString GetAddress_Unguarded(const USGHapticChannelInfo* HapticChannelInfo, + ESGHapticChannelType Type, int32 TypeIndex); + + /** + * Returns the address that corresponds to the nth channel of a specific type. It's unguarded, which means I don't + * check the validity of index - could result in an exception. Optimized piece of code for for loops. + * Used for Internals. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info") + static void GetIpcParams_Unguarded(UPARAM(ref) USGHapticChannelInfo* HapticChannelInfo, + ESGHapticChannelType Type, int32 TypeIndex, + int32& OutIndex, FString& OutAddressString); + + /** + * Regenerate the channel names for a specific device Index in shared memory. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Channel Info") + static void RegenerateAddresses(USGHapticChannelInfo* HapticChannelInfo, int32 ForDeviceIndex); + + /** + * Returns an array of all the haptic addresses stored for this info channel. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Channel Info") + static TArray GetAllAddresses(const USGHapticChannelInfo* HapticChannelInfo); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHapticGloveKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHapticGloveKismetLibrary.h new file mode 100644 index 0000000..aedf565 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGHapticGloveKismetLibrary.h @@ -0,0 +1,321 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * An interface for any of our gloves that can track hand motion and/or send + * force / vibrotactile feedback. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGHapticGloveKismetLibrary.generated.h" + +class USGBasicHandModel; +class USGHandPose; +class USGHandProfile; +class USGHapticGlove; + +/** + * A glove developed by SenseGlove, that has hand tracking and/or haptic feedback functionality. + */ +UCLASS(meta=(ScriptName = "SenseGloveHapticGloveKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGHapticGloveKismetLibrary : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Get all Haptic Gloves detected on this system. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject")) + static TArray GetHapticGloves(UObject* WorldContextObject, bool bConnectedOnly = true); + + /** + * Get the first Haptic Glove detected on this system. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Glove", Category="SenseGlove | Core | Haptic Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetGlove_OutG(UObject* WorldContextObject, USGHapticGlove*& OutGlove); + + /** + * Get the first left/right Haptic Glove detected on this system. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Glove", Category="SenseGlove | Core | Haptic Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetGlove_bRH_OutG(UObject* WorldContextObject, bool bRightHanded, + USGHapticGlove*& OutGlove); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="To String", Category="SenseGlove | Core | Haptic Glove") + static FString ToString_S(ESGHapticGloveCalibrationState State); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="To String", Category="SenseGlove | Core | Haptic Glove") + static FString ToString_L(ESGHapticLocation Location); + + + /** + * Get the DeviceType enumerator of this device; used to check if its a SenseGlove/Nova/etc. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static ESGDeviceType GetDeviceType(const USGHapticGlove* HapticGlove); + + /** + * Retrieve this glove's unique identifier. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static FString GetDeviceId(const USGHapticGlove* HapticGlove); + + /** + * Retrieve this glove's hardware (sub) version. "DK1", "DK2", etc. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static FString GetHardwareVersion(const USGHapticGlove* HapticGlove); + + /** + * Retrieve this device's main firmware version. v4.12 returns 4. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static int32 GetFirmwareVersion(const USGHapticGlove* HapticGlove); + + /** + * Retrieve this device's sub firmware version. v4.12 returns 12. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static int32 GetSubFirmwareVersion(const USGHapticGlove* HapticGlove); + + /** + * Returns true if this glove is made for a right hand. If false, it's a left hand. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static bool IsRight(const USGHapticGlove* HapticGlove); + + /** + * Retrieve this glove's IMU rotation, if if has any. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static bool GetImuRotation_FQuat_OutI(UPARAM(ref) USGHapticGlove* HapticGlove, FQuat& OutImu); + + /** + * Retrieve this glove's IMU rotation, if if has any. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGHapticGlove* HapticGlove, FRotator& OutImu); + + /** + * Retrieve a HandPose based on the latest profile, but with a specific hand geometry. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandPose_HG_OutHP(UObject* WorldContextObject, + const USGHapticGlove* HapticGlove, + const USGBasicHandModel* HandGeometry, + USGHandPose*& OutHandPose); + + /** + * Retrieve a HandPose based on the latest profile and default hand Geometry. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Haptic Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandPose_OutHP(UObject* WorldContextObject, + UPARAM(ref) USGHapticGlove* HapticGlove, + USGHandPose*& OutHandPose); + + /** + * Returns the Hand Angles calculated by this Nova 2 Glove. Used for input for HandPoses, but can be used in and of + * itself. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static bool GetHandAngles(const USGHapticGlove* HapticGlove, TArray& OutHandAngles); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove", meta=(WorldContext="WorldContextObject")) + static USGBasicHandModel* GetHandGeometry(UObject* WorldContextObject, const USGHapticGlove* HapticGlove); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static void SetHandGeometry(UPARAM(ref) USGHapticGlove* HapticGlove, const USGBasicHandModel* HandGeometry); + + /** + * Returns the HapticGlove's state of calibration for its on-board sensors. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static ESGHapticGloveCalibrationState GetCalibrationState(const USGHapticGlove* HapticGlove); + + /** + * Resets internal calibration of the Haptic Glove. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static void EndCalibration(UPARAM(ref) USGHapticGlove* HapticGlove); + + /** + * Force-End any form of calibration manually, if any is still running. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static void ResetCalibration(UPARAM(ref) USGHapticGlove* HapticGlove); + + /** + * Retrieve the current calibration instruction. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Haptic Glove") + static FString GetCalibrationInstruction(const USGHapticGlove* HapticGlove); + + /** + * Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when resetting. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static void StopHaptics(UPARAM(ref) USGHapticGlove* HapticGlove); + + /** + * Stops only vibrations. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static void StopVibrations(UPARAM(ref) USGHapticGlove* HapticGlove); + + /** + * Take all active commands in the device queue, compile them into one and send them to the device. + * + * @return Returns true if the message was successfully sent to SenseCom. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static bool SendHaptics(UPARAM(ref) USGHapticGlove* HapticGlove); + + /** + * Returns true if the HapticGlove supports vibration feedback on the specified location. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static bool SupportsCustomWaveform(const USGHapticGlove* HapticGlove, ESGHapticLocation AtLocation); + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static bool SendCustomWaveform(UPARAM(ref) USGHapticGlove* HapticGlove, + USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @remarks The simplest interface, using default offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Haptic Glove") + static void GetWristLocation_RP_FQuat_RR_TH_OutWP_OutWR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Queue a list of force-feedback levels, between 0.0f and 1.0f. Your list should be sorted from thumb to pinky. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static bool QueueForceFeedbackLevels(UPARAM(ref) USGHapticGlove* HapticGlove, const TArray& Levels01); + + /** + * Set the Force-Feedback value of a particular finger to a specific level. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static bool QueueForceFeedbackLevel(UPARAM(ref) USGHapticGlove* HapticGlove, int32 Finger, float Level01); + + /** + * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the vibration levels, from 0.0 (no vibration) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static bool QueueVibroLevels(UPARAM(ref) USGHapticGlove* HapticGlove, const TArray& Levels01); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptic Glove") + static bool QueueVibroLevel(UPARAM(ref) USGHapticGlove* HapticGlove, ESGHapticLocation Location, float Level01); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + * + * @remarks The simplest interface, using default offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Haptic Glove") + static void GetWristLocation_RP_FRotator_RR_TH_OutWP_OutWR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Haptic Glove") + static void GetGloveLocation_RP_FQuat_RR_TH_OutGP_OutGR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Haptic Glove") + static void GetGloveLocation_RP_FRotator_RR_TH_OutGP_OutGR( + const USGHapticGlove* HapticGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Create a String Representation of this Haptic Glove. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptic Glove") + static FString ToString(const USGHapticGlove* HapticGlove); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGInterpolationSetKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGInterpolationSetKismetLibrary.h new file mode 100644 index 0000000..2f7d61f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGInterpolationSetKismetLibrary.h @@ -0,0 +1,186 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Data class containing all variables to map an input value from one range to + * another. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGInterpolationSetKismetLibrary.generated.h" + +class USGInterpolationSet; + +/** + * Set of variables to map a value from one range to the next. + */ +UCLASS(meta=(ScriptName = "SenseGloveInterpolationSetKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGInterpolationSetKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Creates a basic interpolation set, without limits. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Interpolation Set", + meta=(WorldContext="WorldContextObject")) + static USGInterpolationSet* MakeInterpolationSet(UObject* WorldContextObject); + + /** + * Create a new interpolation set without limits. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Interpolation Set", + Category="SenseGlove | Core | Kinematics | Interpolation Set", meta=(WorldContext="WorldContextObject")) + static USGInterpolationSet* MakeInterpolationSet_F1_F2_T1_T2( + UObject* WorldContextObject, float From1, float From2, float To1, float To2); + + /** + * Create a new interpolation set with limits. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Interpolation Set", + Category="SenseGlove | Core | Kinematics | Interpolation Set", meta=(WorldContext="WorldContextObject")) + static USGInterpolationSet* MakeInterpolationSet_F1_F2_T1_T2_M_M( + UObject* WorldContextObject, float From1, float From2, float To1, float To2, float Min, float Max); + + /** + * Convert a string notation of an InterpolationSet into a new class instance. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Kinematics | Interpolation Set", + meta=(WorldContext="WorldContextObject")) + static USGInterpolationSet* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * First value of input range. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static float GetX0(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static void SetX0(UPARAM(ref) USGInterpolationSet* InterpolationSet, float X0); + + /** + * Second value of input range. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + float GetX1(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static void SetX1(UPARAM(ref) USGInterpolationSet* InterpolationSet, float X1); + + /** + * First value of output range. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static float GetY0(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static void SetY0(UPARAM(ref) USGInterpolationSet* InterpolationSet, float Y0); + + /** + * Second value of output range. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static float GetY1(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static void SetY1(UPARAM(ref) USGInterpolationSet* InterpolationSet, float Y1); + + /** + * Minimum range of the output value. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static float GetMin(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static void SetMin(UPARAM(ref) USGInterpolationSet* InterpolationSet, float Min); + + /** + * Maximum range of the output value. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static float GetMax(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static void SetMax(UPARAM(ref) USGInterpolationSet* InterpolationSet, float Max); + + /** + * Calculate an output value in range [x0...x1] to [y0..y1] + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static int32 Get(const USGInterpolationSet* InterpolationSet, float Value, bool bLimit, + bool bNormalizeAngle = false); + + /** + * Returns true if this InterpolationSet has the same values as another set. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static bool Equals(const USGInterpolationSet* A, const USGInterpolationSet* B); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Kinematics | Interpolation Set") + static FString ToString(const USGInterpolationSet* InterpolationSet); + + /** + * + */ + UFUNCTION(BlueprintPure, DisplayName="To String", Category="SenseGlove | Core | Kinematics | Interpolation Set") + static FString ToString_bL(const USGInterpolationSet* InterpolationSet, bool bLimits); + + /** + * Convert this InterpolationSet into a string notation so it can be stored on disk. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Kinematics | Interpolation Set") + static FString SGSerialize(const USGInterpolationSet* InterpolationSet); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGJointKinematicsKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGJointKinematicsKismetLibrary.h new file mode 100644 index 0000000..119bd1f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGJointKinematicsKismetLibrary.h @@ -0,0 +1,97 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains kinematic formulae and wrappers for Sense Glove mathematics. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Math/Quat.h" +#include "Math/Vector.h" + +#include "SGCore/SGBasicHandModel.h" +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGJointKinematicsKismetLibrary.generated.h" + +/** + * + */ +UCLASS(meta=(ScriptName = "SenseGloveJointKinematicsKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGJointKinematicsKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Perform forward Kinematics on a set of joints, defined by a start position- and rotation, + * joint angles and the lengths in between. Outputs the calculated positions and rotations. + */ + UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics", + Category="SenseGlove | Core | Kinematics | Joint Kinematics") + static bool ForwardKinematics_SP_FQuat_SR_JL_JA_OutNP_TArrayFQuat_OutNR( + const FVector& StartPosition, const FQuat& StartRotation, + const TArray& JointLengths, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + /** + * Perform forward Kinematics on a set of joints, defined by a start position- and rotation, + * joint angles and the lengths in between. Outputs the calculated positions and rotations. + */ + UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics", + Category="SenseGlove | Core | Kinematics | Joint Kinematics") + static bool + ForwardKinematics_SP_FRotator_SR_JL_JA_OutNP_TArrayFRotator_OutNR( + const FVector& StartPosition, const FRotator& StartRotation, + const TArray& JointLengths, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + /** + * Calculate positions and rotations of a finger based on input angles and profile. + */ + UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics", + Category="SenseGlove | Core | Kinematics | Joint Kinematics") + static bool ForwardKinematics_P_F_JA_OutNP_TArrayFQuat_OutNR( + const USGBasicHandModel* Profile, ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); + + /** + * Calculate positions and rotations of a finger based on input angles and profile. + */ + UFUNCTION(BlueprintCallable, DisplayName="Forward Kinematics", + Category="SenseGlove | Core | Kinematics | Joint Kinematics") + static bool ForwardKinematics_P_F_JA_OutNP_TArrayFRotator_OutNR( + const USGBasicHandModel* Profile, ESGFinger Finger, const TArray& JointAngles, + TArray& OutNewPositions, TArray& OutNewRotations); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGLibraryKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGLibraryKismetLibrary.h new file mode 100644 index 0000000..de82491 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGLibraryKismetLibrary.h @@ -0,0 +1,71 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Information about the SGCore C++ Library. + */ + + +#pragma once + +#include "Containers/UnrealString.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGLibraryKismetLibrary.generated.h" + +/** + * Provides information about this C++ Library. + */ +UCLASS(meta=(ScriptName = "SenseGloveLibraryKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGLibraryKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The version of this C++ Library in string representation. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Library") + static FString GetVersion(); + + /** + * Back-End version in string notation. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Library") + static FString GetBackendVersion(); + + /** + * If possible, check what version of SGConnect is paired with this API. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Library") + static FString GetSGConnectVersion(); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNova2GloveKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNova2GloveKismetLibrary.h new file mode 100644 index 0000000..e7650e8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNova2GloveKismetLibrary.h @@ -0,0 +1,473 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback + * and sensor module, and active contact feedback in the front strap. + * Since the Nova 2.0 is significantly different from the Nova 1 Glove, it gets + * its own separate device interface. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGNova2GloveKismetLibrary.generated.h" + +class USGBasicHandModel; +class USGDevice; +class USGHandPose; +class USGHandProfile; +class USGNova2Glove; +class USGNova2GloveHandProfile; +class USGNova2GloveSensorData; + +/** + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact + * feedback in the front strap. + */ +UCLASS(meta=(ScriptName = "SenseGloveNova2GloveKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGNova2GloveKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Deserializes a Nova 2.0 from its ConstantsString. Returns a nullptr if unsuccessful. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static USGDevice* Parse(UObject* WorldContextObject, const FString& ConstantsString); + + /** + * Retrieve all Nova 2.0's. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static TArray GetNova2Gloves(UObject* WorldContextObject); + + /** + * Retrieve the first connected Nova 2.0 there is. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova2 Glove", Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetNova2Glove_OutG(UObject* WorldContextObject, USGNova2Glove*& OutGlove); + + /** + * Retrieve the first (connected) right or left handed Nova 2.0. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova2 Glove", Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetNova2Glove_bRH_OutG(UObject* WorldContextObject, + bool bRightHanded, USGNova2Glove*& OutGlove); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", + Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void CalculateGloveLocation_RP_FQuat_RR_TH_bRH_HW_OutGP_OutGR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", + Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void CalculateGloveLocation_RP_FRotator_RR_TH_bRH_HW_OutGP_OutGR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @remarks The simplest interface, using default offsets. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", + Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void CalculateWristLocation_RP_FQuat_RR_TH_bRH_HW_OutWP_OutWR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @remarks The simplest interface, using default offsets. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", + Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void CalculateWristLocation_RP_FRotator_RR_TH_bRH_HW_OutWP_OutWR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, const FString& HardwareVersion, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Special Byte to identify the command as a Streaming Byte. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static FString GetStreamByte(); + + /** + * Ranges before a Nova 2.0 Sensor is allowed to move. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static TArray GetNova2SensorRanges(); + + /** + * Converts Nova 2.0 Sensor Data into floating point inputs for normalization. + */ + UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values", + Category="SenseGlove | Core | Nova | Nova 2 Glove") + static TArray ToNormalizedValues_SD(const USGNova2GloveSensorData* SensorData); + + /** + * Convert Sensor Data into a series of normalized values. + */ + UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values", + Category="SenseGlove | Core | Nova | Nova 2 Glove", meta=(WorldContext="WorldContextObject")) + static TArray ToNormalizedValues_SD_OutSN( + UObject* WorldContextObject, + const USGNova2GloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer); + + /** + * Calculate Hand Angles for a Nova 2.0 Glove, based on normalized input. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static TArray CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator, bool bInfluenceIndex); + + /** + * Convert normalized inputs (5-6 sensors) to input for an Interpolator. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static TArray ToNormalizedAngles( + const TArray& NormalizedData, const USGNovaGloveInfo* GloveInfo); + + /** + * Return the DeviceType of this Nova. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static ESGDeviceType GetDeviceType(const USGNova2Glove* Nova2Glove); + + /** + * Returns this device's unique identifier. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static FString GetDeviceId(const USGNova2Glove* Nova2Glove); + + /** + * Access this device's hardware designation. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static FString GetHardwareVersion(const USGNova2Glove* Nova2Glove); + + /** + * Access this device's main firmware version. (ex: v3.2 -> 3). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static int32 GetFirmwareVersion(const USGNova2Glove* Nova2Glove); + + /** + * Access this device's sub-firmware version. (ex: v3.2 -> 2). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static int32 GetSubFirmwareVersion(const USGNova2Glove* Nova2Glove); + + /** + * Returns true if this device operates on a battery. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool HasBattery(const USGNova2Glove* Nova2Glove); + + /** + * Returns true if this device is currently charging. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool IsCharging(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /** + * Returns the device's battery level, as a value between 0 (empty) and 1 (full). + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool GetBatteryLevel(UPARAM(ref) USGNova2Glove* Nova2Glove, float& OutBatteryLevel); + + /** + * Returns true if this glove is meant for right hands. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool IsRight(const USGNova2Glove* Nova2Glove); + + /** + * Retrieve this glove's latest IMU rotation, if one is present. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool GetImuRotation_FQuat_OutI(UPARAM(ref) USGNova2Glove* Nova2Glove, FQuat& OutImu); + + /** + * Retrieve this glove's latest IMU rotation, if one is present. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGNova2Glove* Nova2Glove, FRotator& OutImu); + + /** + * Retrieve a new hand pose using this glove, based on (calibrated) user data. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandPose(UObject* WorldContextObject, + UPARAM(ref) USGNova2Glove* Nova2Glove, + const USGBasicHandModel* HandModel, + USGHandPose*& OutHandPose); + + /** + * Returns the Hand Angles calculated by this Nova2 Glove. Used for input for HandPoses, but can be used in and of + * itself. + * + * @param OutHandAngles + */ + UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandAngles(const USGNova2Glove* Nova2Glove, TArray& OutHandAngles); + + /* + * Retrieve the calibration status of this Nova 2.0 Glove. + */ + UFUNCTION(BlueprintPure, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static ESGHapticGloveCalibrationState GetCalibrationState(const USGNova2Glove* Nova2Glove); + + /* + * Completes sensor Normalization on the Nova 2.0's end. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static void EndCalibration(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /* + * Completes sensor Normalization on the Nova 2.0's end. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static void ResetCalibration(UPARAM(ref) USGNova2Glove* Nova2Glove); + +public: + /* + * Stop all haptic feedback effects playing on this device. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static void StopHaptics(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /** + * Stop only all vibrotactile feedback. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static void StopVibrations(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /** + * Flush all streaming haptic effects on the different fingers to the Nova 2.0 Glove. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | SG | Nova 2 Glove") + static bool SendHaptics(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /** + * Returns true if this Glove supports the chosen haptic location. + */ + UFUNCTION(BlueprintPure, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static bool SupportsCustomWaveform(const USGNova2Glove* Nova2Glove, ESGHapticLocation AtLocation); + + /** + * Send a custom waveform to the Nova 2.0. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static bool SendCustomWaveform(UPARAM(ref) USGNova2Glove* Nova2Glove, + USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static bool QueueForceFeedbackLevels(UPARAM(ref) USGNova2Glove* Nova2Glove, const TArray& Levels01); + + /** + * Set the Force-Feedback value of a particular finger to a specific level. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static bool QueueForceFeedbackLevel(UPARAM(ref) USGNova2Glove* Nova2Glove, int32 Finger, float Level01); + + /** + * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static bool QueueVibroLevels(UPARAM(ref) USGNova2Glove* Nova2Glove, const TArray& Amplitudes); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. This is to + * support backwards compatibility for older plugins. Use of Customwaveforms is encouraged. + */ + UFUNCTION(BlueprintCallable, Category="Nova2Glove | Core | Nova | Nova 2 Glove") + static bool QueueVibroLevel(UPARAM(ref) USGNova2Glove* Nova2Glove, ESGHapticLocation Location, float Level01); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( + const USGNova2Glove* Nova2Glove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Access DeviceInfo of this Nova. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveInfo* GetGloveInfo(UObject* WorldContextObject, const USGNova2Glove* Nova2Glove); + + /** + * If true, the Index Finger sensors will influence the tracking of the other fingers. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool DoesIndexInfluenceOthers(const USGNova2Glove* Nova2Glove); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void SetIndexInfluencesOthers(UPARAM(ref) USGNova2Glove* Nova2Glove, bool bInfluenceOthers); + + /** + * If true, this glove's sensor calibration runs on board the device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool SupportsOnBoardNormalization(const USGNova2Glove* Nova2Glove); + + /** + * Get the latest Sensor Data from this Glove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetSensorData(UObject* WorldContextObject, + UPARAM(ref) USGNova2Glove* Nova2Glove, USGNova2GloveSensorData*& OutSensorData); + + /** + * Returns the normalized Sensor Data of this Nova2 Glove. If no normalization is running on the glove(s), then + * it's done on the PC side. + * + * @param OutNormalizedValues + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool GetNormalizedInput(const USGNova2Glove* Nova2Glove, TArray& OutNormalizedValues); + + /** + * Tell the Nova Glove to send Raw Data instead of normalized data. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool SendRawData(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /** + * Tell the Nova Glove to send normalized data. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool SendNormalizedData(UPARAM(ref) USGNova2Glove* Nova2Glove); + + /** + * Convert a HapticLocation into a Nova 2.0 Motor location. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static ESGNova2VibroMotor ToNovaMotor(const USGNova2Glove* Nova2Glove, ESGHapticLocation Location); + + /** + * Returns the channel index for a particular motor. Can make this as complex as I want for the Nova2 GLove(s). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static int32 ChannelIndex(const USGNova2Glove* Nova2Glove, ESGNova2VibroMotor Motor); + + /** + * Ensures the waveform that is to be sent to this Nova2 Glove has the appropriate parameters. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static void ValidateWaveform(const USGNova2Glove* Nova2Glove, + USGCustomWaveform* OutWaveform, ESGNova2VibroMotor Motor); + + /** + * Directly sends a custom waveform to the Nova 2.0 Glove motors, as opposed to specifying a Haptic Location. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static bool SendCustomWaveform_Nova2( + UPARAM(ref) USGNova2Glove* Nova2Glove, + USGCustomWaveform* OutWaveform, ESGNova2VibroMotor Motor, bool bValidateWaveform = true); + + /** + * Create a string representation of this device for reporting purposes. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove") + static FString ToString(const USGNova2Glove* Nova2Glove); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.h new file mode 100644 index 0000000..f0604c1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNova2GloveSensorDataKismetLibrary.h @@ -0,0 +1,159 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Sensor Data coming off the Nova2 2.0 Glove. + * Has certain features the Nova2 1.0 Glove does not have, such as multiple + * flexion sensors, normalization states and Active Strap info. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGNova2GloveSensorDataKismetLibrary.generated.h" + +class USGNovaGloveInfo; +class USGNova2GloveSensorData; + +/** + * Nova Glove 2.0 Sensor data, which had additional feedback and calibration parameters. + */ +UCLASS(meta=(ScriptName = "SenseGloveNova2GloveSensorDataKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGNova2GloveSensorDataKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Default constructor for Nova2GloveSensorData. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGNova2GloveSensorData* MakeNova2GloveSensorData(UObject* WorldContextObject); + + /** + * Create a new instance of a Nova2GloveSensorData. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Nova2 Glove Sensor Data", + Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data", meta=(WorldContext="WorldContextObject")) + static USGNova2GloveSensorData* MakeNova2GloveSensorData_NS_V_PV_FQuat_IR_bIP_BL_bC( + UObject* WorldContextObject, ESGNormalizationState NormalizationState, + const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a Nova2GloveSensorData. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Nova2 Glove Sensor Data", + Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data", meta=(WorldContext="WorldContextObject")) + static USGNova2GloveSensorData* MakeNova2GloveSensorData_NS_V_PV_FRotator_IR_bIP_BL_b( + UObject* WorldContextObject, ESGNormalizationState NormalizationState, + const TArray& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Parse the bytes as they come in from the device into usable values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGNova2GloveSensorData* Parse(UObject* WorldContextObject, + const FString& RawData, const USGNovaGloveInfo* GloveInfo); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static ESGNormalizationState GetSensorState(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static TArray GetSensorValues(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Returns the sensor movement of a specific finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static float GetSensorValue(const USGNova2GloveSensorData* Nova2GloveSensorData, + ESGFinger Finger, ESGNova2SensorLocation Location); + + /** + * The number of values that were parsed from the sensor string. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static int32 GetParsedValues(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Quaternion rotation relative to magnetic north. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", + Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static FQuat GetImuRotation_FQuat(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Rotation relative to magnetic north. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", + Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static FRotator GetImuRotation_FRotator(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Whether the IMU values were all successfully parsed, or not. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static bool IsImuParsed(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * A value between 0..1 that represents the battery level of this Nova2 Glove (0 .. 100%). Returns -1 if the value + * wasn't received. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static float GetBatteryLevel(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Returns true if this NovaGlove is connected to a power source. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static bool IsCharging(const USGNova2GloveSensorData* Nova2GloveSensorData); + + /** + * Returns true if this sensor data contains the same values as another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static bool Equals(const USGNova2GloveSensorData* A, const USGNova2GloveSensorData* B); + + /** + * Create a readable string representation of this Sensor Data. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova 2 Glove Sensor Data") + static FString ToString(const USGNova2GloveSensorData* Nova2GloveSensorData); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveInfoKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveInfoKismetLibrary.h new file mode 100644 index 0000000..171fed0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveInfoKismetLibrary.h @@ -0,0 +1,163 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains information on Nova's hardware, extracted from the device. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGNovaGloveInfoKismetLibrary.generated.h" + +class USGNovaGloveInfo; + +/** + * Device information extracted from a Nova Glove. + */ +UCLASS(meta=(ScriptName = "SenseGloveNovaGloveInfoKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGNovaGloveInfoKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Info", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveInfo* MakeNovaGloveInfo(UObject* WorldContextObject); + + /** + * Create a new instance of a NovaGloveInfo. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Info", + Category="SenseGlove | Core | Nova | Nova Glove Info", meta=(WorldContext="WorldContextObject")) + static USGNovaGloveInfo* MakeNovaGloveInfo_DI_HV_FV_SFV_bRH_IC_NOS( + UObject* WorldContextObject, + const FString& DeviceId, const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, const FQuat& ImuCorrection, int32 NumberOfSensors); + + /** + * Parse a constants string into a NovaGloveInfo class. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Info", + meta=(WorldContext="WorldContextObject")) + static bool Parse(UObject* WorldContextObject, const FString& ConstantsString, USGNovaGloveInfo*& OutGloveInfo); + + /** + * Convert a string representation back into a NovaGloveInfo class. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Info", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveInfo* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Unique identifier of this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static FString GetDeviceId(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * Hardware (sub) version of this Sense Glove Device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static FString GetHardwareVersion(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * Firmware version running on the device's MicroController. (as v4.12, this is the 4). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static int32 GetFirmwareVersion(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * Sub firmware version running on the device's microcontroller (as v4.12, this is the .12). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static int32 GetSubFirmwareVersion(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * Determines if this is a right-handed Nova. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static bool IsRight(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * The IMU correction of this Nova. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Correction", Category="SenseGlove | Core | Nova | Nova Glove Info") + static FQuat GetImuCorrection_FQuat(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * The IMU correction of this Nova. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Correction", Category="SenseGlove | Core | Nova | Nova Glove Info") + static FRotator GetImuCorrection_FRotator(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * The number of sensors in this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static int32 GetNumberOfSensors(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * Returns true if this glove's firmware is newer than certain version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + bool FirmwareNewerThan(const USGNovaGloveInfo* NovaGloveInfo, + int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + /** + * Returns true if this glove's firmware is older than certain version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + bool FirmwareOlderThan(const USGNovaGloveInfo* NovaGloveInfo, + int32 FirmwareMain, int32 FirmwareSub, bool bInclusive) const; + + /** + * Returns true if this GloveInfo contains the same information as another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static bool Equals(const USGNovaGloveInfo* A, const USGNovaGloveInfo* B); + + /** + * Create a string representation of this Glove Info. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Info") + static FString ToString(const USGNovaGloveInfo* NovaGloveInfo); + + /** + * Convert this class into a string representation so it can be unpacked later. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Nova | Nova Glove Info") + static FString SGSerialize(const USGNovaGloveInfo* NovaGloveInfo); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveKismetLibrary.h new file mode 100644 index 0000000..8d46dde --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveKismetLibrary.h @@ -0,0 +1,514 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * An interface for the "Nova" - a soft glove. + * Contains methods for Kinematics, Haptics and Serialization. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGNovaGloveKismetLibrary.generated.h" + +class USGBasicHandModel; +class USGDevice; +class USGHandPose; +class USGHandProfile; +class USGNovaGlove; +class USGNovaGloveHandProfile; +class USGNovaGloveSensorData; + +/** + * A soft glove with Force- and Vibrotactile Feedback and limited tracking. + */ +UCLASS(meta=(ScriptName = "SenseGloveNovaGloveKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGNovaGloveKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Deserializes a Nova from its ConstantsString. Returns a nullptr if unsuccessful. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static USGDevice* Parse(UObject* WorldContextObject, const FString& ConstantsString); + + /** + * Retrieve all Nova's. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static TArray GetNovaGloves(UObject* WorldContextObject); + + /** + * Retrieve the first connected Nova there is. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove", Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetNovaGlove_OutG(UObject* WorldContextObject, USGNovaGlove*& OutGlove); + + /** + * Retrieve the first (connected) right or left handed Nova. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove", Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetNovaGlove_bRH_OutG(UObject* WorldContextObject, + bool bRightHanded, USGNovaGlove*& OutGlove); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", + Category="SenseGlove | Core | Nova | Nova Glove") + static void CalculateGloveLocation_RP_FQuat_RR_TH_bRH_OutGP_OutGR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", + Category="SenseGlove | Core | Nova | Nova Glove") + static void CalculateGloveLocation_RP_FRotator_RR_TH_bRH_OutGP_OutGR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @remarks The simplest interface, using default offsets. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", + Category="SenseGlove | Core | Nova | Nova Glove") + static void CalculateWristLocation_RP_FQuat_RR_TH_bRH_OutWP_OutWR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets, without + * needing an object reference. + * + * @remarks The simplest interface, using default offsets. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", + Category="SenseGlove | Core | Nova | Nova Glove") + static void CalculateWristLocation_RP_FRotator_RR_TH_bRH_OutWP_OutWR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Byte indicating a new Nova haptic command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static FString GetHapticsByte(); + + /** + * Byte indicating a new Nova thresholds command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static FString GetThresholdsByte(); + + /** + * Byte to ignore Thresholds. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static FString GetIgnoreThresholdsByte(); + + /** + * Ranges before a Nova 1.0 Sensor is allowed to move. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static TArray GetNovaSensorRanges(); + + /** + * Converts Nova Sensor Data into floating point inputs for normalization. + */ + UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values", Category="SenseGlove | Core | Nova | Nova Glove") + static TArray ToNormalizedValues_SD(const USGNovaGloveSensorData* SensorData); + + /** + * Convert Sensor Data into a series of normalized values. + */ + UFUNCTION(BlueprintCallable, DisplayName="To Normalized Values", Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static TArray ToNormalizedValues_SD_OutSN( + UObject* WorldContextObject, + const USGNovaGloveSensorData* SensorData, USGSensorNormalization*& OutSensorNormalizer); + + /** + * Calculate Hand Angles for a Nova Glove, based on normalized input. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static TArray CalculateHandAngles( + const TArray& NormalizedValues, const USGHandInterpolator* Interpolator); + + /** + * Converts a Threshold command into a Nova Glove command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static FString ToNovaCommandAsFlexion(const USGThresholdCommand* Thresholds); + + /** + * Converts a Threshold command into a Nova Glove command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static FString ToNovaCommandAsRaw( + const USGThresholdCommand* Thresholds, const USGSensorNormalization* Interpolator); + + /** + * Return the DeviceType of this Nova. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static ESGDeviceType GetDeviceType(const USGNovaGlove* NovaGlove); + + /** + * Returns this device's unique identifier. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static FString GetDeviceId(const USGNovaGlove* NovaGlove); + + /** + * Access this device's hardware designation. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static FString GetHardwareVersion(const USGNovaGlove* NovaGlove); + + /** + * Access this device's main firmware version. (ex: v3.2 -> 3). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static int32 GetFirmwareVersion(const USGNovaGlove* NovaGlove); + + /** + * Access this device's sub-firmware version. (ex: v3.2 -> 2). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static int32 GetSubFirmwareVersion(const USGNovaGlove* NovaGlove); + + /** + * Change this device's index within the SenseCom. Warning: Can cause errors. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static void SetDeviceIndex(UPARAM(ref) USGNovaGlove* NovaGlove, int32 NewIndex); + + /** + * Returns true if this device operates on a battery. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static bool HasBattery(const USGNovaGlove* NovaGlove); + + /** + * Returns true if this device is currently charging. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool IsCharging(UPARAM(ref) USGNovaGlove* NovaGlove); + + /** + * Returns the device's battery level, as a value between 0 (empty) and 1 (full). + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool GetBatteryLevel(UPARAM(ref) USGNovaGlove* NovaGlove, float& OutBatteryLevel); + + /** + * Returns true if this glove is meant for right hands. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static bool IsRight(const USGNovaGlove* NovaGlove); + + /** + * Retrieve Nova rotation. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova Glove") + static bool GetImuRotation_FQuat_OutI(UPARAM(ref) USGNovaGlove* NovaGlove, FQuat& OutImu); + + /** + * Retrieve Nova rotation. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | Nova | Nova Glove") + static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGNovaGlove* NovaGlove, FRotator& OutImu); + + /** + * Retrieve a new hand pose using this glove, based on (calibrated) user data. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandPose(UObject* WorldContextObject, + UPARAM(ref) USGNovaGlove* NovaGlove, + const USGBasicHandModel* HandModel, + USGHandPose*& OutHandPose); + + /** + * Returns the Hand Angles calculated by this Nova Glove. Used for input for HandPoses, but can be used in and of + * itself. + * + * @param OutHandAngles + */ + UFUNCTION(BlueprintPure, DisplayName="Get Hand Pose", Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandAngles(const USGNovaGlove* NovaGlove, TArray& OutHandAngles); + + /* + * Retrieve the calibration status of this Nova Glove. + */ + UFUNCTION(BlueprintPure, Category="NovaGlove | Core | Nova | Nova Glove") + static ESGHapticGloveCalibrationState GetCalibrationState(const USGNovaGlove* NovaGlove); + + /* + * Completes sensor Normalization on the Nova's end. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static void EndCalibration(UPARAM(ref) USGNovaGlove* NovaGlove); + + /* + * Completes sensor Normalization on the Nova's end. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static void ResetCalibration(UPARAM(ref) USGNovaGlove* NovaGlove); + +public: + /* + * Stop all haptic feedback effects playing on this device. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static void StopHaptics(UPARAM(ref) USGNovaGlove* NovaGlove); + + /** + * Stop only all vibrotactile feedback. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static void StopVibrations(UPARAM(ref) USGNovaGlove* NovaGlove); + + /** + * Take all active commands in the device queue, compile them into one and send them to the device. + * + * @returns Returns true if the message was successfully sent to SenseCom. Returns false if no changes to commands + * were detected. + * + * @remarks Generic function across any Haptic Interface in SGCore. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | SG | Nova Glove") + static bool SendHaptics(UPARAM(ref) USGNovaGlove* NovaGlove); + + /** + * Returns true if this Glove supports the chosen haptic location. + */ + UFUNCTION(BlueprintPure, Category="NovaGlove | Core | Nova | Nova Glove") + static bool SupportsCustomWaveform(const USGNovaGlove* NovaGlove, ESGHapticLocation AtLocation); + + /** + * Send a custom waveform to the Nova. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static bool SendCustomWaveform(UPARAM(ref) USGNovaGlove* NovaGlove, + USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static bool QueueForceFeedbackLevels(UPARAM(ref) USGNovaGlove* NovaGlove, const TArray& Levels01); + + /** + * Set the Force-Feedback value of a particular finger to a specific level. + */ + UFUNCTION(BlueprintCallable, Category="NovaGlove | Core | Nova | Nova Glove") + static bool QueueForceFeedbackLevel(UPARAM(ref) USGNovaGlove* NovaGlove, int32 Finger, float Level01); + + /** + * Queue a vibrotactile level for each finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool QueueVibroLevels(UPARAM(ref) USGNovaGlove* NovaGlove, const TArray& Amplitudes); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool QueueVibroLevel_L_L(UPARAM(ref) USGNovaGlove* NovaGlove, ESGHapticLocation Location, float Level01); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova Glove") + static void GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | Nova | Nova Glove") + static void GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova Glove") + static void GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | Nova | Nova Glove") + static void GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( + const USGNovaGlove* NovaGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Access all sorts of device info specific to this Nova. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove", meta=(WorldContext="WorldContextObject")) + static USGNovaGloveInfo* GetGloveInfo(UObject* WorldContextObject, const USGNovaGlove* NovaGlove); + + /** + * If true, this Nova Glove supports sending special firmware commands to lock brakes at specific sensor values. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static bool SupportsThresholds(const USGNovaGlove* NovaGlove); + + /** + * If true, this Nova Glove supports sending custom 'fire-and-forget' waveforms. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static bool SupportsCustomWaveforms(const USGNovaGlove* NovaGlove); + + /** + * If true, this glove's sensor calibration runs on board the device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static bool SupportsOnBoardNormalization(const USGNovaGlove* NovaGlove); + + /** + * Get the latest Sensor Data from this Glove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetSensorData(UObject* WorldContextObject, + UPARAM(ref) USGNovaGlove* NovaGlove, USGNovaGloveSensorData*& OutSensorData); + + /** + * Converts a set of commands into a series of bytes (string) this glove can understand. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static FString ToNovaCommand( + const USGNovaGlove* NovaGlove, + const TArray& ForceFeedbackLevels, const TArray& BuzzLevels, float WristLevel); + + /** + * Queue a vibrotactle level for a specific finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool QueueVibroLevel_F_A(UPARAM(ref) USGNovaGlove* NovaGlove, int32 Finger, float Amplitude); + + /** + * Queue a command to the vibration amplitude of a general wrist actuator to a set level. + * + * @returns Returns true if the wrist command has been successfully queued. If false, the device might not support + * direct wrist control or have the appropriate firmware. + * + * @remarks This one isn't contained in an interface as it's not used outside of the NovaGlove class. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool QueueWristLevel(UPARAM(ref) USGNovaGlove* NovaGlove, float Amplitude); + + /** + * Convert a HapticLocation into a Nova Motor location. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static ESGNovaVibroMotor ToNovaMotor(const USGNovaGlove* NovaGlove, ESGHapticLocation Location); + + /** + * Returns the channel index for a particular motor. Can make this as complex as I want for the Nova GLove(s). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static int32 ChannelIndex(const USGNovaGlove* NovaGlove, ESGNovaVibroMotor Motor); + + /** + * Ensures the waveform that is to be sent to this Nova Glove has the appropriate parameters. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static void ValidateWaveform(const USGNovaGlove* NovaGlove, + USGCustomWaveform* OutWaveform, ESGNovaVibroMotor Motor); + + /** + * Directly sends a custom waveform to the Nova Glove motors, as opposed to specifying a Haptic Location. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool SendCustomWaveform_Nova( + UPARAM(ref) USGNovaGlove* NovaGlove, + USGCustomWaveform* OutWaveform, ESGNovaVibroMotor Motor, bool bValidateWaveform = true); + + /** + * Stops the glove when flexing pas this point. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool QueueThresholdCommand_Flexion(UPARAM(ref) USGNovaGlove* NovaGlove, + int32 Finger, float FlexionThreshold); + + /** + * Queue a command to clear the threshold for a specific finger. + * + * @returns Returns true if the command was queued. If false, the device does not have the required firmware for + * these commands. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove") + static bool QueueClearThreshold(UPARAM(ref) USGNovaGlove* NovaGlove, int32 Finger); + + /** + * Create a string representation of this device for reporting purposes. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove") + static FString ToString(const USGNovaGlove* NovaGlove); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.h new file mode 100644 index 0000000..e4ec9be --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGNovaGloveSensorDataKismetLibrary.h @@ -0,0 +1,171 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Nova SensorData, parsed from rae string representations. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGNovaGloveSensorDataKismetLibrary.generated.h" + +class USGNovaGloveInfo; +class USGNovaGloveSensorData; + +/** + * Sensor Data coming from a Nova, converted into useful values. + */ +UCLASS(meta=(ScriptName = "SenseGloveNovaGloveSensorDataKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGNovaGloveSensorDataKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Default constructor for NovaGloveSensorData. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveSensorData* MakeNovaGloveSensorData(UObject* WorldContextObject); + + /** + * Create a new instance of a NovaGloveSensorData. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Sensor Data", + Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", meta=(WorldContext="WorldContextObject")) + static USGNovaGloveSensorData* MakeNovaGloveSensorData_V_PV_FQuat_IR_bIP_BL_bC( + UObject* WorldContextObject, const TArray& Values, int32 ParsedValues, + const FQuat& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Create a new instance of a NovaGloveSensorData. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Nova Glove Sensor Data", + Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", meta=(WorldContext="WorldContextObject")) + static USGNovaGloveSensorData* MakeNovaGloveSensorData_V_PV_FRotator_IR_bIP_BL_b( + UObject* WorldContextObject, const TArray& Values, int32 ParsedValues, + const FRotator& ImuRotation, bool bImuParsed, float BatteryLevel, bool bCharging); + + /** + * Returns a NovaGloveSensorData without any values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveSensorData* Empty(UObject* WorldContextObject); + + /** + * Parse the bytes as they come in from the device into usable values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveSensorData* Parse(UObject* WorldContextObject, + const FString& RawData, const USGNovaGloveInfo* GloveInfo); + + /** + * Convert this sensor data into ta string representation. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGNovaGloveSensorData* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Pronation/Supination, Flexion/Extension and Abduction/Adduction values for each finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static TArray GetSensorValues(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Returns the sensor movement of a specific finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static float GetSensorValue(const USGNovaGloveSensorData* NovaGloveSensorData, + ESGFinger Finger, ESGNovaSensorLocation Location); + + /** + * The number of values that were parsed from the sensor string. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static int32 GetParsedValues(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Quaternion rotation relative to magnetic north. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", + Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static FQuat GetImuRotation_FQuat(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Rotation relative to magnetic north. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", + Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static FRotator GetImuRotation_FRotator(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Whether the IMU values were all successfully parsed, or not. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static bool IsImuParsed(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * A value between 0..1 that represents the battery level of this Nova Glove (0 .. 100%). Returns -1 if the value + * wasn't received. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static float GetBatteryLevel(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Returns true if this NovaGlove is connected to a power source. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static bool IsCharging(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Returns true if this sensor data contains the same values as another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static bool Equals(const USGNovaGloveSensorData* A, const USGNovaGloveSensorData* B); + + /** + * Create a readable string representation of this Sensor Data. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static FString ToString(const USGNovaGloveSensorData* NovaGloveSensorData); + + /** + * Convert this sensor data into a string so it can be stored on disk. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | Nova | Nova Glove Sensor Data") + static FString SGSerialize(const USGNovaGloveSensorData* NovaGloveSensorData); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseComKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseComKismetLibrary.h new file mode 100644 index 0000000..deb1ec7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseComKismetLibrary.h @@ -0,0 +1,90 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseComKismetLibrary.generated.h" + +/** + * + */ +UCLASS(meta=(ScriptName = "SenseGloveSenseComKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseComKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Registers current process as the latest SenseCom build. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SenseCom") + static bool RegisterExe(); + + /** + * Register a particular path as the SenseGlove executable location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Register Exe", Category="SenseGlove | Core | SenseCom") + static bool RegisterExe_EP(const FString& ExePath); + + /** + * Retrieve the location of SenseGlove executable. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SenseCom") + static bool GetExePath(FString& OutExePath); + + /** + * Returns true if SenseCom scanning is active. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SenseCom") + static bool ScanningActive(); + + /** + * Returns the directory of the current process. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SenseCom") + static bool GetCurrentExeDirectory(FString& OutDirectory); + + /** + * Force-starts the SenseCom application if it is active on the system. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SenseCom") + static bool StartupSenseCom(); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveInfoKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveInfoKismetLibrary.h new file mode 100644 index 0000000..9c5d3a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveInfoKismetLibrary.h @@ -0,0 +1,235 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Glove information taken from the Sense Glove. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGFloatArray.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseGloveInfoKismetLibrary.generated.h" + +class USGSenseGloveInfo; + +/** + * Glove Information taken from a SenseGlove. Contains everything from unique ID, firmware version, etc. + */ +UCLASS(meta=(ScriptName = "SenseGloveSenseGloveInfoKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseGloveInfoKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* MakeSenseGloveInfo(UObject* WorldContextObject); + + /** + * Create a new Sense Glove device model. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Info", + Category="SenseGlove | Core | SG | Sense Glove Info", meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* MakeSenseGloveInfo_DI_HV_FV_SFV_bRH_NOS_FQuat_IC_SP_TArrayFQuat_SR_GL_F( + UObject* WorldContextObject, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FQuat& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions); + + /** + * Create a new Sense Glove device model. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Info", + Category="SenseGlove | Core | SG | Sense Glove Info", meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* MakeSenseGloveInfo_DI_HV_FV_SFV_bRH_NOS_FRotator_IC_SP_TArrayFRotator_SR_GL_F( + UObject* WorldContextObject, const FString& DeviceId, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, + bool bRightHanded, int32 NumberOfSensors, const FRotator& ImuCorrection, + const TArray& StartPositions, const TArray& StartRotations, + const TArray& GloveLengths, const TArray& Functions); + + /** + * Create an instance of the SGModel from its string representation. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info", + meta=(WorldContext="WorldContextObject")) + static bool Parse(UObject* WorldContextObject, + const FString& ConstantsString, USGSenseGloveInfo*& OutGloveInfo, + bool bUpdateOldModels = true); + + /** + * Deserialize a HandProfile back into usable values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Info", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Unique identifier of this device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static FString GetDeviceId(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * Hardware (sub) version of this Sense Glove Device. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static FString GetHardwareVersion(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * Firmware version running on the device's MicroController. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static int32 GetFirmwareVersion(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * Sub-Firmware version running on the device's MicroController. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static int32 GetSubFirmwareVersion(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * Check if this Sense Glove belongs to a left or right hand. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static bool IsRight(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The number of Sensors in this SenseGlove. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static int32 GetNumberOfSensors(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The IMU correction of this Sense Glove. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Info") + static FQuat GetImuCorrection_FQuat(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The IMU correction of this Sense Glove. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Info") + static FRotator GetImuCorrection_FRotator(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The starting positions of each Sense Glove finger, relative to the glove origin. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray GetStartPositions(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The starting rotations of each Sense Glove finger, relative to the glove origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Start Rotations", Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray GetStartRotations_TArrayFQuat(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The starting rotations of each Sense Glove finger, relative to the glove origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Start Rotations", Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray GetStartRotations_TArrayFRotator(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The lengths of each Sense Glove finger section, in cm. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray GetGloveLengths(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * Whether this device has a specific function (T/F). + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray GetFunctions(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * The starting position of one Sense Glove finger, relative to the glove origin. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static FVector GetStartPosition(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger); + + /** + * The starting rotation of one Sense Glove finger, relative to the glove origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Start Rotation", Category="SenseGlove | Core | SG | Sense Glove Info") + static FQuat GetStartRotation_FQuat(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger); + + /** + * The starting rotation of one Sense Glove finger, relative to the glove origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Start Rotation", Category="SenseGlove | Core | SG | Sense Glove Info") + static FRotator GetStartRotation_FRotator(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger); + + /** + * The lengths of one Sense Glove finger's sections, in cm. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Lengths", Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray GetGloveLengths_F(const USGSenseGloveInfo* SenseGloveInfo, ESGFinger Finger); + + /** + * Place incoming sensor data into the right format, according to this glove's model. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static TArray ToGloveAngles(const USGSenseGloveInfo* SenseGloveInfo, + const TArray& SensorAngles); + + /** + * Returns true if this SG_Model has the same values as another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static bool Equals(const USGSenseGloveInfo* A, const USGSenseGloveInfo* B); + + /** + * Create a string representation for fast logging. + */ + UFUNCTION(BlueprintPure, DisplayName="To String", Category="SenseGlove | Core | SG | Sense Glove Info") + static FString ToString_bSN(const USGSenseGloveInfo* SenseGloveInfo, bool bShortNotation); + + /** + * Create a string representation for logging. If shortNotation is false, all values are reported. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Info") + static FString ToString(const USGSenseGloveInfo* SenseGloveInfo); + + /** + * Serialize this HandProfile into a string representation. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Info") + static FString SGSerialize(const USGSenseGloveInfo* SenseGloveInfo); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h new file mode 100644 index 0000000..7951960 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveKismetLibrary.h @@ -0,0 +1,484 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * An interface for the Sense Glove exoskeleton glove. + * Contains methods for Kinematics, Haptics and Serialization. + */ + + +#pragma once + +#include "SGCore/SGHandPose.h" +#include "SGCore/SGSenseGlove.h" +#include "SGCore/SGSenseGlovePose.h" +#include "SGCore/SGSenseGloveSensorData.h" +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseGloveKismetLibrary.generated.h" + +class USGDevice; +class USGHandInterpolator; +class USGHandPose; +class USGSenseGlove; +class USGSenseGloveSensorNormalizer; + +/** + * Interface for the Sense Glove; and exoskeleton Force-Feedback glove. + */ +UCLASS(meta=(ScriptName = "SenseGloveSenseGloveKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseGloveKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Deserializes a Sense Glove from its ConstantsString. Returns a nullptr if unsuccessful. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static USGDevice* Parse(UObject* WorldContextObject, const FString& ConstantsString); + + /** + * Retrieve all Sense Gloves connected to this system. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static TArray GetSenseGloves(UObject* WorldContextObject); + + /** + * Retrieve the first connected Sense Glove there is. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Sense Glove", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetSenseGlove_OutG(UObject* WorldContextObject, USGSenseGlove*& OutGlove); + + /** + * Retrieve the first (connected) right or left handed sense glove. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Sense Glove", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetSenseGlove_bRH_OutG(UObject* WorldContextObject, bool bRightHanded, USGSenseGlove*& OutGlove); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", + Category="SenseGlove | Core | SG | Sense Glove") + static void CalculateGloveLocation_RP_FQuat_RR_TH_bRH_MO_OutGP_FQuat_OutGR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location without requiring an object reference. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Location", + Category="SenseGlove | Core | SG | Sense Glove") + static void CalculateGloveLocation_RP_FRotator_RR_TH_bRH_MO_OutGP_FRotator_OutGR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Calculates the full wrist location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", + Category="SenseGlove | Core | SG | Sense Glove") + static void CalculateWristLocation_RP_FQuat_RR_TH_bRH_MO_GWPOffset_FQuat_GWRO_OutWP_FQuat_OutWR( + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Calculates the full wrist location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Wrist Location", + Category="SenseGlove | Core | SG | Sense Glove") + static void CalculateWristLocation_RP_FRotator_RR_TH_bRH_MO_GWPOffset_FRotator_GWRO_OutWP_FRotator_OutWR( + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, bool bRightHanded, ESGFinger MountedOn, + const FVector& GloveWristPositionOffset, const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Byte indicating a new Sense Glove haptic command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static FString GetHapticsByte(); + + /** + * Byte indicating a new Thumper command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static FString GetThumperByte(); + + /** + * Default offset from thimble to fingertip. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static FVector GetDefaultThimbleOffset(); + + /** + * Calculates a GlovePose based on sensor angles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* CalculateGlovePose_SD_GM( + UObject* WorldContextObject, + const USGSenseGloveSensorData* SensorData, const USGSenseGloveInfo* GloveModel); + + /** + * Calculates a GlovePose based on gloveAngles and a glove model. + * + * @remarks Use this when you already have gloveAngles collected. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* CalculateGlovePose_GA_GM( + UObject* WorldContextObject, + const TArray& GloveAngles, const USGSenseGloveInfo* GloveModel); + + /** + * Returns normalized flexions and abductions. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void NormalizeValues(const TArray& SumAngles, + const USGSenseGloveSensorNormalizer* Normalizer, + TArray& OutFlexions, TArray& OutAbductions); + + /** + * Calculate Hand Angles from a GlovePose and relevant normalizers. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void CalculateHandAngles( + const USGSenseGlovePose* GlovePose, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + TArray& OutHandAngles); + + /** + * Calculate a HandPose based on a glovePose and a solver. + * + * @remarks Use this when you already have a GlovePose. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static void CalculateHandPose( + UObject* WorldContextObject, + const USGSenseGlovePose* GlovePose, const USGBasicHandModel* HandModel, + const USGSenseGloveSensorNormalizer* Normalizer, const USGHandInterpolator* NormalizedToAngles, + USGHandPose*& OutHandPose); + + /** + * Get the DeviceType enumerator of this SenseGlove, used in DeviceList enumeration. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static ESGDeviceType GetDeviceType(const USGSenseGlove* SenseGlove); + + /** + * Retrieve this Sense Glove's unique identifier. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static FString GetDeviceId(const USGSenseGlove* SenseGlove); + + /** + * Retrieve this glove's hardware (sub) version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static FString GetHardwareVersion(const USGSenseGlove* SenseGlove); + + /** + * Retrieve this device's firmware version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static int32 GetFirmwareVersion(const USGSenseGlove* SenseGlove); + + /** + * Retrieve this device's sub-firmware version. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static int32 GetSubFirmwareVersion(const USGSenseGlove* SenseGlove); + + /** + * Check if this Sense Glove is right handed. + * + * @remarks While the variable is stored in SG_GloveModel, added direct access here since its frequently used. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static bool IsRight(const USGSenseGlove* SenseGlove); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove") + static bool GetImuRotation_FQuat_OutI(UPARAM(ref) USGSenseGlove* SenseGlove, FQuat& OutImu); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Rotation", Category="SenseGlove | Core | SG | Sense Glove") + static bool GetImuRotation_FRotator_OutI(UPARAM(ref) USGSenseGlove* SenseGlove, FRotator& OutImu); + + /** + * Retrieve a new hand pose using this glove's data, based on (calibrated) user data. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetHandPose(UObject* WorldContextObject, + UPARAM(ref) USGSenseGlove* SenseGlove, + const USGBasicHandModel* HandModel, + USGHandPose*& OutHandPose); + + /** + * Returns the Hand Angles calculated by this Sense Glove. Used for input for HandPoses, but can be used in and of + * itself. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static bool GetHandAngles(const USGSenseGlove* SenseGlove, TArray& OutHandAngles); + + /* + * Retrieve the calibration status of this Sense Glove. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static ESGHapticGloveCalibrationState GetCalibrationState(const USGSenseGlove* SenseGlove); + + /* + * Completes sensor Normalization on the Glove's end. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void EndCalibration(UPARAM(ref) USGSenseGlove* SenseGlove); + + /* + * Completes sensor Normalization on the Glove's end. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void ResetCalibration(UPARAM(ref) USGSenseGlove* SenseGlove); + +public: + /* + * Stop all haptic feedback effects playing on this device. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void StopHaptics(UPARAM(ref) USGSenseGlove* SenseGlove); + + /** + * Stop only all vibrotactile feedback. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void StopVibrations(UPARAM(ref) USGSenseGlove* SenseGlove); + + /** + * Flush all streaming haptic effects on the different fingers to the Glove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool SendHaptics(UPARAM(ref) USGSenseGlove* SenseGlove); + + /** + * Set the Force-Feedback value of a particular finger to a specific level. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool QueueForceFeedbackLevels(UPARAM(ref) USGSenseGlove* SenseGlove, const TArray& Levels01); + + /** + * Queue a list of force-feedback levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool QueueForceFeedbackLevel(UPARAM(ref) USGSenseGlove* SenseGlove, int32 Finger, float Level01); + + /** + * Queue a vibrotactile level for each finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool QueueVibroLevels(UPARAM(ref) USGSenseGlove* SenseGlove, const TArray& Amplitudes); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool QueueVibroLevel_L_L(UPARAM(ref) USGSenseGlove* SenseGlove, ESGHapticLocation Location, float Level01); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetGloveLocation_RP_FQuat_RR_TH_OutGP_FQuat_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetGloveLocation_RP_FRotator_RR_TH_OutGP_FRotator_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetGloveLocation_RP_FQuat_RR_TH_MO_OutGP_FQuat_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, + FVector& OutGlovePosition, FQuat& OutGloveRotation); + + /** + * Retrieve the location of the glove origin, based on a reference location. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Glove Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetGloveLocation_RP_FRotator_RR_TH_MO_OutGP_FRotator_OutGR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, ESGFinger MountedOn, + FVector& OutGlovePosition, FRotator& OutGloveRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetWristLocation_RP_FQuat_RR_TH_OutWP_FQuat_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetWristLocation_RP_FRotator_RR_TH_OutWP_FRotator_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetWristLocation_RP_FQuat_RR_TH_GWPO_FQuat_GWRO_OutWP_FQuat_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FQuat& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FQuat& GloveWristRotationOffset, + FVector& OutWristPosition, FQuat& OutWristRotation); + + /** + * Retrieve the location of the wrist, based on a reference location and default glove-hand offsets. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Wrist Location", Category="SenseGlove | Core | SG | Sense Glove") + static void GetWristLocation_RP_FRotator_RR_TH_GWPO_FRotator_GWRO_OutWP_FRotator_OutWR( + const USGSenseGlove* SenseGlove, + const FVector& ReferencePosition, const FRotator& ReferenceRotation, + ESGPositionalTrackingHardware TrackingHardware, + const FVector& GloveWristPositionOffset, + const FRotator& GloveWristRotationOffset, + FVector& OutWristPosition, FRotator& OutWristRotation); + + /** + * Retrieve this glove's hardware model, which contains its hardware data. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* GetGloveInfo(UObject* WorldContextObject, const USGSenseGlove* SenseGlove); + + /** + * Offset from thimble to fingertip, used for Inverse Kinematics. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static TArray GetFingerThimbleOffsets(const USGSenseGlove* SenseGlove); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static void SetFingerThimbleOffset(UPARAM(ref) USGSenseGlove* SenseGlove, int32 Finger, const FVector& Offset); + + /** + * + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static bool SupportsWristActuator(const USGSenseGlove* SenseGlove); + + /** + * Get the latest Sensor Data from this Sense Glove. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove", meta=(WorldContext="WorldContextObject")) + static bool GetSensorData(UObject* WorldContextObject, + const USGSenseGlove* SenseGlove, USGSenseGloveSensorData*& OutSensorData); + + /** + * Get the pose of this Sense Glove's hardware, based on its latest Sensor Data. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetGlovePose_OutGP(UObject* WorldContextObject, + UPARAM(ref) USGSenseGlove* SenseGlove, + USGSenseGlovePose*& OutGlovePose); + + /** + * Get the pose of this Sense Glove's hardware based on a set of Sensor Data. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Glove Pose", Category="SenseGlove | Core | SG | Sense Glove", + meta=(WorldContext="WorldContextObject")) + static bool GetGlovePose_SD_OutGP(UObject* WorldContextObject, + UPARAM(ref) USGSenseGlove* SenseGlove, + const USGSenseGloveSensorData* SensorData, + USGSenseGlovePose*& OutGlovePose); + + /** + * Queue a vibrotactle level for a specific finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool QueueVibroLevel_F_A(UPARAM(ref) USGSenseGlove* SenseGlove, int32 Finger, float Amplitude); + + /** + * Queue a command for the SenseGlove Thumper actuator. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove") + static bool QueueThumperCommand(UPARAM(ref) USGSenseGlove* SenseGlove, ESGSenseGloveThumperCommand Command); + + /** + * Create a string representation of this device for reporting purposes. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove") + static FString ToString(const USGSenseGlove* SenseGlove); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGlovePoseKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGlovePoseKismetLibrary.h new file mode 100644 index 0000000..4f5e5f1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGlovePoseKismetLibrary.h @@ -0,0 +1,181 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains position and rotation data of a SenseGlove's exoskeleton, along + * with accessors for relevant variables. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGQuatArray.h" +#include "SGTypes/SGRotatorArray.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseGlovePoseKismetLibrary.generated.h" + +class USGSenseGloveInfo; +class USGSenseGlovePose; + +/** + * Represents a pose of a Sense Glove exoskeleton. + */ +UCLASS(meta=(ScriptName = "SenseGloveSenseGlovePoseKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseGlovePoseKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The basic constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose", + meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* MakeSenseGlovePose(UObject* WorldContextObject); + + /** + * Creates a new instance of a SenseGlovePose. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Pose", + Category="SenseGlove | Core | SG | Sense Glove Pose", meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* MakeSenseGlovePose_bRH_JP_TArrayFSGQuatArray_JR_GA( + UObject* WorldContextObject, bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles); + + /** + * Creates a new instance of a SenseGlovePose. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Pose", + Category="SenseGlove | Core | SG | Sense Glove Pose", meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* MakeSenseGlovePose_bRH_JP_TArrayFSGRotatorArray_JR_GA( + UObject* WorldContextObject, bool bRightHanded, + const TArray& JointPositions, + const TArray& JointRotations, + const TArray& GloveAngles); + + /** + * Returns an idle pose for the Sense Glove if no data can be found. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose", + meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* IdlePose(UObject* WorldContextObject, const USGSenseGloveInfo* GloveInfo); + + /** + * Deserialize a GlovePose back into usable values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Pose", + meta=(WorldContext="WorldContextObject")) + static USGSenseGlovePose* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Whether this Glove Pose was created for be a right- or left hand, or not. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static bool IsRight(const USGSenseGlovePose* SenseGlovePose); + + /** + * Positions of each glove joint, relative to the Glove's Origin. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetJointPositions(const USGSenseGlovePose* SenseGlovePose); + + /** + * Quaternion rotation of each glove joint, relative to the Glove Origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetJointRotations_TArrayFSGQuatArray(const USGSenseGlovePose* SenseGlovePose); + + /** + * Rotation of each glove joint, relative to the Glove Origin. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Joint Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetJointRotations_TArrayFSGRotatorArray(const USGSenseGlovePose* SenseGlovePose); + + /** + * Glove joint angles in euler notation, relative to the last segment. + * + * @remarks Essentially sensor angles, though placed in their proper xyz notation. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetGloveAngles(const USGSenseGlovePose* SenseGlovePose); + + /** + * The position of the tip of the 'thimbles', the furthest link on each glove link. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetThimblePositions(const USGSenseGlovePose* SenseGlovePose); + + /** + * The (quaternion) rotation of the 'thimbles', the furthest link on each link. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Thimble Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetThimbleRotations_FQuat(const USGSenseGlovePose* SenseGlovePose); + + /** + * The rotation of the 'thimbles', the furthest link on each link. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Thimble Rotations", Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetThimbleRotations_FRotator(const USGSenseGlovePose* SenseGlovePose); + + /** + * Sum of the Sensor angles in each (xyz) direction. "Total Pronation / Flexion / Abduction". + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray GetTotalGloveAngles(const USGSenseGlovePose* SenseGlovePose); + + /** + * Calculate fingertip positions, knowing the offset between thimble and fingertips. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static TArray CalculateFingertips(const USGSenseGlovePose* SenseGlovePose, + const TArray& FingerOffsets); + + /** + * Returns true if this glove pose equals another. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static bool Equals(const USGSenseGlovePose* A, const USGSenseGlovePose* B); + + /** + * Returns a user-friendly string representation of this GlovePose for reporting. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Pose") + static FString ToString(const USGSenseGlovePose* SenseGlovePose, bool bShortFormat = false); + + /** + * Serialize this GlovePose into a string representation. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Pose") + static FString SGSerialize(const USGSenseGlovePose* SenseGlovePose); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.h new file mode 100644 index 0000000..3fb533d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveSensorDataKismetLibrary.h @@ -0,0 +1,165 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Parsed sensor data coming form a Sense Glove. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGFloatArray.h" + +#include "SGSenseGloveSensorDataKismetLibrary.generated.h" + +class USGSenseGloveInfo; +class USGSenseGloveSensorData; + +/** + * Sense Glove Sensor Data, parsed from a sensor string. + */ +UCLASS(meta=(ScriptName = "SenseGloveSenseGloveSensorDataKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseGloveSensorDataKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The basic constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorData* MakeSenseGloveSensorData(UObject* WorldContextObject); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Sensor Data", + Category="SenseGlove | Core | SG | Sense Glove Sensor Data", meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorData* MakeSenseGloveSensorData_SA_FQuatImuRotation_PV_bIP( + UObject* WorldContextObject, + const TArray& SensorAngles, const FQuat& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Create a new instance of a Sense Glove Sensor Data class. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Sensor Data", + Category="SenseGlove | Core | SG | Sense Glove Sensor Data", meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorData* MakeSenseGloveSensorData_SA_FRotatorImuRotation_PV_bIP( + UObject* WorldContextObject, + const TArray& SensorAngles, const FRotator& ImuRotation, int32 ParsedValues, bool bImuParsed); + + /** + * Returns sensor data with no values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorData* Empty(UObject* WorldContextObject); + + /** + * Deserialize Sense Glove sensor data from a raw char[] received through IPC. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorData* Parse(UObject* WorldContextObject, + const FString& RawData, const USGSenseGloveInfo* GloveInfo); + + /** + * Deserialize a HandProfile back into useable values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Data", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorData* Deserialize(UObject* WorldContextObject, const FString& SerializedString); + + /** + * Glove angles in degrees, sorted by finger, from proximal to distal. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static TArray GetSensorAngles(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * Get the glove angles of a specific finger segment. + */ + UFUNCTION(BlueprintPure, DisplayName="Get Sensor Angles", + Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static TArray GetSensorAngles_F(const USGSenseGloveSensorData* SenseGloveSensorData, ESGFinger Finger); + + /** + * Returns all glove angles in a sequence, without splitting them per finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static TArray GetAngleSequence(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", + Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static FQuat GetImuRotation_FQuat(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * + */ + UFUNCTION(BlueprintPure, DisplayName="Get Imu Rotation", + Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static FRotator GetImuRotation_FRotator(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * Check how many values have been parsed from the Sensor String. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static int32 GetParsedValues(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * Check if the IMU was properly parsed. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static bool IsImuParsed(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * Returns true if the values of both data are equal. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static bool Equals(const USGSenseGloveSensorData* A, const USGSenseGloveSensorData* B); + + /** + * Retrieve a simple representation of this sensor data for debugging purposes. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static FString ToString(const USGSenseGloveSensorData* SenseGloveSensorData); + + /** + * Serialize this HandProfile into a string representation. + */ + UFUNCTION(BlueprintPure, DisplayName="Serialize", Category="SenseGlove | Core | SG | Sense Glove Sensor Data") + static FString SGSerialize(const USGSenseGloveSensorData* SenseGloveSensorData); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.h new file mode 100644 index 0000000..35fb200 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveSensorNormalizerKismetLibrary.h @@ -0,0 +1,84 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Internal class that acts as a sort of 'in between' handProfile. This class + * converts SG Dk1 Angles into 'normalized data' - between 0 .. 1. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGSenseGloveSensorNormalizerKismetLibrary.generated.h" + +class USGSenseGloveSensorNormalizer; + +/** + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact + * feedback in the front strap. + */ +UCLASS(meta=(ScriptName = "SenseGloveSenseGloveSensorNormalizerKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseGloveSensorNormalizerKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorNormalizer* MakeSenseGloveSensorNormalizer(UObject* WorldContextObject); + + /** + * Creates a new SenseGlove Sensor Normalizer based off the device's sensor angles. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sense Glove Sensor Normalizer", + Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer", meta=(WorldContext="WorldContextObject")) + static USGSenseGloveSensorNormalizer* MakeSenseGloveSensorNormalizer_bRH( + UObject* WorldContextObject, + bool bRightHanded); + + /** + * Normalize a finger's flexion, based on the total flexion of the exoskeleton. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer") + static float NormalizeFlexion(const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer, + int32 Finger, float SumFlexionAngles); + + /** + * Normalize a finger's abduction, based on the total abduction of the exoskeleton. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | SG | Sense Glove Sensor Normalizer") + static float NormalizeAbduction(const USGSenseGloveSensorNormalizer* SenseGloveSensorNormalizer, + int32 Finger, float SumAbductionAngles); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveVarsKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveVarsKismetLibrary.h new file mode 100644 index 0000000..96bdbc1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSenseGloveVarsKismetLibrary.h @@ -0,0 +1,144 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Contains enumerators and classes to aid in Sense Glove Deserialization. + */ + + +#pragma once + +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" +#include "Math/Quat.h" +#include "Math/Vector.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGVectorArray.h" + +#include "SGSenseGloveVarsKismetLibrary.generated.h" + +class USGSenseGloveInfo; + +/** + * "Database" class containing Sense Glove internal variables. + */ +UCLASS(meta=(ScriptName = "SenseGloveVarsKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSenseGloveVarsKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Retrieve a basic ConstantsString for a Sense Glove of a specific Hardware Version. Used for debugging / unit tests. + * + * @returns Returns an empty string when an invalid glove version is requested. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars") + static FString GetStandardConstantsString(const FString& HardwareVersion, float FirmwareVersion, bool bRightHanded); + + /** + * Retrieve an example sensor string of a Sense Glove with a particular hardware- and firmware version. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars") + static FString GetSensorString(const FString& HardwareVersion, float FirmwareVersion); + + /** + * Retrieve the starting positions of a particular Sense Glove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars") + static TArray GetStartPositions(const FString& HardwareVersion, bool bRightHanded); + + /** + * Retrieve the starting rotations of a particular Sense Glove. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Start Rotations", + Category="SenseGlove | Core | SG | Sense Glove Vars") + static TArray GetStartRotations_TArrayFQuat(const FString& HardwareVersion, bool bRightHanded); + + /** + * Retrieve the starting rotations of a particular Sense Glove. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Start Rotations", + Category="SenseGlove | Core | SG | Sense Glove Vars") + static TArray GetStartRotations_TArrayFRotator(const FString& HardwareVersion, bool bRightHanded); + + /** + * Retrieve the glove finger lengths of a particular Sense Glove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars") + static TArray GetGloveLengths(const FString& HardwareVersion); + + /** + * Get the number of sensors of a SenseGlove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars") + static int32 GetSensors(const FString& HardwareVersion); + + /** + * Get the default IMUCorrection for the SenseGlove. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Vars") + static FQuat GetImuCorrection_FQuat(const FString& HardwareVersion, + int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Get the default IMUCorrection for the SenseGlove. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Imu Correction", Category="SenseGlove | Core | SG | Sense Glove Vars") + static FRotator GetImuCorrection_FRotator(const FString& HardwareVersion, + int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Check all functionality of a SenseGlove. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | SG | Sense Glove Vars") + static TArray GetFunctions(const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion); + + /** + * Generate a custom glove info. + */ + UFUNCTION(BlueprintCallable, DisplayName="GenerateGloveModel", Category="SenseGlove | Core | SG | Sense Glove Vars", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* GenerateGloveModel_HV_FV_SFV_bRH( + UObject* WorldContextObject, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, bool bRightHanded); + + /** + * Generate a custom glove info. + */ + UFUNCTION(BlueprintCallable, DisplayName="GenerateGloveModel", Category="SenseGlove | Core | SG | Sense Glove Vars", + meta=(WorldContext="WorldContextObject")) + static USGSenseGloveInfo* GenerateGloveModel_HV_FV_SFV_bRH_CI( + UObject* WorldContextObject, + const FString& HardwareVersion, int32 FirmwareVersion, int32 SubFirmwareVersion, bool bRightHanded, + const FString& CustomId); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSensorNormalizationKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSensorNormalizationKismetLibrary.h new file mode 100644 index 0000000..5052dd2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGSensorNormalizationKismetLibrary.h @@ -0,0 +1,141 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A script to normalize any set of floating point values by looking at their + * minimum and maximum values. Used for automagical calibration. + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGSensorNormalizationKismetLibrary.generated.h" + +class USGSensorNormalization; + +/** + * Interface for Nova 2.0 Gloves. A soft glove with detachable force-feedback and sensor module, and active contact + * feedback in the front strap. + */ +UCLASS(meta=(ScriptName = "SenseGloveSensorNormalizationKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGSensorNormalizationKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization", + meta=(WorldContext="WorldContextObject")) + static USGSensorNormalization* MakeSensorNormalization(UObject* WorldContextObject); + + /** + * Create a new instance of SensorNormalization. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Sensor Normalization", + Category="SenseGlove | Core | Util | Sensor Normalization", meta=(WorldContext="WorldContextObject")) + static USGSensorNormalization* MakeSensorNormalization_MR( + UObject* WorldContextObject, + const TArray& MovementRanges); + + /** + * If true, the normalization collection is active. If false, we're no longer collecting min / max values. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization") + static bool CollectsNormalization(const USGSensorNormalization* SensorNormalization); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization") + static void SetCollectNormalization(UPARAM(ref) USGSensorNormalization* SensorNormalization, + bool bCollectNormalization); + + /** + * The amount of items in this collector Useful for FOR loops. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization") + static int32 GetLength(const USGSensorNormalization* SensorNormalization); + + /** + * The amount of values that have moved the appropriate amount. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization") + static int32 GetMoveCount(const USGSensorNormalization* SensorNormalization); + + /** + * Returns true if all sensors are allowed to move. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization") + static bool AllSensorsMoving(const USGSensorNormalization* SensorNormalization); + + /** + * Reset the normalization of values. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization") + static void ResetNormalization(UPARAM(ref) USGSensorNormalization* SensorNormalization); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization") + static void UpdateNormalization(UPARAM(ref) USGSensorNormalization* SensorNormalization, + float Value, int32 Index); + + /** + * Normalize a value on a specific index, and update Normalization while you're at it. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization") + static float NormalizeValue(UPARAM(ref) USGSensorNormalization* SensorNormalization, + float Value, int32 Index); + + /** + * Update and Normalize a set of values, provided this is the same length. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Util | Sensor Normalization") + static TArray NormalizeValues(UPARAM(ref) USGSensorNormalization* SensorNormalization, + const TArray& Values); + + /** + * Returns true if a sensor on this index has moved enough. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization") + static bool MovedEnough(const USGSensorNormalization* SensorNormalization, int32 Index); + + /** + * Turn a value from 0 .. 1 back into [minValue ... maxValue] range for the Nova Glove. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Util | Sensor Normalization") + static float Denormalize(const USGSensorNormalization* SensorNormalization, + float Value01, int32 Index, float FallbackValue = 1.0f); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGThresholdCommandKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGThresholdCommandKismetLibrary.h new file mode 100644 index 0000000..83caa53 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGThresholdCommandKismetLibrary.h @@ -0,0 +1,130 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * Internal class to hold 'Threshold Commands' for specific fingers. Can be sent + * to a Device, or used internally. + * Threshold Commands tell our device "When your sensor data is higher than this + * threshold, lock FFB. Otherwise, turn it back off". + */ + + +#pragma once + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGThresholdCommandKismetLibrary.generated.h" + +class USGThresholdCommand; + +/** + * Internal class to hold 'Threshold Commands' for specific fingers. Can be sent to a Device, or used internally. + */ +UCLASS(meta=(ScriptName = "SenseGloveThresholdCommandKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGThresholdCommandKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * The default constructor. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command", + meta=(WorldContext="WorldContextObject")) + static USGThresholdCommand* MakeThresholdCommand(UObject* WorldContextObject); + + /** + * Create a new instance of ThresholdCommand. + */ + UFUNCTION(BlueprintCallable, DisplayName="Make Threshold Command", + Category="SenseGlove | Core | Haptics | Threshold Command", meta=(WorldContext="WorldContextObject")) + static USGThresholdCommand* MakeThresholdCommand_AF_TV( + UObject* WorldContextObject, + const TArray& AffectedFingers, const TArray& ThresholdValues); + + /** + * Retrieve the threshold of a particular finger. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command", + meta=(WorldContext="WorldContextObject")) + static float GetThreshold(const USGThresholdCommand* ThresholdCommand, int32 Finger); + + /** + * Activates the threshold for a finger at a particular value. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command") + static void SetThreshold(UPARAM(ref) USGThresholdCommand* ThresholdCommand, int32 Finger, float ThresholdValue); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command", + meta=(WorldContext="WorldContextObject")) + static TArray GetThresholds(const USGThresholdCommand* ThresholdCommand); + + /** + * Activates the threshold for a finger at a particular value. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command") + static void SetThresholds(UPARAM(ref) USGThresholdCommand* ThresholdCommand, + const TArray& AffectedFingers, const TArray& ThresholdValues); + + /** + * If true, the threshold on a finger should be active. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command", + meta=(WorldContext="WorldContextObject")) + static bool GetFingerActive(const USGThresholdCommand* ThresholdCommand, int32 Finger); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command") + static TArray GetActiveFingers(const USGThresholdCommand* ThresholdCommand); + + /** + * Deactivates Threshold Mode for a particular finger. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command") + static void ClearThreshold(UPARAM(ref) USGThresholdCommand* ThresholdCommand, int32 Finger); + + /** + * Disables Threshold mode for all fingers. Clears the ActiveFingers, but keeps the Thresholds value for now, in + * case you want to re-apply them later. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Haptics | Threshold Command") + static void ClearThresholds(UPARAM(ref) USGThresholdCommand* ThresholdCommand); + + /** + * Returns true if both values are exactly equal. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command") + static bool Equals(const USGThresholdCommand* A, const USGThresholdCommand* B); + + /** + * Print the contents of this Threshold Command. If inactive, a '-' is shown. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Core | Haptics | Threshold Command") + static FString ToString(const USGThresholdCommand* ThresholdCommand); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGTrackingKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGTrackingKismetLibrary.h new file mode 100644 index 0000000..971139c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/Public/SGCoreKismet/SGTrackingKismetLibrary.h @@ -0,0 +1,753 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Quat.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGCoreTypes.h" + +#include "SGTrackingKismetLibrary.generated.h" + +/** + * + */ +UCLASS(meta=(ScriptName = "SenseGloveTrackingKismetLibrary")) +class SENSEGLOVECOREKISMET_API USGTrackingKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + /** + * Knowing a position & rotation in 3D space, calculate a relative location based on offsets. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Location", Category="SenseGlove | Core | Tracking") + static void CalculateLocation_TP_FQuat_TR_PO_FQuat_RO_OutNP_FQuat_OutNR( + const FVector& TrackedPosition, const FQuat& TrackedRotation, + const FVector& PositionOffset, const FQuat& RotationOffset, + FVector& OutNewPosition, FQuat& OutNewRotation); + + /** + * Knowing a position & rotation in 3D space, calculate a relative location based on offsets. + */ + UFUNCTION(BlueprintCallable, DisplayName="Calculate Location", Category="SenseGlove | Core | Tracking") + static void CalculateLocation_TP_FRotator_TR_PO_FRotator_RO_OutNP_FRotator_OutNR( + const FVector& TrackedPosition, const FRotator& TrackedRotation, + const FVector& PositionOffset, const FRotator& RotationOffset, + FVector& OutNewPosition, FRotator& OutNewRotation); + + /** + * Positional offset from each finger to the glove origin. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static TArray GetSenseGloveFingerToGlovePositionOrigin(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Finger To Glove Rotation Origin", + Category="SenseGlove | Core | Tracking") + static TArray GetSenseGloveFingerToGloveRotationOrigin_TArrayFQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Finger To Glove Rotation Origin", + Category="SenseGlove | Core | Tracking") + static TArray GetSenseGloveFingerToGloveRotationOrigin_TArrayFRotator(); + + /** + * Default position offset from glove origin to wrist location, in cm. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetSenseGloveWristPositionOffset(); + + /** + * Default rotation offset from glove origin to wrist location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FQuat GetSenseGloveWristRotationOffset_FQuat(); + + /** + * Default rotation offset from glove origin to wrist location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FRotator GetSenseGloveWristRotationOffset_FRotator(); + + /** + * Get the position and rotation offsets to go from the glove origin to the mounted position. + * @remarks Based on CAD. needs to be inverted when going from tracker to glove origin. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Mount Offset", Category="SenseGlove | Core | Tracking") + static void GetSenseGloveMountOffset_bRH_TF_OutIP_FQuat_OutIR( + bool bRightHanded, ESGFinger ToFinger, FVector& OutIPosition, FQuat& OutIRotation); + + /** + * Get the position and rotation offsets to go from the glove origin to the mounted position. + * @remarks Based on CAD. needs to be inverted when going from tracker to glove origin. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Mount Offset", Category="SenseGlove | Core | Tracking") + static void GetSenseGloveMountOffset_bRH_TF_OutIP_FRotator_OutIR( + bool bRightHanded, ESGFinger ToFinger, FVector& OutIPosition, FRotator& OutIRotation); + + /** + * Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount + * offset to get the glove location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Tracker Mouunt Offset", + Category="SenseGlove | Core | Tracking") + static void GetSenseGloveTrackerMountOffset_H_bRH_OutPO_FQuat_OutRO( + ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Get the offset to get from the TrackedHardware to a SenseGlove mounting location. Combined with Glove-Mount + * offset to get the glove location. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Tracker Mouunt Offset", + Category="SenseGlove | Core | Tracking") + static void GetSenseGloveTrackerMountOffset_H_bRH_OutPO_FRotator_OutRO( + ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * Vive Tracker origin to Finger rotational offset. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetSenseGloveViveToAttachPosition(); + + /** + * Vive Tracker origin to Finger rotational offset. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Vive To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetSenseGloveViveToAttachRotation_FQuat(); + + /** + * Vive Tracker origin to Finger rotational offset. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Vive To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetSenseGloveViveToAttachRotation_FRotator(); + + /** + * Oculus Touch origin to Finger rotational offset. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetSenseGloveOculusTouchToAttachPosition(); + + /** + * Oculus Touch origin to Finger rotational offset. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Oculus Touch To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetSenseGloveOculusTouchToAttachRotation_FQuat(); + + /** + * Oculus Touch origin to Finger rotational offset. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get SenseGlove Oculus Touch To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetSenseGloveOculusTouchToAttachRotation_FRotator(); + + /** + * Positional offset between Nova Glove Origin and Wrist. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetNovaToWristPositionOffset(); + + /** + * Rotational offset between Nova Glove Origin and Wrist. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nove To Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FQuat GetNovaToWristRotationOffset_FQuat(); + + /** + * Rotational offset between Nova Glove Origin and Wrist. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nove To Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FRotator GetNovaToWristRotationOffset_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNovaViveToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Vive To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNovaViveToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Vive To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNovaViveToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNovaViveToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Vive To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNovaViveToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Vive To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNovaViveToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNovaQuest2ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNovaQuest2ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNovaQuest2ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNovaQuest2ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNovaQuest2ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNovaQuest2ToAttachRotation_FRotator(); + + /** + * @remarks Left is a mirror, so we only need R pos. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNovaPico2ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Pico 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNovaPico2ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Pico 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNovaPico2ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Pico 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNovaPico2ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Pico 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNovaPico2ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNovaQuestProToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest Pro To To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNovaQuestProToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNovaQuestProToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNovaQuestProToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNovaQuestProToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNovaQuestProToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNovaViveFocus3ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Vive Focus 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNovaViveFocus3ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Vive Focus 3 To Attach Rotattion", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNovaViveFocus3ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNovaViveFocus3ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Vive Focus 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNovaViveFocus3ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Vive Focus 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNovaViveFocus3ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNovaQuest3ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNovaQuest3ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNovaQuest3ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNovaQuest3ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNovaQuest3ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNovaQuest3ToAttachRotation_FRotator(); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking") + static void GetNovaGloveWristOffset_bRH_OutPO_FQuat_OutRO( + bool bRightHanded, FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Wrist Offset", Category="SenseGlove | Core | Tracking") + static void GetNovaGloveWristOffset_bRH_OutPO_FRotator_OutRO( + bool bRightHanded, FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Tracker Offset", Category="SenseGlove | Core | Tracking") + static void GetNovaGloveTrackerOffset_H_bRH_OutPO_FQuat_OutRO( + ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova Glove Tracker Offset", Category="SenseGlove | Core | Tracking") + static void GetNovaGloveTrackerOffset_H_bRH_OutPO_FRotator_OutRO( + ESGPositionalTrackingHardware Hardware, bool bRightHanded, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNova2ToWristPositionOffset(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 To Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNova2ToWristRotationOffset_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 To Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNova2ToWristRotationOffset_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNova2ToWristPositionOffset(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 To Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNova2ToWristRotationOffset_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 To Wrist Rotation Offset", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNova2ToWristRotationOffset_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNova2Quest2ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNova2Quest2ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNova2Quest2ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNova2Quest2ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNova2Quest2ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest 2 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNova2Quest2ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNova2QuestProToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNova2QuestProToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNova2QuestProToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNova2QuestProToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNova2QuestProToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest Pro To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNova2QuestProToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNova2ViveTrackerToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Vive Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNova2ViveTrackerToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Vive Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNova2ViveTrackerToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNova2ViveTrackerToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Vive Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNova2ViveTrackerToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Vive Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNova2ViveTrackerToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNova2ViveWristTrackerToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Vive Wrist Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNova2ViveWristTrackerToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Vive Wrist Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNova2ViveWristTrackerToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNova2ViveWristTrackerToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Vive Wrist Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNova2ViveWristTrackerToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Vive Wrist Tracker To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNova2ViveWristTrackerToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetRightNova2Quest3ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetRightNova2Quest3ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Right Nova 2 Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetRightNova2Quest3ToAttachRotation_FRotator(); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FVector GetLeftNova2Quest3ToAttachPosition(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FQuat GetLeftNova2Quest3ToAttachRotation_FQuat(); + + /** + * + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Left Nova 2 Quest 3 To Attach Rotation", + Category="SenseGlove | Core | Tracking") + static FRotator GetLeftNova2Quest3ToAttachRotation_FRotator(); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Wrist Offset", Category="SenseGlove | Core | Tracking") + static void GetNova2GloveWristOffset_bRH_HW_OutPO_FQuat_OutRO( + bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + + /** + * Returns the Offsets that will bring us from the Nova origin to the wrist position. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Wrist Offset", Category="SenseGlove | Core | Tracking") + static void GetNova2GloveWristOffset_bRH_HW_OutPO_FRotator_OutRO( + bool bRightHanded, const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * Retrieves Offsets for a particular device. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Tracker Offset", Category="SenseGlove | Core | Tracking") + static void GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FQuat_OutRO( + ESGPositionalTrackingHardware Hardware, bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FQuat& OutRotationOffset); + /** + * Retrieves Offsets for a particular device. + */ + UFUNCTION(BlueprintCallable, DisplayName="Get Nova 2 Glove Tracker Offset", Category="SenseGlove | Core | Tracking") + static void GetNova2GloveTrackerOffset_H_bRH_HW_OutPO_FRotator_OutRO( + ESGPositionalTrackingHardware Hardware, bool bRightHanded, + const FString& HardwareVersion, + FVector& OutPositionOffset, FRotator& OutRotationOffset); + + /** + * + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Core | Tracking") + static FString ToString(ESGPositionalTrackingHardware Hardware); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveCoreKismet/SenseGloveCoreKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/SenseGloveCoreKismet.Build.cs new file mode 100644 index 0000000..8634d73 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveCoreKismet/SenseGloveCoreKismet.Build.cs @@ -0,0 +1,65 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveCoreKismet : ModuleRules +{ + public SenseGloveCoreKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveCore", + "SenseGloveLog", + "SenseGloveKismet", + "SenseGloveTypes", + "SenseGloveUtils", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugCube.cpp b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugCube.cpp new file mode 100644 index 0000000..3dee13c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugCube.cpp @@ -0,0 +1,57 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGDebug/SGDebugCube.h" + +#include "DrawDebugHelpers.h" +#include "Engine/World.h" +#include "Kismet/GameplayStatics.h" +#include "Math/Color.h" +#include "UObject/Object.h" + +void FSGDebugCube::Draw(const UWorld* World, const FVector& Location, const FQuat& Rotation, + const FSGDebugCubeSettings& Settings) +{ + const float LifeTime = UGameplayStatics::GetWorldDeltaSeconds(World) * Settings.LifeTimeModifier; + DrawDebugBox(World, + Location, + Settings.Extent, + Rotation, + Settings.Color, + Settings.bPersistentLines, + LifeTime, + Settings.DepthPriority, + Settings.Thickness); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugGizmo.cpp b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugGizmo.cpp new file mode 100644 index 0000000..d370564 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugGizmo.cpp @@ -0,0 +1,60 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGDebug/SGDebugGizmo.h" + +#include "DrawDebugHelpers.h" +#include "Engine/World.h" +#include "Kismet/GameplayStatics.h" +#include "Math/Color.h" +#include "UObject/Object.h" + +void FSGDebugGizmo::Draw(const UWorld* World, const FVector& Location, const FQuat& Rotation, + const FSGDebugGizmoSettings& Settings) +{ + const float LifeTime = UGameplayStatics::GetWorldDeltaSeconds(World) * Settings.LifeTimeModifier; + + const FVector XAxisLineEnd(Location + Rotation.RotateVector(FVector(Settings.Length, 0.0f, 0.0f))); + DrawDebugLine(World, Location, XAxisLineEnd, + Settings.XAxisColor, Settings.bPersistentLines, LifeTime, Settings.DepthPriority, Settings.Thickness); + + const FVector YAxisLineEnd(Location + Rotation.RotateVector(FVector{0.0f, Settings.Length, 0.0f})); + DrawDebugLine(World, Location, YAxisLineEnd, + Settings.YAxisColor, Settings.bPersistentLines, LifeTime, Settings.DepthPriority, Settings.Thickness); + + const FVector ZAxisLineEnd{Location + Rotation.RotateVector(FVector{0.0f, 0.0f, Settings.Length})}; + DrawDebugLine(World, Location, ZAxisLineEnd, + Settings.ZAxisColor, Settings.bPersistentLines, LifeTime, Settings.DepthPriority, Settings.Thickness); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugVirtualHand.cpp b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugVirtualHand.cpp new file mode 100644 index 0000000..8471034 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SGDebug/SGDebugVirtualHand.cpp @@ -0,0 +1,117 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGDebug/SGDebugVirtualHand.h" + +#include "DrawDebugHelpers.h" +#include "Engine/World.h" +#include "Kismet/GameplayStatics.h" +#include "Math/Color.h" +#include "UObject/Object.h" + +#include "SGDebug/SGDebugCube.h" +#include "SGDebug/SGDebugGizmo.h" + +void FSGDebugVirtualHand::Draw( + const UWorld* World, + const FXRHandTrackingState& HandTrackingState, + const FSGVirtualHandDebuggingSettings& Settings) +{ + if (!ensureAlwaysMsgf( + Settings.DrawingMode != ESGDebugVirtualHandDrawingMode::None, + TEXT("Invalid virtual hand drawing mode!"))) + { + return; + }; + + if (!ensureAlwaysMsgf( + HandTrackingState.bValid, + TEXT("Invalid hand tracking state!"))) + { + return; + }; + + if (!ensureAlwaysMsgf( + HandTrackingState.HandKeyLocations.Num() == HandTrackingState.HandKeyRotations.Num(), + TEXT("Mismatched hand tracking state locations and rotations!"))) + { + return; + }; + + for (TArray::SizeType HandKeyIndex = 0; + HandKeyIndex < HandTrackingState.HandKeyLocations.Num(); ++HandKeyIndex) + { + const FVector& HandKeyLocation{HandTrackingState.HandKeyLocations[HandKeyIndex]}; + const FQuat& HandKeyRotation{HandTrackingState.HandKeyRotations[HandKeyIndex]}; + + if (Settings.DrawingMode == ESGDebugVirtualHandDrawingMode::CubicJoints) + { + FSGDebugCube::Draw(World, HandKeyLocation, HandKeyRotation, Settings.DebugCubicHandSettings); + } + else if (Settings.DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints) + { + FSGDebugGizmo::Draw(World, HandKeyLocation, HandKeyRotation, Settings.DebugGizmoHandSettings); + } + } +} + +void FSGDebugVirtualHand::Draw( + const UWorld* World, + const FXRHandTrackingState& HandTrackingState, + const FSGDebugGizmoSettings& Settings) +{ + if (!ensureAlwaysMsgf( + HandTrackingState.bValid, + TEXT("Invalid hand tracking state!"))) + { + return; + }; + + if (!ensureAlwaysMsgf( + HandTrackingState.HandKeyLocations.Num() == HandTrackingState.HandKeyRotations.Num(), + TEXT("Mismatched hand tracking state locations and rotations!"))) + { + return; + }; + + for (TArray::SizeType HandKeyIndex = 0; + HandKeyIndex < HandTrackingState.HandKeyLocations.Num(); ++HandKeyIndex) + { + const FVector& HandKeyLocation{HandTrackingState.HandKeyLocations[HandKeyIndex]}; + const FQuat& HandKeyRotation{HandTrackingState.HandKeyRotations[HandKeyIndex]}; + + FSGDebugGizmo::Draw(World, HandKeyLocation, HandKeyRotation, Settings); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebug.cpp b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebug.cpp new file mode 100644 index 0000000..3aa0408 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebug.cpp @@ -0,0 +1,42 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveDebug.h" + +#include "Modules/ModuleManager.h" + +#include "SenseGloveDebugModule.h" + +IMPLEMENT_MODULE(FSenseGloveDebugModule, SenseGloveDebug) diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebug.h b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebug.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebug.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebugModule.cpp b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebugModule.cpp new file mode 100644 index 0000000..b240e6a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebugModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveDebugModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveDebugModule" + +void FSenseGloveDebugModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveDebug module..."); +} + +void FSenseGloveDebugModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveDebug module..."); +} + +void FSenseGloveDebugModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveDebug module has succeeded!"); +} + +void FSenseGloveDebugModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveDebug module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebugModule.h b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebugModule.h new file mode 100644 index 0000000..6d17d64 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Private/SenseGloveDebugModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveDebug" + +class FSenseGloveDebugModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugCube.h b/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugCube.h new file mode 100644 index 0000000..a0fe148 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugCube.h @@ -0,0 +1,63 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Rotator.h" +#include "Math/Vector.h" + +#include "SGSettings/SGDebugCubeSettings.h" + +class SENSEGLOVEDEBUG_API FSGDebugCube final +{ +public: + static void Draw( + const UWorld* World, + const FVector& Location, const FQuat& Rotation, + const FSGDebugCubeSettings& Settings); + + static FORCEINLINE void Draw( + const UWorld* World, + const FVector& Location, const FRotator& Rotation, + const FSGDebugCubeSettings& Settings) + { + Draw(World, Location, Rotation.Quaternion(), Settings); + } + +public: + FSGDebugCube() = delete; + virtual ~FSGDebugCube() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugGizmo.h b/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugGizmo.h new file mode 100644 index 0000000..2983ec2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugGizmo.h @@ -0,0 +1,63 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Rotator.h" +#include "Math/Vector.h" + +#include "SGSettings/SGDebugGizmoSettings.h" + +class SENSEGLOVEDEBUG_API FSGDebugGizmo final +{ +public: + static void Draw( + const UWorld* World, + const FVector& Location, const FQuat& Rotation, + const FSGDebugGizmoSettings& Settings); + + static FORCEINLINE void Draw( + const UWorld* World, + const FVector& Location, const FRotator& Rotation, + const FSGDebugGizmoSettings& Settings) + { + Draw(World, Location, Rotation.Quaternion(), Settings); + } + +public: + FSGDebugGizmo() = delete; + virtual ~FSGDebugGizmo() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugVirtualHand.h b/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugVirtualHand.h new file mode 100644 index 0000000..ad5063c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/Public/SGDebug/SGDebugVirtualHand.h @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" +#include "Runtime/Launch/Resources/Version.h" + +#include "SGSettings/SGVirtualHandDebuggingSettings.h" + +class UWorld; + +class SENSEGLOVEDEBUG_API FSGDebugVirtualHand final +{ +public: + static void Draw( + const UWorld* World, + const FXRHandTrackingState& HandTrackingState, + const FSGVirtualHandDebuggingSettings& Settings); + + static void Draw( + const UWorld* World, + const FXRHandTrackingState& HandTrackingState, + const FSGDebugGizmoSettings& Settings); + +public: + FSGDebugVirtualHand() = delete; + virtual ~FSGDebugVirtualHand() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebug/SenseGloveDebug.Build.cs b/Plugins/SenseGlove/Source/SenseGloveDebug/SenseGloveDebug.Build.cs new file mode 100644 index 0000000..c30d464 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebug/SenseGloveDebug.Build.cs @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveDebug : ModuleRules +{ + public SenseGloveDebug(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "HeadMountedDisplay", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveSettings", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugCubeKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugCubeKismetLibrary.cpp new file mode 100644 index 0000000..2b5d5c6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugCubeKismetLibrary.cpp @@ -0,0 +1,56 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGDebugKismet/SGDebugCubeKismetLibrary.h" + +#include "SGDebug/SGDebugCube.h" + +void USGDebugCubeKismetLibrary::Draw_W_L_FQuat_R_S( + UObject* WorldContextObject, + const FVector& Location, const FQuat& Rotation, const FSGDebugCubeSettings& Settings) +{ + ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!")); + + FSGDebugCube::Draw(WorldContextObject->GetWorld(), Location, Rotation, Settings); +} + +void USGDebugCubeKismetLibrary::Draw_W_L_FRotator_S( + UObject* WorldContextObject, + const FVector& Location, const FRotator& Rotation, const FSGDebugCubeSettings& Settings) +{ + ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!")); + + FSGDebugCube::Draw(WorldContextObject->GetWorld(), Location, Rotation, Settings); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugGizmoKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugGizmoKismetLibrary.cpp new file mode 100644 index 0000000..2747bbe --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugGizmoKismetLibrary.cpp @@ -0,0 +1,56 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGDebugKismet/SGDebugGizmoKismetLibrary.h" + +#include "SGDebug/SGDebugGizmo.h" + +void USGDebugGizmoKismetLibrary::Draw_W_L_FQuat_R_S( + UObject* WorldContextObject, + const FVector& Location, const FQuat& Rotation, const FSGDebugGizmoSettings& Settings) +{ + ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!")); + + FSGDebugGizmo::Draw(WorldContextObject->GetWorld(), Location, Rotation, Settings); +} + +void USGDebugGizmoKismetLibrary::Draw_W_L_FRotator_S( + UObject* WorldContextObject, + const FVector& Location, const FRotator& Rotation, const FSGDebugGizmoSettings& Settings) +{ + ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!")); + + FSGDebugGizmo::Draw(WorldContextObject->GetWorld(), Location, Rotation, Settings); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugVirtualHandKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugVirtualHandKismetLibrary.cpp new file mode 100644 index 0000000..53bc363 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SGDebugKismet/SGDebugVirtualHandKismetLibrary.cpp @@ -0,0 +1,48 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGDebugKismet/SGDebugVirtualHandKismetLibrary.h" + +#include "SGDebug/SGDebugVirtualHand.h" + +void USGDebugVirtualHandKismetLibrary::Draw_FXRHandTrackingState( + UObject* WorldContextObject, + const FXRHandTrackingState& HandTrackingState, + const FSGVirtualHandDebuggingSettings& Settings) +{ + ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!")); + + FSGDebugVirtualHand::Draw(WorldContextObject->GetWorld(), HandTrackingState, Settings); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismet.cpp new file mode 100644 index 0000000..7f4c78f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveDebugKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveDebugKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveDebugKismetModule, SenseGloveDebugKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismet.h b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismet.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismetModule.cpp new file mode 100644 index 0000000..63f8088 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismetModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveDebugKismetModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveDebugKismetModule" + +void FSenseGloveDebugKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveDebugKismet module..."); +} + +void FSenseGloveDebugKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveDebugKismet module..."); +} + +void FSenseGloveDebugKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveDebugKismet module has succeeded!"); +} + +void FSenseGloveDebugKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveDebugKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismetModule.h new file mode 100644 index 0000000..874389b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Private/SenseGloveDebugKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveDebugKismet" + +class FSenseGloveDebugKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugCubeKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugCubeKismetLibrary.h new file mode 100644 index 0000000..eb88110 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugCubeKismetLibrary.h @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGDebug/SGDebugCube.h" + +#include "SGDebugCubeKismetLibrary.generated.h" + +class USGDebug; + +UCLASS(meta=(ScriptName = "SenseGloveDebugCubeKismetLibrary")) +class SENSEGLOVEDEBUGKISMET_API USGDebugCubeKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Cube", + meta=(WorldContext="WorldContextObject")) + static void Draw_W_L_FQuat_R_S( + UObject* WorldContextObject, + const FVector& Location, const FQuat& Rotation, + const FSGDebugCubeSettings& Settings); + + UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Cube", + meta=(WorldContext="WorldContextObject")) + static void Draw_W_L_FRotator_S( + UObject* WorldContextObject, + const FVector& Location, const FRotator& Rotation, + const FSGDebugCubeSettings& Settings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugGizmoKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugGizmoKismetLibrary.h new file mode 100644 index 0000000..6cc0204 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugGizmoKismetLibrary.h @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGDebug/SGDebugGizmo.h" + +#include "SGDebugGizmoKismetLibrary.generated.h" + +class USGDebug; + +UCLASS(meta=(ScriptName = "SenseGloveDebugGizmoKismetLibrary")) +class SENSEGLOVEDEBUGKISMET_API USGDebugGizmoKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Gizmo", + meta=(WorldContext="WorldContextObject")) + static void Draw_W_L_FQuat_R_S( + UObject* WorldContextObject, + const FVector& Location, const FQuat& Rotation, + const FSGDebugGizmoSettings& Settings); + + UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Gizmo", + meta=(WorldContext="WorldContextObject")) + static void Draw_W_L_FRotator_S( + UObject* WorldContextObject, + const FVector& Location, const FRotator& Rotation, + const FSGDebugGizmoSettings& Settings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugVirtualHandKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugVirtualHandKismetLibrary.h new file mode 100644 index 0000000..b41484b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/Public/SGDebugKismet/SGDebugVirtualHandKismetLibrary.h @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGDebugVirtualHandKismetLibrary.generated.h" + +class USGDebug; + +UCLASS(meta=(ScriptName = "SenseGloveDebugVirtualHandKismetLibrary")) +class SENSEGLOVEDEBUGKISMET_API USGDebugVirtualHandKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Virtual Hand", + meta=(WorldContext="WorldContextObject")) + static void Draw_FXRHandTrackingState( + UObject* WorldContextObject, + const FXRHandTrackingState& HandTrackingState, + const FSGVirtualHandDebuggingSettings& Settings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveDebugKismet/SenseGloveDebugKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/SenseGloveDebugKismet.Build.cs new file mode 100644 index 0000000..59e924e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveDebugKismet/SenseGloveDebugKismet.Build.cs @@ -0,0 +1,66 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveDebugKismet : ModuleRules +{ + public SenseGloveDebugKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "HeadMountedDisplay", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveDebug", + "SenseGloveKismet", + "SenseGloveSettings", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGAssetUtils.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGAssetUtils.cpp new file mode 100644 index 0000000..ba11e62 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGAssetUtils.cpp @@ -0,0 +1,1032 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGEditor/SGAssetUtils.h" + +#include "Animation/DebugSkelMeshComponent.h" +#include "Animation/Skeleton.h" +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "Engine/SkeletalMesh.h" +#include "Engine/SkeletalMeshSocket.h" +#include "HeadMountedDisplayTypes.h" +#include "IEditableSkeleton.h" +#include "Internationalization/Text.h" +#include "IPersonaToolkit.h" +#include "ISkeletalMeshEditorModule.h" +#include "ISkeletonEditorModule.h" +#include "Misc/AssertionMacros.h" +#include "Misc/CoreMiscDefines.h" +#include "ReferenceSkeleton.h" +#include "Rendering/SkeletalMeshLODRenderData.h" +#include "Rendering/SkeletalMeshRenderData.h" +#include "Subsystems/AssetEditorSubsystem.h" +#include "UObject/Object.h" +#include "UObject/UnrealNames.h" + +#include "SGLog/SGLog.h" +#include "SGSettings/SGSettings.h" + +struct FSGAssetUtils::FImpl +{ + /************************ + * Static methods + ************************/ + + FORCEINLINE static const FSGVirtualHandSettings& GetVirtualHandSettings() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + const FSGVirtualHandSettings& VirtualHandSettings{Settings->GetVirtualHandSettings()}; + return VirtualHandSettings; + } + + FORCEINLINE static const FSGVirtualHandGrabSettings& GetVirtualHandGrabSettings() + { + const FSGVirtualHandSettings& VirtualHandSettings{GetVirtualHandSettings()}; + return VirtualHandSettings.GrabSettings; + } + + FORCEINLINE static const FSGVirtualHandMeshSettings& GetVirtualHandMeshSettings() + { + const FSGVirtualHandSettings& VirtualHandSettings{GetVirtualHandSettings()}; + return VirtualHandSettings.MeshSettings; + } + + FORCEINLINE static const FSGVirtualHandTouchSettings& GetVirtualHandTouchSettings() + { + const FSGVirtualHandSettings& VirtualHandSettings{GetVirtualHandSettings()}; + return VirtualHandSettings.TouchSettings; + } + + static bool IsHandBoneWeighted( + const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh, const FName& BoneName); + + static FName GetHandBoneName(const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh); + + static bool IsLeftHandMesh(const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh); + static bool IsRightHandMesh(const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh); + + static FTransform GetHandBoneRefTransform(const USkeletalMesh* SkeletalMesh, const FName& BoneName); + + static bool AddSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, + const FName& BoneName, const FName& SocketName, const FTransform& SocketTransform); + + static bool AddGrabAttachPointSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + + static bool AddFingertipColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, + bool bRight, EHandKeypoint DistalKeypoint, const FName& SocketName); + + static bool AddGrabThumbColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + static bool AddGrabIndexColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + static bool AddGrabMiddleColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + + static bool AddTouchThumbColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + static bool AddTouchIndexColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + static bool AddTouchMiddleColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + static bool AddTouchRingColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + static bool AddTouchLittleColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, bool bRight); + + static bool AddSenseGloveSockets(const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh); + + static bool AddSenseGloveSockets(USkeletalMesh* SkeletalMesh, USkeleton* Skeleton); + static bool ClearExistingSockets(USkeletalMesh* SkeletalMesh, USkeleton* Skeleton); +}; + +bool FSGAssetUtils::FImpl::IsHandBoneWeighted( + const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh, const FName& BoneName) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + if (!ensureAlwaysMsgf(BoneName != NAME_None, TEXT("Invalid BoneName!"))) + { + return false; + } + + const FReferenceSkeleton& RefSkeleton{SkeletalMesh->GetRefSkeleton()}; + const int32 BoneIndex = RefSkeleton.FindBoneIndex(BoneName); + + // MeshBoneIndex must be an index into the mesh's skeleton, *not* the source skeleton!!! + if (!ensureAlwaysMsgf(BoneIndex != INDEX_NONE, TEXT("Invalid BoneIndex!"))) + { + // If we get an invalid index, we are done here. + return false; + } + + const FSkeletalMeshRenderData* ResourceForRendering{SkeletalMesh->GetResourceForRendering()}; + if (!ensureAlwaysMsgf(ResourceForRendering, TEXT("Invalid ResourceForRendering!"))) + { + // If there's no mesh, then this bone can't possibly be weighted! + return false; + } + + const TIndirectArray& LODRenderData{ResourceForRendering->LODRenderData}; + const int32 LODRenderDataNum{LODRenderData.Num()}; + if (!ensureAlwaysMsgf(LODRenderDataNum > 0, TEXT("Invalid LODRenderDataNum!"))) + { + // If there's no mesh, then this bone can't possibly be weighted! + return false; + } + + const TSharedRef PersonaToolkit{SkeletalMeshEditor->GetPersonaToolkit()}; + const UDebugSkelMeshComponent* PreviewMeshComponent{PersonaToolkit->GetPreviewMeshComponent()}; + if (!ensureAlwaysMsgf(PreviewMeshComponent, TEXT("Invalid PreviewMeshComponent!"))) + { + return false; + } + + const int32 PredictedLODLevel = PreviewMeshComponent->GetPredictedLODLevel(); + + const USkeletalMesh* PreviewSkeletalMeshAsset{PreviewMeshComponent->GetSkeletalMeshAsset()}; + if (!ensureAlwaysMsgf(IsValid(PreviewSkeletalMeshAsset), TEXT("Invalid PreviewSkeletalMeshAsset!"))) + { + return false; + } + + const FSkeletalMeshRenderData* PreviewResourceForRendering{PreviewSkeletalMeshAsset->GetResourceForRendering()}; + if (!ensureAlwaysMsgf(PreviewResourceForRendering, TEXT("Invalid PreviewResourceForRendering!"))) + { + return false; + } + + const TIndirectArray& PreviewLODRenderData{PreviewResourceForRendering->LODRenderData}; + const int32 PreviewLODRenderDataNum{PreviewLODRenderData.Num()}; + if (!ensureAlwaysMsgf(LODRenderDataNum > 0, TEXT("Invalid LODRenderDataNum!"))) + { + return false; + } + + const int32 MaxPreviewLODRenderDataNum = PreviewLODRenderDataNum - 1; + + // Get current LOD + const int32 LODIndex = FMath::Clamp(PredictedLODLevel, 0, MaxPreviewLODRenderDataNum); + const FSkeletalMeshLODRenderData& LODData{PreviewLODRenderData[LODIndex]}; + + // Check whether the bone is vertex weighted + const int32 Index = LODData.ActiveBoneIndices.Find(IntCastChecked(BoneIndex)); + + return Index != INDEX_NONE; +} + +FName FSGAssetUtils::FImpl::GetHandBoneName( + const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return NAME_None; + } + + static const FString HandBonePrefix{TEXT("hand_")}; + + const FReferenceSkeleton& RefSkeleton{SkeletalMesh->GetRefSkeleton()}; + const int32 BoneNum = RefSkeleton.GetNum(); + + for (int i = 0; i < BoneNum; ++i) + { + const FName BoneName{RefSkeleton.GetBoneName(i)}; + const FString BoneNameString{BoneName.ToString()}; + + if (!BoneNameString.StartsWith(HandBonePrefix)) + { + continue; + } + + if (!IsHandBoneWeighted(SkeletalMeshEditor, SkeletalMesh, BoneName)) + { + continue; + } + + return BoneName; + } + + SGLOG_ERROR("Invalid SenseGlove virtual hand mesh!"); + + return NAME_None; +} + +bool FSGAssetUtils::FImpl::IsLeftHandMesh( + const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh) +{ + static constexpr int32 HandBoneNameIndex = static_cast(EHandKeypoint::Wrist); + + const FSGVirtualHandMeshSettings& MeshSettings{GetVirtualHandMeshSettings()}; + + if (!ensureAlwaysMsgf(HandBoneNameIndex < MeshSettings.RightHandBoneNames.Num() + && HandBoneNameIndex < MeshSettings.RightHandBoneNames.Num(), + TEXT("Invalid HandBoneNameIndex"))) + { + return false; + } + + const FName LeftHandBoneName{MeshSettings.LeftHandBoneNames[HandBoneNameIndex]}; + const FName HandBoneName{GetHandBoneName(SkeletalMeshEditor, SkeletalMesh)}; + + if (HandBoneName == NAME_None) + { + return false; + } + + if (HandBoneName != LeftHandBoneName) + { + return false; + } + + return true; +} + +bool FSGAssetUtils::FImpl::IsRightHandMesh( + const ISkeletalMeshEditor* SkeletalMeshEditor, const USkeletalMesh* SkeletalMesh) +{ + static constexpr int32 HandBoneNameIndex = static_cast(EHandKeypoint::Wrist); + + const FSGVirtualHandMeshSettings& MeshSettings{GetVirtualHandSettings().MeshSettings}; + + if (!ensureAlwaysMsgf(HandBoneNameIndex < MeshSettings.RightHandBoneNames.Num() + && HandBoneNameIndex < MeshSettings.RightHandBoneNames.Num(), + TEXT("Invalid HandBoneNameIndex"))) + { + return false; + } + + const FName RightHandBoneName{MeshSettings.RightHandBoneNames[HandBoneNameIndex]}; + const FName HandBoneName{GetHandBoneName(SkeletalMeshEditor, SkeletalMesh)}; + + if (HandBoneName == NAME_None) + { + return false; + } + + if (HandBoneName != RightHandBoneName) + { + return false; + } + + return true; +} + +FTransform FSGAssetUtils::FImpl::GetHandBoneRefTransform( + const USkeletalMesh* SkeletalMesh, const FName& BoneName) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh"))) + { + return FTransform::Identity; + } + + const FReferenceSkeleton& ReferenceSkeleton{SkeletalMesh->GetRefSkeleton()}; + + const int32 BoneIndex = ReferenceSkeleton.FindBoneIndex(BoneName); + if (!ensureAlwaysMsgf(BoneIndex != INDEX_NONE, + TEXT("Could not find a bone index for the '%s' joint!"), *BoneName.ToString())) + { + return FTransform::Identity; + } + + const TArray Transforms{ReferenceSkeleton.GetRefBonePose()}; + if (!ensureAlwaysMsgf(Transforms.Num() > 0 && Transforms.Num() > BoneIndex, + TEXT("Invalid bone index '%d' or no transforms found!"), BoneIndex)) + { + return FTransform::Identity; + } + + const FTransform& Transform{Transforms[BoneIndex]}; + return Transform; +} + +bool FSGAssetUtils::FImpl::AddSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, + const FName& BoneName, const FName& SocketName, const FTransform& SocketTransform) +{ + if (!ensureAlwaysMsgf(SkeletalMeshEditor, TEXT("Invalid SkeletalMeshEditor!"))) + { + return false; + } + + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + TSharedRef PersonaToolkit{SkeletalMeshEditor->GetPersonaToolkit()}; + TSharedPtr EditableSkeleton{PersonaToolkit->GetEditableSkeleton()}; + if (!ensureAlwaysMsgf(EditableSkeleton.IsValid(), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + USkeletalMeshSocket* Socket{NewObject()}; + Socket->BoneName = BoneName; + Socket->SocketName = SocketName; + if (!ensureAlwaysMsgf(IsValid(Socket), TEXT("Invalid Socket!"))) + { + return false; + } + + const bool bDoesSocketAlreadyExistOnTheMesh = EditableSkeleton->DoesSocketAlreadyExist( + Socket, FText::FromName(SocketName), ESocketParentType::Mesh, SkeletalMesh); + const bool bDoesSocketAlreadyExistOnTheSkeleton = EditableSkeleton->DoesSocketAlreadyExist( + Socket, FText::FromName(SocketName), ESocketParentType::Skeleton, SkeletalMesh); + + if (bDoesSocketAlreadyExistOnTheMesh || bDoesSocketAlreadyExistOnTheSkeleton) + { + SGLOG_ERROR(FString::Printf(TEXT("Socket '%s' already exists on '%s'; refuse to add a duplicate!"), + *SocketName.ToString(), *SkeletalMesh->GetPathName())); + return false; + } + + Socket = EditableSkeleton->AddSocket(BoneName); + if (!ensureAlwaysMsgf(IsValid(Socket), TEXT("Invalid Socket!"))) + { + return false; + } + + EditableSkeleton->RenameSocket(Socket->SocketName, SocketName, SkeletalMesh); + + Socket->RelativeLocation = SocketTransform.GetLocation(); + Socket->RelativeRotation = SocketTransform.GetRotation().Rotator(); + Socket->RelativeScale = SocketTransform.GetScale3D(); + + return true; +} + +bool FSGAssetUtils::FImpl::AddGrabAttachPointSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + static constexpr int32 BoneNameIndex = static_cast(EHandKeypoint::Wrist); + + const FSGVirtualHandMeshSettings MeshSettings{GetVirtualHandMeshSettings()}; + + if (!ensureAlwaysMsgf(BoneNameIndex < MeshSettings.RightHandBoneNames.Num() + && BoneNameIndex < MeshSettings.RightHandBoneNames.Num(), + TEXT("Invalid BoneNameIndex"))) + { + return false; + } + + const FName& BoneName{ + bRight + ? MeshSettings.RightHandBoneNames[BoneNameIndex] + : MeshSettings.LeftHandBoneNames[BoneNameIndex] + }; + + const FSGVirtualHandGrabSettings GrabSettings{GetVirtualHandGrabSettings()}; + const FName& SocketName{GrabSettings.GrabAttachPointSocketName}; + const FTransform& SocketTransform{GrabSettings.GrabAttachPointSocketTransform}; + + const bool bAddedSocket = AddSocket( + SkeletalMeshEditor, SkeletalMesh, BoneName, SocketName, SocketTransform); + if (!bAddedSocket) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the socket '%s' to '%s'!"), + *SocketName.ToString(), *SkeletalMesh->GetPathName())); + return false; + } + + return true; +} + +bool FSGAssetUtils::FImpl::AddFingertipColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, + const bool bRight, const EHandKeypoint DistalKeypoint, const FName& SocketName) +{ + const int32 BoneNameIndex = static_cast(DistalKeypoint); + + const FSGVirtualHandMeshSettings MeshSettings{GetVirtualHandMeshSettings()}; + + if (!ensureAlwaysMsgf(BoneNameIndex < MeshSettings.RightHandBoneNames.Num() + && BoneNameIndex < MeshSettings.RightHandBoneNames.Num(), + TEXT("Invalid BoneNameIndex"))) + { + return false; + } + + const FName& BoneName{ + bRight + ? MeshSettings.RightHandBoneNames[BoneNameIndex] + : MeshSettings.LeftHandBoneNames[BoneNameIndex] + }; + + FTransform SocketTransform{ + GetHandBoneRefTransform(SkeletalMesh, BoneName) + }; + + const bool bAddedSocket = AddSocket( + SkeletalMeshEditor, SkeletalMesh, BoneName, SocketName, MoveTemp(SocketTransform)); + + if (!bAddedSocket) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the socket '%s' to '%s'!"), + *BoneName.ToString(), *SkeletalMesh->GetPathName())); + return false; + } + + return true; +} + +bool FSGAssetUtils::FImpl::AddGrabThumbColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandGrabSettings GrabSettings{GetVirtualHandGrabSettings()}; + const FName& SocketName{GrabSettings.ThumbColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::ThumbDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddGrabIndexColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandGrabSettings GrabSettings{GetVirtualHandGrabSettings()}; + const FName& SocketName{GrabSettings.IndexColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::IndexDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddGrabMiddleColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandGrabSettings GrabSettings{GetVirtualHandGrabSettings()}; + const FName& SocketName{GrabSettings.MiddleColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::MiddleDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddTouchThumbColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandTouchSettings TouchSettings{GetVirtualHandTouchSettings()}; + const FName& SocketName{TouchSettings.ThumbColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::ThumbDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddTouchIndexColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandTouchSettings TouchSettings{GetVirtualHandTouchSettings()}; + const FName& SocketName{TouchSettings.IndexColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::IndexDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddTouchMiddleColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandTouchSettings TouchSettings{GetVirtualHandTouchSettings()}; + const FName& SocketName{TouchSettings.MiddleColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::MiddleDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddTouchRingColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandTouchSettings TouchSettings{GetVirtualHandTouchSettings()}; + const FName& SocketName{TouchSettings.RingColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::RingDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddTouchLittleColliderSocket( + const ISkeletalMeshEditor* SkeletalMeshEditor, USkeletalMesh* SkeletalMesh, const bool bRight) +{ + const FSGVirtualHandTouchSettings TouchSettings{GetVirtualHandTouchSettings()}; + const FName& SocketName{TouchSettings.PinkyColliderSocketName}; + return AddFingertipColliderSocket(SkeletalMeshEditor, SkeletalMesh, + bRight, EHandKeypoint::LittleDistal, SocketName); +} + +bool FSGAssetUtils::FImpl::AddSenseGloveSockets(const ISkeletalMeshEditor* SkeletalMeshEditor, + USkeletalMesh* SkeletalMesh) +{ + if (!ensureAlwaysMsgf(SkeletalMeshEditor, TEXT("Invalid SkeletalMeshEditor!"))) + { + return false; + } + + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + const bool bIsLeft = IsLeftHandMesh(SkeletalMeshEditor, SkeletalMesh); + const bool bIsRight = IsRightHandMesh(SkeletalMeshEditor, SkeletalMesh); + const bool bIsHandMesh = bIsLeft || bIsRight; + if (!bIsHandMesh) + { + SGLOG_ERROR(FString::Printf(TEXT("Asset '%s' is not a valid virtual hand mesh!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool bAddedGrabAttachPointSocket = AddGrabAttachPointSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!bAddedGrabAttachPointSocket) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the grab attach point socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool GrabThumbCollider = AddGrabThumbColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!GrabThumbCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the grab thumb collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool GrabIndexCollider = AddGrabIndexColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!GrabIndexCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the grab index collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool GrabMiddleCollider = AddGrabMiddleColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!GrabMiddleCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the grab middle collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool TouchThumbCollider = AddTouchThumbColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!TouchThumbCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the touch thumb collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool TouchIndexCollider = AddTouchIndexColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!TouchIndexCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the touch index collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool TouchMiddleCollider = AddTouchMiddleColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!TouchMiddleCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the touch middle collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool TouchRingCollider = AddTouchRingColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!TouchRingCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the touch ring collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool TouchLittleCollider = AddTouchLittleColliderSocket( + SkeletalMeshEditor, SkeletalMesh, bIsRight); + if (!TouchLittleCollider) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the touch little collider socket to asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + return true; +} + +bool FSGAssetUtils::FImpl::AddSenseGloveSockets(USkeletalMesh* SkeletalMesh, USkeleton* Skeleton) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + if (!ensureAlwaysMsgf(IsValid(Skeleton), TEXT("Invalid Skeleton!"))) + { + return false; + } + + const bool bAssetEdotirOpenForSkeletalMesh = IsAssetEditorOpenForAsset(SkeletalMesh); + if (bAssetEdotirOpenForSkeletalMesh) + { + const int32 ClosedEditorsNum = CloseAllEditorsForAsset(SkeletalMesh); + (void) ClosedEditorsNum; + } + + const bool bAssetEdotirOpenForSkeleton = IsAssetEditorOpenForAsset(Skeleton); + if (bAssetEdotirOpenForSkeleton) + { + const int32 ClosedEditorsNum = CloseAllEditorsForAsset(Skeleton); + (void) ClosedEditorsNum; + } + + const bool bCanModifySkeletalMesh = SkeletalMesh->CanModify(); + if (!bCanModifySkeletalMesh) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not modify the asset '%s'!"), *SkeletalMesh->GetPathName())); + return false; + } + + const bool bCanModifySkeleton = Skeleton->CanModify(); + if (!bCanModifySkeleton) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not modify the asset '%s'!"), *Skeleton->GetPathName())); + return false; + } + + bool bOpenedSkeletalMeshEditor = OpenEditorForAsset(SkeletalMesh); + if (!bOpenedSkeletalMeshEditor) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not open the editor for the asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + TArray AssetEditors{FindEditorsForAsset(SkeletalMesh)}; + if (AssetEditors.IsEmpty()) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not find any editor for the asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + for (IAssetEditorInstance* AssetEditor: AssetEditors) + { + if (!ensureAlwaysMsgf(AssetEditor, TEXT("Invalid AssetEditor!"))) + { + return false; + } + + const ISkeletalMeshEditor* SkeletalMeshEditor{static_cast(AssetEditor)}; + if (!SkeletalMeshEditor) + { + continue; + } + + const bool bAddedSenseGloveSockets = AddSenseGloveSockets(SkeletalMeshEditor, SkeletalMesh); + if (!bAddedSenseGloveSockets) + { + SGLOG_ERROR(FString::Printf(TEXT("Failed to add the SenseGlove sockets to the asset '%s'!"), + *SkeletalMesh->GetPathName())); + const int32 ClosedEditorsNum = CloseAllEditorsForAsset(SkeletalMesh); + (void) ClosedEditorsNum; + return false; + } + + const int32 ClosedEditorsNum = CloseAllEditorsForAsset(SkeletalMesh); + (void) ClosedEditorsNum; + + break; + } + + SkeletalMesh->PostEditChange(); + Skeleton->PostEditChange(); + + const bool bMarkedSkeletalMeshPackageDirty = SkeletalMesh->MarkPackageDirty(); + if (!bMarkedSkeletalMeshPackageDirty) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not mark the asset '%s' as dirty!"), *SkeletalMesh->GetPathName())); + return false; + } + + const bool bMarkedSkeletonPackageDirty = Skeleton->MarkPackageDirty(); + if (!bMarkedSkeletonPackageDirty) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not mark the asset '%s' as dirty!"), *Skeleton->GetPathName())); + return false; + } + + bOpenedSkeletalMeshEditor = OpenEditorForAsset(SkeletalMesh); + if (!bOpenedSkeletalMeshEditor) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not refresh the editor for the asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool bOpenedSkeletonEditor = OpenEditorForAsset(Skeleton); + if (!bOpenedSkeletonEditor) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not refresh the editor for the asset '%s'!"), + *Skeleton->GetPathName())); + return false; + } + + return true; +} + +bool FSGAssetUtils::FImpl::ClearExistingSockets(USkeletalMesh* SkeletalMesh, USkeleton* Skeleton) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + if (!ensureAlwaysMsgf(IsValid(Skeleton), TEXT("Invalid Skeleton!"))) + { + return false; + } + + const bool bAssetEdotirOpenForSkeletalMesh = IsAssetEditorOpenForAsset(SkeletalMesh); + if (bAssetEdotirOpenForSkeletalMesh) + { + const int32 ClosedEditorsNum = CloseAllEditorsForAsset(SkeletalMesh); + (void) ClosedEditorsNum; + } + + const bool bAssetEdotirOpenForSkeleton = IsAssetEditorOpenForAsset(Skeleton); + if (bAssetEdotirOpenForSkeleton) + { + const int32 ClosedEditorsNum = CloseAllEditorsForAsset(Skeleton); + (void) ClosedEditorsNum; + } + + const bool bCanModifySkeletalMesh = SkeletalMesh->CanModify(); + if (!bCanModifySkeletalMesh) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not modify the asset '%s'!"), *SkeletalMesh->GetPathName())); + return false; + } + + const bool bCanModifySkeleton = Skeleton->CanModify(); + if (!bCanModifySkeleton) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not modify the asset '%s'!"), *Skeleton->GetPathName())); + return false; + } + + Skeleton->Sockets.Empty(); + + SkeletalMesh->PostEditChange(); + Skeleton->PostEditChange(); + + const bool bMarkedSkeletalMeshPackageDirty = SkeletalMesh->MarkPackageDirty(); + if (!bMarkedSkeletalMeshPackageDirty) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not mark the asset '%s' as dirty!"), *SkeletalMesh->GetPathName())); + return false; + } + + const bool bMarkedSkeletonPackageDirty = Skeleton->MarkPackageDirty(); + if (!bMarkedSkeletonPackageDirty) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not mark the asset '%s' as dirty!"), *Skeleton->GetPathName())); + return false; + } + + const bool bOpenedSkeletalMeshEditor = OpenEditorForAsset(SkeletalMesh); + if (!bOpenedSkeletalMeshEditor) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not refresh the editor for the asset '%s'!"), + *SkeletalMesh->GetPathName())); + return false; + } + + const bool bOpenedSkeletonEditor = OpenEditorForAsset(Skeleton); + if (!bOpenedSkeletonEditor) + { + SGLOG_ERROR(FString::Printf(TEXT("Could not refresh the editor for the asset '%s'!"), + *Skeleton->GetPathName())); + return false; + } + + return true; +} + +UAssetEditorSubsystem* FSGAssetUtils::GetAssetEditorSubsystem() +{ + if (!ensureAlwaysMsgf(GEditor, TEXT("Invalid GEditor!"))) + { + return nullptr; + } + + UAssetEditorSubsystem* AssetEditorSubsystem{GEditor->GetEditorSubsystem()}; + return AssetEditorSubsystem; +} + +UObject* FSGAssetUtils::GetEditedAsset() +{ + UAssetEditorSubsystem* AssetEditorSubsystem{GetAssetEditorSubsystem()}; + if (!ensureAlwaysMsgf(AssetEditorSubsystem, TEXT("Invalid AssetEditorSubsystem!"))) + { + return nullptr; + } + + TArray EditedAssets{AssetEditorSubsystem->GetAllEditedAssets()}; + for (UObject* EditedAsset: EditedAssets) + { + TArray AssetEditors{FindEditorsForAsset(EditedAsset)}; + for (IAssetEditorInstance* AssetEditor: AssetEditors) + { + if (!ensureAlwaysMsgf(AssetEditor, TEXT("Invalid AssetEditor!"))) + { + return nullptr; + } + + TSharedPtr TabManager = AssetEditor->GetAssociatedTabManager(); + if (!ensureAlwaysMsgf(TabManager.IsValid(), TEXT("Invalid TabManager!"))) + { + return nullptr; + } + + TSharedPtr OwnerTab{TabManager->GetOwnerTab()}; + if (!ensureAlwaysMsgf(OwnerTab.IsValid(), TEXT("Invalid OwnerTab!"))) + { + return nullptr; + } + + const bool bForeground = OwnerTab->IsForeground(); + if (bForeground) + { + return EditedAsset; + } + } + } + + ensureAlwaysMsgf(false, TEXT("The code flow should never reach here!")); + + return nullptr; +} + +bool FSGAssetUtils::IsAssetEditorOpenForAsset(UObject* Asset) +{ + if (!ensureAlwaysMsgf(Asset, TEXT("Invalid Asset!"))) + { + return false; + } + + TArray AssetEditors{FindEditorsForAsset(Asset)}; + return !AssetEditors.IsEmpty(); +} + +TArray FSGAssetUtils::FindEditorsForAsset(UObject* Asset) +{ + if (!ensureAlwaysMsgf(Asset, TEXT("Invalid Asset!"))) + { + return TArray{}; + } + + UAssetEditorSubsystem* AssetEditorSubsystem{GetAssetEditorSubsystem()}; + if (!ensureAlwaysMsgf(AssetEditorSubsystem, TEXT("Invalid AssetEditorSubsystem!"))) + { + return TArray{}; + } + + TArray AssetEditors{AssetEditorSubsystem->FindEditorsForAsset(Asset)}; + return AssetEditors; +} + +bool FSGAssetUtils::OpenEditorForAsset(UObject* Asset) +{ + if (!ensureAlwaysMsgf(Asset, TEXT("Invalid Asset!"))) + { + return false; + } + + UAssetEditorSubsystem* AssetEditorSubsystem{GetAssetEditorSubsystem()}; + if (!ensureAlwaysMsgf(AssetEditorSubsystem, TEXT("Invalid AssetEditorSubsystem!"))) + { + return false; + } + + const bool bOpenedEditor = AssetEditorSubsystem->OpenEditorForAsset(Asset); + return bOpenedEditor; +} + +int32 FSGAssetUtils::CloseAllEditorsForAsset(UObject* Asset) +{ + if (!ensureAlwaysMsgf(Asset, TEXT("Invalid Asset!"))) + { + return 0; + } + + UAssetEditorSubsystem* AssetEditorSubsystem{GetAssetEditorSubsystem()}; + if (!ensureAlwaysMsgf(AssetEditorSubsystem, TEXT("Invalid AssetEditorSubsystem!"))) + { + return false; + } + + const int32 ClosedEditorsNum = AssetEditorSubsystem->CloseAllEditorsForAsset(Asset); + return ClosedEditorsNum; +} + +bool FSGAssetUtils::AddSenseGloveSockets(USkeletalMesh* SkeletalMesh) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + USkeleton* Skeleton{SkeletalMesh->GetSkeleton()}; + if (!ensureAlwaysMsgf(IsValid(Skeleton), TEXT("Invalid Skeleton!"))) + { + return false; + } + + const bool bAddedSenseGloveSockets = FImpl::AddSenseGloveSockets(SkeletalMesh, Skeleton); + return bAddedSenseGloveSockets; +} + +bool FSGAssetUtils::AddSenseGloveSockets(USkeleton* Skeleton) +{ + if (!ensureAlwaysMsgf(IsValid(Skeleton), TEXT("Invalid Skeleton!"))) + { + return false; + } + + USkeletalMesh* SkeletalMesh{Skeleton->GetPreviewMesh()}; + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + const bool bAddedSenseGloveSockets = FImpl::AddSenseGloveSockets(SkeletalMesh, Skeleton); + return bAddedSenseGloveSockets; +} + +bool FSGAssetUtils::ClearExistingSockets(USkeletalMesh* SkeletalMesh) +{ + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + USkeleton* Skeleton{SkeletalMesh->GetSkeleton()}; + if (!ensureAlwaysMsgf(IsValid(Skeleton), TEXT("Invalid Skeleton!"))) + { + return false; + } + + const bool bClearedExistingSockets = FImpl::ClearExistingSockets(SkeletalMesh, Skeleton); + return bClearedExistingSockets; +} + +bool FSGAssetUtils::ClearExistingSockets(USkeleton* Skeleton) +{ + if (!ensureAlwaysMsgf(IsValid(Skeleton), TEXT("Invalid Skeleton!"))) + { + return false; + } + + USkeletalMesh* SkeletalMesh{Skeleton->GetPreviewMesh()}; + if (!ensureAlwaysMsgf(IsValid(SkeletalMesh), TEXT("Invalid SkeletalMesh!"))) + { + return false; + } + + const bool bClearedExistingSockets = FImpl::ClearExistingSockets(SkeletalMesh, Skeleton); + return bClearedExistingSockets; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGContentBrowserExtension.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGContentBrowserExtension.cpp new file mode 100644 index 0000000..b7b87d3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGContentBrowserExtension.cpp @@ -0,0 +1,314 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGEditor/SGContentBrowserExtension.h" + +#include "Animation/Skeleton.h" +#include "AssetRegistry/AssetData.h" +#include "Containers/UnrealString.h" +#include "ContentBrowserDelegates.h" +#include "ContentBrowserModule.h" +#include "Editor.h" +#include "Engine/SkeletalMesh.h" +#include "Framework/Commands/UIAction.h" +#include "Framework/MultiBox/MultiBoxBuilder.h" +#include "Framework/MultiBox/MultiBoxExtender.h" +#include "GenericPlatform/GenericPlatformMisc.h" +#include "Internationalization/Text.h" +#include "Math/Transform.h" +#include "Misc/MessageDialog.h" +#include "ReferenceSkeleton.h" +#include "UObject/Object.h" + +#include "SGEditor/SGAssetUtils.h" +#include "SGEditor/SGPluginStyle.h" + +#define LOCTEXT_NAMESPACE "SGContentBrowserExtension" + +struct FSGContentBrowserExtension::FImpl +{ + /************************ + * Static methods + ************************/ + + static void TryAddSenseGloveSockets(const TArray& SelectedAssets); + static void TryClearExistingSockets(const TArray& SelectedAssets); +}; + +void FSGContentBrowserExtension::FImpl::TryAddSenseGloveSockets(const TArray& SelectedAssets) +{ + const FText ConfirmationDialogText{ + LOCTEXT("SenseGloveAddSocketsConfirmation", + "Do you want to add the SenseGlove sockets?") + }; + const EAppReturnType::Type DialogResult{ + FMessageDialog::Open(EAppMsgType::YesNo, ConfirmationDialogText) + }; + + if (DialogResult != EAppReturnType::Yes) + { + return; + } + + bool bAllAssetsSucceeded = true; + + for (const FAssetData& Asset: SelectedAssets) + { + USkeletalMesh* SkeletalMesh{Cast(Asset.GetAsset())}; + USkeleton* Skeleton{Cast(Asset.GetAsset())}; + + if (!IsValid(SkeletalMesh) && !IsValid(Skeleton)) + { + continue; + } + + bool bAddedSenseGloveSockets = false; + + if (IsValid(SkeletalMesh)) + { + bAddedSenseGloveSockets = FSGAssetUtils::AddSenseGloveSockets(SkeletalMesh); + } + else if (IsValid(Skeleton)) + { + bAddedSenseGloveSockets = FSGAssetUtils::AddSenseGloveSockets(Skeleton); + } + + if (!bAddedSenseGloveSockets) + { + bAllAssetsSucceeded = false; + + const FText ResultDialogText{ + FText::Format( + LOCTEXT("SenseGloveAddSocketsResultFailedOn", + "Failed to add the SenseGlove sockets to '{0}'!"), + FText::FromString(Asset.GetSoftObjectPath().ToString())) + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } + + if (!bAddedSenseGloveSockets) + { + break; + } + } + + if (bAllAssetsSucceeded) + { + const FText ResultDialogText{ + LOCTEXT("SenseGloveAddSocketsResultSuccess", + "Successfully added the SenseGlove grab and touch sockets. If you wish the changes to persist, save" + " the modified asset(s) now!") + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } +} + +void FSGContentBrowserExtension::FImpl::TryClearExistingSockets(const TArray& SelectedAssets) +{ + const FText ConfirmationDialogText{ + LOCTEXT("SenseGloveClearExistingSocketsConfirmation", + "Are you sure you want to clear all the existing sockets? This cannot be undone!") + }; + const EAppReturnType::Type DialogResult{ + FMessageDialog::Open(EAppMsgType::YesNo, ConfirmationDialogText) + }; + + if (DialogResult != EAppReturnType::Yes) + { + return; + } + + bool bAllAssetsSucceeded = true; + + for (const FAssetData& Asset: SelectedAssets) + { + USkeletalMesh* SkeletalMesh{Cast(Asset.GetAsset())}; + USkeleton* Skeleton{Cast(Asset.GetAsset())}; + + if (!IsValid(SkeletalMesh) && !IsValid(Skeleton)) + { + continue; + } + + bool bClearedExistingSockets = false; + + if (IsValid(SkeletalMesh)) + { + bClearedExistingSockets = FSGAssetUtils::ClearExistingSockets(SkeletalMesh); + } + else if (IsValid(Skeleton)) + { + bClearedExistingSockets = FSGAssetUtils::ClearExistingSockets(Skeleton); + } + + if (!bClearedExistingSockets) + { + bAllAssetsSucceeded = false; + + const FText ResultDialogText{ + FText::Format( + LOCTEXT("SenseGloveClearExistingSocketsResultFailedOn", + "Failed to clear all the existing sockets on '{0}'!"), + FText::FromString(Asset.GetSoftObjectPath().ToString())) + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } + + if (!bClearedExistingSockets) + { + break; + } + } + + if (bAllAssetsSucceeded) + { + const FText ResultDialogText{ + LOCTEXT("SenseGloveClearExistingSocketsResultSuccess", + "Successfully cleared all the existing sockets! If you wish the changes to persist, save the" + " modified asset(s) now!") + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } +} + +void FSGContentBrowserExtension::Register() +{ + FContentBrowserModule& ContentBrowserModule{ + FModuleManager::LoadModuleChecked(TEXT("ContentBrowser")) + }; + + TArray& ContextMenuDelegates{ + ContentBrowserModule.GetAllAssetViewContextMenuExtenders() + }; + + ContextMenuDelegates.Add(FContentBrowserMenuExtender_SelectedAssets::CreateStatic(&OnExtendAssetSelectionMenu)); +} + +TSharedRef FSGContentBrowserExtension::OnExtendAssetSelectionMenu( + const TArray& SelectedAssets) +{ + TSharedRef Extender{MakeShared()}; + Extender->AddMenuExtension( + "CommonAssetActions", + EExtensionHook::After, + nullptr, + FMenuExtensionDelegate::CreateStatic(&AssetExtenderCallback, SelectedAssets) + ); + return MoveTemp(Extender); +} + +void FSGContentBrowserExtension::AssetExtenderCallback( + FMenuBuilder& MenuBuilder, const TArray SelectedAssets) +{ + bool bShouldExtendTheMenu = true; + bool bAnySkeletalMeshSelected = false; + bool bAnySkeletonSelected = false; + + for (const FAssetData& Asset: SelectedAssets) + { + if (Asset.IsRedirector() + || FName{*Asset.AssetClassPath.ToString()} == NAME_Class + || (Asset.PackageFlags & PKG_FilterEditorOnly)) + { + bShouldExtendTheMenu = false; + break; + } + + const bool bIsChildOfUSkeletalMesh = Asset.GetClass()->IsChildOf(USkeletalMesh::StaticClass()); + const bool bIsChildOfUSkeleton = Asset.GetClass()->IsChildOf(USkeleton::StaticClass()); + + if (!bIsChildOfUSkeletalMesh && !bIsChildOfUSkeleton) + { + bShouldExtendTheMenu = false; + break; + } + + if (bIsChildOfUSkeletalMesh) + { + bAnySkeletalMeshSelected = true; + } + + if (bIsChildOfUSkeleton) + { + bAnySkeletonSelected = true; + } + + if (bAnySkeletalMeshSelected && bAnySkeletonSelected) + { + bShouldExtendTheMenu = false; + break; + } + } + + if (!bShouldExtendTheMenu) + { + return; + } + + MenuBuilder.BeginSection(FName{TEXT("SenseGloveSection")}, LOCTEXT("SenseGloveHeading", "SenseGlove")); + + MenuBuilder.AddMenuEntry( + LOCTEXT("SenseGloveAddSocketsLabel", "Add SenseGlove Sockets"), + LOCTEXT("SenseGloveAddSocketsToolTip", "Adds and sets up the SenseGlove grab and touch sockets"), + FSGPluginStyle::GetStyleSetIcon(), + FUIAction{ + FExecuteAction::CreateLambda([SelectedAssets]()-> void + { + FImpl::TryAddSenseGloveSockets(SelectedAssets); + }) + }, + NAME_None, + EUserInterfaceActionType::Button, + NAME_None); + + MenuBuilder.AddMenuEntry( + LOCTEXT("SenseGloveClearExistingSocketsLabel", "Clear Existing Sockets"), + LOCTEXT("SenseGloveClearExistingSocketsToolTip", + "Clears all the existing sockets; SenseGlove or otherwise"), + FSGPluginStyle::GetStyleSetIcon(), + FUIAction{ + FExecuteAction::CreateLambda([SelectedAssets]()-> void + { + FImpl::TryClearExistingSockets(SelectedAssets); + }) + }, + NAME_None, + EUserInterfaceActionType::Button, + NAME_None); + + MenuBuilder.EndSection(); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGPluginStyle.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGPluginStyle.cpp new file mode 100644 index 0000000..c928915 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGPluginStyle.cpp @@ -0,0 +1,169 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGEditor/SGPluginStyle.h" + +#include "Interfaces/IPluginManager.h" +#include "Styling/SlateStyleRegistry.h" + +#define LOCTEXT_NAMESPACE "SGPluginStyle" + +struct FSGPluginStyle::FImpl +{ + /************************ + * Static methods + ************************/ + + static FString GetPluginName(); + static FString GetPluginBaseDir(); + static FString GetPluginResourcesDir(); + static FString GetPluginIconPath(); + + /************************ + * Member variables + ************************/ + + /************************ + * Owner object + ************************/ + + FSGPluginStyle* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGPluginStyle* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + void RegisterIcon(); + void Register(); + void Unregister(); +}; + +FString FSGPluginStyle::FImpl::GetPluginName() +{ + static const FString PluginName{"SenseGlove"}; + return PluginName; +} + +FString FSGPluginStyle::FImpl::GetPluginBaseDir() +{ + const FString PluginName{FImpl::GetPluginName()}; + const FString BaseDir{IPluginManager::Get().FindPlugin(PluginName)->GetBaseDir()}; + return BaseDir; +} + +FString FSGPluginStyle::FImpl::GetPluginResourcesDir() +{ + const FString BaseDir{GetPluginBaseDir()}; + const FString ResourcesDir{FPaths::Combine(BaseDir, "Resources")}; + return ResourcesDir; + +} + +FString FSGPluginStyle::FImpl::GetPluginIconPath() +{ + const FString ResourcesDir{GetPluginResourcesDir()}; + const FString IconPath{FPaths::Combine(ResourcesDir, "Icon128.png")}; + return IconPath; +} + +FSGPluginStyle::FSGPluginStyle() + : FSlateStyleSet{FName{TEXT("SenseGlove")}}, + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGPluginStyle::~FSGPluginStyle() = default; + +void FSGPluginStyle::Initialize() const +{ + Pimpl->Register(); +} + +void FSGPluginStyle::Deinitialize() const +{ + Pimpl->Unregister(); +} + +FSGPluginStyle::FImpl::FImpl(FSGPluginStyle* InOwner) + : Owner(InOwner) +{ +} + +FSGPluginStyle::FImpl::~FImpl() = default; + +void FSGPluginStyle::FImpl::RegisterIcon() +{ + FName IconName{FSGPluginStyle::GetStyleSetIconName()}; + FString IconPath{GetPluginIconPath()}; + FVector2d IconSize{128.0f, 128.0f}; + + Owner->Set(MoveTemp(IconName), + new FSlateImageBrush{ + MoveTemp(IconPath), MoveTemp(IconSize) + }); +} + +void FSGPluginStyle::FImpl::Register() +{ + RegisterIcon(); + + FSlateStyleRegistry::RegisterSlateStyle(*Owner); +} + +void FSGPluginStyle::FImpl::Unregister() +{ + FSlateStyleRegistry::UnRegisterSlateStyle(*Owner); +} + +void FSGPluginStyle::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGSocketsEditor.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGSocketsEditor.cpp new file mode 100644 index 0000000..3c8c7f6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGSocketsEditor.cpp @@ -0,0 +1,277 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGEditor/SGSocketsEditor.h" + +#include "Framework/MultiBox/MultiBoxExtender.h" +#include "ISkeletonEditorModule.h" +#include "Modules/ModuleManager.h" + +#include "SGEditor/SGPluginStyle.h" +#include "SGEditor/SGSocketsEditorCommands.h" + +#define LOCTEXT_NAMESPACE "SocketsEditor" + +struct FSGSocketsEditor::FImpl +{ + /************************ + * Member variables + ************************/ + + // TSharedPtr AssetActions; + TSharedPtr EditorCommands; + TSharedPtr MenuExtender; + TSharedPtr ToolbarExtender; + + /************************ + * Owner object + ************************/ + + FSGSocketsEditor* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGSocketsEditor* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TSharedRef FSGSocketsEditor::GetInstance() +{ + static TSharedPtr Instance{MakeShared()}; + return Instance.ToSharedRef(); +} + +FSGSocketsEditor::FSGSocketsEditor() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSGSocketsEditor::~FSGSocketsEditor() = default; + +void FSGSocketsEditor::Initialize() const +{ + RegisterCommands(); + ExtendMenu(); + ExtendToolbar(); +} + +void FSGSocketsEditor::Deinitialize() const +{ + UnregisterCommands(); +} + +void FSGSocketsEditor::RegisterCommands() const +{ + if (Pimpl->EditorCommands.IsValid()) + { + Pimpl->EditorCommands.Reset(); + } + Pimpl->EditorCommands = MakeShared(); + Pimpl->EditorCommands->RegisterCommands(); +} + +void FSGSocketsEditor::UnregisterCommands() const +{ + if (!Pimpl->EditorCommands.IsValid()) + { + return; + } + Pimpl->EditorCommands->Unregister(); +} + +void FSGSocketsEditor::ExtendMenu() const +{ + if (Pimpl->MenuExtender.IsValid()) + { + Pimpl->MenuExtender.Reset(); + } + Pimpl->MenuExtender = MakeShared(); + + ISkeletonEditorModule& SkeletalMeshEditorModule{ + FModuleManager::LoadModuleChecked("SkeletalMeshEditor") + }; + + ISkeletonEditorModule& SkeletonEditorModule{ + FModuleManager::LoadModuleChecked("SkeletonEditor") + }; + + const TSharedPtr SkeletalMeshExtensibilityManager{ + SkeletalMeshEditorModule.GetMenuExtensibilityManager() + }; + + const TSharedPtr SkeletonExtensibilityManager{ + SkeletonEditorModule.GetMenuExtensibilityManager() + }; + + if (!ensureAlwaysMsgf(SkeletonExtensibilityManager.IsValid(), + TEXT("Invalid SkeletonExtensibilityManager!"))) + { + return; + } + + if (!ensureAlwaysMsgf(SkeletalMeshExtensibilityManager.IsValid(), + TEXT("Invalid SkeletalMeshExtensibilityManager!"))) + { + return; + } + + Pimpl->MenuExtender->AddMenuExtension( + FName{TEXT("AssetEditorActions")}, + EExtensionHook::After, + Pimpl->EditorCommands->CommandList, + FMenuExtensionDelegate::CreateLambda([&](FMenuBuilder MenuBuilder)-> void + { + MenuBuilder.BeginSection(FName{TEXT("SenseGlove")}, LOCTEXT("SenseGloveHeading", "SenseGlove")); + { + MenuBuilder.AddMenuEntry( + Pimpl->EditorCommands->SenseGloveAddSockets, + NAME_None, + LOCTEXT("SenseGloveAddSocketsLabel", "Add SenseGlove Sockets"), + LOCTEXT( + "SenseGloveAddSocketsToolTip", "Adds and sets up the SenseGlove grab and touch sockets"), + FSGPluginStyle::GetStyleSetIcon(), + NAME_None); + + MenuBuilder.AddMenuEntry( + Pimpl->EditorCommands->SenseGloveClearExistingSockets, + NAME_None, + LOCTEXT("SenseGloveClearExistingSocketsLabel", "Clear Existing Sockets"), + LOCTEXT( + "SenseGloveClearSocketsToolTip", "Clears all sockets; SenseGlove or otherwise"), + FSlateIcon{FSGPluginStyle::GetStyleSetIcon()}, + NAME_None); + } + MenuBuilder.EndSection(); + })); + + SkeletalMeshExtensibilityManager->AddExtender(Pimpl->MenuExtender); + SkeletonExtensibilityManager->AddExtender(Pimpl->MenuExtender); +} + +void FSGSocketsEditor::ExtendToolbar() const +{ + if (Pimpl->ToolbarExtender.IsValid()) + { + Pimpl->ToolbarExtender.Reset(); + } + Pimpl->ToolbarExtender = MakeShared(); + + ISkeletonEditorModule& SkeletalMeshEditorModule{ + FModuleManager::LoadModuleChecked("SkeletalMeshEditor") + }; + + ISkeletonEditorModule& SkeletonEditorModule{ + FModuleManager::LoadModuleChecked("SkeletonEditor") + }; + + const TSharedPtr SkeletalMeshExtensibilityManager{ + SkeletalMeshEditorModule.GetToolBarExtensibilityManager() + }; + + const TSharedPtr SkeletonExtensibilityManager{ + SkeletonEditorModule.GetToolBarExtensibilityManager() + }; + + if (!ensureAlwaysMsgf(SkeletonExtensibilityManager.IsValid(), + TEXT("Invalid SkeletonExtensibilityManager!"))) + { + return; + } + + if (!ensureAlwaysMsgf(SkeletalMeshExtensibilityManager.IsValid(), + TEXT("Invalid SkeletalMeshExtensibilityManager!"))) + { + return; + } + + Pimpl->ToolbarExtender->AddToolBarExtension( + FName{TEXT("SkeletalMesh")}, + EExtensionHook::After, + Pimpl->EditorCommands->CommandList, + FToolBarExtensionDelegate::CreateLambda([&](FToolBarBuilder& ToolbarBuilder)-> void + { + ToolbarBuilder.BeginSection(FName{TEXT("SenseGlove")}); + { + ToolbarBuilder.AddToolBarButton( + Pimpl->EditorCommands->SenseGloveAddSockets, + NAME_None, + LOCTEXT("SenseGloveAddSocketsLabel", "Add SenseGlove Sockets"), + LOCTEXT( + "SenseGloveAddSocketsToolTip", "Adds and sets up the SenseGlove grab and touch sockets"), + FSGPluginStyle::GetStyleSetIcon(), + NAME_None, + FNewMenuDelegate{} + ); + + ToolbarBuilder.AddToolBarButton( + Pimpl->EditorCommands->SenseGloveClearExistingSockets, + NAME_None, + LOCTEXT("SenseGloveClearExistingSocketsLabel", "Clear Existing Sockets"), + LOCTEXT( + "SenseGloveClearSocketsToolTip", "Clears all sockets; SenseGlove or otherwise"), + FSGPluginStyle::GetStyleSetIcon(), + NAME_None, + FNewMenuDelegate{} + ); + } + ToolbarBuilder.EndSection(); + })); + + SkeletalMeshExtensibilityManager->AddExtender(Pimpl->ToolbarExtender); + SkeletonExtensibilityManager->AddExtender(Pimpl->ToolbarExtender); +} + +FSGSocketsEditor::FImpl::FImpl(FSGSocketsEditor* InOwner) + : Owner(InOwner) +{ +} + +FSGSocketsEditor::FImpl::~FImpl() = default; + +void FSGSocketsEditor::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGSocketsEditorCommands.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGSocketsEditorCommands.cpp new file mode 100644 index 0000000..9377254 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SGEditor/SGSocketsEditorCommands.cpp @@ -0,0 +1,224 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGEditor/SGSocketsEditorCommands.h" + +#include "Animation/Skeleton.h" +#include "Containers/UnrealString.h" +#include "Engine/SkeletalMesh.h" +#include "Framework/Commands/UIAction.h" +#include "GenericPlatform/GenericPlatformMisc.h" +#include "Internationalization/Text.h" +#include "Misc/MessageDialog.h" +#include "UObject/Object.h" + +#include "SGEditor/SGAssetUtils.h" +#include "SGEditor/SGPluginStyle.h" + +#define LOCTEXT_NAMESPACE "SocketsEditorCommands" + +struct FSGSocketsEditorCommands::FImpl +{ + /************************ + * Static methods + ************************/ + + static void TryAddSenseGloveSockets(); + static void TryClearExistingSockets(); +}; + +void FSGSocketsEditorCommands::FImpl::TryAddSenseGloveSockets() +{ + const FText ConfirmationDialogText{ + LOCTEXT("SenseGloveAddSocketsConfirmation", + "Do you want to add the SenseGlove sockets?") + }; + const EAppReturnType::Type DialogResult{ + FMessageDialog::Open(EAppMsgType::YesNo, ConfirmationDialogText) + }; + + if (DialogResult != EAppReturnType::Yes) + { + return; + } + + UObject* EditedAsset{FSGAssetUtils::GetEditedAsset()}; + USkeletalMesh* EditedSkeletalMesh{Cast(EditedAsset)}; + USkeleton* EditedSkeleton{Cast(EditedAsset)}; + + bool bAddedSenseGloveSockets = false; + if (IsValid(EditedSkeletalMesh)) + { + bAddedSenseGloveSockets = FSGAssetUtils::AddSenseGloveSockets(EditedSkeletalMesh); + } + else if (IsValid(EditedSkeleton)) + { + bAddedSenseGloveSockets = FSGAssetUtils::AddSenseGloveSockets(EditedSkeleton); + } + + if (bAddedSenseGloveSockets) + { + const FText ResultDialogText{ + LOCTEXT("SenseGloveAddSocketsResultSuccess", + "Successfully added the SenseGlove grab and touch sockets. If you wish the changes to persist, save" + " the modified asset(s) now!") + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } + else + { + const FText ResultDialogText{ + LOCTEXT("SenseGloveAddSocketsResultSuccessFailed", + "Failed to add the SenseGlove sockets!") + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } +} + +void FSGSocketsEditorCommands::FImpl::TryClearExistingSockets() +{ + const FText ConfirmationDialogText{ + LOCTEXT("SenseGloveClearExistingSocketsConfirmation", + "Are you sure you want to clear all the existing sockets? This cannot be undone!") + }; + const EAppReturnType::Type DialogResult{ + FMessageDialog::Open(EAppMsgType::YesNo, ConfirmationDialogText) + }; + + if (DialogResult != EAppReturnType::Yes) + { + return; + } + + UObject* EditedAsset{FSGAssetUtils::GetEditedAsset()}; + USkeletalMesh* EditedSkeletalMesh{Cast(EditedAsset)}; + USkeleton* EditedSkeleton{Cast(EditedAsset)}; + + bool bClearedExistingSockets = false; + if (IsValid(EditedSkeletalMesh)) + { + bClearedExistingSockets = FSGAssetUtils::ClearExistingSockets(EditedSkeletalMesh); + } + else if (IsValid(EditedSkeleton)) + { + bClearedExistingSockets = FSGAssetUtils::ClearExistingSockets(EditedSkeleton); + } + + if (bClearedExistingSockets) + { + const FText ResultDialogText{ + LOCTEXT("SenseGloveClearExistingSocketsResultSuccess", + "Successfully cleared all the existing sockets! If you wish the changes to persist, save the" + " modified asset(s) now!") + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } + else + { + const FText ResultDialogText{ + LOCTEXT("SenseGloveClearExistingSocketsResultSuccessFailed", + "Failed to clear all the existing sockets!") + }; + FMessageDialog::Open(EAppMsgType::Ok, ResultDialogText); + } +} + +FSGSocketsEditorCommands::FSGSocketsEditorCommands() + : TCommands{ + TEXT("SGSocketsEditor"), + NSLOCTEXT("Contexts", "SGSocketsEditor", "SenseGlove Sockets Editor"), + NAME_None, + FSGPluginStyle::GetInstance()->GetStyleSetName() + } +{ +} + +FSGSocketsEditorCommands::~FSGSocketsEditorCommands() = default; + +void FSGSocketsEditorCommands::RegisterCommands() +{ + if (CommandList.IsValid()) + { + CommandList.Reset(); + } + + CommandList = MakeShared(); + + if (SenseGloveAddSockets.IsValid()) + { + SenseGloveAddSockets.Reset(); + } + + if (SenseGloveClearExistingSockets.IsValid()) + { + SenseGloveClearExistingSockets.Reset(); + } + + UI_COMMAND(SenseGloveAddSockets, + "Add SenseGlove Sockets", + "Adds and sets up the SenseGlove grab and touch sockets", + EUserInterfaceActionType::Button, + FInputChord{}); + + UI_COMMAND(SenseGloveClearExistingSockets, + "Clear Existing Sockets", + "Clears all the existing sockets; SenseGlove or otherwise", + EUserInterfaceActionType::Button, + FInputChord{}); + + CommandList->MapAction(SenseGloveAddSockets, + FExecuteAction::CreateLambda([&]()-> void + { + FImpl::TryAddSenseGloveSockets(); + }), + FCanExecuteAction::CreateLambda([&]()-> bool + { + return true; + }), + EUIActionRepeatMode::RepeatDisabled); + + CommandList->MapAction(SenseGloveClearExistingSockets, + FExecuteAction::CreateLambda([&]()-> void + { + FImpl::TryClearExistingSockets(); + }), + FCanExecuteAction::CreateLambda([&]()-> bool + { + return true; + }), + EUIActionRepeatMode::RepeatDisabled); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditor.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditor.cpp new file mode 100644 index 0000000..3567501 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditor.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveEditor.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveEditorModule.h" + +IMPLEMENT_MODULE(FSenseGloveEditorModule, SenseGloveEditor) diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditor.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditor.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditor.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditorModule.cpp b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditorModule.cpp new file mode 100644 index 0000000..eff24e8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditorModule.cpp @@ -0,0 +1,72 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveEditorModule.h" + +#include "SGEditor/SGContentBrowserExtension.h" +#include "SGEditor/SGPluginStyle.h" +#include "SGEditor/SGSocketsEditor.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveEditorModule" + +void FSenseGloveEditorModule::StartupModule() +{ + SGLOG("Starting up SenseGloveEditor module..."); + + FSGPluginStyle::GetInstance()->Initialize(); + FSGContentBrowserExtension::Register(); + FSGSocketsEditor::GetInstance()->Initialize(); +} + +void FSenseGloveEditorModule::PreUnloadCallback() +{ + SGLOG("Unloading SenseGloveEditor module..."); +} + +void FSenseGloveEditorModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveEditor module has succeeded!"); +} + +void FSenseGloveEditorModule::ShutdownModule() +{ + SGLOG("Shutting down SenseGloveEditor module..."); + + FSGSocketsEditor::GetInstance()->Deinitialize(); + FSGPluginStyle::GetInstance()->Deinitialize(); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditorModule.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditorModule.h new file mode 100644 index 0000000..fea994d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Private/SenseGloveEditorModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveEditor" + +class FSenseGloveEditorModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGAssetUtils.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGAssetUtils.h new file mode 100644 index 0000000..5be49f3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGAssetUtils.h @@ -0,0 +1,72 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "Templates/SharedPointer.h" + +class IAssetEditorInstance; +class UAssetEditorSubsystem; +class USkeletalMesh; +class USkeleton; +class UObject; + +class SENSEGLOVEEDITOR_API FSGAssetUtils final +{ +public: + static UAssetEditorSubsystem* GetAssetEditorSubsystem(); + + static UObject* GetEditedAsset(); + + static bool IsAssetEditorOpenForAsset(UObject* Asset); + static TArray FindEditorsForAsset(UObject* Asset); + static bool OpenEditorForAsset(UObject* Asset); + static int32 CloseAllEditorsForAsset(UObject* Asset); + + static bool AddSenseGloveSockets(USkeletalMesh* SkeletalMesh); + static bool AddSenseGloveSockets(USkeleton* Skeleton); + + static bool ClearExistingSockets(USkeletalMesh* SkeletalMesh); + static bool ClearExistingSockets(USkeleton* Skeleton); + +private: + struct FImpl; + +private: + FSGAssetUtils() = delete; + virtual ~FSGAssetUtils() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGContentBrowserExtension.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGContentBrowserExtension.h new file mode 100644 index 0000000..3ef562f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGContentBrowserExtension.h @@ -0,0 +1,60 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Templates/SharedPointer.h" + +struct FAssetData; +class FMenuBuilder; +class USkeletalMesh; + +class SENSEGLOVEEDITOR_API FSGContentBrowserExtension +{ +public: + static void Register(); + +protected: + static TSharedRef OnExtendAssetSelectionMenu(const TArray& SelectedAssets); + static void AssetExtenderCallback(FMenuBuilder& MenuBuilder, const TArray SelectedAssets); + +private: + struct FImpl; + +private: + FSGContentBrowserExtension() = delete; + virtual ~FSGContentBrowserExtension() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGPluginStyle.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGPluginStyle.h new file mode 100644 index 0000000..822a511 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGPluginStyle.h @@ -0,0 +1,82 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Styling/SlateStyle.h" +#include "Templates/SharedPointer.h" + +class ISlateStyle; + +class SENSEGLOVEEDITOR_API FSGPluginStyle final : public FSlateStyleSet +{ +public: + FORCEINLINE static TSharedRef GetInstance() + { + static TSharedPtr Instance{MakeShared()}; + return Instance.ToSharedRef(); + } + + FORCEINLINE static const FName& GetStyleSetIconName() + { + static const FName IconName{TEXT("SenseGlove.Icon")}; + return IconName; + } + + FORCEINLINE static const FSlateIcon& GetStyleSetIcon() + { + static FSlateIcon Icon{GetInstance()->GetStyleSetName(), GetStyleSetIconName()}; + return Icon; + } + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGPluginStyle(); + virtual ~FSGPluginStyle(); + +public: + void Initialize() const; + void Deinitialize() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGSocketsEditor.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGSocketsEditor.h new file mode 100644 index 0000000..29f106c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGSocketsEditor.h @@ -0,0 +1,71 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Framework/MultiBox/MultiBoxExtender.h" +#include "Templates/SharedPointer.h" + +class SENSEGLOVEEDITOR_API FSGSocketsEditor +{ +public: + static TSharedRef GetInstance(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + FSGSocketsEditor(); + virtual ~FSGSocketsEditor(); + +public: + void Initialize() const; + void Deinitialize() const; + + void RegisterCommands() const; + void UnregisterCommands() const; + + void ExtendMenu() const; + + void ExtendToolbar() const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGSocketsEditorCommands.h b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGSocketsEditorCommands.h new file mode 100644 index 0000000..5bcf341 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/Public/SGEditor/SGSocketsEditorCommands.h @@ -0,0 +1,58 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Framework/Commands/Commands.h" +#include "Framework/Commands/UICommandList.h" +#include "Templates/SharedPointer.h" + +class SENSEGLOVEEDITOR_API FSGSocketsEditorCommands final : public TCommands +{ +public: + TSharedPtr CommandList; + TSharedPtr SenseGloveAddSockets; + TSharedPtr SenseGloveClearExistingSockets; + +private: + struct FImpl; + +public: + FSGSocketsEditorCommands(); + virtual ~FSGSocketsEditorCommands() override; + +public: + virtual void RegisterCommands() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveEditor/SenseGloveEditor.Build.cs b/Plugins/SenseGlove/Source/SenseGloveEditor/SenseGloveEditor.Build.cs new file mode 100644 index 0000000..48b0f98 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveEditor/SenseGloveEditor.Build.cs @@ -0,0 +1,71 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveEditor : ModuleRules +{ + public SenseGloveEditor(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "AssetTools", + "Core", + "CoreUObject", + "Engine", + "InputCore", + "Projects", + "SkeletalMeshEditor", + "SkeletonEditor", + "Slate", + "SlateCore", + "UnrealEd", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveSettings", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGBackendType.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGBackendType.cpp new file mode 100644 index 0000000..15f4897 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGBackendType.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGBackendType.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGConnectionType.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGConnectionType.cpp new file mode 100644 index 0000000..99b0108 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGConnectionType.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGConnectionType.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGDeviceType.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGDeviceType.cpp new file mode 100644 index 0000000..d3aafd4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGDeviceType.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGDeviceType.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFinger.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFinger.cpp new file mode 100644 index 0000000..a9c0140 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFinger.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGFinger.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFingerMovement.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFingerMovement.cpp new file mode 100644 index 0000000..6c225f2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFingerMovement.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGFingerMovement.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFingerSolver.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFingerSolver.cpp new file mode 100644 index 0000000..f79fa55 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGFingerSolver.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGFingerSolver.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticChannelType.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticChannelType.cpp new file mode 100644 index 0000000..f4051b3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticChannelType.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGHapticChannelType.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticGloveCalibrationState.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticGloveCalibrationState.cpp new file mode 100644 index 0000000..aafd1c5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticGloveCalibrationState.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGHapticGloveCalibrationState.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticLocation.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticLocation.cpp new file mode 100644 index 0000000..6184da1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGHapticLocation.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGHapticLocation.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGListFormat.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGListFormat.cpp new file mode 100644 index 0000000..8d9b439 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGListFormat.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGListFormat.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNormalizationState.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNormalizationState.cpp new file mode 100644 index 0000000..459817f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNormalizationState.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNormalizationState.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNova2SensorLocation.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNova2SensorLocation.cpp new file mode 100644 index 0000000..8c5d316 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNova2SensorLocation.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNova2SensorLocation.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNova2VibroMotor.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNova2VibroMotor.cpp new file mode 100644 index 0000000..4130274 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNova2VibroMotor.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNova2VibroMotor.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaCVar.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaCVar.cpp new file mode 100644 index 0000000..b50c524 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaCVar.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNovaCVar.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaData.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaData.cpp new file mode 100644 index 0000000..b76d780 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaData.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNovaData.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaSensorLocation.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaSensorLocation.cpp new file mode 100644 index 0000000..c41af00 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaSensorLocation.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNovaSensorLocation.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaVibroMotor.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaVibroMotor.cpp new file mode 100644 index 0000000..9883dac --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGNovaVibroMotor.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGNovaVibroMotor.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGPositionalTrackingHardware.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGPositionalTrackingHardware.cpp new file mode 100644 index 0000000..ebac104 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGPositionalTrackingHardware.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGPositionalTrackingHardware.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveCVar.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveCVar.cpp new file mode 100644 index 0000000..cfc4261 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveCVar.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGSenseGloveCVar.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveSVar.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveSVar.cpp new file mode 100644 index 0000000..9792f30 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveSVar.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGSenseGloveSVar.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveThumperCommand.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveThumperCommand.cpp new file mode 100644 index 0000000..080a628 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSenseGloveThumperCommand.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGSenseGloveThumperCommand.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSensorFormat.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSensorFormat.cpp new file mode 100644 index 0000000..4f2fd38 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGSensorFormat.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGSensorFormat.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGThumbMovement.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGThumbMovement.cpp new file mode 100644 index 0000000..7f64469 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGThumbMovement.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGThumbMovement.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGThumbSolver.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGThumbSolver.cpp new file mode 100644 index 0000000..25d4987 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGThumbSolver.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGThumbSolver.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGWaveformType.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGWaveformType.cpp new file mode 100644 index 0000000..9325807 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_ESGWaveformType.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_ESGWaveformType.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FQuat.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FQuat.cpp new file mode 100644 index 0000000..a6e0226 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FQuat.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FQuat.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGBasicHandModelImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGBasicHandModelImpl.cpp new file mode 100644 index 0000000..6d86d0c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGBasicHandModelImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGBasicHandModelImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGBetaDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGBetaDeviceImpl.cpp new file mode 100644 index 0000000..c29c5af --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGBetaDeviceImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGBetaDeviceImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGCustomWaveformImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGCustomWaveformImpl.cpp new file mode 100644 index 0000000..42a3a63 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGCustomWaveformImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGCustomWaveformImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGDeviceImpl.cpp new file mode 100644 index 0000000..5159faf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGDeviceImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGDeviceImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGDeviceModelImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGDeviceModelImpl.cpp new file mode 100644 index 0000000..f831923 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGDeviceModelImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGDeviceModelImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHandInterpolatorImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHandInterpolatorImpl.cpp new file mode 100644 index 0000000..57c5242 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHandInterpolatorImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGHandInterpolatorImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHandPoseImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHandPoseImpl.cpp new file mode 100644 index 0000000..fe929bb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHandPoseImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGHandPoseImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHapticChannelInfoImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHapticChannelInfoImpl.cpp new file mode 100644 index 0000000..ee8c8fa --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHapticChannelInfoImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGHapticChannelInfoImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHapticGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHapticGloveImpl.cpp new file mode 100644 index 0000000..aa19b69 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGHapticGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGHapticGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGInterpolationSetImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGInterpolationSetImpl.cpp new file mode 100644 index 0000000..8fe4fac --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGInterpolationSetImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGInterpolationSetImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNova2GloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNova2GloveImpl.cpp new file mode 100644 index 0000000..c1ec039 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNova2GloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGNova2GloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNova2GloveSensorDataImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNova2GloveSensorDataImpl.cpp new file mode 100644 index 0000000..920294e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNova2GloveSensorDataImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveImpl.cpp new file mode 100644 index 0000000..d0fe0b2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGNovaGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveInfoImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveInfoImpl.cpp new file mode 100644 index 0000000..32e6781 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveInfoImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGNovaGloveInfoImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveSensorDataImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveSensorDataImpl.cpp new file mode 100644 index 0000000..1982d7b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGNovaGloveSensorDataImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveImpl.cpp new file mode 100644 index 0000000..90b9bd7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGSenseGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveInfoImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveInfoImpl.cpp new file mode 100644 index 0000000..037a28f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveInfoImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGSenseGloveInfoImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGlovePoseImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGlovePoseImpl.cpp new file mode 100644 index 0000000..ca63271 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGlovePoseImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGSenseGlovePoseImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveSensorDataImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveSensorDataImpl.cpp new file mode 100644 index 0000000..355cebd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveSensorDataImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.cpp new file mode 100644 index 0000000..5b37175 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSensorNormalizationImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSensorNormalizationImpl.cpp new file mode 100644 index 0000000..5c0d754 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGSensorNormalizationImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGSensorNormalizationImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGThresholdCommandImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGThresholdCommandImpl.cpp new file mode 100644 index 0000000..a62d956 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FSGThresholdCommandImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FSGThresholdCommandImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FString.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FString.cpp new file mode 100644 index 0000000..078a6a7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FString.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FString.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FVector.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FVector.cpp new file mode 100644 index 0000000..ffb11f4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_FVector.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_FVector.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_JNIEnv_Ptr.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_JNIEnv_Ptr.cpp new file mode 100644 index 0000000..68c4fa3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_JNIEnv_Ptr.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_JNIEnv_Ptr.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FQuat.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FQuat.cpp new file mode 100644 index 0000000..005d155 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FQuat.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_FQuat.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGNova2GloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGNova2GloveImpl.cpp new file mode 100644 index 0000000..151b70c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGNova2GloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_FSGNova2GloveImpl.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGNovaGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGNovaGloveImpl.cpp new file mode 100644 index 0000000..b9b45fd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGNovaGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_FSGNovaGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGSenseGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGSenseGloveImpl.cpp new file mode 100644 index 0000000..0f471af --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FSGSenseGloveImpl.cpp @@ -0,0 +1,35 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_FSGSenseGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FString.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FString.cpp new file mode 100644 index 0000000..f51cd8e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FString.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_FString.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FVector.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FVector.cpp new file mode 100644 index 0000000..6efc5da --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_FVector.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_FVector.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FQuat.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FQuat.cpp new file mode 100644 index 0000000..3233d41 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FQuat.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TArray_FQuat.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.cpp new file mode 100644 index 0000000..215fa9e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FVector.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FVector.cpp new file mode 100644 index 0000000..240a47d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_FVector.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TArray_FVector.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_bool.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_bool.cpp new file mode 100644 index 0000000..0cbeea1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_bool.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TArray_bool.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_float.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_float.cpp new file mode 100644 index 0000000..5a6a550 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TArray_float.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TArray_float.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.cpp new file mode 100644 index 0000000..100f3ef --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.cpp new file mode 100644 index 0000000..fdebc77 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.cpp @@ -0,0 +1,35 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_bool.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_bool.cpp new file mode 100644 index 0000000..20c485c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_bool.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_bool.h" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_float.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_float.cpp new file mode 100644 index 0000000..9043e81 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_float.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_float.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_int32.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_int32.cpp new file mode 100644 index 0000000..3dd6ec0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TArray_int32.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TArray_int32.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.cpp new file mode 100644 index 0000000..71c8847 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.cpp new file mode 100644 index 0000000..bc6b22b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.cpp new file mode 100644 index 0000000..aadebdf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.cpp new file mode 100644 index 0000000..be18b07 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.cpp new file mode 100644 index 0000000..1ec8010 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.cpp new file mode 100644 index 0000000..541edaf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.cpp new file mode 100644 index 0000000..e045fcb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_jclass.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_jclass.cpp new file mode 100644 index 0000000..0e59dbe --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_jclass.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_jclass.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_jmethodID.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_jmethodID.cpp new file mode 100644 index 0000000..dba5629 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SGInterop/SGIC_jmethodID.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGInterop/SGIC_jmethodID.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInterop.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInterop.cpp new file mode 100644 index 0000000..c863a2d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInterop.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveInterop.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveInteropModule.h" + +IMPLEMENT_MODULE(FSenseGloveInteropModule, SenseGloveInterop) diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInterop.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInterop.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInterop.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInteropModule.cpp b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInteropModule.cpp new file mode 100644 index 0000000..190176b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInteropModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveInteropModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveInteropModule" + +void FSenseGloveInteropModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveInterop module..."); +} + +void FSenseGloveInteropModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveInterop module..."); +} + +void FSenseGloveInteropModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveInterop module has succeeded!"); +} + +void FSenseGloveInteropModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveInterop module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInteropModule.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInteropModule.h new file mode 100644 index 0000000..9edc876 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Private/SenseGloveInteropModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveInterop" + +class FSenseGloveInteropModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGBackendType.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGBackendType.h new file mode 100644 index 0000000..3032315 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGBackendType.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGBackendType +{ + ESGBackendType Type; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGConnectionType.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGConnectionType.h new file mode 100644 index 0000000..f91c734 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGConnectionType.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGConnectionType +{ + ESGConnectionType Type; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGDeviceType.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGDeviceType.h new file mode 100644 index 0000000..b20f59a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGDeviceType.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGDeviceType +{ + ESGDeviceType Type; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFinger.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFinger.h new file mode 100644 index 0000000..c97a5eb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFinger.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGFinger +{ + ESGFinger Finger; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFingerMovement.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFingerMovement.h new file mode 100644 index 0000000..82a2bf5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFingerMovement.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGFingerMovement +{ + ESGFingerMovement Movement; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFingerSolver.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFingerSolver.h new file mode 100644 index 0000000..4c0e827 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGFingerSolver.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGFingerSolver +{ + ESGFingerSolver Solver; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticChannelType.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticChannelType.h new file mode 100644 index 0000000..1abd817 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticChannelType.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGHapticChannelType +{ + ESGHapticChannelType Type; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticGloveCalibrationState.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticGloveCalibrationState.h new file mode 100644 index 0000000..1e1591d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticGloveCalibrationState.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGHapticGloveCalibrationState +{ + ESGHapticGloveCalibrationState State; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticLocation.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticLocation.h new file mode 100644 index 0000000..f9bfb72 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGHapticLocation.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGHapticLocation +{ + ESGHapticLocation Location; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGListFormat.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGListFormat.h new file mode 100644 index 0000000..b0e8c96 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGListFormat.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGListFormat +{ + ESGListFormat Format; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNormalizationState.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNormalizationState.h new file mode 100644 index 0000000..a94c3a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNormalizationState.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNormalizationState +{ + ESGNormalizationState State; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNova2SensorLocation.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNova2SensorLocation.h new file mode 100644 index 0000000..69143a9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNova2SensorLocation.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNova2SensorLocation +{ + ESGNova2SensorLocation Location; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNova2VibroMotor.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNova2VibroMotor.h new file mode 100644 index 0000000..fb77e48 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNova2VibroMotor.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNova2VibroMotor +{ + ESGNova2VibroMotor Motor; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaCVar.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaCVar.h new file mode 100644 index 0000000..b4591f9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaCVar.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNovaCVar +{ + ESGNovaCVar Var; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaData.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaData.h new file mode 100644 index 0000000..8b356b1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaData.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNovaData +{ + ESGNovaData Data; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaSensorLocation.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaSensorLocation.h new file mode 100644 index 0000000..f26ce11 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaSensorLocation.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNovaSensorLocation +{ + ESGNovaSensorLocation Location; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaVibroMotor.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaVibroMotor.h new file mode 100644 index 0000000..6792eef --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGNovaVibroMotor.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGNovaVibroMotor +{ + ESGNovaVibroMotor Motor; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGPositionalTrackingHardware.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGPositionalTrackingHardware.h new file mode 100644 index 0000000..40c8be3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGPositionalTrackingHardware.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGPositionalTrackingHardware +{ + ESGPositionalTrackingHardware Hardware; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveCVar.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveCVar.h new file mode 100644 index 0000000..5cd9f13 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveCVar.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGSenseGloveCVar +{ + ESGSenseGloveCVar Var; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveSVar.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveSVar.h new file mode 100644 index 0000000..9592891 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveSVar.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGSenseGloveSVar +{ + ESGSenseGloveSVar Var; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveThumperCommand.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveThumperCommand.h new file mode 100644 index 0000000..7e718d4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSenseGloveThumperCommand.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGSenseGloveThumperCommand +{ + ESGSenseGloveThumperCommand Command; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSensorFormat.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSensorFormat.h new file mode 100644 index 0000000..1756769 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGSensorFormat.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGSensorFormat +{ + ESGSensorFormat Format; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGThumbMovement.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGThumbMovement.h new file mode 100644 index 0000000..751a7e3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGThumbMovement.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGThumbMovement +{ + ESGThumbMovement Movement; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGThumbSolver.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGThumbSolver.h new file mode 100644 index 0000000..197f69f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGThumbSolver.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGThumbSolver +{ + ESGThumbSolver Solver; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGWaveformType.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGWaveformType.h new file mode 100644 index 0000000..a838b3d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_ESGWaveformType.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" + +struct FSGIC_ESGWaveformType +{ + ESGWaveformType Type; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FQuat.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FQuat.h new file mode 100644 index 0000000..406428e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FQuat.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Quat.h" + +struct FSGIC_FQuat +{ + FQuat Quat; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGBasicHandModelImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGBasicHandModelImpl.h new file mode 100644 index 0000000..72ee0a5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGBasicHandModelImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGBasicHandModelImpl.h" + +struct FSGIC_FSGBasicHandModelImpl +{ + FSGBasicHandModelImpl BasicHandModelImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGBetaDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGBetaDeviceImpl.h new file mode 100644 index 0000000..0b1f6a1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGBetaDeviceImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGBetaDeviceImpl.h" + +struct FSGIC_FSGBetaDeviceImpl +{ + FSGBetaDeviceImpl BetaDeviceImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGCustomWaveformImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGCustomWaveformImpl.h new file mode 100644 index 0000000..057bdfa --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGCustomWaveformImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGCustomWaveformImpl.h" + +struct FSGIC_FSGCustomWaveformImpl +{ + FSGCustomWaveformImpl CustomWaveformImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGDeviceImpl.h new file mode 100644 index 0000000..191028e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGDeviceImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceImpl.h" + +struct FSGIC_FSGDeviceImpl +{ + FSGDeviceImpl SGDeviceImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGDeviceModelImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGDeviceModelImpl.h new file mode 100644 index 0000000..5d20b6d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGDeviceModelImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceModelImpl.h" + +struct FSGIC_FSGDeviceModelImpl +{ + FSGDeviceModelImpl DeviceModelImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHandInterpolatorImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHandInterpolatorImpl.h new file mode 100644 index 0000000..0fcc026 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHandInterpolatorImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHandInterpolatorImpl.h" + +struct FSGIC_FSGHandInterpolatorImpl +{ + FSGHandInterpolatorImpl HandInterpolatorImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHandPoseImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHandPoseImpl.h new file mode 100644 index 0000000..0274566 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHandPoseImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHandPoseImpl.h" + +struct FSGIC_FSGHandPoseImpl +{ + FSGHandPoseImpl HandPoseImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHapticChannelInfoImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHapticChannelInfoImpl.h new file mode 100644 index 0000000..fbe4269 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHapticChannelInfoImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHapticChannelInfoImpl.h" + +struct FSGIC_FSGHapticChannelInfoImpl +{ + FSGHapticChannelInfoImpl HapticChannelInfoImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHapticGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHapticGloveImpl.h new file mode 100644 index 0000000..a5f8214 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGHapticGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHapticGloveImpl.h" + +struct FSGIC_FSGHapticGloveImpl +{ + FSGHapticGloveImpl HapticGloveImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGInterpolationSetImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGInterpolationSetImpl.h new file mode 100644 index 0000000..157df32 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGInterpolationSetImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGInterpolationSetImpl.h" + +struct FSGIC_FSGInterpolationSetImpl +{ + FSGInterpolationSetImpl InterpolationSetImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNova2GloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNova2GloveImpl.h new file mode 100644 index 0000000..7831bce --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNova2GloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNova2GloveImpl.h" + +struct FSGIC_FSGNova2GloveImpl +{ + FSGNova2GloveImpl Nova2GloveImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h new file mode 100644 index 0000000..d18a03c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNova2GloveSensorDataImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNova2GloveSensorDataImpl.h" + +struct FSGIC_FSGNova2GloveSensorDataImpl +{ + FSGNova2GloveSensorDataImpl Nova2GloveSensorDataImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveImpl.h new file mode 100644 index 0000000..4d7cf19 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveImpl.h" + +struct FSGIC_FSGNovaGloveImpl +{ + FSGNovaGloveImpl NovaGloveImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveInfoImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveInfoImpl.h new file mode 100644 index 0000000..b772958 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveInfoImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveInfoImpl.h" + +struct FSGIC_FSGNovaGloveInfoImpl +{ + FSGNovaGloveInfoImpl NovaGloveInfoImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h new file mode 100644 index 0000000..55d7d70 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGNovaGloveSensorDataImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveSensorDataImpl.h" + +struct FSGIC_FSGNovaGloveSensorDataImpl +{ + FSGNovaGloveSensorDataImpl NovaGloveSensorDataImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveImpl.h new file mode 100644 index 0000000..47bca67 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveImpl.h" + +struct FSGIC_FSGSenseGloveImpl +{ + FSGSenseGloveImpl SenseGloveImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveInfoImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveInfoImpl.h new file mode 100644 index 0000000..ad54a2a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveInfoImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveInfoImpl.h" + +struct FSGIC_FSGSenseGloveInfoImpl +{ + FSGSenseGloveInfoImpl SenseGloveInfoImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGlovePoseImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGlovePoseImpl.h new file mode 100644 index 0000000..5a72595 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGlovePoseImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGlovePoseImpl.h" + +struct FSGIC_FSGSenseGlovePoseImpl +{ + FSGSenseGlovePoseImpl SenseGlovePoseImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h new file mode 100644 index 0000000..e222a72 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveSensorDataImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveSensorDataImpl.h" + +struct FSGIC_FSGSenseGloveSensorDataImpl +{ + FSGSenseGloveSensorDataImpl SenseGloveSensorDataImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h new file mode 100644 index 0000000..2bea270 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSenseGloveSensorNormalizerImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveSensorNormalizerImpl.h" + +struct FSGIC_FSGSenseGloveSensorNormalizerImpl +{ + FSGSenseGloveSensorNormalizerImpl SenseGloveSensorNormalizerImpl; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSensorNormalizationImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSensorNormalizationImpl.h new file mode 100644 index 0000000..0883e93 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGSensorNormalizationImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSensorNormalizationImpl.h" + +struct FSGIC_FSGSensorNormalizationImpl +{ + FSGSensorNormalizationImpl SensorNormalizationImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGThresholdCommandImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGThresholdCommandImpl.h new file mode 100644 index 0000000..bd10903 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FSGThresholdCommandImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGThresholdCommandImpl.h" + +struct FSGIC_FSGThresholdCommandImpl +{ + FSGThresholdCommandImpl ThresholdCommandImpl; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FString.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FString.h new file mode 100644 index 0000000..914807d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FString.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +struct FSGIC_FString +{ + FString String; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FVector.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FVector.h new file mode 100644 index 0000000..fa10733 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_FVector.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" + +struct FSGIC_FVector +{ + FVector Vector; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_JNIEnv_Ptr.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_JNIEnv_Ptr.h new file mode 100644 index 0000000..549a096 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_JNIEnv_Ptr.h @@ -0,0 +1,47 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#if PLATFORM_ANDROID +#include "Android/AndroidJavaEnv.h" + +struct FSGIC_JNIEnv_Ptr +{ + JNIEnv* Ptr; +}; +#endif /* PLATFORM_ANDROID */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FQuat.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FQuat.h new file mode 100644 index 0000000..f0caff2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FQuat.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Quat.h" + +struct FSGIC_TArray_FQuat +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGNova2GloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGNova2GloveImpl.h new file mode 100644 index 0000000..14c5c73 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGNova2GloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNova2GloveImpl.h" + +struct FSGIC_TArray_FSGNova2GloveImpl +{ + TArray Array; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGNovaGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGNovaGloveImpl.h new file mode 100644 index 0000000..64fb01f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGNovaGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveImpl.h" + +struct FSGIC_TArray_FSGNovaGloveImpl +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGSenseGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGSenseGloveImpl.h new file mode 100644 index 0000000..68a9bb1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FSGSenseGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveImpl.h" + +struct FSGIC_TArray_FSGSenseGloveImpl +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FString.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FString.h new file mode 100644 index 0000000..2f46643 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FString.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" + +struct FSGIC_TArray_FString +{ + TArray Array; +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FVector.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FVector.h new file mode 100644 index 0000000..d7d8788 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_FVector.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" + +struct FSGIC_TArray_FVector +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FQuat.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FQuat.h new file mode 100644 index 0000000..34c38b2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FQuat.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Quat.h" + +struct FSGIC_TArray_TArray_FQuat +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h new file mode 100644 index 0000000..03c9ce0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FSGInterpolationSetImpl.h @@ -0,0 +1,45 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGInterpolationSetImpl.h" + +struct FSGIC_TArray_TArray_FSGInterpolationSetImpl +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FVector.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FVector.h new file mode 100644 index 0000000..dff3fd3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_FVector.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" + +struct FSGIC_TArray_TArray_FVector +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_bool.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_bool.h new file mode 100644 index 0000000..8f33757 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_bool.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +struct FSGIC_TArray_TArray_bool +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_float.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_float.h new file mode 100644 index 0000000..7b1148d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TArray_float.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +struct FSGIC_TArray_TArray_float +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.h new file mode 100644 index 0000000..af26776 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TSharedRef_FSGDeviceImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceImpl.h" + +struct FSGIC_TArray_TSharedRef_FSGDeviceListImpl +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h new file mode 100644 index 0000000..89876e9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_TSharedRef_FSGHapticGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHapticGloveImpl.h" + +struct FSGIC_TArray_TSharedRef_FSGHapticGloveImpl +{ + TArray> Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_bool.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_bool.h new file mode 100644 index 0000000..c780ed9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_bool.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +struct FSGIC_TArray_bool +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_float.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_float.h new file mode 100644 index 0000000..0718dd2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_float.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +struct FSGIC_TArray_float +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_int32.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_int32.h new file mode 100644 index 0000000..3b1fc88 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TArray_int32.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" + +struct FSGIC_TArray_int32 +{ + TArray Array; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h new file mode 100644 index 0000000..ff939cc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGBetaDeviceImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGBetaDeviceImpl.h" + +struct FSGIC_TSharedPtr_FSGBetaDeviceImpl +{ + TSharedPtr Ptr; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h new file mode 100644 index 0000000..4368725 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGDeviceImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGDeviceImpl.h" + +struct FSGIC_TSharedPtr_FSGDeviceImpl +{ + TSharedPtr Ptr; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h new file mode 100644 index 0000000..5b8c8a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGHapticGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGHapticGloveImpl.h" + +struct FSGIC_TSharedPtr_FSGHapticGloveImpl +{ + TSharedPtr Ptr; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h new file mode 100644 index 0000000..9d963a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGNova2GloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNova2GloveImpl.h" + +struct FSGIC_TSharedPtr_FSGNova2GloveImpl +{ + TSharedPtr Ptr; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h new file mode 100644 index 0000000..9a6d264 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGNovaGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGNovaGloveImpl.h" + +struct FSGIC_TSharedPtr_FSGNovaGloveImpl +{ + TSharedPtr Ptr; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h new file mode 100644 index 0000000..c9bac5e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSharedPtr_FSGSenseGloveImpl.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGCoreImpl/SGSenseGloveImpl.h" + +struct FSGIC_TSharedPtr_FSGSenseGloveImpl +{ + TSharedPtr Ptr; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.h new file mode 100644 index 0000000..d75ce93 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_TSubclassOf_FSGDeviceImpl.h @@ -0,0 +1,44 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Templates/SubclassOf.h" +#include "SGCoreImpl/SGDeviceImpl.h" + +struct FSGIC_TSubclassOf_FSDeviceImpl +{ + TSubclassOf DeviceSubclassOf; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_jclass.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_jclass.h new file mode 100644 index 0000000..ca87e40 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_jclass.h @@ -0,0 +1,47 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#if PLATFORM_ANDROID +#include "Android/AndroidJavaEnv.h" + +struct FSGIC_jclass +{ + jclass Class; +}; +#endif /* PLATFORM_ANDROID */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_jmethodID.h b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_jmethodID.h new file mode 100644 index 0000000..93b025d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/Public/SGInterop/SGIC_jmethodID.h @@ -0,0 +1,47 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" + +#if PLATFORM_ANDROID +#include "Android/AndroidJavaEnv.h" + +struct FSGIC_jmethodID +{ + jmethodID MethodID; +}; +#endif /* PLATFORM_ANDROID */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveInterop/SenseGloveInterop.Build.cs b/Plugins/SenseGlove/Source/SenseGloveInterop/SenseGloveInterop.Build.cs new file mode 100644 index 0000000..20c0a76 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveInterop/SenseGloveInterop.Build.cs @@ -0,0 +1,70 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveInterop : ModuleRules +{ + public SenseGloveInterop(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveTypes", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + "SenseGloveCoreImpl", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGBlueprintFunctionLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGBlueprintFunctionLibrary.cpp new file mode 100644 index 0000000..526cda8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGBlueprintFunctionLibrary.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGGameUserSettingsKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGGameUserSettingsKismetLibrary.cpp new file mode 100644 index 0000000..07d034c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGGameUserSettingsKismetLibrary.cpp @@ -0,0 +1,50 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGGameUserSettingsKismetLibrary.h" + +#include "SenseGlove/GameFramework/SGGameUserSettings.h" + +ESGEngineScalabilitySettings USGGameUserSettingsKismetLibrary::GetEngineScalabilitySettings( + const USGGameUserSettings* GameUserSettings) +{ + return GameUserSettings->GetEngineScalabilitySettings(); +} + +void USGGameUserSettingsKismetLibrary::SetEngineScalabilitySettings(USGGameUserSettings* GameUserSettings, + const ESGEngineScalabilitySettings Scalability) +{ + GameUserSettings->SetEngineScalabilitySettings(Scalability); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGGrabComponentKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGGrabComponentKismetLibrary.cpp new file mode 100644 index 0000000..c976a0a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGGrabComponentKismetLibrary.cpp @@ -0,0 +1,149 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A data class containing the minimum required data for a hand's forward + * kinematics. + * Used in both kinematics and calibration. + */ + + +#include "SGKismet/SGGrabComponentKismetLibrary.h" + +#include "SenseGlove/Components/SGGrabComponent.h" + +USGGrabComponent* UGrabComponentKismetLibrary::GetGrabComponent(const AActor* Actor) +{ + return USGGrabComponent::GetGrabComponent(Actor); +} + +bool UGrabComponentKismetLibrary::IsGrabbable(const AActor* Actor) +{ + return USGGrabComponent::IsGrabbable(Actor); +} + +EAttachmentRule UGrabComponentKismetLibrary::GetAttachmentLocationRule(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetAttachmentLocationRule(); +} + +void UGrabComponentKismetLibrary::SetAttachmentLocationRule(USGGrabComponent* GrabComponent, + const EAttachmentRule InAttachmentLocationRule) +{ + GrabComponent->SetAttachmentLocationRule(InAttachmentLocationRule); +} + +EAttachmentRule UGrabComponentKismetLibrary::GetAttachmentRotationRule(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetAttachmentRotationRule(); +} + +void UGrabComponentKismetLibrary::SetAttachmentRotationRule(USGGrabComponent* GrabComponent, + const EAttachmentRule InAttachmentRotationRule) +{ + GrabComponent->SetAttachmentRotationRule(InAttachmentRotationRule); +} + +EAttachmentRule UGrabComponentKismetLibrary::GetAttachmentScaleRule(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetAttachmentScaleRule(); +} + +void UGrabComponentKismetLibrary::SetAttachmentScaleRule(USGGrabComponent* GrabComponent, + const EAttachmentRule InAttachmentScaleRule) +{ + GrabComponent->SetAttachmentScaleRule(InAttachmentScaleRule); +} + +bool UGrabComponentKismetLibrary::GetAttachmentWeldSimulatedBodies(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetAttachmentWeldSimulatedBodies(); +} + +void UGrabComponentKismetLibrary::SetAttachmentWeldSimulatedBodies(USGGrabComponent* GrabComponent, + const bool bInAttachmentWeldSimulatedBodies) +{ + GrabComponent->SetAttachmentWeldSimulatedBodies(bInAttachmentWeldSimulatedBodies); +} + +const FName& UGrabComponentKismetLibrary::GetAttachmentSocketName(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetAttachmentSocketName(); +} + +void UGrabComponentKismetLibrary::SetAttachmentSocketName(USGGrabComponent* GrabComponent, + const FName& InAttachmentSocketName) +{ + GrabComponent->SetAttachmentSocketName(InAttachmentSocketName); +} + +EDetachmentRule UGrabComponentKismetLibrary::GetDetachmentLocationRule(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetDetachmentLocationRule(); +} + +void UGrabComponentKismetLibrary::SetDetachmentLocationRule(USGGrabComponent* GrabComponent, + const EDetachmentRule InDetachmentLocationRule) +{ + GrabComponent->SetDetachmentLocationRule(InDetachmentLocationRule); +} + +EDetachmentRule UGrabComponentKismetLibrary::GetDetachmentRotationRule(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetDetachmentRotationRule(); +} + +void UGrabComponentKismetLibrary::SetDetachmentRotationRule(USGGrabComponent* GrabComponent, + const EDetachmentRule InDetachmentRotationRule) +{ + GrabComponent->SetDetachmentRotationRule(InDetachmentRotationRule); +} + +EDetachmentRule UGrabComponentKismetLibrary::GetDetachmentScaleRule(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetDetachmentScaleRule(); +} + +void UGrabComponentKismetLibrary::SetDetachmentScaleRule(USGGrabComponent* GrabComponent, + const EDetachmentRule InDetachmentScaleRule) +{ + GrabComponent->SetDetachmentScaleRule(InDetachmentScaleRule); +} + +bool UGrabComponentKismetLibrary::GetDetachmentInCallModify(const USGGrabComponent* GrabComponent) +{ + return GrabComponent->GetDetachmentInCallModify(); +} + +void UGrabComponentKismetLibrary::SetDetachmentInCallModify(USGGrabComponent* GrabComponent, + const bool bInDetachmentInCallModify) +{ + GrabComponent->SetDetachmentInCallModify(bInDetachmentInCallModify); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGHandTrackerComponentKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGHandTrackerComponentKismetLibrary.cpp new file mode 100644 index 0000000..b2d800e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGHandTrackerComponentKismetLibrary.cpp @@ -0,0 +1,74 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGHandTrackerComponentKismetLibrary.h" + +#include "SenseGlove/Components/SGHandTrackerComponent.h" + +bool UHandTrackerComponentKismetLibrary::IsLeft( + const USGHandTrackerComponent* HandTrackerComponent) +{ + return HandTrackerComponent->IsLeft(); +} + +bool UHandTrackerComponentKismetLibrary::IsRight( + const USGHandTrackerComponent* HandTrackerComponent) +{ + return HandTrackerComponent->IsRight(); +} + +void UHandTrackerComponentKismetLibrary::SetRight( + USGHandTrackerComponent* HandTrackerComponent, const bool bInRight) +{ + HandTrackerComponent->SetRight(bInRight); +} + +bool UHandTrackerComponentKismetLibrary::IsVisualized( + const USGHandTrackerComponent* HandTrackerComponent) +{ + return HandTrackerComponent->IsVisualized(); +} + +void UHandTrackerComponentKismetLibrary::SetVisualize( + USGHandTrackerComponent* HandTrackerComponent, const bool bInVisualize) +{ + HandTrackerComponent->SetVisualize(bInVisualize); +} + +const FXRHandTrackingState& UHandTrackerComponentKismetLibrary::GetHandTrackingState( + USGHandTrackerComponent* HandTrackerComponent) +{ + return HandTrackerComponent->GetHandTrackingState(); +} diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGHapticsComponentKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGHapticsComponentKismetLibrary.cpp new file mode 100644 index 0000000..8838028 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGHapticsComponentKismetLibrary.cpp @@ -0,0 +1,155 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGHapticsComponentKismetLibrary.h" + +#include "SenseGlove/Components/SGHapticsComponent.h" + +bool UHapticsComponentKismetLibrary::IsLeft( + const USGHapticsComponent* HapticsComponent) +{ + return HapticsComponent->IsLeft(); +} + +bool UHapticsComponentKismetLibrary::IsRight( + const USGHapticsComponent* HapticsComponent) +{ + return HapticsComponent->IsRight(); +} + +void UHapticsComponentKismetLibrary::SetRight( + USGHapticsComponent* HapticsComponent, const bool bInRight) +{ + HapticsComponent->SetRight(bInRight); +} + +bool UHapticsComponentKismetLibrary::AutoStopsAllHaptics( + const USGHapticsComponent* HapticsComponent) +{ + return HapticsComponent->AutoStopsAllHaptics(); +} + +void UHapticsComponentKismetLibrary::SetAutoStopAllHaptics( + USGHapticsComponent* HapticsComponent, const bool bInAutoStopAllHaptics) +{ + HapticsComponent->SetAutoStopAllHaptics(bInAutoStopAllHaptics); +} + +void UHapticsComponentKismetLibrary::StopHaptics( + USGHapticsComponent* HapticsComponent) +{ + HapticsComponent->StopHaptics(); +} + +void UHapticsComponentKismetLibrary::StopVibrations( + USGHapticsComponent* HapticsComponent) +{ + HapticsComponent->StopVibrations(); +} + +bool UHapticsComponentKismetLibrary::SendHaptics( + USGHapticsComponent* HapticsComponent) +{ + return HapticsComponent->SendHaptics(); +} + +bool UHapticsComponentKismetLibrary::SupportsCustomWaveform( + const USGHapticsComponent* HapticsComponent, + const ESGHapticLocation AtLocation) +{ + return HapticsComponent->SupportsCustomWaveform(AtLocation); +} + +bool UHapticsComponentKismetLibrary::SendCustomWaveform_OutWaveform_Location( + USGHapticsComponent* HapticsComponent, + USGCustomWaveform* OutWaveform, const ESGHapticLocation Location) +{ + return HapticsComponent->SendCustomWaveform(OutWaveform, Location); +} + +bool UHapticsComponentKismetLibrary::SendCustomWaveform_Amplitude_Duration_Location( + USGHapticsComponent* HapticsComponent, + const float Amplitude, const float Duration, const ESGHapticLocation Location) +{ + return HapticsComponent->SendCustomWaveform(Amplitude, Duration, Location); +} + +bool UHapticsComponentKismetLibrary::SendCustomWaveform_Amplitude_Duration_Frequency_Location( + USGHapticsComponent* HapticsComponent, + const float Amplitude, const float Duration, const float Frequency, const ESGHapticLocation Location) +{ + return HapticsComponent->SendCustomWaveform(Amplitude, Duration, Frequency, Location); +} + +bool UHapticsComponentKismetLibrary::QueueForceFeedbackLevels( + USGHapticsComponent* HapticsComponent, + const TArray& Levels01) +{ + return HapticsComponent->QueueForceFeedbackLevels(Levels01); +} + +bool UHapticsComponentKismetLibrary::QueueForceFeedbackLevel( + USGHapticsComponent* HapticsComponent, + const int32 Finger, const float Level01) +{ + return HapticsComponent->QueueForceFeedbackLevel(Finger, Level01); +} + +bool UHapticsComponentKismetLibrary::QueueVibroLevels( + USGHapticsComponent* HapticsComponent, + const TArray& Levels01) +{ + return HapticsComponent->QueueVibroLevels(Levels01); +} + +bool UHapticsComponentKismetLibrary::QueueVibroLevel( + USGHapticsComponent* HapticsComponent, + const ESGHapticLocation Location, const float Level01) +{ + return HapticsComponent->QueueVibroLevel(Location, Level01); +} + +bool UHapticsComponentKismetLibrary::SupportsWristSqueeze( + const USGHapticsComponent* HapticsComponent) +{ + return HapticsComponent->SupportsWristSqueeze(); +} + +bool UHapticsComponentKismetLibrary::QueueWristSqueeze( + USGHapticsComponent* HapticsComponent, + const float SqueezeLevel01, const bool bSendImmediate) +{ + return HapticsComponent->QueueWristSqueeze(SqueezeLevel01, bSendImmediate); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp new file mode 100644 index 0000000..a0aa540 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGPawnKismetLibrary.cpp @@ -0,0 +1,261 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGPawnKismetLibrary.h" + +#include "Camera/CameraComponent.h" +#include "Components/SphereComponent.h" +#include "Runtime/Launch/Resources/Version.h" +#include "XRDeviceVisualizationComponent.h" + +#include "SenseGlove/Components/SGVirtualHandComponent.h" +#include "SenseGlove/Components/SGWristTrackerComponent.h" +#include "SenseGlove/GameFramework/SGPawn.h" + +UCameraComponent* UPawnKismetLibrary::GetCamera(const ASGPawn* Pawn) +{ + return Pawn->GetCamera(); +} + +USGWristTrackerComponent* UPawnKismetLibrary::GetWristTrackerLeft(const ASGPawn* Pawn) +{ + return Pawn->GetWristTrackerLeft(); +} + +UXRDeviceVisualizationComponent* UPawnKismetLibrary::GetControllerVisualizerLeft(const ASGPawn* Pawn) +{ + return Pawn->GetControllerVisualizerLeft(); +} + +USGVirtualHandComponent* UPawnKismetLibrary::GetHandLeft(const ASGPawn* Pawn) +{ + return Pawn->GetHandLeft(); +} + +USGVirtualHandComponent* UPawnKismetLibrary::GetRealHandLeft(const ASGPawn* Pawn) +{ + return Pawn->GetHandLeft(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftThumbFingertipGrabCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftThumbFingertipGrabCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftIndexFingertipGrabCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftIndexFingertipGrabCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftMiddleFingertipGrabCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftMiddleFingertipGrabCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftThumbFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftThumbFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftIndexFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftIndexFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftMiddleFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftMiddleFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftRingFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftRingFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetLeftPinkyFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetLeftPinkyFingertipTouchCollider(); +} + +USGWristTrackerComponent* UPawnKismetLibrary::GetWristTrackerRight(const ASGPawn* Pawn) +{ + return Pawn->GetWristTrackerRight(); +} + +UXRDeviceVisualizationComponent* UPawnKismetLibrary::GetControllerVisualizerRight(const ASGPawn* Pawn) +{ + return Pawn->GetControllerVisualizerRight(); +} + +USGVirtualHandComponent* UPawnKismetLibrary::GetHandRight(const ASGPawn* Pawn) +{ + return Pawn->GetHandRight(); +} + +USGVirtualHandComponent* UPawnKismetLibrary::GetRealHandRight(const ASGPawn* Pawn) +{ + return Pawn->GetRealHandRight(); +} + +USphereComponent* UPawnKismetLibrary::GetRightThumbFingertipGrabCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightThumbFingertipGrabCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightIndexFingertipGrabCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightIndexFingertipGrabCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightMiddleFingertipGrabCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightMiddleFingertipGrabCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightThumbFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightThumbFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightIndexFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightIndexFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightMiddleFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightMiddleFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightRingFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightRingFingertipTouchCollider(); +} + +USphereComponent* UPawnKismetLibrary::GetRightPinkyFingertipTouchCollider(const ASGPawn* Pawn) +{ + return Pawn->GetRightPinkyFingertipTouchCollider(); +} + +bool UPawnKismetLibrary::CanLeftHandGrab(const ASGPawn* Pawn, const AActor* Actor) +{ + return Pawn->CanLeftHandGrab(Actor); +} + +bool UPawnKismetLibrary::IsLeftHandGrabbing_Actor(const ASGPawn* Pawn, const AActor* Actor) +{ + return Pawn->IsLeftHandGrabbing(Actor); +} + +bool UPawnKismetLibrary::IsLeftHandGrabbing_OutActor(const ASGPawn* Pawn, AActor*& OutActor) +{ + return Pawn->IsLeftHandGrabbing(OutActor); +} + +bool UPawnKismetLibrary::IsLeftHandGrabbing(const ASGPawn* Pawn) +{ + return Pawn->IsLeftHandGrabbing(); +} + +bool UPawnKismetLibrary::CanRightHandGrab(const ASGPawn* Pawn, const AActor* Actor) +{ + return Pawn->CanRightHandGrab(Actor); +} + +bool UPawnKismetLibrary::IsRightHandGrabbing_Actor(const ASGPawn* Pawn, const AActor* Actor) +{ + return Pawn->IsRightHandGrabbing(Actor); +} + +bool UPawnKismetLibrary::IsRightHandGrabbing_OutActor(const ASGPawn* Pawn) +{ + return Pawn->IsRightHandGrabbing(); +} + +bool UPawnKismetLibrary::IsRightHandGrabbing(const ASGPawn* Pawn, AActor*& OutActor) +{ + return Pawn->IsRightHandGrabbing(); +} + +bool UPawnKismetLibrary::CanGrab(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, const AActor* Actor) +{ + return Pawn->CanGrab(Hand, Actor); +} + +bool UPawnKismetLibrary::IsGrabbing_Actor(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, const AActor* Actor) +{ + return Pawn->IsGrabbing(Hand, Actor); +} + +bool UPawnKismetLibrary::IsGrabbing_OutActor(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, + AActor*& OutActor) +{ + return Pawn->IsGrabbing(Hand, OutActor); +} + +bool UPawnKismetLibrary::IsGrabbing(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand) +{ + return Pawn->IsGrabbing(Hand); +} + +void UPawnKismetLibrary::GrabLeft(ASGPawn* Pawn, AActor* Actor) +{ + Pawn->GrabLeft(Actor); +} + +void UPawnKismetLibrary::GrabRight(ASGPawn* Pawn, AActor* Actor) +{ + Pawn->GrabRight(Actor); +} + +void UPawnKismetLibrary::Grab(ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor) +{ + Pawn->Grab(Hand, Actor); +} + +void UPawnKismetLibrary::ReleaseLeft(ASGPawn* Pawn) +{ + Pawn->ReleaseLeft(); +} + +void UPawnKismetLibrary::ReleaseRight(ASGPawn* Pawn) +{ + Pawn->ReleaseRight(); +} + +void UPawnKismetLibrary::Release(ASGPawn* Pawn, const USGVirtualHandComponent* Hand) +{ + Pawn->Release(Hand); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGTouchComponentKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGTouchComponentKismetLibrary.cpp new file mode 100644 index 0000000..9b178db --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGTouchComponentKismetLibrary.cpp @@ -0,0 +1,91 @@ + +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * A data class containing the minimum required data for a hand's forward + * kinematics. + * Used in both kinematics and calibration. + */ + + +#include "SGKismet/SGTouchComponentKismetLibrary.h" + +#include "SenseGlove/Components/SGTouchComponent.h" + +USGTouchComponent* UTouchComponentKismetLibrary::GetTouchComponent(const AActor* Actor) +{ + return USGTouchComponent::GetTouchComponent(Actor); +} + +bool UTouchComponentKismetLibrary::IsTouchable(const AActor* Actor) +{ + return USGTouchComponent::IsTouchable(Actor); +} + +int32 UTouchComponentKismetLibrary::GetForceFeedbackLevel(const USGTouchComponent* TouchComponent) +{ + return TouchComponent->GetForceFeedbackLevel(); +} + +void UTouchComponentKismetLibrary::SetForceFeedbackLevel(USGTouchComponent* TouchComponent, const float Level) +{ + TouchComponent->SetForceFeedbackLevel(Level); +} + +float UTouchComponentKismetLibrary::GetVibrotactileAmplitude(const USGTouchComponent* TouchComponent) +{ + return TouchComponent->GetVibrotactileAmplitude(); +} + +void UTouchComponentKismetLibrary::SetVibrotactileAmplitude(USGTouchComponent* TouchComponent, const float Amplitude) +{ + TouchComponent->SetVibrotactileAmplitude(Amplitude); +} + +float UTouchComponentKismetLibrary::GetVibrotactileDuration(const USGTouchComponent* TouchComponent) +{ + return TouchComponent->GetVibrotactileDuration(); +} + +void UTouchComponentKismetLibrary::SetVibrotactileDuration(USGTouchComponent* TouchComponent, const float Duration) +{ + TouchComponent->SetVibrotactileDuration(Duration); +} + +float UTouchComponentKismetLibrary::GetVibrotactileFrequency(const USGTouchComponent* TouchComponent) +{ + return TouchComponent->GetVibrotactileFrequency(); +} + +void UTouchComponentKismetLibrary::SetVibrotactileFrequency(USGTouchComponent* TouchComponent, const float Frequency) +{ + TouchComponent->SetVibrotactileFrequency(Frequency); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGVirtualHandComponentKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGVirtualHandComponentKismetLibrary.cpp new file mode 100644 index 0000000..347f8e6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGVirtualHandComponentKismetLibrary.cpp @@ -0,0 +1,159 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGVirtualHandComponentKismetLibrary.h" + +#include "SenseGlove/Components/SGVirtualHandComponent.h" +#include "SGCore/SGHapticGlove.h" + +const TArray& UVirtualHandComponentKismetLibrary::GetLeftHandBoneNames() +{ + return USGVirtualHandComponent::GetLeftHandBoneNames(); +} + +const TArray& UVirtualHandComponentKismetLibrary::GetRightHandBoneNames() +{ + return USGVirtualHandComponent::GetRightHandBoneNames(); +} + +const FName& UVirtualHandComponentKismetLibrary::GetLeftHandBoneName(const int32 Joint) +{ + return USGVirtualHandComponent::GetLeftHandBoneName(Joint); +} + +const FName& UVirtualHandComponentKismetLibrary::GetRightHandBoneName(const int32 Joint) +{ + return USGVirtualHandComponent::GetRightHandBoneName(Joint); +} + +bool UVirtualHandComponentKismetLibrary::IsLeft(const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->IsLeft(); +} + +bool UVirtualHandComponentKismetLibrary::IsRight(const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->IsRight(); +} + +void UVirtualHandComponentKismetLibrary::SetRight( + USGVirtualHandComponent* VirtualHandComponent, const bool bInRight) +{ + VirtualHandComponent->SetRight(bInRight); +} + +bool UVirtualHandComponentKismetLibrary::OverridesPluginVirtualHandSettings( + const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->OverridesPluginVirtualHandSettings(); +} + +const FSGVirtualHandSettingsOverrides& UVirtualHandComponentKismetLibrary::GetVirtualHandSettingsOverrides( + const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->GetVirtualHandSettingsOverrides(); +} + +void UVirtualHandComponentKismetLibrary::SetVirtualHandSettingsOverrides( + USGVirtualHandComponent* VirtualHandComponent, + const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides) +{ + VirtualHandComponent->SetVirtualHandSettingsOverrides(InVirtualHandSettingsOverrides); +} + +FSGVirtualHandSettings UVirtualHandComponentKismetLibrary::GetVirtualHandSettings( + const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->GetVirtualHandSettings(); +} + +bool UVirtualHandComponentKismetLibrary::IsGloveConnected(const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->IsGloveConnected(); +} + +USGHapticGlove* UVirtualHandComponentKismetLibrary::GetConnectedGlove( + const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->GetConnectedGlove(); +} + +const FXRHandTrackingState& UVirtualHandComponentKismetLibrary::GetHandTrackingState( + USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->GetHandTrackingState(); +} + +const TArray& UVirtualHandComponentKismetLibrary::GetHandBoneNames( + const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->GetHandBoneNames(); +} + +const FName& UVirtualHandComponentKismetLibrary::GetHandBoneName( + const USGVirtualHandComponent* VirtualHandComponent, const int32 Joint) +{ + return VirtualHandComponent->GetHandBoneName(Joint); +} + +const FTransform& UVirtualHandComponentKismetLibrary::GetHandBoneRefTransform_BN( + const USGVirtualHandComponent* VirtualHandComponent, const FName& BoneName) +{ + return VirtualHandComponent->GetHandBoneRefTransform(BoneName); +} + +const FTransform& UVirtualHandComponentKismetLibrary::GetHandBoneRefTransform_J( + const USGVirtualHandComponent* VirtualHandComponent, const int32 Joint) +{ + return VirtualHandComponent->GetHandBoneRefTransform(Joint); +} + +const FTransform& UVirtualHandComponentKismetLibrary::GetHandRootBoneRefTransform( + const USGVirtualHandComponent* VirtualHandComponent) +{ + return VirtualHandComponent->GetHandRootBoneRefTransform(); +} + +FRotator UVirtualHandComponentKismetLibrary::GetHandBoneRefRotation_BN( + const USGVirtualHandComponent* VirtualHandComponent, const FName& BoneName) +{ + return VirtualHandComponent->GetHandBoneRefRotation(BoneName); +} + +FRotator UVirtualHandComponentKismetLibrary::GetHandBoneRefRotation_J( + const USGVirtualHandComponent* VirtualHandComponent, const int32 Joint) +{ + return VirtualHandComponent->GetHandBoneRefRotation(Joint); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGWristTrackerComponentKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGWristTrackerComponentKismetLibrary.cpp new file mode 100644 index 0000000..7e4e9f5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SGKismet/SGWristTrackerComponentKismetLibrary.cpp @@ -0,0 +1,97 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGWristTrackerComponentKismetLibrary.h" + +#include "SenseGlove/Components/SGWristTrackerComponent.h" + +bool UWristTrackerComponentKismetLibrary::IsLeft(const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->IsLeft(); +} + +bool UWristTrackerComponentKismetLibrary::IsRight(const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->IsRight(); +} + +void UWristTrackerComponentKismetLibrary::SetRight( + USGWristTrackerComponent* WristTrackerComponent, const bool bInRight) +{ + WristTrackerComponent->SetRight(bInRight); +} + +bool UWristTrackerComponentKismetLibrary::OverridesPluginWristTrackingSettings( + const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->OverridesPluginWristTrackingSettings(); +} + +const FSGWristTrackingSettingsOverrides& UWristTrackerComponentKismetLibrary::GetWristTrackingSettingsOverrides( + const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->GetWristTrackingSettingsOverrides(); +} + +void UWristTrackerComponentKismetLibrary::SetWristTrackingSettingsOverrides( + USGWristTrackerComponent* WristTrackerComponent, + const FSGWristTrackingSettingsOverrides& InWristTrackingSettingsOverrides) +{ + WristTrackerComponent->SetWristTrackingSettingsOverrides(InWristTrackingSettingsOverrides); +} + +FSGWristTrackingSettings UWristTrackerComponentKismetLibrary::GetWristTrackingSettings( + const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->GetWristTrackingSettings(); +} + +const FVector& UWristTrackerComponentKismetLibrary::GetWristLocation( + const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->GetWristLocation(); +} + +const FRotator& UWristTrackerComponentKismetLibrary::GetWristRotation( + const USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->GetWristRotation(); +} + +const FXRHandTrackingState& UWristTrackerComponentKismetLibrary::GetHandTrackingState( + USGWristTrackerComponent* WristTrackerComponent) +{ + return WristTrackerComponent->GetHandTrackingState(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismet.cpp new file mode 100644 index 0000000..679a9c6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveKismetModule, SenseGloveKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismet.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismet.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismetModule.cpp new file mode 100644 index 0000000..865dee9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismetModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveKismetModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveKismetModule" + +void FSenseGloveKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveKismet module..."); +} + +void FSenseGloveKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveKismet module..."); +} + +void FSenseGloveKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveKismet module has succeeded!"); +} + +void FSenseGloveKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismetModule.h new file mode 100644 index 0000000..24e2b81 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Private/SenseGloveKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveKismet" + +class FSenseGloveKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGBlueprintFunctionLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGBlueprintFunctionLibrary.h new file mode 100644 index 0000000..b6fc034 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGBlueprintFunctionLibrary.h @@ -0,0 +1,50 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Kismet/BlueprintFunctionLibrary.h" + +#include "SGBlueprintFunctionLibrary.generated.h" + +/** + * This class is a base class for any function libraries exposed to blueprints. + * Methods in subclasses are expected to be static, and no methods should be added to this base class. + */ +UCLASS(Abstract) +class SENSEGLOVEKISMET_API USGBlueprintFunctionLibrary : public UBlueprintFunctionLibrary +{ + GENERATED_BODY() +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGGameUserSettingsKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGGameUserSettingsKismetLibrary.h new file mode 100644 index 0000000..7293b76 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGGameUserSettingsKismetLibrary.h @@ -0,0 +1,57 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGTypes.h" + +#include "SGGameUserSettingsKismetLibrary.generated.h" + +class USGGameUserSettings; + +UCLASS(meta=(ScriptName = "SenseGloveGameUserSettingsKismetLibrary")) +class SENSEGLOVEKISMET_API USGGameUserSettingsKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Game User Settings") + static ESGEngineScalabilitySettings GetEngineScalabilitySettings(const USGGameUserSettings* GameUserSettings); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Game User Settings") + static void SetEngineScalabilitySettings(UPARAM(ref) USGGameUserSettings* GameUserSettings, + ESGEngineScalabilitySettings Scalability); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGGrabComponentKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGGrabComponentKismetLibrary.h new file mode 100644 index 0000000..5262baf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGGrabComponentKismetLibrary.h @@ -0,0 +1,120 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGGrabComponentKismetLibrary.generated.h" + +class AActor; + +class USGGrabComponent; + +UCLASS(meta=(ScriptName = "SenseGloveGrabComponentKismetLibrary")) +class SENSEGLOVEKISMET_API UGrabComponentKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static USGGrabComponent* GetGrabComponent(const AActor* Actor); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static bool IsGrabbable(const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static EAttachmentRule GetAttachmentLocationRule(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetAttachmentLocationRule(UPARAM(ref) USGGrabComponent* GrabComponent, + EAttachmentRule InAttachmentLocationRule); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static EAttachmentRule GetAttachmentRotationRule(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetAttachmentRotationRule(UPARAM(ref) USGGrabComponent* GrabComponent, + EAttachmentRule InAttachmentRotationRule); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static EAttachmentRule GetAttachmentScaleRule(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetAttachmentScaleRule(UPARAM(ref) USGGrabComponent* GrabComponent, + EAttachmentRule InAttachmentScaleRule); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static bool GetAttachmentWeldSimulatedBodies(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetAttachmentWeldSimulatedBodies(UPARAM(ref) USGGrabComponent* GrabComponent, + bool bInAttachmentWeldSimulatedBodies); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static const FName& GetAttachmentSocketName(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetAttachmentSocketName(UPARAM(ref) USGGrabComponent* GrabComponent, + const FName& InAttachmentSocketName); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static EDetachmentRule GetDetachmentLocationRule(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetDetachmentLocationRule(UPARAM(ref) USGGrabComponent* GrabComponent, + EDetachmentRule InDetachmentLocationRule); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static EDetachmentRule GetDetachmentRotationRule(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetDetachmentRotationRule(UPARAM(ref) USGGrabComponent* GrabComponent, + EDetachmentRule InDetachmentRotationRule); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static EDetachmentRule GetDetachmentScaleRule(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetDetachmentScaleRule(UPARAM(ref) USGGrabComponent* GrabComponent, + EDetachmentRule InDetachmentScaleRule); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Grab Component") + static bool GetDetachmentInCallModify(const USGGrabComponent* GrabComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Grab Component") + static void SetDetachmentInCallModify(UPARAM(ref) USGGrabComponent* GrabComponent, + bool bInDetachmentInCallModify); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGHandTrackerComponentKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGHandTrackerComponentKismetLibrary.h new file mode 100644 index 0000000..4664166 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGHandTrackerComponentKismetLibrary.h @@ -0,0 +1,70 @@ +/** +* @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGHandTrackerComponentKismetLibrary.generated.h" + +class AActor; + +class USGHandTrackerComponent; + +UCLASS(meta=(ScriptName = "SenseGloveHandTrackerComponentKismetLibrary")) +class SENSEGLOVEKISMET_API UHandTrackerComponentKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Hand Tracker Component") + static bool IsLeft(const USGHandTrackerComponent* HandTrackerComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Hand Tracker Component") + static bool IsRight(const USGHandTrackerComponent* HandTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Hand Tracker Component") + static void SetRight(UPARAM(ref) USGHandTrackerComponent* HandTrackerComponent, bool bInRight); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Hand Tracker Component") + static bool IsVisualized(const USGHandTrackerComponent* HandTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Hand Tracker Component") + static void SetVisualize(UPARAM(ref) USGHandTrackerComponent* HandTrackerComponent, bool bInVisualize); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Hand Tracker Component") + static const FXRHandTrackingState& GetHandTrackingState( + UPARAM(ref) USGHandTrackerComponent* HandTrackerComponent); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGHapticsComponentKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGHapticsComponentKismetLibrary.h new file mode 100644 index 0000000..4fccbcc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGHapticsComponentKismetLibrary.h @@ -0,0 +1,202 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGHapticsComponentKismetLibrary.generated.h" + +class AActor; + +class USGCustomWaveform; +class USGHapticsComponent; + +UCLASS(meta=(ScriptName = "SenseGloveHapticsComponentKismetLibrary")) +class SENSEGLOVEKISMET_API UHapticsComponentKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Haptics Component") + static bool IsLeft(const USGHapticsComponent* HapticsComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Haptics Component") + static bool IsRight(const USGHapticsComponent* HapticsComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static void SetRight(UPARAM(ref) USGHapticsComponent* HapticsComponent, bool bInRight); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Haptics Component") + static bool AutoStopsAllHaptics(const USGHapticsComponent* HapticsComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static void SetAutoStopAllHaptics(UPARAM(ref) USGHapticsComponent* HapticsComponent, bool bInAutoStopAllHaptics); + + /** + * Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when restarting the + * level. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static void StopHaptics(UPARAM(ref) USGHapticsComponent* HapticsComponent); + + /** + * Stops only vibrations. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static void StopVibrations(UPARAM(ref) USGHapticsComponent* HapticsComponent); + + /** + * Take all active commands in the device queue, compile them into one and send them to the device. + * + * @return Returns true if the message was successfully sent to SenseCom. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static bool SendHaptics(UPARAM(ref) USGHapticsComponent* HapticsComponent); + + /** + * Returns true if the haptic glove supports vibration feedback at the specified location. + * + * @param AtLocation + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Haptics Component") + static bool SupportsCustomWaveform(const USGHapticsComponent* HapticsComponent, + ESGHapticLocation AtLocation); + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param OutWaveform + * @param Location + */ + UFUNCTION(BlueprintCallable, DisplayName="Send Custom Waveform", + Category="SenseGlove | Components | Haptics Component") + static bool SendCustomWaveform_OutWaveform_Location( + UPARAM(ref) USGHapticsComponent* HapticsComponent, + USGCustomWaveform* OutWaveform, ESGHapticLocation Location); + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param Amplitude + * @param Duration + * @param Location + */ + UFUNCTION(BlueprintCallable, DisplayName="Send Custom Waveform", + Category="SenseGlove | Components | Haptics Component") + static bool SendCustomWaveform_Amplitude_Duration_Location( + UPARAM(ref) USGHapticsComponent* HapticsComponent, + float Amplitude, float Duration, ESGHapticLocation Location); + + /** + * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support + * custom waveforms. + * + * @param Amplitude + * @param Duration + * @param Frequency + * @param Location + */ + UFUNCTION(BlueprintCallable, DisplayName="Send Custom Waveform", + Category="SenseGlove | Components | Haptics Component") + static bool SendCustomWaveform_Amplitude_Duration_Frequency_Location( + UPARAM(ref) USGHapticsComponent* HapticsComponent, + float Amplitude, float Duration, float Frequency, ESGHapticLocation Location); + + /** + * Queue a list of force-feedback levels, between 0.0f and 1.0f. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the Force-Feedback levels, from 0.0f (no FFB) to 1.0f. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static bool QueueForceFeedbackLevels(UPARAM(ref) USGHapticsComponent* HapticsComponent, + const TArray& Levels01); + + /** + * Set the Force-Feedback value of a particular finger to a specific level + * + * @param Level01 Value will be clamped between [0...1], where 0.0f means no Force-Feedback, and 1.0 means full + * force-feedback. + * @param Finger The finger to which to send the command. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static bool QueueForceFeedbackLevel(UPARAM(ref) USGHapticsComponent* HapticsComponent, + int32 Finger, float Level01); + + /** + * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky. + * + * @param Levels01 Array containing the vibration levels, from 0.0 (no vibration) to 1.0. A value < 0.0f will be + * ignored. + * + * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static bool QueueVibroLevels(UPARAM(ref) USGHapticsComponent* HapticsComponent, + const TArray& Levels01); + + /** + * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude. + * + * @param Location + * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full + * vibration. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static bool QueueVibroLevel(UPARAM(ref) USGHapticsComponent* HapticsComponent, + ESGHapticLocation Location, float Level01); + + /** + * Returns true if the chosen glove supports active contact feedback on the Wrist. + */ + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Haptics Component") + static bool SupportsWristSqueeze(const USGHapticsComponent* HapticsComponent); + + /** + * Queue a command to set the amount of squeeze level (a.k.a. squeeze-feedback) to the desired level + * (0 = no squeeze, 1 = full squeeze) on the wrist, and optionally send it right away. + * + * @param SqueezeLevel01 + * @param bSendImmediate + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Haptics Component") + static bool QueueWristSqueeze(UPARAM(ref) USGHapticsComponent* HapticsComponent, + float SqueezeLevel01, bool bSendImmediate); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h new file mode 100644 index 0000000..ce6eb51 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGPawnKismetLibrary.h @@ -0,0 +1,191 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Rotator.h" +#include "Math/Transform.h" +#include "UObject/NameTypes.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGPawnKismetLibrary.generated.h" + +class UCameraComponent; +class USphereComponent; +class UXRDeviceVisualizationComponent; + +class ASGPawn; +class USGVirtualHandComponent; +class USGWristTrackerComponent; + +UCLASS(meta=(ScriptName = "SenseGlovePawnKismetLibrary")) +class SENSEGLOVEKISMET_API UPawnKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static UCameraComponent* GetCamera(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USGWristTrackerComponent* GetWristTrackerLeft(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static UXRDeviceVisualizationComponent* GetControllerVisualizerLeft(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USGVirtualHandComponent* GetHandLeft(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USGVirtualHandComponent* GetRealHandLeft(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftThumbFingertipGrabCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftIndexFingertipGrabCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftMiddleFingertipGrabCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftThumbFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftIndexFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftMiddleFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftRingFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetLeftPinkyFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USGWristTrackerComponent* GetWristTrackerRight(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static UXRDeviceVisualizationComponent* GetControllerVisualizerRight(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USGVirtualHandComponent* GetHandRight(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USGVirtualHandComponent* GetRealHandRight(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightThumbFingertipGrabCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightIndexFingertipGrabCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightMiddleFingertipGrabCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightThumbFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightIndexFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightMiddleFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightRingFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static USphereComponent* GetRightPinkyFingertipTouchCollider(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool CanLeftHandGrab(const ASGPawn* Pawn, const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsLeftHandGrabbing_Actor(const ASGPawn* Pawn, const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsLeftHandGrabbing_OutActor(const ASGPawn* Pawn, AActor*& OutActor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsLeftHandGrabbing(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool CanRightHandGrab(const ASGPawn* Pawn, const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsRightHandGrabbing_Actor(const ASGPawn* Pawn, const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsRightHandGrabbing_OutActor(const ASGPawn* Pawn); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsRightHandGrabbing(const ASGPawn* Pawn, AActor*& OutActor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool CanGrab(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsGrabbing_Actor(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsGrabbing_OutActor(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand, AActor*& OutActor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Game Framework | Pawn") + static bool IsGrabbing(const ASGPawn* Pawn, const USGVirtualHandComponent* Hand); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") + static void GrabLeft(UPARAM(ref) ASGPawn* Pawn, AActor* Actor); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") + static void GrabRight(UPARAM(ref) ASGPawn* Pawn, AActor* Actor); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") + void Grab(UPARAM(ref) ASGPawn* Pawn, USGVirtualHandComponent* Hand, AActor* Actor); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") + void ReleaseLeft(UPARAM(ref) ASGPawn* Pawn); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") + void ReleaseRight(UPARAM(ref) ASGPawn* Pawn); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Game Framework | Pawn") + static void Release(UPARAM(ref) ASGPawn* Pawn, const USGVirtualHandComponent* Hand); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGTouchComponentKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGTouchComponentKismetLibrary.h new file mode 100644 index 0000000..b378b55 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGTouchComponentKismetLibrary.h @@ -0,0 +1,81 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGTouchComponentKismetLibrary.generated.h" + +class AActor; + +class USGTouchComponent; + +UCLASS(meta=(ScriptName = "SenseGloveTouchComponentKismetLibrary")) +class SENSEGLOVEKISMET_API UTouchComponentKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component") + static USGTouchComponent* GetTouchComponent(const AActor* Actor); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component") + static bool IsTouchable(const AActor* Actor); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Touch Component") + static int32 GetForceFeedbackLevel(const USGTouchComponent* TouchComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component") + static void SetForceFeedbackLevel(UPARAM(ref) USGTouchComponent* TouchComponent, float Level); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Touch Component") + static float GetVibrotactileAmplitude(const USGTouchComponent* TouchComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component") + static void SetVibrotactileAmplitude(UPARAM(ref) USGTouchComponent* TouchComponent, float Amplitude); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Touch Component") + static float GetVibrotactileDuration(const USGTouchComponent* TouchComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component") + static void SetVibrotactileDuration(UPARAM(ref) USGTouchComponent* TouchComponent, float Duration); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Touch Component") + static float GetVibrotactileFrequency(const USGTouchComponent* TouchComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Touch Component") + static void SetVibrotactileFrequency(UPARAM(ref) USGTouchComponent* TouchComponent, float Frequency); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGVirtualHandComponentKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGVirtualHandComponentKismetLibrary.h new file mode 100644 index 0000000..a744824 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGVirtualHandComponentKismetLibrary.h @@ -0,0 +1,138 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "Math/Rotator.h" +#include "Math/Transform.h" +#include "UObject/NameTypes.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGSettings/SGVirtualHandSettings.h" +#include "SGSettings/SGVirtualHandSettingsOverrides.h" + +#include "SGVirtualHandComponentKismetLibrary.generated.h" + +class USkeletalMeshComponent; + +class USGHandPose; +class USGHapticGlove; +class USGVirtualHandComponent; + +UCLASS(meta=(ScriptName = "SenseGloveVirtualHandComponentKismetLibrary")) +class SENSEGLOVEKISMET_API UVirtualHandComponentKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static const TArray& GetLeftHandBoneNames(); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static const TArray& GetRightHandBoneNames(); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static const FName& GetLeftHandBoneName(int32 Joint); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static const FName& GetRightHandBoneName(int32 Joint); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static bool IsLeft(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static bool IsRight(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static void SetRight(UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, bool bInRight); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static bool OverridesPluginVirtualHandSettings(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static const FSGVirtualHandSettingsOverrides& GetVirtualHandSettingsOverrides( + const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static void SetVirtualHandSettingsOverrides( + UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent, + const FSGVirtualHandSettingsOverrides& InVirtualHandSettingsOverrides); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static FSGVirtualHandSettings GetVirtualHandSettings(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static bool IsGloveConnected(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static USGHapticGlove* GetConnectedGlove(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Virtual Hand Component") + static const FXRHandTrackingState& GetHandTrackingState( + UPARAM(ref) USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static const TArray& GetHandBoneNames(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static const FName& GetHandBoneName(const USGVirtualHandComponent* VirtualHandComponent, + int32 Joint); + + UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Transform", + Category="SenseGlove | Components | Virtual Hand Component") + static const FTransform& GetHandBoneRefTransform_BN(const USGVirtualHandComponent* VirtualHandComponent, + const FName& BoneName); + + UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Transform", + Category="SenseGlove | Components | Virtual Hand Component") + static const FTransform& GetHandBoneRefTransform_J(const USGVirtualHandComponent* VirtualHandComponent, + int32 Joint); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Virtual Hand Component") + static const FTransform& GetHandRootBoneRefTransform(const USGVirtualHandComponent* VirtualHandComponent); + + UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Rotation", + Category="SenseGlove | Components | Virtual Hand Component") + static FRotator GetHandBoneRefRotation_BN(const USGVirtualHandComponent* VirtualHandComponent, + const FName& BoneName); + + UFUNCTION(BlueprintPure, DisplayName="Get Hand Bone Ref Rotation", + Category="SenseGlove | Components | Virtual Hand Component") + static FRotator GetHandBoneRefRotation_J(const USGVirtualHandComponent* VirtualHandComponent, + int32 Joint); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGWristTrackerComponentKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGWristTrackerComponentKismetLibrary.h new file mode 100644 index 0000000..85757dd --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/Public/SGKismet/SGWristTrackerComponentKismetLibrary.h @@ -0,0 +1,89 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGSettings/SGWristTrackingSettings.h" +#include "SGSettings/SGWristTrackingSettingsOverrides.h" + +#include "SGWristTrackerComponentKismetLibrary.generated.h" + +class USkeletalMeshComponent; + +class USGWristTrackerComponent; + +UCLASS(meta=(ScriptName = "SenseGloveWristTrackerComponentKismetLibrary")) +class SENSEGLOVEKISMET_API UWristTrackerComponentKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Wrist Tracker Component") + static bool IsLeft(const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Wrist Tracker Component") + static bool IsRight(const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Wrist Tracker Component") + static void SetRight(UPARAM(ref) USGWristTrackerComponent* WristTrackerComponent, bool bInRight); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Wrist Tracker Component") + static bool OverridesPluginWristTrackingSettings(const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Wrist Tracker Component") + static const FSGWristTrackingSettingsOverrides& GetWristTrackingSettingsOverrides( + const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Wrist Tracker Component") + static void SetWristTrackingSettingsOverrides( + UPARAM(ref) USGWristTrackerComponent* WristTrackerComponent, + const FSGWristTrackingSettingsOverrides& InWristTrackingSettingsOverrides); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Components | Wrist Tracker Component") + static FSGWristTrackingSettings GetWristTrackingSettings(const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Wrist Tracker Component") + static const FVector& GetWristLocation(const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Wrist Tracker Component") + static const FRotator& GetWristRotation(const USGWristTrackerComponent* WristTrackerComponent); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Components | Wrist Tracker Component") + static const FXRHandTrackingState& GetHandTrackingState( + UPARAM(ref) USGWristTrackerComponent* WristTrackerComponent); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveKismet/SenseGloveKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveKismet/SenseGloveKismet.Build.cs new file mode 100644 index 0000000..8703df9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveKismet/SenseGloveKismet.Build.cs @@ -0,0 +1,68 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveKismet : ModuleRules +{ + public SenseGloveKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "HeadMountedDisplay", + "XRBase", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGlove", + "SenseGloveCore", + "SenseGloveLog", + "SenseGloveSettings", + "SenseGloveTypes", + "SenseGloveUtils", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/Private/SGLog/SGLog.cpp b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SGLog/SGLog.cpp new file mode 100644 index 0000000..26f7209 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SGLog/SGLog.cpp @@ -0,0 +1,284 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGLog/SGLog.h" + +#include "Containers/Map.h" +#include "Logging/LogMacros.h" +#include "Templates/Atomic.h" + +DEFINE_LOG_CATEGORY(LogEditor) +DEFINE_LOG_CATEGORY(LogGeneric) + +struct FSGLogCore::FStaticImpl +{ + /************************ + * Type definitions + ************************/ + + struct VerbosityMapper + { + FString Tag; + FColor Color; + + VerbosityMapper(const FString& InTag, const FColor& InColor); + }; + + /************************ + * Member variables + ************************/ + + TMap VerbosityMap; + + TAtomic bInitialized; + + /************************ + * Constructor / Destructor + ************************/ + + FStaticImpl(); + ~FStaticImpl(); +}; + +struct FSGLogCore::FImpl +{ + /************************ + * Member variables + ************************/ + + FSGLogCore::EVerbosity Verbosity; + FSGLogCore::ECategory Category; + FString File; + FString Function; + FString Line; + + /************************ + * Constructor / Destructor + ************************/ + + FImpl(); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + +TUniquePtr FSGLogCore::SPimpl{ + new FStaticImpl{}, FStaticImplDeleter() +}; + +FSGLogCore::FSGLogCore(const EVerbosity& Verbosity, const ECategory& Category, const std::string& File, + const std::string& Function, const int32 Line) + : Pimpl(TUniquePtr(new FImpl{}, PimplDeleter)), + bAnyEntries(false) +{ +#if defined ( SENSEGLOVE_LOGGING ) + if (!SPimpl->bInitialized) + { + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::Fatal, + FStaticImpl::VerbosityMapper(TEXT("FATAL"), FColor::White)); + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::Error, + FStaticImpl::VerbosityMapper(TEXT("ERROR"), FColor::Red)); + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::Warning, + FStaticImpl::VerbosityMapper(TEXT("WARNING"), FColor::Yellow)); + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::Display, + FStaticImpl::VerbosityMapper(TEXT("DISPLAY"), FColor::Green)); + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::Log, + FStaticImpl::VerbosityMapper(TEXT("LOG"), FColor::Silver)); + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::Verbose, + FStaticImpl::VerbosityMapper(TEXT("VERBOSE"), FColor::Purple)); + SPimpl->VerbosityMap.Add(FSGLogCore::EVerbosity::VeryVerbose, + FStaticImpl::VerbosityMapper(TEXT("VERY_VERBOSE"), FColor::Magenta)); + + SPimpl->bInitialized = true; + } + + Pimpl->Verbosity = Verbosity; + Pimpl->Category = Category; + Pimpl->File = FString(StringCast(File.c_str()).Get()); + Pimpl->Function = FString(StringCast(Function.c_str()).Get()); + Pimpl->Line = FString::FromInt(Line); +#endif /* defined ( SENSEGLOVE_LOGGING ) */ +} + +FSGLogCore::~FSGLogCore() +{ +#if defined ( SENSEGLOVE_LOGGING ) + const EVerbosity& Verbosity = Pimpl->Verbosity; + const ECategory& Category = Pimpl->Category; + const FStaticImpl::VerbosityMapper& VerbosityMapper = SPimpl->VerbosityMap[Verbosity]; + const FString& Tag = VerbosityMapper.Tag; + const FColor& Color = VerbosityMapper.Color; + + const FString Message(FString::Printf(TEXT("[%s %s %s %s] %s"), Tag.GetCharArray().GetData(), + Pimpl->File.GetCharArray().GetData(), + Pimpl->Function.GetCharArray().GetData(), + Pimpl->Line.GetCharArray().GetData(), Buffer.GetCharArray().GetData())); + + // Generic + if (Category == ECategory::Generic) + { + switch (Verbosity) + { + case EVerbosity::Display: + { + UE_LOG(LogGeneric, Display, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Error: + { + UE_LOG(LogGeneric, Error, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Fatal: + { + UE_LOG(LogGeneric, Fatal, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Log: + { + UE_LOG(LogGeneric, Log, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Verbose: + { + UE_LOG(LogGeneric, Verbose, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::VeryVerbose: + { + UE_LOG(LogGeneric, VeryVerbose, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Warning: + { + UE_LOG(LogGeneric, Warning, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + } + } + + // Editor + if (Category == ECategory::Editor) + { + switch (Verbosity) + { + case EVerbosity::Display: + { + UE_LOG(LogEditor, Display, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Error: + { + UE_LOG(LogEditor, Error, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Fatal: + { + UE_LOG(LogEditor, Fatal, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Log: + { + UE_LOG(LogEditor, Log, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Verbose: + { + UE_LOG(LogEditor, Verbose, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::VeryVerbose: + { + UE_LOG(LogEditor, VeryVerbose, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + + case EVerbosity::Warning: + { + UE_LOG(LogEditor, Warning, TEXT("%s"), Message.GetCharArray().GetData()); + } + break; + } + } +#endif /* defined ( SENSEGLOVE_LOGGING ) */ +} + +FSGLogCore::FStaticImpl::FStaticImpl() + : bInitialized(false) +{ +} + +FSGLogCore::FStaticImpl::~FStaticImpl() = default; + +FSGLogCore::FStaticImpl::VerbosityMapper::VerbosityMapper(const FString& InTag, + const FColor& InColor) + : Tag(InTag), + Color(InColor) +{ +} + +void FSGLogCore::FStaticImplDeleter::operator()(const FSGLogCore::FStaticImpl* Pointer) const +{ + delete Pointer; +} + +FSGLogCore::FImpl::FImpl() + : Verbosity(EVerbosity::Verbose), + Category(ECategory::Generic) +{ +} + +FSGLogCore::FImpl::~FImpl() = default; + +void FSGLogCore::FImplDeleter::operator()(const FSGLogCore::FImpl* Pointer) const +{ + delete Pointer; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLog.cpp b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLog.cpp new file mode 100644 index 0000000..8264987 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLog.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveLog.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveLogModule.h" + +IMPLEMENT_MODULE(FSenseGloveLogModule, SenseGloveLog); diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLog.h b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLog.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLog.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLogModule.cpp b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLogModule.cpp new file mode 100644 index 0000000..b800ff1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLogModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveLogModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveLogModule" + +void FSenseGloveLogModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveLog module..."); +} + +void FSenseGloveLogModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveLog module..."); +} + +void FSenseGloveLogModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveLog module has succeeded!"); +} + +void FSenseGloveLogModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveLog module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLogModule.h b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLogModule.h new file mode 100644 index 0000000..33732db --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/Private/SenseGloveLogModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveLog" + +class FSenseGloveLogModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/Public/SGLog/SGLog.h b/Plugins/SenseGlove/Source/SenseGloveLog/Public/SGLog/SGLog.h new file mode 100644 index 0000000..59acade --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/Public/SGLog/SGLog.h @@ -0,0 +1,738 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include +#include + +#include "Containers/StringConv.h" +#include "Containers/UnrealString.h" +#include "GameFramework/Actor.h" +#include "Logging/LogVerbosity.h" +#include "Math/Rotator.h" +#include "Math/Transform.h" +#include "Math/Vector.h" +#include "Templates/SharedPointer.h" +#include "Templates/UnrealTemplate.h" + +DECLARE_LOG_CATEGORY_EXTERN(LogEditor, All, All); + +DECLARE_LOG_CATEGORY_EXTERN(LogGeneric, All, All); + +template +struct TFSGLogString +{ + T T1; + FString T2; + static_assert(std::is_same::value, "Error: you are missing a template specialization!"); +}; + +template +struct TFSGLogString +{ + T T1; + FString T2; + static_assert(std::is_same::value, "Error: you are missing a template specialization!"); +}; + +template<> +struct TFSGLogString +{ + static void Format(const AActor* Actor, FString& OutString) + { + ensureAlwaysMsgf(Actor, TEXT("FATAL: cannot log a NULL actor object!")); + + OutString = FString::Printf(TEXT("%s"), Actor->GetName().GetCharArray().GetData()); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const AActor* Actor, FString& OutString) + { + ensureAlwaysMsgf(Actor, TEXT("FATAL: cannot log a NULL actor object!")); + + OutString = FString::Printf(TEXT("%s"), Actor->GetName().GetCharArray().GetData()); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const bool Value, FString& OutString) + { + OutString = Value ? TEXT("True") : TEXT("False"); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const bool Value, FString& OutString) + { + OutString = Value ? TEXT("True") : TEXT("False"); + } +}; + +template +struct TFSGLogString +{ + static void Format(const char* Value, FString& OutString) + { + OutString = FString(UTF8_TO_TCHAR(Value)); + } +}; + +template +struct TFSGLogString +{ + static void Format(const char* Value, FString& OutString) + { + OutString = FString(UTF8_TO_TCHAR(Value)); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const char* Value, FString& OutString) + { + OutString = FString(UTF8_TO_TCHAR(Value)); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const char* Value, FString& OutString) + { + OutString = FString(UTF8_TO_TCHAR(Value)); + } +}; + +#if ! PLATFORM_ANDROID && PLATFORM_LINUX +template +struct TFSGLogString +{ + static void Format(const char16_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; +#endif /* ! PLATFORM_ANDROID && PLATFORM_LINUX */ + +#if ! PLATFORM_ANDROID && PLATFORM_LINUX +template +struct TFSGLogString +{ + static void Format(const char16_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; +#endif /* ! PLATFORM_ANDROID && PLATFORM_LINUX */ + +#if ! PLATFORM_ANDROID && PLATFORM_LINUX +template<> +struct TFSGLogString +{ + static void Format(const char16_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; +#endif /* ! PLATFORM_ANDROID && PLATFORM_LINUX */ + +#if ! PLATFORM_ANDROID && PLATFORM_LINUX +template<> +struct TFSGLogString +{ + static void Format(const char16_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; +#endif /* ! PLATFORM_ANDROID && PLATFORM_LINUX */ + +template<> +struct TFSGLogString +{ + static void Format(const double Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const double Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const float Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const float Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FName& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FName& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FQuat& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FQuat& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FRotator& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FRotator& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FString& Value, FString& OutString) + { + OutString = Value; + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FString& Value, FString& OutString) + { + OutString = Value; + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FTransform& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FTransform& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FVector& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const FVector& Value, FString& OutString) + { + OutString = Value.ToString(); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int8 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int8 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int16 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int16 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int32 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int32 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int64 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const int64 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const long double Value, FString& OutString) + { + char Buffer[128]; + std::snprintf(Buffer, sizeof(Buffer), "%Lf", Value); + OutString = FString(UTF8_TO_TCHAR(Buffer)); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const long double Value, FString& OutString) + { + char Buffer[128]; + std::snprintf(Buffer, sizeof(Buffer), "%Lf", Value); + OutString = FString(UTF8_TO_TCHAR(Buffer)); + } +}; + +#if ! PLATFORM_ANDROID && PLATFORM_LINUX +template<> +struct TFSGLogString +{ + static void Format(const std::size_t Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; +#endif /* ! PLATFORM_ANDROID && PLATFORM_LINUX */ + +#if ! PLATFORM_ANDROID && PLATFORM_LINUX +template<> +struct TFSGLogString +{ + static void Format(const std::size_t Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; +#endif /* ! PLATFORM_ANDROID && PLATFORM_LINUX */ + +template<> +struct TFSGLogString +{ + static void Format(const uint8 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint8 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint16 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint16 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint32 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint32 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint64 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const uint64 Value, FString& OutString) + { + OutString = LexToString(Value); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const std::string& Value, FString& OutString) + { + OutString = FString(UTF8_TO_TCHAR(Value.c_str())); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const std::string& Value, FString& OutString) + { + OutString = FString(UTF8_TO_TCHAR(Value.c_str())); + } +}; + +template +struct TFSGLogString +{ + static void Format(const wchar_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; + +template +struct TFSGLogString +{ + static void Format(const wchar_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const wchar_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const wchar_t* Value, FString& OutString) + { + OutString = FString(StringCast(Value).Get()); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const std::wstring& Value, FString& OutString) + { + OutString = FString(StringCast(Value.data(), Value.size()).Get(), Value.size()); + } +}; + +template<> +struct TFSGLogString +{ + static void Format(const std::wstring& Value, FString& OutString) + { + OutString = FString(StringCast(Value.data(), Value.size()).Get(), Value.size()); + } +}; + +class SENSEGLOVELOG_API FSGLogCore +{ +public: + enum class EVerbosity : uint8 + { + /** Always prints s fatal error to console (and log file) and crashes (even if logging is disabled) */ + Fatal, + + /** + * Prints an error to console (and log file). + * Commandlets and the editor collect and report errors. Error messages result in commandlet failure. + */ + Error, + + /** + * Prints a warning to console (and log file). + * Commandlets and the editor collect and report warnings. Warnings can be treated as an error. + */ + Warning, + + /** Prints a message to console (and log file) */ + Display, + + /** Prints a message to a log file (does not print to console) */ + Log, + + /** + * Prints a verbose message to a log file (if Verbose logging is enabled for the given category, + * usually used for detailed logging) + */ + Verbose, + + /** + * Prints a verbose message to a log file (if VeryVerbose logging is enabled, + * usually used for detailed logging that would otherwise spam output) + */ + VeryVerbose, + }; + + enum class ECategory + { + Editor, + Generic, + }; + +private: + struct FStaticImpl; + + struct FStaticImplDeleter + { + void operator()(const FStaticImpl* Pointer) const; + }; + + static TUniquePtr SPimpl; + + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* Pointer) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + FString Buffer; + bool bAnyEntries; + +public: + FSGLogCore(const EVerbosity& Verbosity, const ECategory& Category, const std::string& File, + const std::string& Function, const int32 Line); + virtual ~FSGLogCore(); + +public: + template + FSGLogCore& operator,(const T& Argument) + { + if (bAnyEntries) + { + Buffer += FString(TEXT(" • ")); + } + + FString FormattedArgument; + TFSGLogString::Format(Argument, FormattedArgument); + Buffer += FormattedArgument; + bAnyEntries = true; + + return *this; + } +}; + +/* Generic */ + +#define SGLOG_FATAL( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Fatal, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_ERROR( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Error, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_WARNING( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Warning, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_DISPLAY( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Display, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_LOG( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Log, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_VERBOSE( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Verbose, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_VERY_VERBOSE( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::VeryVerbose, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Log, FSGLogCore::ECategory::Generic, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +/* Editor */ + +#define SGLOG_EDITOR_FATAL( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Fatal, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR_ERROR( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Error, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR_WARNING( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Warning, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR_DISPLAY( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Display, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR_LOG( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Log, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR_VERBOSE( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Verbose, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR_VERY_VERBOSE( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::VeryVerbose, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; + +#define SGLOG_EDITOR( ... ) \ + (FSGLogCore(FSGLogCore::EVerbosity::Log, FSGLogCore::ECategory::Editor, __FILE__, __FUNCTION__, __LINE__)), __VA_ARGS__; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveLog/SenseGloveLog.Build.cs b/Plugins/SenseGlove/Source/SenseGloveLog/SenseGloveLog.Build.cs new file mode 100644 index 0000000..c68e2ed --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveLog/SenseGloveLog.Build.cs @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveLog : ModuleRules +{ + public SenseGloveLog(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + if (Target.Configuration != UnrealTargetConfiguration.Shipping) + { + PublicDefinitions.Add("SENSEGLOVE_LOGGING"); + } + } +} diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGDebugCubeSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGDebugCubeSettings.cpp new file mode 100644 index 0000000..8d9087c --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGDebugCubeSettings.cpp @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGDebugCubeSettings.h" + +FSGDebugCubeSettings::FSGDebugCubeSettings() + : FSGDebugCubeSettings{ + FVector{1.0f, 1.0f, 1.0f}, + FColor{255, 0, 0, 255}, + false, + 1.1f, + 0, + 1.0f, + } +{ +} + +FSGDebugCubeSettings::FSGDebugCubeSettings( + const FVector& InExtent, + const FColor& InColor, + const bool bInPersistentLines, + const float InLifeTimeModifier, + const uint8 InDepthPriority, + const float InThickness) + : Extent(InExtent), + Color(InColor), + bPersistentLines(bInPersistentLines), + LifeTimeModifier(InLifeTimeModifier), + DepthPriority(InDepthPriority), + Thickness(InThickness) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGDebugGizmoSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGDebugGizmoSettings.cpp new file mode 100644 index 0000000..cc866ec --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGDebugGizmoSettings.cpp @@ -0,0 +1,70 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGDebugGizmoSettings.h" + +FSGDebugGizmoSettings::FSGDebugGizmoSettings() + : FSGDebugGizmoSettings{ + 1.0f, + FColor{255, 0, 0, 255}, + FColor{0, 255, 0, 255}, + FColor{0, 0, 255, 255}, + false, + 1.1f, + 0, + 1.0f, + } +{ +} + +FSGDebugGizmoSettings::FSGDebugGizmoSettings( + const float InLength, + const FColor& InXAxisColor, + const FColor& InYAxisColor, + const FColor& InZAxisColor, + const bool bInPersistentLines, + const float InLifeTimeModifier, + const uint8 InDepthPriority, + const float InThickness) + : Length(InLength), + XAxisColor{InXAxisColor}, + YAxisColor{InYAxisColor}, + ZAxisColor{InZAxisColor}, + bPersistentLines(bInPersistentLines), + LifeTimeModifier(InLifeTimeModifier), + DepthPriority(InDepthPriority), + Thickness(InThickness) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGGameUserSettingsSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGGameUserSettingsSettings.cpp new file mode 100644 index 0000000..e7cf556 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGGameUserSettingsSettings.cpp @@ -0,0 +1,47 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGGameUserSettingsSettings.h" + +FSGGameUserSettingsSettings::FSGGameUserSettingsSettings() + : HardwareBenchmarkingSettings{FSGHardwareBenchmarkingSettings{}} +{ +} + +FSGGameUserSettingsSettings::FSGGameUserSettingsSettings( + const FSGHardwareBenchmarkingSettings& InHardwareBenchmarkingSettings) + : HardwareBenchmarkingSettings{InHardwareBenchmarkingSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGGloveTrackingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGGloveTrackingSettings.cpp new file mode 100644 index 0000000..4a25cdc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGGloveTrackingSettings.cpp @@ -0,0 +1,49 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGGloveTrackingSettings.h" + +FSGGloveTrackingSettings::FSGGloveTrackingSettings() + : FSGGloveTrackingSettings{ + 60.0f + } +{ +} + +FSGGloveTrackingSettings::FSGGloveTrackingSettings( + const float InDataRetrievalRefreshRate) + : DataRetrievalRefreshRate(InDataRetrievalRefreshRate) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHMDTrackingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHMDTrackingSettings.cpp new file mode 100644 index 0000000..1e8a284 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHMDTrackingSettings.cpp @@ -0,0 +1,49 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGHMDTrackingSettings.h" + +FSGHMDTrackingSettings::FSGHMDTrackingSettings() + : FSGHMDTrackingSettings{ + ESGViveHMDDetectionPriority::FocusVision_XRElite_Focus3 + } +{ +} + +FSGHMDTrackingSettings::FSGHMDTrackingSettings( + const ESGViveHMDDetectionPriority InViveHmdDetectionPriority) + : ViveHMDDetectionPriority(InViveHmdDetectionPriority) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHandTrackingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHandTrackingSettings.cpp new file mode 100644 index 0000000..025337b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHandTrackingSettings.cpp @@ -0,0 +1,52 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGHandTrackingSettings.h" + +FSGHandTrackingSettings::FSGHandTrackingSettings() + : FSGHandTrackingSettings{ + false, + true + } +{ +} + +FSGHandTrackingSettings::FSGHandTrackingSettings( + const bool bInUseMoreSpecificMotionSourceNames, + const bool bInSupportLegacyControllerMotionSources) + : bUseMoreSpecificMotionSourceNames(bInUseMoreSpecificMotionSourceNames), + bSupportLegacyControllerMotionSources(bInSupportLegacyControllerMotionSources) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHardwareBenchmarkingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHardwareBenchmarkingSettings.cpp new file mode 100644 index 0000000..9fd2d19 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGHardwareBenchmarkingSettings.cpp @@ -0,0 +1,55 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGHardwareBenchmarkingSettings.h" + +FSGHardwareBenchmarkingSettings::FSGHardwareBenchmarkingSettings() + : FSGHardwareBenchmarkingSettings{ + 10.0f, + 1.0f, + 1.0f + } +{ +} + +FSGHardwareBenchmarkingSettings::FSGHardwareBenchmarkingSettings( + const float InWorkScale, + const float InCPUMultiplier, + const float InGPUMultiplier) + : WorkScale(InWorkScale), + CPUMultiplier(InCPUMultiplier), + GPUMultiplier(InGPUMultiplier) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGInitializationSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGInitializationSettings.cpp new file mode 100644 index 0000000..b1f7066 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGInitializationSettings.cpp @@ -0,0 +1,49 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGInitializationSettings.h" + +FSGInitializationSettings::FSGInitializationSettings() + : FSGInitializationSettings{ + false + } +{ +} + +FSGInitializationSettings::FSGInitializationSettings( + const bool bInValidateIfDefaultClassesAreSGCompliant) + : bValidateIfDefaultClassesAreSGCompliant(bInValidateIfDefaultClassesAreSGCompliant) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp new file mode 100644 index 0000000..eadc5a1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGSettings.cpp @@ -0,0 +1,189 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGSettings.h" + +#include "Containers/Array.h" +#include "Engine/Engine.h" + +#if WITH_EDITOR +#include "PropertyEditorModule.h" +#endif /* WITH_EDITOR */ + +#include "UObject/NameTypes.h" +#include "UObject/Object.h" +#include "UObject/Package.h" +#include "UObject/UObjectGlobals.h" + +#include "SGLog/SGLog.h" + +#if WITH_EDITOR +#include "SGSettings/SGWristTrackingDetailsCustomization.h" +#endif /* WITH_EDITOR */ + +struct USGSettings::FImpl +{ + /************************ + * Static methods + ************************/ + + FORCENOINLINE static const FName& GetWristTrackingSettingsPropertyName() + { + static const FName Name{TEXT("SGWristTrackingSettings")}; + return Name; + } + + /************************ + * Owner object + ************************/ + + USGSettings* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGSettings* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + void RegisterCustomPropertyTypeLayouts(); + void UnregisterCustomPropertyTypeLayouts(); +}; + +USGSettings* USGSettings::GetInstance() +{ + /// HACK + // Allow the game module to use the settings system in situations when GEngine is not initialized, yet! + // e.g. from SGPawn's CDO. + if (!GEngine) + { + USGSettings* StartupInstance{ + NewObject(GetTransientPackage(), FName(TEXT("SGSettings"))) + }; + return StartupInstance; + } + + USGSettings* Instance{GEngine->GetEngineSubsystem()}; + return Instance; +} + +USGSettings::USGSettings() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +bool USGSettings::ShouldCreateSubsystem(UObject* Outer) const +{ + return true; +} + +void USGSettings::Initialize(FSubsystemCollectionBase& Collection) +{ + SGLOG("Initializing the SenseGlove settings singleton with the engine lifetime..."); + + Super::Initialize(Collection); + +#if WITH_EDITOR + Pimpl->RegisterCustomPropertyTypeLayouts(); +#endif /* WITH_EDITOR */ + + SGLOG("The SenseGlove settings singleton has been successfully initialized with the engine lifetime!"); +} + +void USGSettings::Deinitialize() +{ + SGLOG("De-initializing the SenseGlove settings singleton due to the engine lifetime expiration..."); + + Super::Deinitialize(); + +#if WITH_EDITOR + Pimpl->UnregisterCustomPropertyTypeLayouts(); +#endif /* WITH_EDITOR */ + + (void) Pimpl.Release(); + + SGLOG("The SenseGlove settings singleton has been successfully de-initialized!"); +} + +USGSettings::FImpl::FImpl(USGSettings* InOwner) + : Owner(InOwner) +{ +} + +#if WITH_EDITOR +void USGSettings::FImpl::RegisterCustomPropertyTypeLayouts() +{ + SGLOG("Registering SGSettings custom property type layouts..."); + + FPropertyEditorModule& PropertyEditorModule = + FModuleManager::LoadModuleChecked(FName{TEXT("PropertyEditor")}); + + SGLOG("Registering SGSettings custom property type layout", GetWristTrackingSettingsPropertyName()); + PropertyEditorModule.RegisterCustomPropertyTypeLayout( + GetWristTrackingSettingsPropertyName(), + FOnGetPropertyTypeCustomizationInstance::CreateStatic( + &FSGWristTrackingDetailsCustomization::NewWristTrackingDetailsCustomization) + ); +} + +void USGSettings::FImpl::UnregisterCustomPropertyTypeLayouts() +{ + SGLOG("Unregistering SGSettings custom property type layouts..."); + + FPropertyEditorModule& PropertyEditorModule = + FModuleManager::LoadModuleChecked(FName{TEXT("PropertyEditor")}); + + SGLOG("Unregistering SGSettings custom property type layout", GetWristTrackingSettingsPropertyName()); + PropertyEditorModule.UnregisterCustomPropertyTypeLayout(GetWristTrackingSettingsPropertyName()); +} +#endif /* WITH_EDITOR */ + +USGSettings::FImpl::~FImpl() = default; + +void USGSettings::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGTrackingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGTrackingSettings.cpp new file mode 100644 index 0000000..b233dc1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGTrackingSettings.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGTrackingSettings.h" + +FSGTrackingSettings::FSGTrackingSettings() + : FSGTrackingSettings{ + false, + FSGGloveTrackingSettings{}, + FSGHandTrackingSettings{}, + FSGHMDTrackingSettings{}, + FSGWristTrackingSettings{} + } +{ +} + +FSGTrackingSettings::FSGTrackingSettings( + const bool bInFallbackToHandTrackingIfNoGloveDetected, + const FSGGloveTrackingSettings& InGloveTrackingSettings, + const FSGHandTrackingSettings& InHandTrackingSettings, + const FSGHMDTrackingSettings& InHmdTrackingSettings, + const FSGWristTrackingSettings& InWristTrackingSettings) + : bFallbackToHandTrackingIfNoGloveDetected(bInFallbackToHandTrackingIfNoGloveDetected), + GloveTrackingSettings(InGloveTrackingSettings), + HandTrackingSettings(InHandTrackingSettings), + HMDTrackingSettings(InHmdTrackingSettings), + WristTrackingSettings(InWristTrackingSettings) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandAnimationSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandAnimationSettings.cpp new file mode 100644 index 0000000..24ed4e5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandAnimationSettings.cpp @@ -0,0 +1,52 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandAnimationSettings.h" + +FSGVirtualHandAnimationSettings::FSGVirtualHandAnimationSettings() + : FSGVirtualHandAnimationSettings{ + FRotator{0.0f, 90.0f, 90.0f}, + true + } +{ +} + +FSGVirtualHandAnimationSettings::FSGVirtualHandAnimationSettings( + const FRotator& InAnimationBoneRotationCorrectionOffset, + const bool bInShouldAnimationApplyBoneLocation) + : AnimationBoneRotationCorrectionOffset{InAnimationBoneRotationCorrectionOffset}, + bShouldAnimationApplyBoneLocation(bInShouldAnimationApplyBoneLocation) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandDebuggingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandDebuggingSettings.cpp new file mode 100644 index 0000000..38cc298 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandDebuggingSettings.cpp @@ -0,0 +1,74 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandDebuggingSettings.h" + +FSGVirtualHandDebuggingSettings::FSGVirtualHandDebuggingSettings() + : FSGVirtualHandDebuggingSettings{ + false, + ESGDebugVirtualHandDrawingMode::None, + FSGDebugCubeSettings{ + FVector{0.5f, 0.5f, 0.5f}, + FColor{255, 0, 0, 255}, + false, + 1.1f, + 0, + 0.2f, + }, + FSGDebugGizmoSettings{ + 1.0f, + FColor{255, 0, 0, 255}, + FColor{0, 255, 0, 255}, + FColor{0, 0, 255, 255}, + false, + 1.1f, + 0, + 0.25f, + }, + } +{ +} + +FSGVirtualHandDebuggingSettings::FSGVirtualHandDebuggingSettings( + const bool bInDrawDebugVirtualHand, + const ESGDebugVirtualHandDrawingMode InDrawingMode, + const FSGDebugCubeSettings& InDebugCubicHandSettings, + const FSGDebugGizmoSettings& InDebugGizmoHandSettings) + : bDrawDebugVirtualHand(bInDrawDebugVirtualHand), + DrawingMode(InDrawingMode), + DebugCubicHandSettings{InDebugCubicHandSettings}, + DebugGizmoHandSettings{InDebugGizmoHandSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandGrabSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandGrabSettings.cpp new file mode 100644 index 0000000..5646bc7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandGrabSettings.cpp @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandGrabSettings.h" + +FSGVirtualHandGrabSettings::FSGVirtualHandGrabSettings() + : FSGVirtualHandGrabSettings{ + FName{TEXT("GrabAttachPoint")}, + FTransform{FQuat::Identity, FVector{0.0f, 5.0f, -6.61557f}}, + FVector{0.04f, 0.04f, 0.04f}, + FName{TEXT("GrabThumbCollider")}, + FName{TEXT("GrabIndexCollider")}, + FName{TEXT("GrabMiddleCollider")} + } +{ +} + +FSGVirtualHandGrabSettings::FSGVirtualHandGrabSettings( + const FName& InGrabAttachPointSocketName, + const FTransform& InGrabAttachPointSocketTransform, + const FVector& InDefaultColliderSize, + const FName& InThumbColliderSocketName, + const FName& InIndexColliderSocketName, + const FName& InMiddleColliderSocketName) + : GrabAttachPointSocketName{InGrabAttachPointSocketName}, + GrabAttachPointSocketTransform{InGrabAttachPointSocketTransform}, + DefaultColliderSize{InDefaultColliderSize}, + ThumbColliderSocketName{InThumbColliderSocketName}, + IndexColliderSocketName{InIndexColliderSocketName}, + MiddleColliderSocketName{InMiddleColliderSocketName} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandHapticsSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandHapticsSettings.cpp new file mode 100644 index 0000000..f577baa --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandHapticsSettings.cpp @@ -0,0 +1,49 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandHapticsSettings.h" + +FSGVirtualHandHapticsSettings::FSGVirtualHandHapticsSettings() + : FSGVirtualHandHapticsSettings{ + true + } +{ +} + +FSGVirtualHandHapticsSettings::FSGVirtualHandHapticsSettings( + bool bInAutoStopAllHapticsOnEndPlay) + : bAutoStopAllHapticsOnEndPlay(bInAutoStopAllHapticsOnEndPlay) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandMeshSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandMeshSettings.cpp new file mode 100644 index 0000000..a0b773b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandMeshSettings.cpp @@ -0,0 +1,430 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandMeshSettings.h" + +#include "UObject/UnrealNames.h" + +#include "Engine/SkeletalMesh.h" + +FSGVirtualHandMeshSettings::FSGVirtualHandMeshSettings() + : FSGVirtualHandMeshSettings{ + nullptr, + nullptr, + FSGVirtualHandPhalangesLengthSettings{}, + FRotator{0.0f, -90.0f, 0.0f} + } +{ +} + +FSGVirtualHandMeshSettings::FSGVirtualHandMeshSettings( + const TSoftObjectPtr& InLeftHandReferenceMesh, + const TSoftObjectPtr& InRightHandReferenceMesh, + const FSGVirtualHandPhalangesLengthSettings& InDistalPhalangesLengthSettings, + const FRotator& InRootBoneRotationCorrection) + : LeftHandReferenceMesh{InLeftHandReferenceMesh}, + RightHandReferenceMesh{InRightHandReferenceMesh}, + DistalPhalangesLengthSettings{InDistalPhalangesLengthSettings}, + RootBoneRotationCorrection{InRootBoneRotationCorrection}, + LeftHandDefaultReferenceBoneTransforms{ + TPair{ + FName{TEXT("hand_l")}, + FTransform{ + FRotator{0.0f, -180.0f, 90.0f}, + FVector{0.0f, 0.0f, 0.0f} + } + }, + TPair{ + FName{TEXT("palm_l")}, + FTransform{ + FRotator{0.0f, 0.0f, 0.0f}, + FVector{0.0f, 0.0f, -6.61557f} + } + }, + TPair{ + FName{TEXT("thumb_01_l")}, + FTransform{ + FRotator{30.400068f, 75.42522f, 33.588919f}, + FVector{2.581536f, 1.356605f, -1.992447f} + } + }, + TPair{ + FName{TEXT("thumb_02_l")}, + FTransform{ + FRotator{-0.379136f, 4.00635f, -23.318826f}, + FVector{0.0f, 0.0f, -4.378f} + } + }, + TPair{ + FName{TEXT("thumb_03_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -10.0f}, + FVector{0.0f, 0.0f, -3.086f} + } + }, + TPair{ + FName{TEXT("index_metacarpal_l")}, + FTransform{ + FRotator{7.277920f, 3.392215f, 1.032481f}, + FVector{2.379324f, -0.384681f, -3.444506f} + } + }, + TPair{ + FName{TEXT("index_01_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -23.373f}, + FVector{-0.240876f, 0.043182f, -5.877098f} + } + }, + TPair{ + FName{TEXT("index_02_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -14.892568f}, + FVector{0.0f, 0.0f, -4.08f} + } + }, + TPair{ + FName{TEXT("index_03_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -12.516401f}, + FVector{0.0f, 0.0f, -2.595f} + } + }, + TPair{ + FName{TEXT("middle_metacarpal_l")}, + FTransform{ + FRotator{0.042392f, -4.274287f, 2.321687f}, + FVector{0.182864f, -0.753571f, -3.375834f} + } + }, + TPair{ + FName{TEXT("middle_01_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -31.572682f}, + FVector{0.0f, 0.0f, -6.098209f} + } + }, + TPair{ + FName{TEXT("middle_02_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -20.76921f}, + FVector{0.0f, 0.0f, -5.169f} + } + }, + TPair{ + FName{TEXT("middle_03_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -10.0f}, + FVector{0.0f, 0.0f, -2.474f} + } + }, + TPair{ + FName{TEXT("ring_metacarpal_l")}, + FTransform{ + FRotator{-11.109678f, -13.886395f, 4.333313f}, + FVector{-1.091757f, -0.542517f, -3.374304f} + } + }, + TPair{ + FName{TEXT("ring_01_l")}, + FTransform{ + FRotator{3.034822f, 5.633827f, -29.271656f}, + FVector{0.020689f, -0.041625f, -5.645517f} + } + }, + TPair{ + FName{TEXT("ring_02_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -18.964f}, + FVector{0.0f, 0.0f, -4.977f} + } + }, + TPair{ + FName{TEXT("ring_03_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -9.167999f}, + FVector{0.0f, 0.0f, -2.265f} + } + }, + TPair{ + FName{TEXT("pinky_metacarpal_l")}, + FTransform{ + FRotator{-22.65256f, -25.358337f, -1.818999f}, + FVector{-2.391111f, -0.305917f, -3.314378f} + } + }, + TPair{ + FName{TEXT("pinky_01_l")}, + FTransform{ + FRotator{3.247850f, 9.999765f, -14.49391f}, + FVector{0.19884f, -0.14312f, -4.957568f} + } + }, + TPair{ + FName{TEXT("pinky_02_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -21.286999f}, + FVector{0.0f, 0.0f, -3.816f} + } + }, + TPair{ + FName{TEXT("pinky_03_l")}, + FTransform{ + FRotator{0.0f, 0.0f, -4.917f}, + FVector{0.0f, 0.0f, -2.04f} + } + }, + }, + RightHandDefaultReferenceBoneTransforms{ + TPair{ + FName{TEXT("hand_r")}, + FTransform{ + FRotator{0.0f, -180.0f, 90.0f}, + FVector{0.0f, 0.0f, 0.0f} + } + }, + TPair{ + FName{TEXT("palm_r")}, + FTransform{ + FRotator{0.0f, 0.0f, 0.0f}, + FVector{0.000052f, -0.000629f, -6.615405f} + } + }, + TPair{ + FName{TEXT("thumb_01_r")}, + FTransform{ + FRotator{-30.400068f, -75.42522f, 33.588919f}, + FVector{-2.581326f, 1.356657f, -1.992833f} + } + }, + TPair{ + FName{TEXT("thumb_02_r")}, + FTransform{ + FRotator{0.379136f, -4.00635f, -23.318826f}, + FVector{0.000136f, -0.000427f, -4.377825f} + } + }, + TPair{ + FName{TEXT("thumb_03_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -10.0f}, + FVector{-0.000046f, 0.000015f, -3.085952f} + } + }, + TPair{ + FName{TEXT("index_metacarpal_r")}, + FTransform{ + FRotator{-7.277920f, -3.392215f, 1.032481f}, + FVector{-2.379309f, -0.385167f, -3.444514f} + } + }, + TPair{ + FName{TEXT("index_01_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -23.373f}, + FVector{0.240952f, 0.043412f, -5.877205f} + } + }, + TPair{ + FName{TEXT("index_02_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -14.892568f}, + FVector{-0.000032f, -0.000005f, -4.079933f} + } + }, + TPair{ + FName{TEXT("index_03_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -12.516401f}, + FVector{0.000004f, -0.00004f, -2.595076f} + } + }, + TPair{ + FName{TEXT("middle_metacarpal_r")}, + FTransform{ + FRotator{-0.042392f, 4.274287f, 2.321687f}, + FVector{-0.182806f, -0.754004f, -3.3758f} + } + }, + TPair{ + FName{TEXT("middle_01_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -31.572682f}, + FVector{-0.000001f, 0.000124f, -6.098366f} + } + }, + TPair{ + FName{TEXT("middle_02_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -20.76921f}, + FVector{0.000037f, 0.000077f, -5.168992f} + } + }, + TPair{ + FName{TEXT("middle_03_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -10.0f}, + FVector{-0.000034f, -0.000046f, -2.474047f} + } + }, + TPair{ + FName{TEXT("ring_metacarpal_r")}, + FTransform{ + FRotator{11.109678f, 13.886395f, 4.333313f}, + FVector{1.091782f, -0.542992f, -3.374208f} + } + }, + TPair{ + FName{TEXT("ring_01_r")}, + FTransform{ + FRotator{-3.034822f, -5.633827f, -29.271656f}, + FVector{-0.020675f, -0.041443f, -5.645712f} + } + }, + TPair{ + FName{TEXT("ring_02_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -18.964f}, + FVector{0.000024f, 0.000021f, -4.977067f} + } + }, + TPair{ + FName{TEXT("ring_03_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -9.167999f}, + FVector{0.000011f, -0.00005f, -2.264975f} + } + }, + TPair{ + FName{TEXT("pinky_metacarpal_r")}, + FTransform{ + FRotator{22.65256f, 25.358337f, -1.818999f}, + FVector{2.391287f, -0.305935f, -3.314677f} + } + }, + TPair{ + FName{TEXT("pinky_01_r")}, + FTransform{ + FRotator{-3.24785f, -9.999765f, -14.49391f}, + FVector{-0.19892f, -0.143261f, -4.957301f} + } + }, + TPair{ + FName{TEXT("pinky_02_r")}, + FTransform{ + FRotator{0.0f, 0.0f, -21.286999f}, + FVector{-0.000033f, -0.00003f, -3.816036f} + } + }, + TPair{ + FName{TEXT("pinky_03_r")}, + FTransform{ + FRotator{0.0f, -0.000002f, -4.917f}, + FVector{0.000031f, 0.000018f, -2.04f} + } + }, + }, + LeftHandBoneNames + { + FName{TEXT("palm_l")},// Palm + FName{TEXT("hand_l")},// Wrist + FName{TEXT("thumb_01_l")},// ThumbMetacarpal + FName{TEXT("thumb_02_l")},// ThumbProximal + FName{TEXT("thumb_03_l")},// ThumbDistal + NAME_None,// ThumbTip + FName{TEXT("index_metacarpal_l")},// IndexMetacarpal + FName{TEXT("index_01_l")},// IndexProximal + FName{TEXT("index_02_l")},// IndexIntermediate + FName{TEXT("index_03_l")},// IndexDistal + NAME_None,// IndexTip + FName{TEXT("middle_metacarpal_l")},// MiddleMetacarpal + FName{TEXT("middle_01_l")},// MiddleProximal + FName{TEXT("middle_02_l")},// MiddleIntermediate + FName{TEXT("middle_03_l")},// MiddleDistal + NAME_None,// MiddleTip + FName{TEXT("ring_metacarpal_l")},// RingMetacarpal + FName{TEXT("ring_01_l")},// RingProximal + FName{TEXT("ring_02_l")},// RingIntermediate + FName{TEXT("ring_03_l")},// RingDistal + NAME_None,// RingTip + FName{TEXT("pinky_metacarpal_l")},// LittleMetacarpal + FName{TEXT("pinky_01_l")},// LittleProximal + FName{TEXT("pinky_02_l")},// LittleIntermediate + FName{TEXT("pinky_03_l")},// LittleDistal + NAME_None,// LittleTip + }, + RightHandBoneNames + { + FName{TEXT("palm_r")},// Palm + FName{TEXT("hand_r")},// Wrist + FName{TEXT("thumb_01_r")},// ThumbMetacarpal + FName{TEXT("thumb_02_r")},// ThumbProximal + FName{TEXT("thumb_03_r")},// ThumbDistal + NAME_None,// ThumbTip + FName{TEXT("index_metacarpal_r")},// IndexMetacarpal + FName{TEXT("index_01_r")},// IndexProximal + FName{TEXT("index_02_r")},// IndexIntermediate + FName{TEXT("index_03_r")},// IndexDistal + NAME_None,// IndexTip + FName{TEXT("middle_metacarpal_r")},// MiddleMetacarpal + FName{TEXT("middle_01_r")},// MiddleProximal + FName{TEXT("middle_02_r")},// MiddleIntermediate + FName{TEXT("middle_03_r")},// MiddleDistal + NAME_None,// MiddleTip + FName{TEXT("ring_metacarpal_r")},// RingMetacarpal + FName{TEXT("ring_01_r")},// RingProximal + FName{TEXT("ring_02_r")},// RingIntermediate + FName{TEXT("ring_03_r")},// RingDistal + NAME_None,// RingTip + FName{TEXT("pinky_metacarpal_r")},// LittleMetacarpal + FName{TEXT("pinky_01_r")},// LittleProximal + FName{TEXT("pinky_02_r")},// LittleIntermediate + FName{TEXT("pinky_03_r")},// LittleDistal + NAME_None// LittleTip + }, + DefaultLeftHandMeshPath{ + TEXT("SkeletalMesh'/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left'") + }, + DefaultLeftHandMeshPathOnly{ + TEXT("/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Left.SK_SenseGlove_VirtualHand_Left") + }, + DefaultRightHandMeshPath{ + TEXT("SkeletalMesh'/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right'") + }, + DefaultRightHandMeshPathOnly{ + TEXT("/SenseGlove/Meshes/SK_SenseGlove_VirtualHand_Right.SK_SenseGlove_VirtualHand_Right") + } +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandPhalangesLengthSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandPhalangesLengthSettings.cpp new file mode 100644 index 0000000..5fbe0a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandPhalangesLengthSettings.cpp @@ -0,0 +1,63 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandPhalangesLengthSettings.h" + +#include "Engine/SkeletalMesh.h" + +FSGVirtualHandPhalangesLengthSettings::FSGVirtualHandPhalangesLengthSettings() + : FSGVirtualHandPhalangesLengthSettings{ + 2.4f, + 2.4f, + 2.4f, + 2.4f, + 2.4f, + } +{ +} + +FSGVirtualHandPhalangesLengthSettings::FSGVirtualHandPhalangesLengthSettings( + const float InThumb, + const float InIndex, + const float InMiddle, + const float InRing, + const float InLittle) + : Thumb(InThumb), + Index(InIndex), + Middle(InMiddle), + Ring(InRing), + Little(InLittle) +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandSettings.cpp new file mode 100644 index 0000000..07e0bc8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandSettings.cpp @@ -0,0 +1,69 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandSettings.h" + +#include "Engine/SkeletalMesh.h" + +FSGVirtualHandSettings::FSGVirtualHandSettings() + : FSGVirtualHandSettings{ + false, + FSGVirtualHandAnimationSettings{}, + FSGVirtualHandDebuggingSettings{}, + FSGVirtualHandGrabSettings{}, + FSGVirtualHandHapticsSettings{}, + FSGVirtualHandMeshSettings{}, + FSGVirtualHandTouchSettings{} + } +{ +} + +FSGVirtualHandSettings::FSGVirtualHandSettings( + const bool bInVisibleWhenHandDataUnavailable, + const FSGVirtualHandAnimationSettings& InAnimationSettings, + const FSGVirtualHandDebuggingSettings& InDebuggingSettings, + const FSGVirtualHandGrabSettings& InGrabSettings, + const FSGVirtualHandHapticsSettings& InHapticsSettings, + const FSGVirtualHandMeshSettings& InMeshSettings, + const FSGVirtualHandTouchSettings& InTouchSettings) + : bVisibleWhenHandDataUnavailable(bInVisibleWhenHandDataUnavailable), + AnimationSettings{InAnimationSettings}, + DebuggingSettings{InDebuggingSettings}, + GrabSettings{InGrabSettings}, + HapticsSettings{InHapticsSettings}, + MeshSettings{InMeshSettings}, + TouchSettings{InTouchSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandSettingsOverrides.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandSettingsOverrides.cpp new file mode 100644 index 0000000..7a3bb52 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandSettingsOverrides.cpp @@ -0,0 +1,69 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandSettingsOverrides.h" + +#include "Engine/SkeletalMesh.h" + +FSGVirtualHandSettingsOverrides::FSGVirtualHandSettingsOverrides() + : FSGVirtualHandSettingsOverrides{ + false, + false, + FSGVirtualHandAnimationSettings{}, + FSGVirtualHandDebuggingSettings{}, + FSGVirtualHandGrabSettings{}, + FSGVirtualHandHapticsSettings{}, + FSGVirtualHandTouchSettings{} + } +{ +} + +FSGVirtualHandSettingsOverrides::FSGVirtualHandSettingsOverrides( + const bool bInOverridePluginSettings, + const bool bInVisibleWhenHandDataUnavailable, + const FSGVirtualHandAnimationSettings& InAnimationSettings, + const FSGVirtualHandDebuggingSettings& InDebuggingSettings, + const FSGVirtualHandGrabSettings& InGrabSettings, + const FSGVirtualHandHapticsSettings& InHapticsSettings, + const FSGVirtualHandTouchSettings& InTouchSettings) + : bOverridePluginSettings(bInOverridePluginSettings), + bVisibleWhenHandDataUnavailable(bInVisibleWhenHandDataUnavailable), + AnimationSettings{InAnimationSettings}, + DebuggingSettings{InDebuggingSettings}, + GrabSettings{InGrabSettings}, + HapticsSettings{InHapticsSettings}, + TouchSettings{InTouchSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandTouchSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandTouchSettings.cpp new file mode 100644 index 0000000..e928d43 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGVirtualHandTouchSettings.cpp @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGVirtualHandTouchSettings.h" + +FSGVirtualHandTouchSettings::FSGVirtualHandTouchSettings() + : FSGVirtualHandTouchSettings{ + FVector{0.04f, 0.04f, 0.04f}, + FName{TEXT("TouchThumbCollider")}, + FName{TEXT("TouchIndexCollider")}, + FName{TEXT("TouchMiddleCollider")}, + FName{TEXT("TouchRingCollider")}, + FName{TEXT("TouchPinkyCollider")} + } +{ +} + +FSGVirtualHandTouchSettings::FSGVirtualHandTouchSettings( + const FVector& InDefaultColliderSize, + const FName& InThumbColliderSocketName, + const FName& InIndexColliderSocketName, + const FName& InMiddleColliderSocketName, + const FName& InRingColliderSocketName, + const FName& InPinkyColliderSocketName) + : DefaultColliderSize{InDefaultColliderSize}, + ThumbColliderSocketName{InThumbColliderSocketName}, + IndexColliderSocketName{InIndexColliderSocketName}, + MiddleColliderSocketName{InMiddleColliderSocketName}, + RingColliderSocketName{InRingColliderSocketName}, + PinkyColliderSocketName{InPinkyColliderSocketName} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDebuggingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDebuggingSettings.cpp new file mode 100644 index 0000000..8bd81d1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDebuggingSettings.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGWristTrackingDebuggingSettings.h" + +FSGWristTrackingDebuggingSettings::FSGWristTrackingDebuggingSettings() + : FSGWristTrackingDebuggingSettings{ + false, + FSGDebugGizmoSettings{ + 4.0f, + FColor{255, 0, 0, 255}, + FColor{0, 255, 0, 255}, + FColor{0, 0, 255, 255}, + false, + 1.1f, + 0, + 0.4f, + }, + } +{ +} + +FSGWristTrackingDebuggingSettings::FSGWristTrackingDebuggingSettings( + const bool bInDrawDebugWristTracker, + const FSGDebugGizmoSettings& InDebugWristTrackerSettings) + : bDrawDebugWristTracker(bInDrawDebugWristTracker), + DebugWristTrackerSettings{InDebugWristTrackerSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDetailsCustomization.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDetailsCustomization.cpp new file mode 100644 index 0000000..de896ca --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDetailsCustomization.cpp @@ -0,0 +1,222 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + * + * + */ + + +#if WITH_EDITOR + +#include "SGSettings/SGWristTrackingDetailsCustomization.h" + +#include "IMotionController.h" +#include "Widgets/Input/SComboBox.h" +#include "Widgets/Text/STextBlock.h" + +#include "SGLog/SGLog.h" + +struct FSGWristTrackingDetailsCustomization::FImpl +{ + /************************ + * Typedefs + ************************/ + + /************************ + * Static methods + ************************/ + + FORCENOINLINE static const FString& GetLeftHandMotionSourcePropertyName() + { + static const FString Name{TEXT("LeftHandMotionSource")}; + return Name; + } + + FORCENOINLINE static const FString& GetRightHandMotionSourcePropertyName() + { + static const FString Name{TEXT("RightHandMotionSource")}; + return Name; + } + + /************************ + * Member variables + ************************/ + + TArray> MotionSources; + + /************************ + * Owner object + ************************/ + + FSGWristTrackingDetailsCustomization* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGWristTrackingDetailsCustomization* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = delete; + FImpl& operator=(const FImpl& Rhs) = delete; + + /************************ + * Methods + ************************/ + + void PopulateComboBoxOptions(); +}; + +TSharedRef FSGWristTrackingDetailsCustomization::NewWristTrackingDetailsCustomization() +{ + return MakeShareable(new FSGWristTrackingDetailsCustomization{}); +} + +FSGWristTrackingDetailsCustomization::FSGWristTrackingDetailsCustomization() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +void FSGWristTrackingDetailsCustomization::CustomizeHeader( + TSharedRef PropertyHandle, + FDetailWidgetRow& HeaderRow, + IPropertyTypeCustomizationUtils& CustomizationUtils) +{ + HeaderRow.NameContent() + [ + PropertyHandle->CreatePropertyNameWidget() + ] + .ValueContent() + [ + PropertyHandle->CreatePropertyValueWidget() + ]; +} + +void FSGWristTrackingDetailsCustomization::CustomizeChildren( + TSharedRef PropertyHandle, + IDetailChildrenBuilder& ChildBuilder, + IPropertyTypeCustomizationUtils& CustomizationUtils) +{ + Pimpl->PopulateComboBoxOptions(); + + uint32 NumChildren; + PropertyHandle->GetNumChildren(NumChildren); + + for (uint32 Index = 0; Index < NumChildren; ++Index) + { + TSharedRef ChildHandle{PropertyHandle->GetChildHandle(Index).ToSharedRef()}; + + if (ChildHandle->GetProperty()->GetName() == Pimpl->GetLeftHandMotionSourcePropertyName() + || ChildHandle->GetProperty()->GetName() == Pimpl->GetRightHandMotionSourcePropertyName()) + { + ChildBuilder.AddCustomRow(ChildHandle->GetPropertyDisplayName()) + .NameContent() + [ + ChildHandle->CreatePropertyNameWidget() + ] + .ValueContent() + [ + SNew(SComboBox>) + .OptionsSource(&Pimpl->MotionSources) + .OnGenerateWidget_Lambda([](TSharedPtr InItem) + { + return SNew(STextBlock).Text(FText::FromName(*InItem)); + }) + .OnSelectionChanged_Lambda([ChildHandle](TSharedPtr NewValue, ESelectInfo::Type) + { + if (NewValue.IsValid()) + { + ChildHandle->SetValue(*NewValue); + } + }) + .Content() + [ + SNew(STextBlock) + .Text_Lambda([ChildHandle]() + { + FName CurrentValue; + ChildHandle->GetValue(CurrentValue); + return FText::FromName(CurrentValue); + }) + ] + ]; + } + else + { + ChildBuilder.AddProperty(ChildHandle); + } + } +} + +void FSGWristTrackingDetailsCustomization::FImpl::PopulateComboBoxOptions() +{ + SGLOG("Populating the FSGWristTrackingSettings MotionSources..."); + + MotionSources.Reset(); + + const TArray MotionControllers{ + IModularFeatures::Get().GetModularFeatureImplementations< + IMotionController>(IMotionController::GetModularFeatureName()) + }; + for (const IMotionController* MotionController: MotionControllers) + { + if (MotionController) + { + TArray MotionControllerSources; + MotionController->EnumerateSources(MotionControllerSources); + + MotionSources.Reserve(MotionSources.Num() + MotionControllerSources.Num()); + for (const FMotionControllerSource& MotionSource: MotionControllerSources) + { + SGLOG("Discovered a new motion source", MotionSource.SourceName); + + MotionSources.AddUnique(MakeShareable(new FName{MotionSource.SourceName})); + } + } + } +} + +FSGWristTrackingDetailsCustomization::FImpl::FImpl(FSGWristTrackingDetailsCustomization* InOwner) + : Owner(InOwner) +{ +} + +FSGWristTrackingDetailsCustomization::FImpl::~FImpl() = default; + +void FSGWristTrackingDetailsCustomization::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} + +#endif /* WITH_EDITOR */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDetailsCustomization.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDetailsCustomization.h new file mode 100644 index 0000000..179baae --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingDetailsCustomization.h @@ -0,0 +1,79 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + +#if WITH_EDITOR + +#include "DetailWidgetRow.h" +#include "IDetailChildrenBuilder.h" +#include "IPropertyTypeCustomization.h" +#include "PropertyHandle.h" +#include "Templates/SharedPointer.h" +#include "Templates/UniquePtr.h" + +class SENSEGLOVESETTINGS_API FSGWristTrackingDetailsCustomization : public IPropertyTypeCustomization +{ +public: + static TSharedRef NewWristTrackingDetailsCustomization(); + +private: + FSGWristTrackingDetailsCustomization(); + +public: + virtual void CustomizeHeader( + TSharedRef PropertyHandle, + FDetailWidgetRow& HeaderRow, + IPropertyTypeCustomizationUtils& CustomizationUtils) override; + + virtual void CustomizeChildren( + TSharedRef PropertyHandle, + IDetailChildrenBuilder& ChildBuilder, + IPropertyTypeCustomizationUtils& CustomizationUtils) override; + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; +}; + +#endif /* WITH_EDITOR */ \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingSettings.cpp new file mode 100644 index 0000000..678a645 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingSettings.cpp @@ -0,0 +1,73 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGWristTrackingSettings.h" + +FSGWristTrackingSettings::FSGWristTrackingSettings() + : FSGWristTrackingSettings{ + ESGOpenXRPositionalTrackingProvider::None, + ESGPositionalTrackingHardware::None, + FVector::ZeroVector, + FVector::ZeroVector, + FRotator::ZeroRotator, + FRotator::ZeroRotator, + FName{TEXT("Left")}, + FName{TEXT("Right")}, + FSGWristTrackingDebuggingSettings{}, + } +{ +} + +FSGWristTrackingSettings::FSGWristTrackingSettings( + const ESGOpenXRPositionalTrackingProvider InOpenXRPositionalTrackingProvider, + const ESGPositionalTrackingHardware InTrackingHardware, + const FVector& InTrackingHardwareLocationOffsetLeftHand, + const FVector& InTrackingHardwareLocationOffsetRightHand, + const FRotator& InTrackingHardwareRotationOffsetLeftHand, + const FRotator& InTrackingHardwareRotationOffsetRightHand, + const FName InLeftHandMotionSource, + const FName InRightHandMotionSource, + const FSGWristTrackingDebuggingSettings& InDebuggingSettings) + : OpenXRPositionalTrackingProvider(InOpenXRPositionalTrackingProvider), + TrackingHardware(InTrackingHardware), + TrackingHardwareLocationOffsetLeftHand{InTrackingHardwareLocationOffsetLeftHand}, + TrackingHardwareLocationOffsetRightHand{InTrackingHardwareLocationOffsetRightHand}, + TrackingHardwareRotationOffsetLeftHand{InTrackingHardwareRotationOffsetLeftHand}, + TrackingHardwareRotationOffsetRightHand{InTrackingHardwareRotationOffsetRightHand}, + LeftHandMotionSource(InLeftHandMotionSource), + RightHandMotionSource(InRightHandMotionSource), + DebuggingSettings{InDebuggingSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingSettingsOverrides.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingSettingsOverrides.cpp new file mode 100644 index 0000000..89d1a8a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SGSettings/SGWristTrackingSettingsOverrides.cpp @@ -0,0 +1,52 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGWristTrackingSettingsOverrides.h" + +FSGWristTrackingSettingsOverrides::FSGWristTrackingSettingsOverrides() + : FSGWristTrackingSettingsOverrides{ + false, + FSGWristTrackingDebuggingSettings{} + } +{ +} + +FSGWristTrackingSettingsOverrides::FSGWristTrackingSettingsOverrides( + const bool bInOverridePluginSettings, + const FSGWristTrackingDebuggingSettings& InDebuggingSettings) + : bOverridePluginSettings(bInOverridePluginSettings), + DebuggingSettings{InDebuggingSettings} +{ +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettings.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettings.cpp new file mode 100644 index 0000000..20accbc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettings.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveSettings.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveSettingsModule.h" + +IMPLEMENT_MODULE(FSenseGloveSettingsModule, SenseGloveSettings) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettings.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettings.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettingsModule.cpp b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettingsModule.cpp new file mode 100644 index 0000000..32eb3f8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettingsModule.cpp @@ -0,0 +1,132 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveSettingsModule.h" + +#include "ISettingsModule.h" +#include "ISettingsSection.h" +#include "Modules/ModuleManager.h" + +#include "SGLog/SGLog.h" +#include "SGSettings/SGSettings.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveSettingsModule" + +void FSenseGloveSettingsModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveSettings module..."); + + SGLOG("Trying to get the Unreal Engine's Settings module..."); + + ISettingsModule* SettingsModule{FModuleManager::GetModulePtr("Settings")}; + if (SettingsModule) + { + SGLOG("Registering the SenseGlove settings manager through the Unreal Engine's Settings module..."); + + ISettingsSectionPtr SenseGloveSettingsSection{ + SettingsModule->RegisterSettings( + "Project", "Plugins", "SenseGloveSettings", + LOCTEXT("RuntimeSettingsName", "SenseGlove"), + LOCTEXT("RuntimeSettingsDescription", "Configure the SenseGlove settings"), + GetMutableDefault() + ) + }; + + if (SenseGloveSettingsSection.IsValid()) + { + SenseGloveSettingsSection->OnModified().BindRaw(this, &FSenseGloveSettingsModule::OnSettingsSaved); + + SGLOG("Successfully registered the SenseGlove settings manager!"); + } + else + { + SGLOG_ERROR("Failed to register the SenseGlove settings manager!"); + } + } + else + { + SGLOG_ERROR("Failed to get the Unreal Engine's Settings module!"); + } +} + +void FSenseGloveSettingsModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveSettings module..."); +} + +void FSenseGloveSettingsModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveSettings module has succeeded!"); +} + +void FSenseGloveSettingsModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveSettings module..."); + + SGLOG("Trying to get the Unreal Engine's Settings module..."); + + ISettingsModule* SettingsModule{FModuleManager::GetModulePtr("Settings")}; + if (SettingsModule) + { + SGLOG("Unregistering the SenseGlove settings manager through the Unreal Engine's Settings module..."); + + SettingsModule->UnregisterSettings("Project", "Plugins", "SenseGloveSettings"); + + SGLOG("Successfully unregistered the SenseGlove settings manager!"); + } + else + { + SGLOG_ERROR("Failed to get the Unreal Engine's Settings module!"); + } +} + +bool FSenseGloveSettingsModule::OnSettingsSaved() const +{ + USGSettings* Settings = GetMutableDefault(); + bool bResaveConfig = false; + + /// TODO + /// Validate settings here in case of invalid values. + /// In that case, we have to set bResaveConfig to true. + + if (bResaveConfig) + { + Settings->SaveConfig(); + } + + return true; +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettingsModule.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettingsModule.h new file mode 100644 index 0000000..d17fbfe --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Private/SenseGloveSettingsModule.h @@ -0,0 +1,54 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveSettings" + +class FSenseGloveSettingsModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; + +private: + bool OnSettingsSaved() const; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGDebugCubeSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGDebugCubeSettings.h new file mode 100644 index 0000000..061caf4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGDebugCubeSettings.h @@ -0,0 +1,82 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "Math/Color.h" +#include "Math/Vector.h" +#include "UObject/ObjectMacros.h" + +#include "SGDebugCubeSettings.generated.h" + +/** +* Implements the debug cube settings. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGDebugCubeSettings +{ + GENERATED_USTRUCT_BODY() + +public: + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube") + FVector Extent; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube") + FColor Color; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube") + bool bPersistentLines; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube") + float LifeTimeModifier; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube") + uint8 DepthPriority; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Cube") + float Thickness; + +public: + FSGDebugCubeSettings(); + + FSGDebugCubeSettings( + const FVector& InExtent, + const FColor& InColor, + bool bInPersistentLines, + float InLifeTimeModifier, + uint8 InDepthPriority, + float InThickness); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGDebugGizmoSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGDebugGizmoSettings.h new file mode 100644 index 0000000..de34c98 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGDebugGizmoSettings.h @@ -0,0 +1,89 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "Math/Color.h" +#include "UObject/ObjectMacros.h" + +#include "SGDebugGizmoSettings.generated.h" + +/** +* Implements the debug gizmo settings. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGDebugGizmoSettings +{ + GENERATED_USTRUCT_BODY() + +public: + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + float Length; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + FColor XAxisColor; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + FColor YAxisColor; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + FColor ZAxisColor; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + bool bPersistentLines; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + float LifeTimeModifier; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + uint8 DepthPriority; + + UPROPERTY(Config, EditDefaultsOnly, Category = "Debug Gizmo") + float Thickness; + +public: + FSGDebugGizmoSettings(); + + FSGDebugGizmoSettings( + float InLength, + const FColor& InXAxisColor, + const FColor& InYAxisColor, + const FColor& InZAxisColor, + bool bInPersistentLines, + float InLifeTimeModifier, + uint8 InDepthPriority, + float InThickness); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGGameUserSettingsSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGGameUserSettingsSettings.h new file mode 100644 index 0000000..964c54b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGGameUserSettingsSettings.h @@ -0,0 +1,74 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettings/SGHardwareBenchmarkingSettings.h" + +#include "SGGameUserSettingsSettings.generated.h" + +/** +* Implements the game user settings. +* +* The Game User Settings control the behavior of the SenseGlove instance of UGameUserSettings. The USGGameUserSettings +* class extends the functionality of UGameUserSettings to provide enhanced customization options specifically for +* applications that utilize the SenseGlove Unreal Engine Plugin. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGGameUserSettingsSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * The hardware-benchmarking settings. + * + * The settings in this section are utilized by the USGGameUserSettings::SetEngineScalabilitySettings() method when + * the Scalability parameter is set to ESGEngineScalabilitySettings::Auto. When the engine scalability settings set + * to auto the graphics settings are determined by running a hardware benchmark by calling the + * UGameUserSettings::RunHardwareBenchmark(). The settings listed here are basically the parameters passed to + * UGameUserSettings::RunHardwareBenchmark(). + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Game User Settings") + FSGHardwareBenchmarkingSettings HardwareBenchmarkingSettings; + +public: + FSGGameUserSettingsSettings(); + + FSGGameUserSettingsSettings( + const FSGHardwareBenchmarkingSettings& InHardwareBenchmarkingSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h new file mode 100644 index 0000000..c50fc72 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGGloveTrackingSettings.h @@ -0,0 +1,67 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGGloveTrackingSettings.generated.h" + +/** +* Implements the glove tracking settings for the SenseGlove Tracking module. +* +* Provides the tracking settings related to SenseGlove devices. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGGloveTrackingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * The glove data retrieval refresh rate. This affects the interval in which + * the tracking module checks for glove connectivity and data retrieval. + * + * The default is s 60Hz (data retrieval operations per second). + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Glove Tracking") + float DataRetrievalRefreshRate; + +public: + FSGGloveTrackingSettings(); + + explicit FSGGloveTrackingSettings( + float InDataRetrievalRefreshRate); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHMDTrackingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHMDTrackingSettings.h new file mode 100644 index 0000000..dbc93fc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHMDTrackingSettings.h @@ -0,0 +1,67 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGTrackingTypes.h" + +#include "SGHMDTrackingSettings.generated.h" + +/** +* Implements the HMD tracking settings for the SenseGlove Tracking module. +* +* Provides the tracking settings related to head-mounted displays (HDMs) and their auto-detection functionality. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGHMDTrackingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Determines which VIVE HMD to prioritize for detection, as the current detection mechanism cannot differentiate + * between HTC VIVE Focus Vision, HTC VIVE XR Elite, and HTC VIVE Focus 3. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="HMD Tracking") + ESGViveHMDDetectionPriority ViveHMDDetectionPriority; + +public: + FSGHMDTrackingSettings(); + + explicit FSGHMDTrackingSettings( + ESGViveHMDDetectionPriority InViveHmdDetectionPriority); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHandTrackingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHandTrackingSettings.h new file mode 100644 index 0000000..a44ea4a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHandTrackingSettings.h @@ -0,0 +1,77 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +#include "SGHandTrackingSettings.generated.h" + +/** +* Implements the hand tracking settings for the SenseGlove Tracking module. +* +* The settings in this section only affects the hand-tracking functionality when it's enabled and available. When +* enabled the bare hands can be used instead of SenseGlove devices to interact within the VR simulation, of course +* without the haptics feedback provided by the SenseGlove devices. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGHandTrackingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * If disabled, (the default) the motion sources for hand tracking will be of the form '[Left|Right][Keypoint]'. If + * enabled, they will be of the form 'HandTracking[Left|Right][Keypoint]'. It is recommended to be enabled to avoid + * collisions between motion sources from different device types. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Hand Tracking") + bool bUseMoreSpecificMotionSourceNames; + + /** + * If enabled, hand tracking supports the 'Left' and 'Right' legacy motion sources. If disabled, it does not. It is + * recommended to be disabled unless you need legacy compatibility in older unreal projects. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Hand Tracking") + bool bSupportLegacyControllerMotionSources; + +public: + FSGHandTrackingSettings(); + + FSGHandTrackingSettings( + bool bInUseMoreSpecificMotionSourceNames, + bool bInSupportLegacyControllerMotionSources); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHardwareBenchmarkingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHardwareBenchmarkingSettings.h new file mode 100644 index 0000000..60adbd8 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGHardwareBenchmarkingSettings.h @@ -0,0 +1,85 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGHardwareBenchmarkingSettings.generated.h" + +/** +* Implements the hardware-benchmarking settings. +* +* The settings in this section are utilized by the USGGameUserSettings::SetEngineScalabilitySettings() method when the +* Scalability parameter is set to ESGEngineScalabilitySettings::Auto. When the engine scalability settings set to auto +* the graphics settings are determined by running a hardware benchmark by calling the +* UGameUserSettings::RunHardwareBenchmark(). The settings listed here are basically the parameters passed to +* UGameUserSettings::RunHardwareBenchmark(). +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGHardwareBenchmarkingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * The WorkScale parameter determines the intensity of the benchmark test. Higher values result in more intensive + * testing, which can help achieve more accurate scalability settings. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Hardware Benchmarking") + float WorkScale; + + /** + * The CPUMultiplier parameter allows you to adjust the impact of CPU performance on the benchmark results. + * Increasing this value will emphasize CPU performance more heavily in determining scalability settings. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Hardware Benchmarking") + float CPUMultiplier; + + /** + * The GPUMultiplier parameter lets you modify the influence of GPU performance on the benchmark outcomes. A higher + * value will increase the weight of GPU performance in setting scalability. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Hardware Benchmarking") + float GPUMultiplier; + +public: + FSGHardwareBenchmarkingSettings(); + + FSGHardwareBenchmarkingSettings( + float InWorkScale, + float InCPUMultiplier, + float InGPUMultiplier); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGInitializationSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGInitializationSettings.h new file mode 100644 index 0000000..aafeef6 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGInitializationSettings.h @@ -0,0 +1,70 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +#include "SGInitializationSettings.generated.h" + +/** +* Implements the plugin initialization settings. +* +* The Initialization Settings section is designed to control how the SenseGlove Unreal Engine Plugin is initialized, +* allowing you to customize its behavior to suit your project's needs. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGInitializationSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * If enabled, the plugin tries to check and validate whether the default for classes such as GameMode, + * GameInstance, etc. are indeed SenseGlove classes or SenseGlove-derived classes. If not, it attempts to set them. + * If you don't like this behavior for whatever reason, consider disabling this option. + * + * By default, this option is disabled. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Initialization") + bool bValidateIfDefaultClassesAreSGCompliant; + +public: + FSGInitializationSettings(); + + explicit FSGInitializationSettings( + bool bInValidateIfDefaultClassesAreSGCompliant); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGSettings.h new file mode 100644 index 0000000..0ad4aca --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGSettings.h @@ -0,0 +1,153 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Subsystems/EngineSubsystem.h" +#include "Templates/UniquePtr.h" +#include "UObject/ObjectMacros.h" + +#include "SGSettings/SGGameUserSettingsSettings.h" +#include "SGSettings/SGInitializationSettings.h" +#include "SGSettings/SGTrackingSettings.h" +#include "SGSettings/SGVirtualHandSettings.h" + +#include "SGSettings.generated.h" + +/** +* Implements the settings for the SenseGlove Unreal Engine Plugin. +*/ +UCLASS(config = SenseGloveSettings, DefaultConfig) +class SENSEGLOVESETTINGS_API USGSettings : public UEngineSubsystem +{ + GENERATED_BODY() + +public: + static USGSettings* GetInstance(); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + /** + * The Initialization Settings section is designed to control how the SenseGlove Unreal Engine Plugin is + * initialized, allowing you to customize its behavior to suit your project's needs. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "SenseGlove") + FSGInitializationSettings InitializationSettings; + + /** + * The Game User Settings control the behavior of the SenseGlove instance of UGameUserSettings. The + * USGGameUserSettings class extends the functionality of UGameUserSettings to provide enhanced customization + * options specifically for applications that utilize the SenseGlove Unreal Engine Plugin. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "SenseGlove") + FSGGameUserSettingsSettings GameUserSettings; + + /** + * The tracking settings are primarily used by the SenseGlove Tracking module and are divided into various + * subsections, each focusing on a specific aspect of tracking. These subsections, along with the other settings + * directly provided by this section, provide comprehensive control over the tracking functionalities. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "SenseGlove") + FSGTrackingSettings TrackingSettings; + + /** + * The Virtual Hand Settings are utilized by various SenseGlove modules such as Debug, Editor, Tracking, and the + * main module. These settings are divided into several subsections, each focusing on a specific aspect of the + * virtual hand functionality. Together with the settings provided directly in this section, they offer + * comprehensive control over any system or component that utilizes the virtual hand. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="SenseGlove") + FSGVirtualHandSettings VirtualHandSettings; + +private: + USGSettings(); + +public: + FORCEINLINE const FSGInitializationSettings& GetInitializationSettings() const + { + return InitializationSettings; + } + + void SetInitializationSettings(const FSGInitializationSettings& InInitializationSettings) + { + InitializationSettings = InInitializationSettings; + } + + FORCEINLINE const FSGGameUserSettingsSettings& GetGameUserSettings() const + { + return GameUserSettings; + } + + void SetGameUserSettings(const FSGGameUserSettingsSettings& InGameUserSettings) + { + GameUserSettings = InGameUserSettings; + } + + FORCEINLINE const FSGTrackingSettings& GetTrackingSettings() const + { + return TrackingSettings; + } + + void SetTrackingSettings(const FSGTrackingSettings& InTrackingSettings) + { + TrackingSettings = InTrackingSettings; + } + + FORCEINLINE const FSGVirtualHandSettings& GetVirtualHandSettings() const + { + return VirtualHandSettings; + } + + void SetVirtualHandSettings(const FSGVirtualHandSettings& InVirtualHandSettings) + { + VirtualHandSettings = InVirtualHandSettings; + } + +public: + virtual bool ShouldCreateSubsystem(UObject* Outer) const override; + + virtual void Initialize(FSubsystemCollectionBase& Collection) override; + virtual void Deinitialize() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGTrackingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGTrackingSettings.h new file mode 100644 index 0000000..9786c4a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGTrackingSettings.h @@ -0,0 +1,109 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +#include "SGSettings/SGGloveTrackingSettings.h" +#include "SGSettings/SGHandTrackingSettings.h" +#include "SGSettings/SGHMDTrackingSettings.h" +#include "SGSettings/SGWristTrackingSettings.h" + +#include "SGTrackingSettings.generated.h" + +/** +* Implements the settings for the SenseGlove Tracking module. +* +* The tracking settings are primarily used by the SenseGlove Tracking module and are divided into various subsections, +* each focusing on a specific aspect of tracking. These subsections, along with the other settings directly provided by +* this section, provide comprehensive control over the tracking functionalities. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGTrackingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Determines whether to fall back to hand-tracking, or not, when no SenseGlove device is detected: + * + * - If disabled, only a real glove will be tracked. + * - If enabled, the plugin will fall back to hand-tracking when it's available and supported by the HMD device. + * + * Note: disabling this option hides the hand-tracking settings section, while enabling it makes the hand-tracking + * settings visible. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Tracking") + bool bFallbackToHandTrackingIfNoGloveDetected; + + /** + * Provides the tracking settings related to SenseGlove devices. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Tracking") + FSGGloveTrackingSettings GloveTrackingSettings; + + /** + * The settings in this section only affects the hand-tracking functionality when it's enabled and available. When + * enabled the bare hands can be used instead of SenseGlove devices to interact within the VR simulation, of course + * without the haptics feedback provided by the SenseGlove devices. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Tracking", + meta=(EditCondition="bFallbackToHandTrackingIfNoGloveDetected", EditConditionHides)) + FSGHandTrackingSettings HandTrackingSettings; + + /** + * Provides the tracking settings related to head-mounted displays (HDMs) and their auto-detection functionality. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Tracking") + FSGHMDTrackingSettings HMDTrackingSettings; + + /** + * Provides the tracking settings applicable to wrist-tracking hardware. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Tracking") + FSGWristTrackingSettings WristTrackingSettings; + +public: + FSGTrackingSettings(); + + FSGTrackingSettings( + bool bInFallbackToHandTrackingIfNoGloveDetected, + const FSGGloveTrackingSettings& InGloveTrackingSettings, + const FSGHandTrackingSettings& InHandTrackingSettings, + const FSGHMDTrackingSettings& InHmdTrackingSettings, + const FSGWristTrackingSettings& InWristTrackingSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandAnimationSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandAnimationSettings.h new file mode 100644 index 0000000..9450361 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandAnimationSettings.h @@ -0,0 +1,82 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "Math/Rotator.h" +#include "UObject/ObjectMacros.h" +#include "UObject/SoftObjectPtr.h" + +#include "SGVirtualHandAnimationSettings.generated.h" + +class USkeletalMesh; + +/** +* Implements the virtual hand animation settings. +* +* Controls how the virtual hand model is animated by the animation system. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandAnimationSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Specifies the offset to apply to each bone's rotation when translating hand pose data to the virtual hand bones. + * This is useful if the virtual hand mesh was imported with an initial rotation. For example, the virtual hand + * model shipped with Unreal Engine's VRTemplate typically has an initial 90.0f degrees rotation on the Yaw axis. + * By default, this option has been set up with the Unreal Engine's VRTemplate virtual hand model in mind. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Animation") + FRotator AnimationBoneRotationCorrectionOffset; + + /** + * When enabled, the animation system applies the joint locations to the current virtual hand mesh bones in + * addition to the joint rotation. Otherwise, only the joint rotations are applied, and joint locations are + * ignored, leaving the bone locations untouched on the virtual hand mesh when animating it. Enabling this option + * typically improves the virtual hand animation. By default, this option is enabled. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Animation") + bool bShouldAnimationApplyBoneLocation; + +public: + FSGVirtualHandAnimationSettings(); + + FSGVirtualHandAnimationSettings( + const FRotator& InAnimationBoneRotationCorrectionOffset, + bool bInShouldAnimationApplyBoneLocation); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandDebuggingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandDebuggingSettings.h new file mode 100644 index 0000000..7553c37 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandDebuggingSettings.h @@ -0,0 +1,99 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +#include "SGSettings/SGDebugCubeSettings.h" +#include "SGSettings/SGDebugGizmoSettings.h" +#include "SGTypes/SGDebugTypes.h" + +#include "SGVirtualHandDebuggingSettings.generated.h" + +/** +* Implements the virtual hand debugging settings. +* +* Primarily used for visually debugging low-level hand data. When enabled, the Virtual Hand Component visualizes a +* debug virtual hand by drawing all individual hand joints. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandDebuggingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * If enabled, visualizes the debug virtual hand where possible. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging") + bool bDrawDebugVirtualHand; + + /** + * Determines the virtual hand drawing mode. If set to `CubicJoints, for every joint a debug cube will be drawn. + * If set to GizmoJoints, for every joint a debug gizmo will be drawn. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging", + meta=(EditCondition="bDrawDebugVirtualHand", EditConditionHides)) + ESGDebugVirtualHandDrawingMode DrawingMode; + + /** + * Visible and valid only if bDrawDebugVirtualHand is enabled and DrawingMode has been set to + * ESGDebugVirtualHandDrawingMode::CubicJoints. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging", + meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::CubicJoints", + EditConditionHides)) + FSGDebugCubeSettings DebugCubicHandSettings; + + /** + * Visible and valid only if bDrawDebugVirtualHand is enabled and DrawingMode has been set to + * ESGDebugVirtualHandDrawingMode::GizmoJoints. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Debugging", + meta=(EditCondition="bDrawDebugVirtualHand && DrawingMode == ESGDebugVirtualHandDrawingMode::GizmoJoints", + EditConditionHides)) + FSGDebugGizmoSettings DebugGizmoHandSettings; + +public: + FSGVirtualHandDebuggingSettings(); + + FSGVirtualHandDebuggingSettings( + bool bInDrawDebugVirtualHand, + ESGDebugVirtualHandDrawingMode InDrawingMode, + const FSGDebugCubeSettings& InDebugCubicHandSettings, + const FSGDebugGizmoSettings& InDebugGizmoHandSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandGrabSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandGrabSettings.h new file mode 100644 index 0000000..f0dcd9e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandGrabSettings.h @@ -0,0 +1,109 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Transform.h" +#include "Math/Vector.h" +#include "UObject/NameTypes.h" +#include "UObject/ObjectMacros.h" +#include "UObject/SoftObjectPtr.h" + +#include "SGVirtualHandGrabSettings.generated.h" + +class USkeletalMesh; + +/** +* Implements the virtual hand grab settings. +* +* Utilized by the SenseGlove Sockets Editor to automatically generate the hand sockets required by the Grab +* system to function. +* +* The SGPawn also utilizes these settings to set up the grab colliders on the virtual hand components. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandGrabSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * The default socket name for the grab attach point, usually located at the palm of the hand. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Grab") + FName GrabAttachPointSocketName; + + /** + * The default socket transform (location, rotation, scale) for the grab attach point, usually located at the palm + * of the hand. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Grab") + FTransform GrabAttachPointSocketTransform; + + /** + * The default collider size for the fingers' grab colliders. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Grab") + FVector DefaultColliderSize; + + /** + * The default socket name for the thumb finger's grab collider, usually located at the tip of the thumb finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Grab") + FName ThumbColliderSocketName; + + /** + * The default socket name for the index finger's grab collider, usually located at the tip of the index finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Grab") + FName IndexColliderSocketName; + + /** + * The default socket name for the middle finger's grab collider, usually located at the tip of the middle finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Grab") + FName MiddleColliderSocketName; + +public: + FSGVirtualHandGrabSettings(); + + FSGVirtualHandGrabSettings( + const FName& InGrabAttachPointSocketName, + const FTransform& InGrabAttachPointSocketTransform, + const FVector& InDefaultColliderSize, + const FName& InThumbColliderSocketName, + const FName& InIndexColliderSocketName, + const FName& InMiddleColliderSocketName); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandHapticsSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandHapticsSettings.h new file mode 100644 index 0000000..e8ee1fe --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandHapticsSettings.h @@ -0,0 +1,69 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "UObject/SoftObjectPtr.h" + +#include "SGVirtualHandHapticsSettings.generated.h" + +class USkeletalMesh; + +/** +* Implements the virtual hand haptics settings. +* +* Utilized by the haptics system. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandHapticsSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Forces all haptics to stop automatically on the EndPlay event. This is useful for situations where the + * simulation has ended, but ongoing haptic feedback might remain active on the glove indefinitely. By default, + * this setting is enabled. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Haptics") + bool bAutoStopAllHapticsOnEndPlay; + +public: + FSGVirtualHandHapticsSettings(); + + FSGVirtualHandHapticsSettings( + bool bInAutoStopAllHapticsOnEndPlay); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandMeshSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandMeshSettings.h new file mode 100644 index 0000000..8b5cbf4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandMeshSettings.h @@ -0,0 +1,179 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Containers/UnrealString.h" +#include "Engine/SkeletalMesh.h" +#include "Math/Rotator.h" +#include "Math/Transform.h" +#include "UObject/NameTypes.h" +#include "UObject/ObjectMacros.h" +#include "UObject/SoftObjectPtr.h" + +#include "SGSettings/SGVirtualHandPhalangesLengthSettings.h" + +#include "SGVirtualHandMeshSettings.generated.h" + +class USkeletalMesh; + +/** +* Implements the virtual hand mesh settings. +* +* Utilized by the SenseGlove Tracking module to account for the current virtual hand mesh when generating hand pose +* data, resulting in more accurate glove or hand data representation and also smoother animations. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandMeshSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * The virtual hand model for the left hand is to be used by the SenseGlove Tracking module to generate all the 26 + * joint data present in the FXRHandTrackingState. The main reason the Tracking module requires a virtual hand + * mesh as a reference is the SenseGlove Hand Pose format only provides 15 joints. So, the remaining joint data for + * FXRHandTrackingState are calculated from a virtual hand mesh compatible with the Epic rig and also the values + * specified by DistalPhalangesLengthSettings. Furthermore, when calculating the existing joints data, their + * current locations and rotations are taken into account in calculating the resulting FXRHandTrackingState. + * + * By default, no virtual hand mesh is set. + * + * Caution: + * If no virtual hand mesh is set, the Tracking module will fall back to hard-coded values extracted from the + * standard virtual hand model shipped by Unreal Engine VRTemplate. This may result in distorted hand mesh while + * animating a hand in case a different hand mesh other than the default Epic virtual hand mesh is being set on the + * virtual hand components. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Mesh") + TSoftObjectPtr LeftHandReferenceMesh; + + /** + * The virtual hand model for the right hand is to be used by the SenseGlove Tracking module to generate all the 26 + * joint data present in the FXRHandTrackingState. The main reason the Tracking module requires a virtual hand + * mesh as a reference is the SenseGlove Hand Pose format only provides 15 joints. So, the remaining joint data for + * FXRHandTrackingState are calculated from a virtual hand mesh compatible with the Epic rig and also the values + * specified by DistalPhalangesLengthSettings. Furthermore, when calculating the existing joints data, their + * current locations and rotations are taken into account in calculating the resulting FXRHandTrackingState. + * + * By default, no virtual hand mesh is set. + * + * Caution: + * If no virtual hand mesh is set, the Tracking module will fall back to hard-coded values extracted from the + * standard virtual hand model shipped by Unreal Engine VRTemplate. This may result in distorted hand mesh while + * animating a hand in case a different hand mesh other than the default Epic virtual hand mesh is being set on the + * virtual hand components. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Mesh") + TSoftObjectPtr RightHandReferenceMesh; + + /** + * The length of distal phalanges that cannot be retrieved from any virtual hand mesh compliant with the Epic + * standard rig. Also, the SenseGlove Hand Pose format does not provide these. This is used by SenseGlove Tracking + * module to calculate an FXRHandTrackingState the all 26 joints. The values you specify here depend on the + * shape of the virtual hand mesh and the defaults are approximated for the virtual hand model shipped with the + * Unreal Engine VRTemplate. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Mesh") + FSGVirtualHandPhalangesLengthSettings DistalPhalangesLengthSettings; + + /** + * Used mostly by the SenseGlove Tracking module and SGPawn to offset for any initial rotation during the virtual + * hand mesh import process. This is the case for example with the virtual hand model shipped with Unreal Engine's + * VRTemplate, which typically has an initial -90.0f degrees rotation on the Yaw axis. By default, this option has + * been set up with the Unreal Engine's VRTemplate virtual hand model in mind. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Mesh") + FRotator RootBoneRotationCorrection; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + TMap LeftHandDefaultReferenceBoneTransforms; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + TMap RightHandDefaultReferenceBoneTransforms; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + TArray LeftHandBoneNames; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + TArray RightHandBoneNames; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + FString DefaultLeftHandMeshPath; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + FString DefaultLeftHandMeshPathOnly; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + FString DefaultRightHandMeshPath; + + /** + * Read-only and for internal use only. + */ + UPROPERTY(Config, VisibleDefaultsOnly, Category="Mesh") + FString DefaultRightHandMeshPathOnly; + +public: + FSGVirtualHandMeshSettings(); + + FSGVirtualHandMeshSettings( + const TSoftObjectPtr& InLeftHandReferenceMesh, + const TSoftObjectPtr& InRightHandReferenceMesh, + const FSGVirtualHandPhalangesLengthSettings& InDistalPhalangesLengthSettings, + const FRotator& InRootBoneRotationCorrection); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandPhalangesLengthSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandPhalangesLengthSettings.h new file mode 100644 index 0000000..ab190f1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandPhalangesLengthSettings.h @@ -0,0 +1,78 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "UObject/SoftObjectPtr.h" + +#include "SGVirtualHandPhalangesLengthSettings.generated.h" + +class USkeletalMesh; + +/** +* Implements the virtual hand phalanges length settings. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandPhalangesLengthSettings +{ + GENERATED_USTRUCT_BODY() + +public: + UPROPERTY(Config, EditDefaultsOnly, Category="Phalanges Length") + float Thumb; + + UPROPERTY(Config, EditDefaultsOnly, Category="Phalanges Length") + float Index; + + UPROPERTY(Config, EditDefaultsOnly, Category="Phalanges Length") + float Middle; + + UPROPERTY(Config, EditDefaultsOnly, Category="Phalanges Length") + float Ring; + + UPROPERTY(Config, EditDefaultsOnly, Category="Phalanges Length") + float Little; + +public: + FSGVirtualHandPhalangesLengthSettings(); + + FSGVirtualHandPhalangesLengthSettings( + float InThumb, + float InIndex, + float InMiddle, + float InRing, + float InLittle); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandSettings.h new file mode 100644 index 0000000..e7887e3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandSettings.h @@ -0,0 +1,128 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "UObject/SoftObjectPtr.h" + +#include "SGSettings/SGVirtualHandAnimationSettings.h" +#include "SGSettings/SGVirtualHandDebuggingSettings.h" +#include "SGSettings/SGVirtualHandGrabSettings.h" +#include "SGSettings/SGVirtualHandHapticsSettings.h" +#include "SGSettings/SGVirtualHandMeshSettings.h" +#include "SGSettings/SGVirtualHandTouchSettings.h" + +#include "SGVirtualHandSettings.generated.h" + +/** +* Implements the virtual hand settings. +* +* The Virtual Hand Settings are utilized by various SenseGlove modules such as Debug, Editor, Tracking, and the main +* module. These settings are divided into several subsections, each focusing on a specific aspect of the virtual hand +* functionality. Together with the settings provided directly in this section, they offer comprehensive control over +* any system or component that utilizes the virtual hand. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Used by the Virtual Hand Component to determine its visibility when no hand data, either from a SenseGlove or + * hand-tracking, is available. If enabled, the virtual hand mesh remains visible even when no data is available. + * By default, this setting is disabled, providing users of the simulation with a clear indicator that no hand data + * is currently available. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + bool bVisibleWhenHandDataUnavailable; + + /** + * Controls how the virtual hand model is animated by the animation system. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + FSGVirtualHandAnimationSettings AnimationSettings; + + /** + * Primarily used for visually debugging low-level hand data. When enabled, the Virtual Hand Component visualizes a + * debug virtual hand by drawing all individual hand joints. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + FSGVirtualHandDebuggingSettings DebuggingSettings; + + /** + * Utilized by the SenseGlove Sockets Editor to automatically generate the hand sockets required by the Grab + * system to function. + * + * The SGPawn also utilizes these settings to set up the grab colliders on the virtual hand components. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + FSGVirtualHandGrabSettings GrabSettings; + + /** + * Utilized by the haptics system. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + FSGVirtualHandHapticsSettings HapticsSettings; + + /** + * Utilized by the SenseGlove Tracking module to account for the current virtual hand mesh when generating hand + * pose data, resulting in more accurate glove or hand data representation and also smoother animations. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + FSGVirtualHandMeshSettings MeshSettings; + + /** + * Utilized by the SenseGlove Sockets Editor to automatically generate the hand sockets required by the touch + * system to function. + * + * The SGPawn also utilizes these settings to set up the grab colliders on the virtual hand components. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Virtual Hand") + FSGVirtualHandTouchSettings TouchSettings; + +public: + FSGVirtualHandSettings(); + + FSGVirtualHandSettings( + bool bInVisibleWhenHandDataUnavailable, + const FSGVirtualHandAnimationSettings& InAnimationSettings, + const FSGVirtualHandDebuggingSettings& InDebuggingSettings, + const FSGVirtualHandGrabSettings& InGrabSettings, + const FSGVirtualHandHapticsSettings& InHapticsSettings, + const FSGVirtualHandMeshSettings& InMeshSettings, + const FSGVirtualHandTouchSettings& InTouchSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandSettingsOverrides.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandSettingsOverrides.h new file mode 100644 index 0000000..4e8b738 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandSettingsOverrides.h @@ -0,0 +1,127 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "UObject/SoftObjectPtr.h" + +#include "SGSettings/SGVirtualHandAnimationSettings.h" +#include "SGSettings/SGVirtualHandDebuggingSettings.h" +#include "SGSettings/SGVirtualHandGrabSettings.h" +#include "SGSettings/SGVirtualHandHapticsSettings.h" +#include "SGSettings/SGVirtualHandTouchSettings.h" + +#include "SGVirtualHandSettingsOverrides.generated.h" + +/** +* Implements the virtual hand settings' overrides. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandSettingsOverrides +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Determines whether to override the plugin's virtual hand settings or not. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove") + bool bOverridePluginSettings; + + /** + * Used by the Virtual Hand Component to determine its visibility when no hand data, either from a SenseGlove or + * hand-tracking, is available. If enabled, the virtual hand mesh remains visible even when no data is available. + * By default, this setting is disabled, providing users of the simulation with a clear indicator that no hand data + * is currently available. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + bool bVisibleWhenHandDataUnavailable; + + /** + * Controls how the virtual hand model is animated by the animation system. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + FSGVirtualHandAnimationSettings AnimationSettings; + + /** + * Primarily used for visually debugging low-level hand data. When enabled, the Virtual Hand Component visualizes a + * debug virtual hand by drawing all individual hand joints. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + FSGVirtualHandDebuggingSettings DebuggingSettings; + + /** + * Utilized by the SenseGlove Sockets Editor to automatically generate the hand sockets required by the Grab + * system to function. + * + * The SGPawn also utilizes these settings to set up the grab colliders on the virtual hand components. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + FSGVirtualHandGrabSettings GrabSettings; + + /** + * Utilized by the haptics system. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + FSGVirtualHandHapticsSettings HapticsSettings; + + /** + * Utilized by the SenseGlove Sockets Editor to automatically generate the hand sockets required by the touch + * system to function. + * + * The SGPawn also utilizes these settings to set up the grab colliders on the virtual hand components. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + FSGVirtualHandTouchSettings TouchSettings; + +public: + FSGVirtualHandSettingsOverrides(); + + FSGVirtualHandSettingsOverrides( + bool bInOverridePluginSettings, + bool bInVisibleWhenHandDataUnavailable, + const FSGVirtualHandAnimationSettings& InAnimationSettings, + const FSGVirtualHandDebuggingSettings& InDebuggingSettings, + const FSGVirtualHandGrabSettings& InGrabSettings, + const FSGVirtualHandHapticsSettings& InHapticsSettings, + const FSGVirtualHandTouchSettings& InTouchSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandTouchSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandTouchSettings.h new file mode 100644 index 0000000..10a4e5a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGVirtualHandTouchSettings.h @@ -0,0 +1,107 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" +#include "UObject/NameTypes.h" +#include "UObject/ObjectMacros.h" +#include "UObject/SoftObjectPtr.h" + +#include "SGVirtualHandTouchSettings.generated.h" + +class USkeletalMesh; + +/** +* Implements the virtual hand touch settings. +* +* Utilized by the SenseGlove Sockets Editor to automatically generate the hand sockets required by the touch +* system to function. +* +* The SGPawn also utilizes these settings to set up the grab colliders on the virtual hand components. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGVirtualHandTouchSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * The default collider size for the fingers' touch colliders. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Touch") + FVector DefaultColliderSize; + + /** + * The default socket name for the thumb finger's touch collider, usually located at the tip of the thumb finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Touch") + FName ThumbColliderSocketName; + + /** + * The default socket name for the index finger's touch collider, usually located at the tip of the index finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Touch") + FName IndexColliderSocketName; + + /** + * The default socket name for the middle finger's touch collider, usually located at the tip of the middle finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Touch") + FName MiddleColliderSocketName; + + /** + * The default socket name for the ring finger's touch collider, usually located at the tip of the ring finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Touch") + FName RingColliderSocketName; + + /** + * The default socket name for the pinky finger's touch collider, usually located at the tip of the pinky finger. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Touch") + FName PinkyColliderSocketName; + +public: + FSGVirtualHandTouchSettings(); + + FSGVirtualHandTouchSettings( + const FVector& InDefaultColliderSize, + const FName& InThumbColliderSocketName, + const FName& InIndexColliderSocketName, + const FName& InMiddleColliderSocketName, + const FName& InRingColliderSocketName, + const FName& InPinkyColliderSocketName); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingDebuggingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingDebuggingSettings.h new file mode 100644 index 0000000..2ee5264 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingDebuggingSettings.h @@ -0,0 +1,77 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "Math/Color.h" +#include "Math/Vector.h" +#include "UObject/ObjectMacros.h" + +#include "SGDebugGizmoSettings.h" + +#include "SGWristTrackingDebuggingSettings.generated.h" + +/** +* Implements the wrist tracking debugging settings. +* +* Provides debugging options for visually debugging the wrist tracker. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGWristTrackingDebuggingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * If enabled, visualizes the debug wrist trackers where possible. + */ + UPROPERTY(EditAnywhere, Category = "Debugging") + bool bDrawDebugWristTracker; + + /** + * Visible and valid only if bDrawDebugGizmo is enabled. + */ + UPROPERTY(EditAnywhere, Category = "Debugging", + meta=(EditCondition="bDrawDebugWristTracker", EditConditionHides)) + FSGDebugGizmoSettings DebugWristTrackerSettings; + +public: + FSGWristTrackingDebuggingSettings(); + + FSGWristTrackingDebuggingSettings( + bool bInDrawDebugWristTracker, + const FSGDebugGizmoSettings& InDebugWristTrackerSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingSettings.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingSettings.h new file mode 100644 index 0000000..8ff56b9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingSettings.h @@ -0,0 +1,193 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "InputCoreTypes.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" +#include "UObject/NameTypes.h" +#include "UObject/ObjectMacros.h" + +#include "SGSettings/SGWristTrackingDebuggingSettings.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGTrackingTypes.h" + +#include "SGWristTrackingSettings.generated.h" + +/** +* Implements the wrist tracking settings. +* +* Provides the tracking settings applicable to wrist-tracking hardware. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGWristTrackingSettings +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Specifies the type of OpenXR provider to use in order to extract the positional tracking data from the + * underlying XR system. If set to None, the plugin attempts to set this automatically by considering a combination + * of approaches including, the current value of `TrackingHardware` specified below, the platform it's targeted at, + * the available OpenXR plugins, along with HMD auto-detection mechanism to specify a compatible OpenXR tracking + * provider. Please note that the OpenXR provider depends on the combination of plugins, platform, and the settings + * you use. For example, it is possible to use a Vive Focus 3 Wrist Tracker on Microsoft Windows along with the + * Epic `OpenXRViveTracker` plugin and check the option `Emulate VIVE Wrist Tracker as VIVE Tracker` inside the + * VIVE Business Streaming application's Input settings. In that case, the correct OpenXR positional tracking + * provider to use would be `OpenXRViveTracker`. However, using the official ViveOpenXR plugin on Android, the + * correct OpenXR provider would be `OpenXRViveWristTracker`. + * + * Caution: + * HMD auto-detection is currently an experimental feature and may fail because HMD vendors occasionally change the + * properties utilized by the plugin for HMD detection. If you encounter issues, such as incorrect tracker offsets, + * it is recommended to explicitly specify the tracking hardware. + * + * Caution: + * Due to highly experimental nature of the HMD auto-detection feature, the HTC VIVE Focus Vision, HTC VIVE XR + * Elite, and HTC VIVE Focus Vision cannot be distinguished from each other in the current iteration. However, + * since the tracker devices and offsets for all these headsets are the same, this should not affect the + * performance or any functionality. The order in which the HMD is detected can be specified through the + * HMD-tracker setting `ViveHMDDetectionPriority`. + * + * Note: + * Ultimate Tracker and ViveOpenXRXrTracker are not supported, yet. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking") + ESGOpenXRPositionalTrackingProvider OpenXRPositionalTrackingProvider; + + /** + * Specifies the type of tracking hardware to use. If set to None, the plugin attempts at HMD auto-detection to + * automatically specify a compatible tracking hardware. If set to `Custom`, any desired location and rotation can + * be specified. + * + * Caution: + * HMD auto-detection is currently an experimental feature and may fail because HMD vendors occasionally change the + * properties utilized by the plugin for HMD detection. If you encounter issues, such as incorrect tracker offsets, + * it is recommended to explicitly specify the tracking hardware. + * + * Caution: + * Due to highly experimental nature of the HMD auto-detection feature, the HTC VIVE Focus Vision, HTC VIVE XR + * Elite, and HTC VIVE Focus Vision cannot be distinguished from each other in the current iteration. However, + * since the tracker devices and offsets for all these headsets are the same, this should not affect the + * performance or any functionality. The order in which the HMD is detected can be specified through the + * HMD-tracker setting `ViveHMDDetectionPriority`. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking") + ESGPositionalTrackingHardware TrackingHardware; + + /** + * Sets a custom location offset for left hand's wrist-tracking hardware. + * + * Note: + * This setting is visible and valid only if TrackingHardware is set to Custom. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking", + meta=(EditCondition="TrackingHardware == ESGPositionalTrackingHardware::Custom", EditConditionHides)) + FVector TrackingHardwareLocationOffsetLeftHand; + + /** + * Sets a custom location offset for right hand's wrist-tracking hardware. + * + * Note: + * This setting is visible and valid only if TrackingHardware is set to Custom. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking", + meta=(EditCondition="TrackingHardware == ESGPositionalTrackingHardware::Custom", EditConditionHides)) + FVector TrackingHardwareLocationOffsetRightHand; + + /** + * Sets a custom rotation offset for left hand's wrist-tracking hardware. + * + * Note: + * This setting is visible and valid only if TrackingHardware is set to Custom. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking", + meta=(EditCondition="TrackingHardware == ESGPositionalTrackingHardware::Custom", EditConditionHides)) + FRotator TrackingHardwareRotationOffsetLeftHand; + + /** + * Sets a custom rotation offset for right hand's wrist-tracking hardware. + * + * Note: + * This setting is visible and valid only if TrackingHardware is set to Custom. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking", + meta=(EditCondition="TrackingHardware == ESGPositionalTrackingHardware::Custom", EditConditionHides)) + FRotator TrackingHardwareRotationOffsetRightHand; + + /** + * Determines the motion source for the left hand. For Oculus HMDs, this is usually Left, and for VIVE HMDs, it's + * typically LeftFoot. + * + * Note: + * For VIVE devices using SteamVR, the motion source hardware for the left hand can be specified by the user + * through the SteamVR app. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Wrist Tracking") + FName LeftHandMotionSource; + + /** + * Determines the motion source for the left hand. For Oculus HMDs, this is usually Right, and for VIVE HMDs, it's + * typically RightFoot. + * + * Note: + * For VIVE devices using SteamVR, the motion source hardware for the right hand can be specified by the user + * through the SteamVR app. + */ + UPROPERTY(Config, EditDefaultsOnly, Category="Wrist Tracking") + FName RightHandMotionSource; + + /** + * Provides debugging options for visually debugging the wrist tracker. + */ + UPROPERTY(Config, EditDefaultsOnly, Category = "Wrist Tracking") + FSGWristTrackingDebuggingSettings DebuggingSettings; + +public: + FSGWristTrackingSettings(); + + FSGWristTrackingSettings( + const ESGOpenXRPositionalTrackingProvider InOpenXRPositionalTrackingProvider, + ESGPositionalTrackingHardware InTrackingHardware, + const FVector& InTrackingHardwareLocationOffsetLeftHand, + const FVector& InTrackingHardwareLocationOffsetRightHand, + const FRotator& InTrackingHardwareRotationOffsetLeftHand, + const FRotator& InTrackingHardwareRotationOffsetRightHand, + FName InLeftHandMotionSource, + FName InRightHandMotionSource, + const FSGWristTrackingDebuggingSettings& InDebuggingSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingSettingsOverrides.h b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingSettingsOverrides.h new file mode 100644 index 0000000..2126ae5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/Public/SGSettings/SGWristTrackingSettingsOverrides.h @@ -0,0 +1,74 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "InputCoreTypes.h" +#include "UObject/ObjectMacros.h" + +#include "SGWristTrackingDebuggingSettings.h" + +#include "SGWristTrackingSettingsOverrides.generated.h" + +/** +* Implements the wrist tracking settings' overrides. +*/ +USTRUCT(BlueprintType) +struct SENSEGLOVESETTINGS_API FSGWristTrackingSettingsOverrides +{ + GENERATED_USTRUCT_BODY() + +public: + /** + * Determines whether to override the plugin's wrist tracking settings or not. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove") + bool bOverridePluginSettings; + + /** + * Provides debugging options for visually debugging the wrist tracker. + */ + UPROPERTY(EditAnywhere, Category = "SenseGlove", + meta=(EditCondition="bOverridePluginSettings", EditConditionHides)) + FSGWristTrackingDebuggingSettings DebuggingSettings; + +public: + FSGWristTrackingSettingsOverrides(); + + FSGWristTrackingSettingsOverrides( + bool bInOverridePluginSettings, + const FSGWristTrackingDebuggingSettings& InDebuggingSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettings/SenseGloveSettings.Build.cs b/Plugins/SenseGlove/Source/SenseGloveSettings/SenseGloveSettings.Build.cs new file mode 100644 index 0000000..d85f575 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettings/SenseGloveSettings.Build.cs @@ -0,0 +1,85 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveSettings : ModuleRules +{ + public SenseGloveSettings(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "HeadMountedDisplay", + "InputCore", + } + ); + + if (Target.bBuildEditor) + { + PrivateDependencyModuleNames.AddRange( + new string[] + { + "PropertyEditor", + "Slate", + "SlateCore", + } + ); + } + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "Settings", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveCore", + "SenseGloveLog", + "SenseGloveTypes", + "SenseGloveUtils", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SGSettingsKismet/SGSettingsKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SGSettingsKismet/SGSettingsKismetLibrary.cpp new file mode 100644 index 0000000..12ae943 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SGSettingsKismet/SGSettingsKismetLibrary.cpp @@ -0,0 +1,87 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGSettingsKismet/SGSettingsKismetLibrary.h" + +#include "SGSettings/SGSettings.h" + +USGSettings* USGSettingsKismetLibrary::GetInstance() +{ + return USGSettings::GetInstance(); +} + +const FSGInitializationSettings& USGSettingsKismetLibrary::GetInitializationSettings(const USGSettings* Settings) +{ + return Settings->GetInitializationSettings(); +} + +void USGSettingsKismetLibrary::SetInitializationSettings( + USGSettings* Settings, const FSGInitializationSettings& InInitializationSettings) +{ + Settings->SetInitializationSettings(InInitializationSettings); +} + +const FSGGameUserSettingsSettings& USGSettingsKismetLibrary::GetGameUserSettings(const USGSettings* Settings) +{ + return Settings->GetGameUserSettings(); +} + +void USGSettingsKismetLibrary::SetGameUserSettings( + USGSettings* Settings, const FSGGameUserSettingsSettings& InGameUserSettingsSettings) +{ + Settings->SetGameUserSettings(InGameUserSettingsSettings); +} + +const FSGTrackingSettings& USGSettingsKismetLibrary::GetTrackingSettings(const USGSettings* Settings) +{ + return Settings->GetTrackingSettings(); +} + +void USGSettingsKismetLibrary::SetTrackingSettings( + USGSettings* Settings, const FSGTrackingSettings& InTrackingSettings) +{ + Settings->SetTrackingSettings(InTrackingSettings); +} + +const FSGVirtualHandSettings& USGSettingsKismetLibrary::GetVirtualHandSettings(const USGSettings* Settings) +{ + return Settings->GetVirtualHandSettings(); +} + +void USGSettingsKismetLibrary::SetVirtualHandSettings( + USGSettings* Settings, const FSGVirtualHandSettings& InVirtualHandSettings) +{ + Settings->SetVirtualHandSettings(InVirtualHandSettings); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismet.cpp new file mode 100644 index 0000000..992c939 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveSettingsKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveSettingsKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveSettingsKismetModule, SenseGloveSettingsKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismet.h b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismet.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismetModule.cpp new file mode 100644 index 0000000..d0e6e1b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismetModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveSettingsKismetModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveSettingsKismetModule" + +void FSenseGloveSettingsKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveSettingsKismet module..."); +} + +void FSenseGloveSettingsKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveSettingsKismet module..."); +} + +void FSenseGloveSettingsKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveSettingsKismet module has succeeded!"); +} + +void FSenseGloveSettingsKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveSettingsKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismetModule.h new file mode 100644 index 0000000..e36370d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Private/SenseGloveSettingsKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveSettingsKismet" + +class FSenseGloveSettingsKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Public/SGSettingsKismet/SGSettingsKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Public/SGSettingsKismet/SGSettingsKismetLibrary.h new file mode 100644 index 0000000..0b48e07 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/Public/SGSettingsKismet/SGSettingsKismetLibrary.h @@ -0,0 +1,84 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGSettings/SGInitializationSettings.h" +#include "SGSettings/SGGameUserSettingsSettings.h" +#include "SGSettings/SGTrackingSettings.h" +#include "SGSettings/SGVirtualHandSettings.h" + +#include "SGSettingsKismetLibrary.generated.h" + +class USGSettings; + +UCLASS(meta=(ScriptName = "SenseGloveSettingsKismetLibrary")) +class SENSEGLOVESETTINGSKISMET_API USGSettingsKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Settings") + static USGSettings* GetInstance(); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Settings") + static const FSGInitializationSettings& GetInitializationSettings(const USGSettings* Settings); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Settings") + static void SetInitializationSettings(UPARAM(ref) USGSettings* Settings, + const FSGInitializationSettings& InInitializationSettings); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Settings") + static const FSGGameUserSettingsSettings& GetGameUserSettings(const USGSettings* Settings); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Settings") + static void SetGameUserSettings(UPARAM(ref) USGSettings* Settings, + const FSGGameUserSettingsSettings& InGameUserSettings); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Settings") + static const FSGTrackingSettings& GetTrackingSettings(const USGSettings* Settings); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Settings") + static void SetTrackingSettings(UPARAM(ref) USGSettings* Settings, + const FSGTrackingSettings& InTrackingSettings); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Settings") + static const FSGVirtualHandSettings& GetVirtualHandSettings(const USGSettings* Settings); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Settings") + static void SetVirtualHandSettings(UPARAM(ref) USGSettings* Settings, + const FSGVirtualHandSettings& InVirtualHandSettings); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/SenseGloveSettingsKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/SenseGloveSettingsKismet.Build.cs new file mode 100644 index 0000000..f622b34 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveSettingsKismet/SenseGloveSettingsKismet.Build.cs @@ -0,0 +1,64 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveSettingsKismet : ModuleRules +{ + public SenseGloveSettingsKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveKismet", + "SenseGloveSettings", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp new file mode 100644 index 0000000..5b68d0b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGGloveTracker.cpp @@ -0,0 +1,211 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTracking/SGGloveTracker.h" + +#include "Engine/Engine.h" +#include "Engine/TimerHandle.h" +#include "Engine/World.h" +#include "TimerManager.h" + +#include "SGBackend/SGBackend.h" +#include "SGBuildHacks/SGPlatform.h" +#include "SGCore/SGHapticGlove.h" +#include "SGLog/SGLog.h" +#include "SGSettings/SGSettings.h" +#include "SGSettings/SGTrackingSettings.h" +#include "SGUtils/SGEngineUtils.h" + +struct USGGloveTracker::FImpl +{ + /************************ + * Static methods + ************************/ + + FORCEINLINE static float GetGloveConnectivityCheckInterval() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + return 1.0f / Settings->GetTrackingSettings().GloveTrackingSettings.DataRetrievalRefreshRate; + } + + /************************ + * Member variables + ************************/ + + FTimerHandle GloveConnectivityCheckTimer; + + /************************ + * Owner object + ************************/ + + USGGloveTracker* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(USGGloveTracker* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; + + /************************ + * Methods + ************************/ + + void UpdateGloves() const; +}; + +USGGloveTracker* USGGloveTracker::GetInstance(const UObject* WorldContextObject) +{ + const UWorld* World{WorldContextObject ? WorldContextObject->GetWorld() : FSGEngineUtils::GetWorld()}; + USGGloveTracker* Instance{IsValid(World) ? World->GetSubsystem() : nullptr}; + return Instance; +} + +USGGloveTracker::USGGloveTracker() + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)), + LeftGlove(nullptr), + RightGlove(nullptr) +{ +} + +bool USGGloveTracker::ShouldCreateSubsystem(UObject* Outer) const +{ + return true; +} + +void USGGloveTracker::Initialize(FSubsystemCollectionBase& Collection) +{ + SGLOG("Initializing the SenseGlove tracking singleton with the world lifetime..."); + + Super::Initialize(Collection); + + const UWorld* World{GetWorld()}; + if (ensureAlwaysMsgf(World, TEXT("Invalid world!"))) + { + SGLOG("Starting the glove connectivity check timer..."); + + const float Interval = FImpl::GetGloveConnectivityCheckInterval(); + + FTimerDelegate Handler; + Handler.BindLambda([= SG_CAPTURE_THIS]()-> void + { + Pimpl->UpdateGloves(); + }); + + FTimerManager& TimerManager = World->GetTimerManager(); + TimerManager.SetTimer( + Pimpl->GloveConnectivityCheckTimer, Handler, Interval, + true, -1.0f); + + if (ensureAlwaysMsgf(TimerManager.IsTimerActive(Pimpl->GloveConnectivityCheckTimer), + TEXT("GloveConnectivityCheckTimer is not active"))) + { + SGLOG("The glove connectivity check timer has been started successfully!"); + SGLOG("The glove connectivity timer interval is: ", Interval); + } + else + { + SGLOG_ERROR("The glove connectivity check timer has failed to start!"); + } + } + + SGLOG("The SenseGlove tracking singleton has been successfully initialized with the world lifetime!"); +} + +void USGGloveTracker::Deinitialize() +{ + SGLOG("De-initializing the SenseGlove tracking singleton due to the world lifetime expiration..."); + + Super::Deinitialize(); + + const UWorld* World{GetWorld()}; + if (ensureAlwaysMsgf(World, TEXT("Invalid world!"))) + { + SGLOG("Stopping the glove connectivity check timer..."); + + FTimerManager& TimerManager = World->GetTimerManager(); + TimerManager.ClearTimer(Pimpl->GloveConnectivityCheckTimer); + + SGLOG("The glove connectivity check timer has been stopped successfully!"); + } + + (void) Pimpl.Release(); + + SGLOG("The SenseGlove tracking singleton has been successfully de-initialized!"); +} + +USGGloveTracker::FImpl::FImpl(USGGloveTracker* InOwner) + : Owner(InOwner) +{ +} + +USGGloveTracker::FImpl::~FImpl() = default; + +void USGGloveTracker::FImpl::UpdateGloves() const +{ + if (!USGBackend::GetInstance()->IsBackendInitialized()) + { + const bool bSucceeded = USGBackend::GetInstance()->InitializeBackend(); + if (!bSucceeded) + { + return; + } + } + + const bool bIsLeftGloveConnected = USGHapticGlove::GetGlove(Owner, false, Owner->LeftGlove); + if (!bIsLeftGloveConnected) + { + Owner->LeftGlove = nullptr; + } + + const bool bIsRightGloveConnected = USGHapticGlove::GetGlove(Owner, true, Owner->RightGlove); + if (!bIsRightGloveConnected) + { + Owner->RightGlove = nullptr; + } +} + +void USGGloveTracker::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGHMDTracker.cpp b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGHMDTracker.cpp new file mode 100644 index 0000000..9947a5e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGHMDTracker.cpp @@ -0,0 +1,593 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTracking/SGHMDTracker.h" + +#include "Runtime/Launch/Resources/Version.h" + +#include "Async/Async.h" +#include "Async/Future.h" +#include "Async/TaskGraphInterfaces.h" +#include "Engine/Engine.h" +#include "IHeadMountedDisplay.h" +#include "IXRTrackingSystem.h" +#include "Misc/Optional.h" +#include "Misc/Timespan.h" + +#include "SGSettings/SGSettings.h" + +struct FSGHMDTracker::FStaticImpl +{ + /************************ + * Static methods + ************************/ + + static void GetHMDMonitorInfo( + IHeadMountedDisplay* Device, IHeadMountedDisplay::MonitorInfo& OutMonitorInfo); + + /************************ + * Constructor / Destructor + ************************/ + + explicit FStaticImpl() = default; + virtual ~FStaticImpl() = delete; +}; + +void FSGHMDTracker::FStaticImpl::GetHMDMonitorInfo( + IHeadMountedDisplay* Device, IHeadMountedDisplay::MonitorInfo& OutMonitorInfo) +{ + TPromise> Promise; + const TFuture> Future{Promise.GetFuture()}; + + AsyncTask(ENamedThreads::ActualRenderingThread, + [ + Device, + Promise = MoveTemp(Promise)]() mutable + { + IHeadMountedDisplay::MonitorInfo MonitorInfo; + Device->GetHMDMonitorInfo(MonitorInfo); + + Promise.SetValue(MoveTemp(MonitorInfo)); + }); + + if (Future.WaitFor(FTimespan::FromMilliseconds(100))) + { + TOptional Result{Future.Get()}; + if (Result.IsSet()) + { + OutMonitorInfo = Result.GetValue(); + } + } +} + +FName FSGHMDTracker::GetDeviceName() +{ + if (GEngine && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed()) + { + const IHeadMountedDisplay* Device{GEngine->XRSystem->GetHMDDevice()}; + if (Device) + { + const FName DeviceName{Device->GetHMDName()}; + return DeviceName; + } + } + return NAME_None; +} + +bool FSGHMDTracker::IsMetaQuest2() +{ + static const FName MetaQuest2DeviceIdentifier{TEXT("Meta Quest 2")}; + static const FName OculusQuest2DeviceIdentifier{TEXT("Oculus Quest2")}; + static const FString Quest2DeviceIdentifier1{TEXT("Quest 2")}; + static const FString Quest2DeviceIdentifier2{TEXT("Quest2")}; + + const FName DeviceName{GetDeviceName()}; + bool bMatched = DeviceName == MetaQuest2DeviceIdentifier || DeviceName == OculusQuest2DeviceIdentifier; + if (!bMatched) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bMatched = DeviceNameString.Contains(Quest2DeviceIdentifier1) + || DeviceNameString.Contains(Quest2DeviceIdentifier2); + } + + return bMatched; +} + +bool FSGHMDTracker::IsMetaQuestPro() +{ + static const FName MetaQuestProDeviceIdentifier{TEXT("Meta Quest Pro")}; + static const FName OculusQuestProDeviceIdentifier{TEXT("Oculus QuestPro")}; + static const FString QuestProDeviceIdentifier1{TEXT("Quest Pro")}; + static const FString QuestProDeviceIdentifier2{TEXT("QuestPro")}; + + const FName DeviceName{GetDeviceName()}; + bool bMatched = DeviceName == MetaQuestProDeviceIdentifier || DeviceName == OculusQuestProDeviceIdentifier; + if (!bMatched) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bMatched = DeviceNameString.Contains(QuestProDeviceIdentifier1) + || DeviceNameString.Contains(QuestProDeviceIdentifier2); + } + + return bMatched; +} + +bool FSGHMDTracker::IsMetaQuest3() +{ + static const FName MetaQuest3DeviceIdentifier{TEXT("Meta Quest 3")}; + static const FName OculusQuest3DeviceIdentifier{TEXT("Oculus Quest3")}; + static const FString Quest3DeviceIdentifier1{TEXT("Quest 3")}; + static const FString Quest3DeviceIdentifier2{TEXT("Quest3")}; + + const FName DeviceName{GetDeviceName()}; + bool bMatched = DeviceName == MetaQuest3DeviceIdentifier || DeviceName == OculusQuest3DeviceIdentifier; + if (!bMatched) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bMatched = DeviceNameString.Contains(Quest3DeviceIdentifier1) + || DeviceNameString.Contains(Quest3DeviceIdentifier2); + } + + return bMatched; +} + +bool FSGHMDTracker::IsHtcVivePro() +{ +#if PLATFORM_ANDROID + return false; +#else /* PLATFORM_ANDROID */ + static const FName DeviceIdentifier{TEXT("Vive OpenXR: Vive SRanipal")}; + static const FString ViveDeviceIdentifier{TEXT("Vive")}; + static const FString SRanipalDeviceIdentifier{TEXT("SRanipal")}; + + static const FName DeviceIdentifier2{TEXT("SteamVR/OpenXR : lighthouse")}; + static const FString LighthouseIdentifier{TEXT("lighthouse")}; + + const FName DeviceName{GetDeviceName()}; + + bool bNameMatches = DeviceName == DeviceIdentifier || DeviceName == DeviceIdentifier2; + if (!bNameMatches) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bNameMatches = DeviceNameString.Contains(ViveDeviceIdentifier) + || DeviceNameString.Contains(SRanipalDeviceIdentifier) + || DeviceNameString.Contains(LighthouseIdentifier); + } + + bool bResolutionMatches = false; + + if (bNameMatches) + { + if (GEngine && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed()) + { + IHeadMountedDisplay* Device{GEngine->XRSystem->GetHMDDevice()}; + if (Device) + { + IHeadMountedDisplay::MonitorInfo HmdMonitorInfo; + FStaticImpl::GetHMDMonitorInfo(Device, HmdMonitorInfo); + + /// NOTE + // VIVE Pro: + // - Official Spec: 1440 x 1600 pixels per eye (2880 x 1600 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 4936 x 2740 + // VIVE Focus 3: + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE XR Elite + // - Official Spec: 1920 x 1920 pixels per eye (3840 x 1920 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE Focus Vision + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): 1720 x 1720 + if (HmdMonitorInfo.ResolutionX < 5000 && HmdMonitorInfo.ResolutionY > 2700) + { + bResolutionMatches = true; + } + } + } + } + + const bool bMatched = bNameMatches && bResolutionMatches; + + return bMatched; +#endif /* PLATFORM_ANDROID */ +} + +bool FSGHMDTracker::IsHtcViveFocus3() +{ +#if PLATFORM_ANDROID + static const FName DeviceIdentifier{TEXT("WAVE:SUE")}; + + const FName DeviceName{GetDeviceName()}; + + const bool bNameMatches = DeviceName == DeviceIdentifier; +#else /* PLATFORM_ANDROID */ + static const FName DeviceIdentifier{TEXT("Vive OpenXR: Vive SRanipal")}; + static const FString ViveDeviceIdentifier{TEXT("Vive")}; + static const FString SRanipalDeviceIdentifier{TEXT("SRanipal")}; + + const FName DeviceName{GetDeviceName()}; + + bool bNameMatches = DeviceName == DeviceIdentifier; + if (!bNameMatches) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bNameMatches = DeviceNameString.Contains(ViveDeviceIdentifier) + || DeviceNameString.Contains(SRanipalDeviceIdentifier); + } +#endif /* PLATFORM_ANDROID */ + + /// NOTE + /// For the time being since we cannot distinguish between VIVE Focus Vision, VIVE XR Elite, and VIVE Focus 3 using + /// resolution checks, we skip the resolution checks altogether and assume it's not a VIVE Pro, as VIVE Pro won't + /// come with Android support. +#if PLATFORM_ANDROID + bool bResolutionMatches = true; +#else /* PLATFORM_ANDROID */ + bool bResolutionMatches = false; + + if (bNameMatches) + { + if (GEngine && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed()) + { + IHeadMountedDisplay* Device{GEngine->XRSystem->GetHMDDevice()}; + if (Device) + { + IHeadMountedDisplay::MonitorInfo HmdMonitorInfo; + FStaticImpl::GetHMDMonitorInfo(Device, HmdMonitorInfo); + + /// NOTE + // VIVE Pro: + // - Official Spec: 1440 x 1600 pixels per eye (2880 x 1600 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 4936 x 2740 + // VIVE Focus 3: + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE XR Elite + // - Official Spec: 1920 x 1920 pixels per eye (3840 x 1920 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE Focus Vision + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): 1720 x 1720 + if (HmdMonitorInfo.ResolutionX > 5000 && + (HmdMonitorInfo.ResolutionY > 2500 && HmdMonitorInfo.ResolutionY < 2700)) + { + bResolutionMatches = true; + } + } + } + } +#endif /* PLATFORM_ANDROID */ + + const bool bMatched = bNameMatches && bResolutionMatches; + + return bMatched; +} + +bool FSGHMDTracker::IsHtcViveXRElite() +{ +#if PLATFORM_ANDROID + static const FName DeviceIdentifier{TEXT("WAVE:SUE")}; + + const FName DeviceName{GetDeviceName()}; + + const bool bNameMatches = DeviceName == DeviceIdentifier; +#else /* PLATFORM_ANDROID */ + static const FName DeviceIdentifier{TEXT("Vive OpenXR: Vive SRanipal")}; + static const FString ViveDeviceIdentifier{TEXT("Vive")}; + static const FString SRanipalDeviceIdentifier{TEXT("SRanipal")}; + + const FName DeviceName{GetDeviceName()}; + + bool bNameMatches = DeviceName == DeviceIdentifier; + if (!bNameMatches) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bNameMatches = DeviceNameString.Contains(ViveDeviceIdentifier) + || DeviceNameString.Contains(SRanipalDeviceIdentifier); + } +#endif /* PLATFORM_ANDROID */ + + /// NOTE + /// For the time being since we cannot distinguish between VIVE Focus Vision, VIVE XR Elite, and VIVE Focus 3 using + /// resolution checks, we skip the resolution checks altogether and assume it's not a VIVE Pro, as VIVE Pro won't + /// come with Android support. +#if PLATFORM_ANDROID + bool bResolutionMatches = true; +#else /* PLATFORM_ANDROID */ + bool bResolutionMatches = false; + + if (bNameMatches) + { + if (GEngine && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed()) + { + IHeadMountedDisplay* Device{GEngine->XRSystem->GetHMDDevice()}; + if (Device) + { + IHeadMountedDisplay::MonitorInfo HmdMonitorInfo; + FStaticImpl::GetHMDMonitorInfo(Device, HmdMonitorInfo); + + /// NOTE + // VIVE Pro: + // - Official Spec: 1440 x 1600 pixels per eye (2880 x 1600 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 4936 x 2740 + // VIVE Focus 3: + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE XR Elite + // - Official Spec: 1920 x 1920 pixels per eye (3840 x 1920 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE Focus Vision + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): 1720 x 1720 + if (HmdMonitorInfo.ResolutionX > 5000 && + (HmdMonitorInfo.ResolutionY > 2500 && HmdMonitorInfo.ResolutionY < 2700)) + { + bResolutionMatches = true; + } + } + } + } +#endif /* PLATFORM_ANDROID */ + + const bool bMatched = bNameMatches && bResolutionMatches; + + return bMatched; +} + +bool FSGHMDTracker::IsHtcViveFocusVision() +{ +#if PLATFORM_ANDROID + static const FName DeviceIdentifier{TEXT("WAVE:SUE")}; + + const FName DeviceName{GetDeviceName()}; + + const bool bNameMatches = DeviceName == DeviceIdentifier; +#else /* PLATFORM_ANDROID */ + static const FName DeviceIdentifier{TEXT("Vive OpenXR: Vive SRanipal")}; + static const FString ViveDeviceIdentifier{TEXT("Vive")}; + static const FString SRanipalDeviceIdentifier{TEXT("SRanipal")}; + + const FName DeviceName{GetDeviceName()}; + + bool bNameMatches = DeviceName == DeviceIdentifier; + if (!bNameMatches) + { + const FString DeviceNameString{GetDeviceName().ToString()}; + bNameMatches = DeviceNameString.Contains(ViveDeviceIdentifier) + || DeviceNameString.Contains(SRanipalDeviceIdentifier); + } +#endif /* PLATFORM_ANDROID */ + + /// NOTE + /// For the time being since we cannot distinguish between VIVE Focus Vision, VIVE XR Elite, and VIVE Focus 3 using + /// resolution checks, we skip the resolution checks altogether and assume it's not a VIVE Pro, as VIVE Pro won't + /// come with Android support. +#if PLATFORM_ANDROID + bool bResolutionMatches = true; +#else /* PLATFORM_ANDROID */ + bool bResolutionMatches = false; + + if (bNameMatches) + { + if (GEngine && GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed()) + { + IHeadMountedDisplay* Device{GEngine->XRSystem->GetHMDDevice()}; + if (Device) + { + IHeadMountedDisplay::MonitorInfo HmdMonitorInfo; + FStaticImpl::GetHMDMonitorInfo(Device, HmdMonitorInfo); + + /// NOTE + // VIVE Pro: + // - Official Spec: 1440 x 1600 pixels per eye (2880 x 1600 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 4936 x 2740 + // VIVE Focus 3: + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE XR Elite + // - Official Spec: 1920 x 1920 pixels per eye (3840 x 1920 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): ? + // VIVE Focus Vision + // - Official Spec: 2448 x 2448 pixels per eye (4896 x 2448 pixels combined) + // - Unreal OpenXR Resolution (PCVR): 5016 x 2508 + // - Unreal OpenXR Resolution (Standalone): 1720 x 1720 + if (HmdMonitorInfo.ResolutionX > 5000 && + (HmdMonitorInfo.ResolutionY > 2500 && HmdMonitorInfo.ResolutionY < 2700)) + { + bResolutionMatches = true; + } + } + } + } +#endif /* PLATFORM_ANDROID */ + + const bool bMatched = bNameMatches && bResolutionMatches; + + return bMatched; +} + +ESGHeadMountedDisplayDevice FSGHMDTracker::GetDeviceType() +{ + if (IsMetaQuest2()) + { + return ESGHeadMountedDisplayDevice::MetaQuest2; + } + + if (IsMetaQuestPro()) + { + return ESGHeadMountedDisplayDevice::MetaQuestPro; + } + + if (IsMetaQuest3()) + { + return ESGHeadMountedDisplayDevice::MetaQuest3; + } + + if (IsHtcVivePro()) + { + return ESGHeadMountedDisplayDevice::HtcVivePro; + } + + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + + if (Settings->GetTrackingSettings().HMDTrackingSettings.ViveHMDDetectionPriority == + ESGViveHMDDetectionPriority::FocusVision_XRElite_Focus3) + { + if (IsHtcViveFocusVision()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocusVision; + } + + if (IsHtcViveXRElite()) + { + return ESGHeadMountedDisplayDevice::HtcViveXRElite; + } + + if (IsHtcViveFocus3()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocus3; + } + } + + if (Settings->GetTrackingSettings().HMDTrackingSettings.ViveHMDDetectionPriority == + ESGViveHMDDetectionPriority::FocusVision_Focus3_XRElite) + { + if (IsHtcViveFocusVision()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocusVision; + } + + if (IsHtcViveFocus3()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocus3; + } + + if (IsHtcViveXRElite()) + { + return ESGHeadMountedDisplayDevice::HtcViveXRElite; + } + } + + if (Settings->GetTrackingSettings().HMDTrackingSettings.ViveHMDDetectionPriority == + ESGViveHMDDetectionPriority::XRElite_FocusVision_Focus3) + { + if (IsHtcViveXRElite()) + { + return ESGHeadMountedDisplayDevice::HtcViveXRElite; + } + + if (IsHtcViveFocusVision()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocusVision; + } + + if (IsHtcViveFocus3()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocus3; + } + } + + if (Settings->GetTrackingSettings().HMDTrackingSettings.ViveHMDDetectionPriority == + ESGViveHMDDetectionPriority::XRElite_Focus3_FocusVision) + { + if (IsHtcViveXRElite()) + { + return ESGHeadMountedDisplayDevice::HtcViveXRElite; + } + + if (IsHtcViveFocus3()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocus3; + } + + if (IsHtcViveFocusVision()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocusVision; + } + } + + if (Settings->GetTrackingSettings().HMDTrackingSettings.ViveHMDDetectionPriority == + ESGViveHMDDetectionPriority::Focus3_FocusVision_XRElite) + { + if (IsHtcViveFocus3()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocus3; + } + + if (IsHtcViveFocusVision()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocusVision; + } + + if (IsHtcViveXRElite()) + { + return ESGHeadMountedDisplayDevice::HtcViveXRElite; + } + } + + if (Settings->GetTrackingSettings().HMDTrackingSettings.ViveHMDDetectionPriority == + ESGViveHMDDetectionPriority::Focus3_XRElite_FocusVision) + { + if (IsHtcViveFocus3()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocus3; + } + + if (IsHtcViveXRElite()) + { + return ESGHeadMountedDisplayDevice::HtcViveXRElite; + } + + if (IsHtcViveFocusVision()) + { + return ESGHeadMountedDisplayDevice::HtcViveFocusVision; + } + } + + return ESGHeadMountedDisplayDevice::None; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGXRHandState.cpp b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGXRHandState.cpp new file mode 100644 index 0000000..30d78f5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGXRHandState.cpp @@ -0,0 +1,71 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTracking/SGXRHandState.h" + +FSGXRHandState::FSGXRHandState() + : HandTracker{}, + JointLocations{}, + JointVelocities{}, + Velocities{XR_TYPE_HAND_JOINT_VELOCITIES_EXT}, + Locations{XR_TYPE_HAND_JOINT_LOCATIONS_EXT}, + KeypointTransforms{}, + Radii{}, + bHasReceivedJointPoses(false), + bTracked(false) +{ + Velocities.jointCount = XR_HAND_JOINT_COUNT_EXT; + Velocities.jointVelocities = JointVelocities; + + Locations.next = &Velocities; + Locations.jointCount = XR_HAND_JOINT_COUNT_EXT; + Locations.jointLocations = JointLocations; +} + +FSGXRHandState::~FSGXRHandState() = default; + +bool FSGXRHandState::GetTransform(const EHandKeypoint Keypoint, FTransform& OutTransform) const +{ + check(static_cast(Keypoint) < EHandKeypointCount); + OutTransform = KeypointTransforms[static_cast(Keypoint)]; + + return bHasReceivedJointPoses; +} + +const FTransform& FSGXRHandState::GetTransform(const EHandKeypoint Keypoint) const +{ + check(static_cast(Keypoint) < EHandKeypointCount); + return KeypointTransforms[static_cast(Keypoint)]; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp new file mode 100644 index 0000000..e41ba49 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SGTracking/SGXRTracker.cpp @@ -0,0 +1,2574 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTracking/SGXRTracker.h" + +#include "Async/Async.h" +#include "Async/Future.h" +#include "Async/TaskGraphInterfaces.h" +#include "Containers/Array.h" +#include "Containers/Map.h" +#include "Engine/Engine.h" +#include "Engine/SkeletalMesh.h" +#include "Engine/World.h" +#include "GameFramework/WorldSettings.h" +#include "IOpenXRHMD.h" +#include "IOpenXRHMDModule.h" +#include "IXRTrackingSystem.h" +#include "Misc/Optional.h" +#include "Misc/Timespan.h" +#include "OpenXRCore.h" + +#include "SGCore/SGHapticGlove.h" +#include "SGLog/SGLog.h" +#include "SGSettings/SGSettings.h" +#include "SGTracking/SGGloveTracker.h" +#include "SGTracking/SGHMDTracker.h" +#include "SGTracking/SGXRHandState.h" +#include "SGTypes/SGCoreTypes.h" +#include "SGTypes/SGTrackingTypes.h" +#include "SGUtils/SGEngineUtils.h" +#include "SGUtils/SGPluginUtils.h" + +struct FSGXRTracker::FImpl +{ + /************************ + * Typedefs + ************************/ + + // bool true == left, false == right + typedef TPair FSGMotionSourceInfo; + + /************************ + * Static methods + ************************/ + + /** + * Parses the enum name removing the prefix. + */ + static FName GetHandKeypointEnumName(const EHandKeypoint HandKeypoint); + + FORCEINLINE static FName GetHandKeypointEnumName(const int32 HandKeypointIndex) + { + return GetHandKeypointEnumName(static_cast(HandKeypointIndex)); + } + + static FName GetControllerHandEnumName(const EControllerHand ControllerHand); + + static FName GetOpenXRPositionalTrackingProviderEnumName( + const ESGOpenXRPositionalTrackingProvider OpenXRPositionalTrackingProvider); + + FORCEINLINE static bool ShouldFallbackToHandTrackingIfNoGloveDetected() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + const bool bFallbackToHandTrackingIfNoGloveDetected = + Settings->GetTrackingSettings().bFallbackToHandTrackingIfNoGloveDetected; + return bFallbackToHandTrackingIfNoGloveDetected; + } + + FORCEINLINE static bool ShouldUseMoreSpecificMotionSourceNames() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected(); + const bool bUseMoreSpecificMotionSourceNames = + bFallbackToHandTrackingIfNoGloveDetected + ? Settings->GetTrackingSettings().HandTrackingSettings.bUseMoreSpecificMotionSourceNames + : false; + return bUseMoreSpecificMotionSourceNames; + } + + FORCEINLINE static bool ShouldSupportLegacyControllerMotionSources() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected(); + const bool bSupportLegacyControllerMotionSources = + bFallbackToHandTrackingIfNoGloveDetected + ? Settings->GetTrackingSettings().HandTrackingSettings.bSupportLegacyControllerMotionSources + : false; + return bSupportLegacyControllerMotionSources; + } + + FORCEINLINE static const FSGHandTrackingSettings& GetHandTrackingSettings() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + return Settings->GetTrackingSettings().HandTrackingSettings; + } + + FORCEINLINE static const FSGVirtualHandSettings& GetVirtualHandSettings() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + return Settings->GetVirtualHandSettings(); + } + + FORCEINLINE static const FSGWristTrackingSettings& GetWristTrackingSettings() + { + const USGSettings* Settings{USGSettings::GetInstance()}; + ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!")); + return Settings->GetTrackingSettings().WristTrackingSettings; + } + + FORCEINLINE static const FName& GetDefaultLeftHandTrackingMotionSourceName() + { + static const FName Name(TEXT("Left")); + return Name; + } + + FORCEINLINE static const FName& GetDefaultRightHandTrackingMotionSourceName() + { + static const FName Name(TEXT("Right")); + return Name; + } + + FORCEINLINE static const FName& GetDefaultHandTrackingMotionSourceName(const EControllerHand Hand) + { + const FName& Name{ + Hand == EControllerHand::Right + ? GetDefaultRightHandTrackingMotionSourceName() + : GetDefaultLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetDefaultHandTrackingMotionSourceName(const bool bRight) + { + const FName& Name{ + bRight + ? GetDefaultRightHandTrackingMotionSourceName() + : GetDefaultLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetLegacyControllerLeftHandTrackingMotionSourceName() + { + static const FName Name(TEXT("Left")); + return Name; + } + + FORCEINLINE static const FName& GetLegacyControllerRightHandTrackingMotionSourceName() + { + static const FName Name(TEXT("Right")); + return Name; + } + + FORCEINLINE static const FName& GetLegacyControllerHandTrackingMotionSourceName(const EControllerHand Hand) + { + const FName& Name{ + Hand == EControllerHand::Right + ? GetLegacyControllerRightHandTrackingMotionSourceName() + : GetLegacyControllerLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetLegacyControllerHandTrackingMotionSourceName(const bool bRight) + { + const FName& Name{ + bRight + ? GetLegacyControllerRightHandTrackingMotionSourceName() + : GetLegacyControllerLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetMoreSpecificLeftHandTrackingMotionSourceName() + { + static const FName Name(TEXT("HandTrackingLeft")); + return Name; + } + + FORCEINLINE static const FName& GetMoreSpecificRightHandTrackingMotionSourceName() + { + static const FName Name(TEXT("HandTrackingRight")); + return Name; + } + + FORCEINLINE static const FName& GetMoreSpecificHandTrackingMotionSourceName(const EControllerHand Hand) + { + const FName& Name{ + Hand == EControllerHand::Right + ? GetMoreSpecificRightHandTrackingMotionSourceName() + : GetMoreSpecificLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetMoreSpecificHandTrackingMotionSourceName(const bool bRight) + { + const FName& Name{ + bRight + ? GetMoreSpecificRightHandTrackingMotionSourceName() + : GetMoreSpecificLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetLeftHandTrackingMotionSourceName() + { + const bool bUseMoreSpecificMotionSourceNames = ShouldUseMoreSpecificMotionSourceNames(); + const FName& Name{ + bUseMoreSpecificMotionSourceNames + ? GetMoreSpecificLeftHandTrackingMotionSourceName() + : GetDefaultLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetRightHandTrackingMotionSourceName() + { + const bool bUseMoreSpecificMotionSourceNames = ShouldUseMoreSpecificMotionSourceNames(); + const FName& Name{ + bUseMoreSpecificMotionSourceNames + ? GetMoreSpecificRightHandTrackingMotionSourceName() + : GetDefaultRightHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetHandTrackingMotionSourceName(const EControllerHand Hand) + { + const FName& Name{ + Hand == EControllerHand::Right + ? GetRightHandTrackingMotionSourceName() + : GetLeftHandTrackingMotionSourceName()}; + return Name; + } + + FORCEINLINE static const FName& GetHandTrackingMotionSourceName(const bool bRight) + { + const FName& Name{ + bRight + ? GetRightHandTrackingMotionSourceName() + : GetLeftHandTrackingMotionSourceName() + }; + return Name; + } + + FORCEINLINE static const FName& GetLeftPositionalTrackingHardwareMotionSourceName() + { + const FName& Name{GetWristTrackingSettings().LeftHandMotionSource}; + return Name; + } + + FORCEINLINE static const FName& GetRightPositionalTrackingHardwareMotionSourceName() + { + const FName& Name{GetWristTrackingSettings().RightHandMotionSource}; + return Name; + } + + FORCEINLINE static FName GetPositionalTrackingHardwareMotionSourceName(const EControllerHand Hand) + { + const FName Name{ + Hand == EControllerHand::Right + ? GetRightPositionalTrackingHardwareMotionSourceName() + : GetLeftPositionalTrackingHardwareMotionSourceName()}; + return Name; + } + + FORCEINLINE static FName GetPositionalTrackingHardwareMotionSourceName(const bool bRight) + { + const FName& Name{ + bRight + ? GetRightPositionalTrackingHardwareMotionSourceName() + : GetLeftPositionalTrackingHardwareMotionSourceName() + }; + return Name; + } + + static ESGPositionalTrackingHardware GetPositionalTrackingHardware(); + + FORCEINLINE static USGHapticGlove* GetGlove(const EControllerHand Hand) + { + const bool bRight = Hand == EControllerHand::Right; + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->GetGlove(bRight) : nullptr; + } + + FORCEINLINE static USGHapticGlove* GetGlove(const bool bRight) + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->GetGlove(bRight) : nullptr; + } + + FORCEINLINE static USGHapticGlove* GetLeftGlove() + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->GetLeftGlove() : nullptr; + } + + FORCEINLINE static USGHapticGlove* GetRightGlove() + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->GetRightGlove() : nullptr; + } + + FORCEINLINE static bool IsGloveConnected(const EControllerHand Hand) + { + const bool bRight = Hand == EControllerHand::Right; + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->IsGloveConnected(bRight) : false; + } + + FORCEINLINE static bool IsGloveConnected(const bool bRight) + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->IsGloveConnected(bRight) : false; + } + + FORCEINLINE static bool IsLeftGloveConnected() + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->IsLeftGloveConnected() : false; + } + + FORCEINLINE static bool IsRightGloveConnected() + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->IsRightGloveConnected() : false; + } + + FORCEINLINE static bool IsAnyGloveConnected() + { + const USGGloveTracker* GloveTracker{USGGloveTracker::GetInstance()}; + return IsValid(GloveTracker) ? GloveTracker->IsAnyGloveConnected() : false; + } + + static TArray GetFingerLengths( + bool bRight, + EHandKeypoint Joint2nd, EHandKeypoint Joint3rd, + float DistalPhalanxLength); + + static TArray> GetFingerLengths(bool bRight); + static TArray GetFingerStartTransforms(bool bRight); + static TArray GetFingerStartPositions(bool bRight); + static TArray GetFingerStartRotations(bool bRight); + static USGBasicHandModel* GetHandModel(bool bRight); + + FORCEINLINE static USGBasicHandModel* GetHandModel(const EControllerHand Hand) + { + const bool bRight = Hand == EControllerHand::Right; + USGBasicHandModel* HandModel{GetHandModel(bRight)}; + return HandModel; + } + + static USGHandPose* GetHandPose(bool bRight); + + FORCEINLINE static USGHandPose* GetHandPose(const EControllerHand Hand) + { + const bool bRight = Hand == EControllerHand::Right; + USGHandPose* HandPose{GetHandPose(bRight)}; + return HandPose; + } + + FORCEINLINE static const FName& GetLeftMeshBoneName(const int32 JointIndex) + { + const FName& Name{GetVirtualHandSettings().MeshSettings.LeftHandBoneNames[JointIndex]}; + return Name; + } + + FORCEINLINE static const FName& GetLeftMeshBoneName(const EHandKeypoint HandKeypoint) + { + const int32 JointIndex = static_cast(HandKeypoint); + const FName& Name{GetLeftMeshBoneName(JointIndex)}; + return Name; + } + + FORCEINLINE static const FName& GetRightMeshBoneName(const int32 JointIndex) + { + const FName& Name{GetVirtualHandSettings().MeshSettings.RightHandBoneNames[JointIndex]}; + return Name; + } + + FORCEINLINE static const FName& GetRightMeshBoneName(const EHandKeypoint HandKeypoint) + { + const int32 JointIndex = static_cast(HandKeypoint); + const FName& Name{GetRightMeshBoneName(JointIndex)}; + return Name; + } + + FORCEINLINE static const FName& GetMeshBoneName(const bool bRight, const int32 Joint) + { + const FName& Name{ + bRight + ? GetRightMeshBoneName(Joint) + : GetLeftMeshBoneName(Joint) + }; + return Name; + } + + FORCEINLINE static const FName& GetMeshBoneName(const bool bRight, const EHandKeypoint HandKeypoint) + { + const int32 JointIndex = static_cast(HandKeypoint); + const FName& Name{GetMeshBoneName(bRight, JointIndex)}; + return Name; + } + + FORCEINLINE static const FName& GetMeshBoneName(const EControllerHand Hand, const int32 JointIndex) + { + const bool bRight = Hand == EControllerHand::Right; + const FName& Name{GetMeshBoneName(bRight, JointIndex)}; + return Name; + } + + static FTransform GetMeshRawBoneRefTransform(bool bRight, const FName& BoneName); + + FORCEINLINE static FTransform GetMeshRawBoneRefTransform(const bool bRight, const int32 JointIndex) + { + const FName& BoneName{GetMeshBoneName(bRight, JointIndex)}; + const FTransform& Transform{GetMeshRawBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshRawBoneRefTransform(const bool bRight, const EHandKeypoint Keypoint) + { + const FName& BoneName{GetMeshBoneName(bRight, Keypoint)}; + const FTransform& Transform{GetMeshRawBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshRawBoneRefTransform(const EControllerHand Hand, const FName& BoneName) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform& Transform{GetMeshRawBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshRawBoneRefTransform(const EControllerHand Hand, const int32 JointIndex) + { + const bool bRight = Hand == EControllerHand::Right; + const FName& BoneName{GetMeshBoneName(bRight, JointIndex)}; + const FTransform& Transform{GetMeshRawBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshRawBoneRefTransform( + const EControllerHand Hand, const EHandKeypoint Keypoint) + { + const bool bRight = Hand == EControllerHand::Right; + const FName& BoneName{GetMeshBoneName(bRight, Keypoint)}; + const FTransform& Transform{GetMeshRawBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + static FTransform GetMeshWristChildBoneRefTransform(bool bRight, const FName& BoneName); + + FORCEINLINE static FTransform GetMeshWristChildBoneRefTransform( + const bool bRight, const int32 JointIndex) + { + const FName& BoneName{GetMeshBoneName(bRight, JointIndex)}; + const FTransform Transform{GetMeshWristChildBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshWristChildBoneRefTransform( + const bool bRight, const EHandKeypoint Keypoint) + { + const FName& BoneName{GetMeshBoneName(bRight, Keypoint)}; + const FTransform Transform{GetMeshWristChildBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshWristChildBoneRefTransform( + const EControllerHand Hand, const FName& BoneName) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform Transform{GetMeshWristChildBoneRefTransform(bRight, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshWristChildBoneRefTransform( + const EControllerHand Hand, const int32 JointIndex) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform Transform{GetMeshWristChildBoneRefTransform(bRight, JointIndex)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshWristChildBoneRefTransform( + const EControllerHand Hand, const EHandKeypoint Keypoint) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform Transform{GetMeshWristChildBoneRefTransform(bRight, Keypoint)}; + return Transform; + } + + static FTransform GetMeshFingerStartBoneRefTransform( + bool bRight, EHandKeypoint Parent, const FName& BoneName); + + FORCEINLINE static FTransform GetMeshFingerStartBoneRefTransform( + const bool bRight, const EHandKeypoint Parent, const int32 JointIndex) + { + const FName& BoneName{GetMeshBoneName(bRight, JointIndex)}; + const FTransform Transform{GetMeshFingerStartBoneRefTransform(bRight, Parent, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshFingerStartBoneRefTransform( + const bool bRight, const EHandKeypoint Parent, const EHandKeypoint Keypoint) + { + const FName& BoneName{GetMeshBoneName(bRight, Keypoint)}; + const FTransform Transform{GetMeshFingerStartBoneRefTransform(bRight, Parent, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshFingerStartBoneRefTransform( + const EControllerHand Hand, const EHandKeypoint Parent, const FName& BoneName) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform Transform{GetMeshFingerStartBoneRefTransform(bRight, Parent, BoneName)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshFingerStartBoneRefTransform( + const EControllerHand Hand, const EHandKeypoint Parent, const int32 JointIndex) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform Transform{GetMeshFingerStartBoneRefTransform(bRight, Parent, JointIndex)}; + return Transform; + } + + FORCEINLINE static FTransform GetMeshFingerStartBoneRefTransform( + const EControllerHand Hand, const EHandKeypoint Parent, const EHandKeypoint Keypoint) + { + const bool bRight = Hand == EControllerHand::Right; + const FTransform Transform{GetMeshFingerStartBoneRefTransform(bRight, Parent, Keypoint)}; + return Transform; + } + + /************************ + * Member variables + ************************/ + + bool bHandTrackingAvailable; + + PFN_xrCreateHandTrackerEXT XRCreateHandTrackerEXT; + PFN_xrDestroyHandTrackerEXT XRDestroyHandTrackerEXT; + PFN_xrLocateHandJointsEXT XRLocateHandJointsEXT; + + IXRTrackingSystem* XRTrackingSystem; + + TSharedPtr MessageHandler; + int32 DeviceIndex; + + int32 CurrentHandTrackingDataIndex; + + TArray BoneParents; + TArray BoneKeypoints; + TMap MotionSourceToKeypointMap; + + FSGXRHandState HandStates[2]; + + TArray LeftAnimationTransforms; + TArray RightAnimationTransforms; + + /************************ + * Owner object + ************************/ + + FSGXRTracker* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSGXRTracker* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = delete; + FImpl& operator=(const FImpl& Rhs) = delete; + + /************************ + * Methods + ************************/ + + FORCEINLINE const FSGXRHandState& GetLeftHandState() const + { + return HandStates[0]; + } + + FORCEINLINE FSGXRHandState& GetLeftHandState() + { + return HandStates[0]; + } + + FORCEINLINE const FSGXRHandState& GetRightHandState() const + { + return HandStates[1]; + } + + FORCEINLINE FSGXRHandState& GetRightHandState() + { + return HandStates[1]; + } + + void BuildMotionSourceToKeypointMap(); + +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 + void CreateHandTracker(XrSession InSession, XrHandEXT HandEXT, FSGXRHandState& HandState) const; +#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 */ + + bool CanOutputTrackingData(EControllerHand Hand) const; + + bool UpdateXRHandTrackingData(FSGXRHandState& OutHandState, const XrHandJointsLocateInfoEXT& LocateInfo) const; + + FName GetTargetOpenXRPositionalTrackingProviderName() const; + + bool GetControllerTransform(const FName MotionSource, const float WorldToMetersScale, + FTransform& OutTransform, bool& bOutMotionSourceHandTracking) const; + + bool GetWristTransform(bool bRight, FTransform& OutTransform) const; + + bool UpdateSGJointData(FSGXRHandState& OutHandState, const EHandKeypoint Joint, + const FTransform& JointTransform, const FTransform& WristTransform) const; + + bool UpdateSGWristJointData(FSGXRHandState& OutHandState, const FTransform& WristTransform) const; + + bool UpdateSGPalmJointData(FSGXRHandState& OutHandState, bool bRight, const FTransform& WristTransform) const; + + bool UpdateSGThumbJointData( + FSGXRHandState& OutHandState, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const; + + bool UpdateSGIndexJointData( + FSGXRHandState& OutHandState, bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const; + + bool UpdateSGMiddleJointData( + FSGXRHandState& OutHandState, bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const; + + bool UpdateSGRingJointData( + FSGXRHandState& OutHandState, bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const; + + bool UpdateSGLittleJointData( + FSGXRHandState& OutHandState, bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const; + + bool UpdateSGHandState(bool bRight, FSGXRHandState& OutHandState) const; +}; + +FName FSGXRTracker::FImpl::GetHandKeypointEnumName(const EHandKeypoint HandKeypoint) +{ + static UEnum* EnumPtr{StaticEnum()}; + ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the EHandKeypoint enum!")); + static const int32 EnumNameLength = FString{TEXT("EHandKeypoint::")}.Len(); + + const FName EnumItemName{ + EnumPtr->GetNameByValue(static_cast(HandKeypoint)) + }; + const FString EnumItemString{EnumItemName.ToString()}; + const int32 EnumItemStringLength = EnumItemString.Len(); + const int32 EnumItemNameLength = EnumItemStringLength - EnumNameLength; + + const FName ParsedName{*EnumItemString.Right(EnumItemNameLength)}; + return ParsedName; +} + +FName FSGXRTracker::FImpl::GetControllerHandEnumName(const EControllerHand ControllerHand) +{ + static UEnum* EnumPtr{StaticEnum()}; + ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the EControllerHand enum!")); + static const int32 EnumNameLength = FString{TEXT("EControllerHand::")}.Len(); + + const FName EnumItemName{ + EnumPtr->GetNameByValue(static_cast(ControllerHand)) + }; + const FString EnumItemString{EnumItemName.ToString()}; + const int32 EnumItemStringLength = EnumItemString.Len(); + const int32 EnumItemNameLength = EnumItemStringLength - EnumNameLength; + + const FName ParsedName{*EnumItemString.Right(EnumItemNameLength)}; + return ParsedName; +} + +FName FSGXRTracker::FImpl::GetOpenXRPositionalTrackingProviderEnumName( + const ESGOpenXRPositionalTrackingProvider OpenXRPositionalTrackingProvider) +{ + static UEnum* EnumPtr{StaticEnum()}; + ensureAlwaysMsgf(EnumPtr, TEXT("Failed to find the ESGOpenXRPositionalTrackingProvider enum!")); + static const int32 EnumNameLength = FString{TEXT("ESGOpenXRPositionalTrackingProvider::")}.Len(); + + const FName EnumItemName{ + EnumPtr->GetNameByValue(static_cast(OpenXRPositionalTrackingProvider)) + }; + const FString EnumItemString{EnumItemName.ToString()}; + const int32 EnumItemStringLength = EnumItemString.Len(); + const int32 EnumItemNameLength = EnumItemStringLength - EnumNameLength; + + const FName ParsedName{*EnumItemString.Right(EnumItemNameLength)}; + return ParsedName; +} + +ESGPositionalTrackingHardware FSGXRTracker::FImpl::GetPositionalTrackingHardware() +{ + ESGPositionalTrackingHardware TrackerHardware = GetWristTrackingSettings().TrackingHardware; + + if (TrackerHardware == ESGPositionalTrackingHardware::None) + { + const ESGHeadMountedDisplayDevice HmdDevice = FSGHMDTracker::GetDeviceType(); + switch (HmdDevice) + { + case ESGHeadMountedDisplayDevice::MetaQuest2: + TrackerHardware = ESGPositionalTrackingHardware::Quest2Controller; + break; + case ESGHeadMountedDisplayDevice::MetaQuestPro: + TrackerHardware = ESGPositionalTrackingHardware::QuestProController; + break; + case ESGHeadMountedDisplayDevice::MetaQuest3: + TrackerHardware = ESGPositionalTrackingHardware::Quest3Controller; + break; + case ESGHeadMountedDisplayDevice::HtcVivePro: + TrackerHardware = ESGPositionalTrackingHardware::ViveTracker; + break; + case ESGHeadMountedDisplayDevice::HtcViveFocus3: + // Fall through + case ESGHeadMountedDisplayDevice::HtcViveXRElite: + TrackerHardware = ESGPositionalTrackingHardware::ViveFocus3WristTracker; + break; + default: + TrackerHardware = ESGPositionalTrackingHardware::Custom; + break; + } + } + + return TrackerHardware; +} + +TArray FSGXRTracker::FImpl::GetFingerLengths( + const bool bRight, + const EHandKeypoint Joint2nd, const EHandKeypoint Joint3rd, + const float DistalPhalanxLength) +{ + const FTransform& Joint2ndTransform{GetMeshRawBoneRefTransform(bRight, Joint2nd)}; + const FVector& Joint2ndLocation{Joint2ndTransform.GetLocation()}; + const FTransform& Joint3rdTransform{GetMeshRawBoneRefTransform(bRight, Joint3rd)}; + const FVector& Joint3rdLocation{Joint3rdTransform.GetLocation()}; + + const float PhalanxLength1st = static_cast(Joint2ndLocation.Size()); + const float PhalanxLength2nd = static_cast(Joint3rdLocation.Size()); + + const TArray Lengths{PhalanxLength1st, PhalanxLength2nd, DistalPhalanxLength}; + return Lengths; +} + +TArray> FSGXRTracker::FImpl::GetFingerLengths(const bool bRight) +{ + const FSGVirtualHandSettings& Settings{GetVirtualHandSettings()}; + + const TArray> Lengths{ + GetFingerLengths(bRight, + EHandKeypoint::ThumbProximal, + EHandKeypoint::ThumbDistal, + Settings.MeshSettings.DistalPhalangesLengthSettings.Thumb + ), + GetFingerLengths(bRight, + EHandKeypoint::IndexIntermediate, + EHandKeypoint::IndexDistal, + Settings.MeshSettings.DistalPhalangesLengthSettings.Index + ), + GetFingerLengths(bRight, + EHandKeypoint::MiddleIntermediate, + EHandKeypoint::MiddleDistal, + Settings.MeshSettings.DistalPhalangesLengthSettings.Middle + ), + GetFingerLengths(bRight, + EHandKeypoint::RingIntermediate, + EHandKeypoint::RingDistal, + Settings.MeshSettings.DistalPhalangesLengthSettings.Ring + ), + GetFingerLengths(bRight, + EHandKeypoint::LittleIntermediate, + EHandKeypoint::LittleDistal, + Settings.MeshSettings.DistalPhalangesLengthSettings.Little + ), + }; + + return Lengths; +} + +TArray FSGXRTracker::FImpl::GetFingerStartTransforms(const bool bRight) +{ + FTransform ThumbStartTransform{ + GetMeshWristChildBoneRefTransform(bRight, EHandKeypoint::ThumbMetacarpal).GetLocation() + }; + + FTransform IndexStartTransform{ + GetMeshFingerStartBoneRefTransform(bRight, EHandKeypoint::IndexMetacarpal, EHandKeypoint::IndexProximal) + }; + + FTransform MiddleStartTransform{ + GetMeshFingerStartBoneRefTransform(bRight, EHandKeypoint::MiddleMetacarpal, EHandKeypoint::MiddleProximal) + }; + + FTransform RingStartTransform{ + GetMeshFingerStartBoneRefTransform(bRight, EHandKeypoint::RingMetacarpal, EHandKeypoint::RingProximal) + }; + + FTransform LittleStartTransform{ + GetMeshFingerStartBoneRefTransform(bRight, EHandKeypoint::LittleMetacarpal, EHandKeypoint::LittleProximal) + }; + + TArray Transforms{ + MoveTemp(ThumbStartTransform), + MoveTemp(IndexStartTransform), + MoveTemp(MiddleStartTransform), + MoveTemp(RingStartTransform), + MoveTemp(LittleStartTransform), + }; + + return Transforms; +} + +TArray FSGXRTracker::FImpl::GetFingerStartPositions(const bool bRight) +{ + const TArray StartTransforms{GetFingerStartTransforms(bRight)}; + + ensureAlwaysMsgf(StartTransforms.Num() == 5, TEXT("Invalid number of finger start transforms!")); + + const TArray StartPositions{ + StartTransforms[0].GetLocation(), + StartTransforms[1].GetLocation(), + StartTransforms[2].GetLocation(), + StartTransforms[3].GetLocation(), + StartTransforms[4].GetLocation(), + }; + + return StartPositions; +} + +TArray FSGXRTracker::FImpl::GetFingerStartRotations(const bool bRight) +{ + const TArray StartRotations{ + FQuat::Identity, + FQuat::Identity, + FQuat::Identity, + FQuat::Identity, + FQuat::Identity, + }; + + return StartRotations; +} + +USGBasicHandModel* FSGXRTracker::FImpl::GetHandModel(const bool bRight) +{ + const TArray> FingerLengths{GetFingerLengths(bRight)}; + const TArray StartPositions{GetFingerStartPositions(bRight)}; + const TArray StartRotations{GetFingerStartRotations(bRight)}; + + UWorld* World{FSGEngineUtils::GetWorld()}; + + USGBasicHandModel* HandModel{ + USGBasicHandModel::NewBasicHandModel(World, bRight, FingerLengths, StartPositions, StartRotations) + }; + + return HandModel; +} + +USGHandPose* FSGXRTracker::FImpl::GetHandPose(const bool bRight) +{ + const USGHapticGlove* Glove{GetGlove(bRight)}; + if (!IsValid(Glove)) + { + return nullptr; + } + + UWorld* World{FSGEngineUtils::GetWorld()}; + const USGBasicHandModel* HandModel{GetHandModel(bRight)}; + USGHandPose* HandPose{nullptr}; + + const bool bGotHandPose = Glove->GetHandPose(World, HandModel, HandPose); + if (!bGotHandPose || !IsValid(HandPose)) + { + return nullptr; + } + + return HandPose; +} + +FTransform FSGXRTracker::FImpl::GetMeshRawBoneRefTransform(const bool bRight, const FName& BoneName) +{ + const FSGVirtualHandMeshSettings& MeshSettings{GetVirtualHandSettings().MeshSettings}; + + const TSoftObjectPtr& HandMesh{ + bRight + ? MeshSettings.LeftHandReferenceMesh + : MeshSettings.RightHandReferenceMesh + }; + + if (HandMesh.IsValid()) + { + const FReferenceSkeleton& ReferenceSkeleton{HandMesh->GetRefSkeleton()}; + const int32 BoneIndex = ReferenceSkeleton.FindBoneIndex(BoneName); + + if (BoneIndex == INDEX_NONE) + { + SGLOG_WARNING(FString::Printf(TEXT("Could not find a bone index for the '%s' joint!"), + *BoneName.ToString())); + } + + const TArray Transforms{ReferenceSkeleton.GetRefBonePose()}; + ensureAlwaysMsgf(Transforms.Num() > 0 && Transforms.Num() > BoneIndex, + TEXT("Invalid bone index '%d' or no transforms found!"), BoneIndex); + + const FTransform& Transform{Transforms[BoneIndex]}; + return Transform; + } + + ensureAlwaysMsgf( + bRight + ? MeshSettings.RightHandDefaultReferenceBoneTransforms.Contains(BoneName) + : MeshSettings.LeftHandDefaultReferenceBoneTransforms.Contains(BoneName), + TEXT("Invalid bone name '%s'!"), *BoneName.ToString()); + + const FTransform& Transform{ + bRight + ? MeshSettings.RightHandDefaultReferenceBoneTransforms[BoneName] + : MeshSettings.LeftHandDefaultReferenceBoneTransforms[BoneName] + }; + return Transform; +} + +FTransform FSGXRTracker::FImpl::GetMeshWristChildBoneRefTransform(const bool bRight, const FName& BoneName) +{ + const FSGVirtualHandMeshSettings& MeshSettings{GetVirtualHandSettings().MeshSettings}; + FQuat RootRotationCorrection{MeshSettings.RootBoneRotationCorrection}; + const FTransform& RootBoneRefTransform{GetMeshRawBoneRefTransform(bRight, EHandKeypoint::Wrist)}; + const FTransform& RawTransform{GetMeshRawBoneRefTransform(bRight, BoneName)}; + FQuat CorrectedRootBoneRefRotation{MoveTemp(RootRotationCorrection) * RootBoneRefTransform.GetRotation()}; + FVector CorrectedLocation{MoveTemp(CorrectedRootBoneRefRotation) * RawTransform.GetLocation()}; + + const FTransform Transform{RawTransform.GetRotation(), MoveTemp(CorrectedLocation)}; + return Transform; +} + +FTransform FSGXRTracker::FImpl::GetMeshFingerStartBoneRefTransform( + const bool bRight, const EHandKeypoint Parent, const FName& BoneName) +{ + const FSGVirtualHandMeshSettings& MeshSettings{GetVirtualHandSettings().MeshSettings}; + FQuat RootRotationCorrection{MeshSettings.RootBoneRotationCorrection}; + const FTransform& RootBoneRefTransform{GetMeshRawBoneRefTransform(bRight, EHandKeypoint::Wrist)}; + FQuat CorrectedRootBoneRefRotation{MoveTemp(RootRotationCorrection) * RootBoneRefTransform.GetRotation()}; + FTransform CorrectedRootBoneRefTransform{ + MoveTemp(CorrectedRootBoneRefRotation), RootBoneRefTransform.GetLocation() + }; + + FTransform ParentBoneRefTransform{ + GetMeshRawBoneRefTransform(bRight, Parent) * MoveTemp(CorrectedRootBoneRefTransform) + }; + + const FTransform Transform{GetMeshRawBoneRefTransform(bRight, BoneName) * MoveTemp(ParentBoneRefTransform)}; + return Transform; +} + +bool FSGXRTracker::GetMotionControllerState( + UObject* WorldContextObject, + const EXRSpaceType XRSpaceType, const EControllerHand Hand, const EXRControllerPoseType XRControllerPoseType, + FXRMotionControllerState& OutMotionControllerState) +{ + auto ToMotionSourceName = []( + const EControllerHand Hand, const EXRControllerPoseType XRControllerPoseType) -> FLazyName + { + static FLazyName LeftAim = "LeftAim"; + static FLazyName LeftGrip = "LeftGrip"; + static FLazyName LeftPalm = "LeftPalm"; + static FLazyName RightAim = "RightAim"; + static FLazyName RightGrip = "RightGrip"; + static FLazyName RightPalm = "RightPalm"; + if (Hand == EControllerHand::Left) + { + switch (XRControllerPoseType) + { + case EXRControllerPoseType::Aim: + return LeftAim; + case EXRControllerPoseType::Grip: + return LeftGrip; + case EXRControllerPoseType::Palm: + return LeftPalm; + default: + check(false); + return LeftGrip; + } + } + else + { + switch (XRControllerPoseType) + { + case EXRControllerPoseType::Aim: + return RightAim; + case EXRControllerPoseType::Grip: + return RightGrip; + case EXRControllerPoseType::Palm: + return RightPalm; + default: + check(false); + return RightGrip; + } + } + }; + + OutMotionControllerState.DeviceName = NAME_None; + OutMotionControllerState.ApplicationInstanceID = FApp::GetInstanceId(); + OutMotionControllerState.TrackingStatus = ETrackingStatus::NotTracked; + OutMotionControllerState.Hand = Hand; + OutMotionControllerState.XRSpaceType = XRSpaceType; + OutMotionControllerState.bValid = false; + + if (!IsValid(WorldContextObject)) + { + return false; + } + + if (!IsValid(WorldContextObject)) + { + return false; + } + + IXRTrackingSystem* XRTrackingSystem{GEngine ? GEngine->XRSystem.Get() : nullptr}; + if (!XRTrackingSystem) + { + return false; + } + + IOpenXRHMD* OpenXRHMD{XRTrackingSystem->GetIOpenXRHMD()}; + if (!OpenXRHMD) + { + return false; + } + + TArray Devices; + const int32 HandIndex = static_cast(Hand); + const bool bGotDevices = + XRTrackingSystem->EnumerateTrackedDevices(Devices, EXRTrackedDeviceType::Controller); + if (bGotDevices && Devices.IsValidIndex(HandIndex)) + { + const XrSession Session{OpenXRHMD->GetSession()}; + if (Session) + { + XrInteractionProfileState Profile = {XR_TYPE_INTERACTION_PROFILE_STATE}; + const XrPath TopLevelUserPath{OpenXRHMD->GetTrackedDevicePath(Devices[HandIndex])}; + const XrResult CurrentInteractionProfile{ + xrGetCurrentInteractionProfile(Session, TopLevelUserPath, &Profile) + }; + if (XR_SUCCEEDED(CurrentInteractionProfile) && Profile.interactionProfile != XR_NULL_PATH) + { + OutMotionControllerState.DeviceName = FOpenXRPath(Profile.interactionProfile); + } + } + } + + if ((Hand == EControllerHand::Left) || (Hand == EControllerHand::Right)) + { + static const FName MotionControllerName("OpenXR"); + TArray MotionControllers{ + IModularFeatures::Get().GetModularFeatureImplementations( + IMotionController::GetModularFeatureName()) + }; + IMotionController* MotionController{nullptr}; + for (IMotionController* MotionControllerIterator: MotionControllers) + { + if (!MotionControllerIterator) + { + continue; + } + + const FName DeviceTypeName{MotionControllerIterator->GetMotionControllerDeviceTypeName()}; + if (DeviceTypeName != MotionControllerName) + { + continue; + } + + MotionController = MotionControllerIterator; + break; + } + + if (MotionController) + { + { + // Handle the pose that is actually being requested. + + const FName MotionSource{ToMotionSourceName(Hand, XRControllerPoseType)}; + const FTransform TrackingToWorld{ + XRSpaceType == EXRSpaceType::UnrealWorldSpace + ? XRTrackingSystem->GetTrackingToWorldTransform() + : FTransform::Identity + }; + const float WorldToMeters = XRSpaceType == EXRSpaceType::UnrealWorldSpace + ? XRTrackingSystem->GetWorldToMetersScale() + : 100.0f; + + FVector Position{FVector::ZeroVector}; + FRotator Rotation{FRotator::ZeroRotator}; + + bool bGotMotionControllerOrientationAndPosition = MotionController->GetControllerOrientationAndPosition( + 0, MotionSource, Rotation, Position, WorldToMeters); + + if (bGotMotionControllerOrientationAndPosition) + { + OutMotionControllerState.ControllerLocation = TrackingToWorld.TransformPosition(Position); + OutMotionControllerState.ControllerRotation = TrackingToWorld.TransformRotation(FQuat{Rotation}); + } + + OutMotionControllerState.bValid |= bGotMotionControllerOrientationAndPosition; + OutMotionControllerState.TrackingStatus = + MotionController->GetControllerTrackingStatus(0, MotionSource); + } + + { + // We always provide the grip transform in Unreal space for XRVisualizationFunctionLibrary; + // The bValid and TrackingStatus above are also valid for this pose. + + const FName MotionSource = ToMotionSourceName(Hand, EXRControllerPoseType::Grip); + const FTransform TrackingToWorld{XRTrackingSystem->GetTrackingToWorldTransform()}; + const float WorldToMeters = XRTrackingSystem->GetWorldToMetersScale(); + + FVector Position = FVector::ZeroVector; + FRotator Rotation = FRotator::ZeroRotator; + + bool bGotMotionControllerOrientationAndPosition = MotionController->GetControllerOrientationAndPosition( + 0, MotionSource, Rotation, Position, WorldToMeters); + + if (bGotMotionControllerOrientationAndPosition) + { + OutMotionControllerState.GripUnrealSpaceLocation = TrackingToWorld.TransformPosition(Position); + OutMotionControllerState.GripUnrealSpaceRotation = + TrackingToWorld.TransformRotation(FQuat(Rotation)); + } + } + } + } + + return OutMotionControllerState.bValid; +} + +bool FSGXRTracker::GetHandTrackingState( + UObject* WorldContextObject, + const EXRSpaceType XRSpaceType, const EControllerHand Hand, + FXRHandTrackingState& OutHandTrackingState) +{ + OutHandTrackingState.ApplicationInstanceID = FApp::GetInstanceId(); + OutHandTrackingState.TrackingStatus = ETrackingStatus::NotTracked; + OutHandTrackingState.Hand = Hand; + OutHandTrackingState.XRSpaceType = XRSpaceType; + OutHandTrackingState.bValid = false; + + if (!IsValid(WorldContextObject)) + { + return false; + } + + IXRTrackingSystem* XRTrackingSystem{GEngine ? GEngine->XRSystem.Get() : nullptr}; + if (!XRTrackingSystem) + { + return false; + } + + IOpenXRHMD* OpenXRHMD{XRTrackingSystem->GetIOpenXRHMD()}; + if (!OpenXRHMD) + { + return false; + } + + FName HandTrackerName("OpenXRHandTracking"); + TArray HandTrackers = IModularFeatures::Get().GetModularFeatureImplementations( + IHandTracker::GetModularFeatureName()); + IHandTracker* HandTracker = nullptr; + for (auto Itr: HandTrackers) + { + if (Itr->GetHandTrackerDeviceTypeName() == HandTrackerName) + { + HandTracker = Itr; + break; + } + } + + if ((Hand == EControllerHand::Left) || (Hand == EControllerHand::Right)) + { + const bool bHandTrackingStateValid = HandTracker && HandTracker->IsHandTrackingStateValid(); + if (bHandTrackingStateValid) + { + bool bTracked = false; + OutHandTrackingState.bValid = HandTracker->GetAllKeypointStates( + Hand, + OutHandTrackingState.HandKeyLocations, + OutHandTrackingState.HandKeyRotations, + OutHandTrackingState.HandKeyRadii, + bTracked); + + if (!ensureAlwaysMsgf( + !OutHandTrackingState.bValid + || (OutHandTrackingState.HandKeyLocations.Num() == EHandKeypointCount + && OutHandTrackingState.HandKeyRotations.Num() == EHandKeypointCount + && OutHandTrackingState.HandKeyRadii.Num() == EHandKeypointCount), + TEXT("Corrupted OutHandTrackingState!"))) + { + OutHandTrackingState.bValid = false; + return false; + } + + if (OutHandTrackingState.bValid) + { + OutHandTrackingState.TrackingStatus = bTracked ? ETrackingStatus::Tracked : ETrackingStatus::NotTracked; + } + } + } + + return OutHandTrackingState.bValid; +} + +FSGXRTracker::FSGXRTracker(const TSharedRef& InMessageHandler) + : Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ + Pimpl->MessageHandler = InMessageHandler; + + // Register the modular features manually. + IModularFeatures::Get().RegisterModularFeature(IHandTracker::GetModularFeatureName(), + static_cast(this)); + IModularFeatures::Get().RegisterModularFeature(IMotionController::GetModularFeatureName(), + static_cast(this)); + IModularFeatures::Get().RegisterModularFeature(IOpenXRExtensionPlugin::GetModularFeatureName(), + static_cast(this)); + + // We're implicitly requiring that the OpenXRPlugin has been loaded and initialized at this point. + if (!IOpenXRHMDModule::Get().IsAvailable()) + { + SGLOG_FATAL("The OpenXRHMD plugin isn't available!"); + ensureAlwaysMsgf(false, TEXT("The OpenXRHMD plugin isn't available!")); + } +} + +FSGXRTracker::FSGXRTracker(FSGXRTracker&& Rhs) SG_NOEXCEPT = default; + +FSGXRTracker::~FSGXRTracker() = default; + +FSGXRTracker& FSGXRTracker::operator=(FSGXRTracker&& Rhs) SG_NOEXCEPT = default; + +bool FSGXRTracker::IsHandTrackingSupportedByDevice() const +{ + const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected(); + + const bool bAnyGloveConnected = FImpl::IsAnyGloveConnected(); + const bool bHandTrackingAvailable = Pimpl->bHandTrackingAvailable; + + const bool bHandTrackingSupportedByDevice = + bAnyGloveConnected || (bFallbackToHandTrackingIfNoGloveDetected && bHandTrackingAvailable); + + return bHandTrackingSupportedByDevice; +} + +const FSGXRHandState& FSGXRTracker::GetLeftHandState() const +{ + return Pimpl->GetLeftHandState(); +} + +const FSGXRHandState& FSGXRTracker::GetRightHandState() const +{ + return Pimpl->GetRightHandState(); +} + +FString FSGXRTracker::GetDisplayName() +{ + static const FString Name{TEXT("SenseGloveTracking")}; + return Name; +} + +bool FSGXRTracker::GetRequiredExtensions(TArray& OutExtensions) +{ + TArray Properties; + EnumerateOpenXRApiLayers(Properties); + + // Some API layers can crash the loader when enabled, if they're present we shouldn't enable the extension. + for (const XrApiLayerProperties& Layer: Properties) + { + if (FCStringAnsi::Strstr(Layer.layerName, "XR_APILAYER_VIVE_hand_tracking") + && Layer.layerVersion <= 1) + { + return false; + } + } + + OutExtensions.Add(XR_EXT_HAND_TRACKING_EXTENSION_NAME); + + return true; +} + +const void* FSGXRTracker::OnGetSystem(const XrInstance InInstance, const void* InNext) +{ + // Store the extension open xr calls to member function pointers for convenient use. + XR_ENSURE(xrGetInstanceProcAddr(InInstance, + "xrCreateHandTrackerEXT", (PFN_xrVoidFunction*)&Pimpl->XRCreateHandTrackerEXT)); + XR_ENSURE(xrGetInstanceProcAddr(InInstance, + "xrDestroyHandTrackerEXT", (PFN_xrVoidFunction*)&Pimpl->XRDestroyHandTrackerEXT)); + XR_ENSURE(xrGetInstanceProcAddr(InInstance, + "xrLocateHandJointsEXT", (PFN_xrVoidFunction*)&Pimpl->XRLocateHandJointsEXT)); + + return InNext; +} + +const void* FSGXRTracker::OnCreateSession(const XrInstance InInstance, const XrSystemId InSystem, const void* InNext) +{ + // Need to wait until the EHandKeypoint enum has been loaded, so we do this here rather than in the constructor + // which runs too early. + Pimpl->BuildMotionSourceToKeypointMap(); + + XrSystemHandTrackingPropertiesEXT HandTrackingSystemProperties{ + XR_TYPE_SYSTEM_HAND_TRACKING_PROPERTIES_EXT}; + XrSystemProperties systemProperties{XR_TYPE_SYSTEM_PROPERTIES, + &HandTrackingSystemProperties}; + XR_ENSURE(xrGetSystemProperties(InInstance, InSystem, &systemProperties)); + + Pimpl->bHandTrackingAvailable = HandTrackingSystemProperties.supportsHandTracking == XR_TRUE; + + return InNext; +} + +const void* FSGXRTracker::OnBeginSession(const XrSession InSession, const void* InNext) +{ + const bool bHandTrackingAvailable = Pimpl->bHandTrackingAvailable; + + if (bHandTrackingAvailable) + { + static FName SystemName(TEXT("OpenXR")); + if (IsValid(GEngine) && GEngine->XRSystem.IsValid() && (GEngine->XRSystem->GetSystemName() == SystemName)) + { + Pimpl->XRTrackingSystem = GEngine->XRSystem.Get(); + } + + // Create a hand tracker for the left hand that tracks default set of hand joints. + FSGXRHandState& LeftHandState{Pimpl->GetLeftHandState()}; +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 + Pimpl->CreateHandTracker(InSession, XR_HAND_LEFT_EXT, LeftHandState); +#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 */ + { + XrHandTrackerCreateInfoEXT CreateInfo{XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT}; + CreateInfo.hand = XR_HAND_LEFT_EXT; + CreateInfo.handJointSet = XR_HAND_JOINT_SET_DEFAULT_EXT; + XR_ENSURE(Pimpl->XRCreateHandTrackerEXT(InSession, &CreateInfo, &LeftHandState.HandTracker)); + } +#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 */ + + // Create a hand tracker for the right hand that tracks default set of hand joints. + FSGXRHandState& RightHandState{Pimpl->GetRightHandState()}; +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 + Pimpl->CreateHandTracker(InSession, XR_HAND_RIGHT_EXT, RightHandState); +#else /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 */ + { + XrHandTrackerCreateInfoEXT CreateInfo{XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT}; + CreateInfo.hand = XR_HAND_RIGHT_EXT; + CreateInfo.handJointSet = XR_HAND_JOINT_SET_DEFAULT_EXT; + XR_ENSURE(Pimpl->XRCreateHandTrackerEXT(InSession, &CreateInfo, &RightHandState.HandTracker)); + } +#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 */ + } + + return InNext; +} + +void FSGXRTracker::UpdateDeviceLocations( + const XrSession InSession, const XrTime DisplayTime, const XrSpace TrackingSpace) +{ + if (!IsHandTrackingStateValid()) + { + return; + } + + XrHandJointsLocateInfoEXT LocateInfo{XR_TYPE_HAND_JOINTS_LOCATE_INFO_EXT}; + LocateInfo.baseSpace = TrackingSpace; + LocateInfo.time = DisplayTime; + + const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected(); + + const bool bLeftGloveConnected = FImpl::IsLeftGloveConnected(); + if (bLeftGloveConnected) + { + /// NOTE + /// It's necessary to call the UpdateXRHandTrackingData first for the wrist-tracking to work properly when the + /// motion controllers are not active and we rely on the OpenXRHandTracking data for wrist tracking. + /// See the NOTE inside the FSGXRTracker::FImpl::GetWristTransform method. + Pimpl->UpdateXRHandTrackingData(Pimpl->GetLeftHandState(), LocateInfo); + Pimpl->UpdateSGHandState(false, Pimpl->GetLeftHandState()); + } + else + { + if (bFallbackToHandTrackingIfNoGloveDetected) + { + Pimpl->UpdateXRHandTrackingData(Pimpl->GetLeftHandState(), LocateInfo); + } + } + + const bool bRightGloveConnected = FImpl::IsRightGloveConnected(); + if (bRightGloveConnected) + { + /// NOTE + /// It's necessary to call the UpdateXRHandTrackingData first for the wrist-tracking to work properly when the + /// motion controllers are not active and we rely on the OpenXRHandTracking data for wrist tracking. + /// See the NOTE inside the FSGXRTracker::FImpl::GetWristLocationAndRotation method. + Pimpl->UpdateXRHandTrackingData(Pimpl->GetRightHandState(), LocateInfo); + Pimpl->UpdateSGHandState(true, Pimpl->GetRightHandState()); + } + else + { + if (bFallbackToHandTrackingIfNoGloveDetected) + { + Pimpl->UpdateXRHandTrackingData(Pimpl->GetRightHandState(), LocateInfo); + } + } +} + +bool FSGXRTracker::GetControllerOrientationAndPosition(const int32 ControllerIndex, const FName MotionSource, + FRotator& OutOrientation, FVector& OutPosition, + const float WorldToMetersScale) const +{ + if (!IsHandTrackingStateValid()) + { + return false; + } + + // Hand tracking currently does not support late update. Current hand tracking systems have latency that make it + // pointless. + if (!IsInGameThread()) + { + return false; + } + + if (ControllerIndex != Pimpl->DeviceIndex) + { + return false; + } + + FTransform ControllerTransform; + bool bMotionSourceHandTracking; + const bool bGotTransform = Pimpl->GetControllerTransform(MotionSource, WorldToMetersScale, + ControllerTransform, bMotionSourceHandTracking); + (void) bMotionSourceHandTracking; + + OutOrientation = ControllerTransform.GetRotation().Rotator(); + OutPosition = ControllerTransform.GetLocation(); + + return bGotTransform; +} + +ETrackingStatus FSGXRTracker::GetControllerTrackingStatus(const int32 ControllerIndex, const FName MotionSource) const +{ + if (!IsHandTrackingStateValid()) + { + return ETrackingStatus::NotTracked; + } + + const FImpl::FSGMotionSourceInfo* KeyPointInfoPtr{Pimpl->MotionSourceToKeypointMap.Find(MotionSource)}; + if (!KeyPointInfoPtr) + { + return ETrackingStatus::NotTracked; + } + + const bool bRight = !KeyPointInfoPtr->Value; + + const bool bGlovePresent = + (bRight && FImpl::IsRightGloveConnected()) || (!bRight && FImpl::IsLeftGloveConnected()); + if (bGlovePresent) + { + return ETrackingStatus::Tracked; + } + + const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected(); + if (bFallbackToHandTrackingIfNoGloveDetected) + { + const FSGXRHandState& HandState{bRight ? GetRightHandState() : GetLeftHandState()}; + return HandState.bTracked ? ETrackingStatus::Tracked : ETrackingStatus::NotTracked; + } + + return ETrackingStatus::NotTracked; +} + +FName FSGXRTracker::GetMotionControllerDeviceTypeName() const +{ + const static FName DefaultName(TEXT("OpenXRHandTracking")); + return DefaultName; +} + +void FSGXRTracker::EnumerateSources(TArray& SourcesOut) const +{ + ensureAlwaysMsgf(IsInGameThread(), TEXT("Is not in the game thread!")); + + SourcesOut.Reserve(SourcesOut.Num() + (EHandKeypointCount * 2)); + + const FName& Left(FImpl::GetLeftHandTrackingMotionSourceName()); + const FName& Right(FImpl::GetRightHandTrackingMotionSourceName()); + + for (int32 Keypoint = 0; Keypoint < EHandKeypointCount; Keypoint++) + { + const FName EnumName{FImpl::GetHandKeypointEnumName(Keypoint)}; + const FString EnumString{EnumName.ToString()}; + const FString StringLeft{FString::Printf(TEXT("%s%s"), *Left.ToString(), *EnumString)}; + const FString StringRight{FString::Printf(TEXT("%s%s"), *Right.ToString(), *EnumString)}; + FName SourceL(*(StringLeft)); + FName SourceR(*(StringRight)); + SourcesOut.Add(MoveTemp(SourceL)); + SourcesOut.Add(MoveTemp(SourceR)); + } +} + +void FSGXRTracker::Tick(const float DeltaTime) +{ +} + +void FSGXRTracker::SendControllerEvents() +{ +} + +void FSGXRTracker::SetMessageHandler(const TSharedRef& InMessageHandler) +{ + Pimpl->MessageHandler = InMessageHandler; +} + +bool FSGXRTracker::Exec(UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar) +{ + return false; +} + +void FSGXRTracker::SetChannelValue( + const int32 ControllerId, const FForceFeedbackChannelType ChannelType, const float Value) +{ +} + +void FSGXRTracker::SetChannelValues(const int32 ControllerId, const FForceFeedbackValues& Values) +{ +} + +bool FSGXRTracker::SupportsForceFeedback(const int32 ControllerId) +{ + // FIXME + // For now it's true, but when we fall back to the hand tracking we might return false. + (void) ControllerId; + return true; +} + +bool FSGXRTracker::IsGamepadAttached() const +{ + return false; +} + +FName FSGXRTracker::GetHandTrackerDeviceTypeName() const +{ + return GetMotionControllerDeviceTypeName(); +} + +bool FSGXRTracker::IsHandTrackingStateValid() const +{ + const bool bFallbackToHandTrackingIfNoGloveDetected = FImpl::ShouldFallbackToHandTrackingIfNoGloveDetected(); + + const bool bHandTrackingAvailable = Pimpl->bHandTrackingAvailable; + const bool bAnyGloveConnected = FImpl::IsAnyGloveConnected(); + + const bool bHandTrackingStateValid = + bAnyGloveConnected || (bFallbackToHandTrackingIfNoGloveDetected && bHandTrackingAvailable); + + return bHandTrackingStateValid; +} + +bool FSGXRTracker::GetKeypointState( + const EControllerHand Hand, const EHandKeypoint Keypoint, FTransform& OutTransform, float& OutRadius) const +{ + if (!IsHandTrackingStateValid()) + { + return false; + } + + if (!Pimpl->CanOutputTrackingData(Hand)) + { + return false; + } + + const FSGXRHandState& HandState{ + Hand == EControllerHand::Left ? GetLeftHandState() : GetRightHandState() + }; + const bool bGotTransform = HandState.GetTransform(Keypoint, OutTransform); + OutRadius = HandState.Radii[static_cast(Keypoint)]; + + if (bGotTransform) + { + if (!ensureAlwaysMsgf(Pimpl->XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + + // Convert to UE world space. + const FTransform& TrackingToWorldTransform{Pimpl->XRTrackingSystem->GetTrackingToWorldTransform()}; + OutTransform *= TrackingToWorldTransform; + } + + return bGotTransform; +} + +bool FSGXRTracker::GetAllKeypointStates( + const EControllerHand Hand, + TArray& OutPositions, TArray& OutRotations, TArray& OutRadii, + bool& OutIsTracked) const +{ + if (!IsHandTrackingStateValid()) + { + return false; + } + + if (Hand != EControllerHand::Left && Hand != EControllerHand::Right) + { + return false; + } + + if (!Pimpl->CanOutputTrackingData(Hand)) + { + return false; + } + + const FSGXRHandState& HandState{ + Hand == EControllerHand::Left ? GetLeftHandState() : GetRightHandState() + }; + + if (!HandState.bHasReceivedJointPoses) + { + return false; + } + + OutIsTracked = HandState.bTracked; + + // If we ever received poses we return the last data we received, even if not currently tracking to avoid poping + // back to (0.0f, 0.0f, 0.0f) and the like. + OutPositions.Empty(EHandKeypointCount); + OutRotations.Empty(EHandKeypointCount); + OutRadii.Empty(EHandKeypointCount); + + if (!ensureAlwaysMsgf(Pimpl->XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + + const FTransform& TrackingToWorldTransform{Pimpl->XRTrackingSystem->GetTrackingToWorldTransform()}; + + for (int32 i = 0; i < EHandKeypointCount; ++i) + { + FTransform KeypointWorldTransform{HandState.KeypointTransforms[i] * TrackingToWorldTransform}; + OutPositions.Add(KeypointWorldTransform.GetLocation()); + OutRotations.Add(KeypointWorldTransform.GetRotation()); + } + + for (int32 i = 0; i < EHandKeypointCount; ++i) + { + OutRadii.Add(HandState.Radii[i]); + } + + return true; +} + +FSGXRTracker::FImpl::FImpl(FSGXRTracker* InOwner) + : bHandTrackingAvailable(false), + XRCreateHandTrackerEXT(nullptr), + XRDestroyHandTrackerEXT(nullptr), + XRLocateHandJointsEXT(nullptr), + XRTrackingSystem(nullptr), + DeviceIndex(0), + CurrentHandTrackingDataIndex(0), + Owner(InOwner) +{ +} + +FSGXRTracker::FImpl::~FImpl() = default; + +void FSGXRTracker::FImpl::BuildMotionSourceToKeypointMap() +{ + ensureAlwaysMsgf(IsInGameThread(), TEXT("Is not in the game thread!")); + + if (!MotionSourceToKeypointMap.IsEmpty()) + { + return; + } + + const bool bSupportLegacyControllerMotionSources = ShouldSupportLegacyControllerMotionSources(); + + // There is a motion source that corresponds to each hand keypoint of the form [Left|Right][Keypoint]. + // Build a map so we can quickly translate from motion source FName to hand bone EHandKeypoint value. + // We also have the option of using more specific motion sources of the form HandTracking[Left|Right][Keypoint]. + // This is useful if one wishes to use hand tracking and controllers simultaneously. + // We also may support more generic legacy motion sources, by default we do support this. + + const FName& Left(GetLeftHandTrackingMotionSourceName()); + const FName& Right(GetRightHandTrackingMotionSourceName()); + + for (int32 KeypointIndex = 0; KeypointIndex < EHandKeypointCount; ++KeypointIndex) + { + const EHandKeypoint EnumValue = static_cast(KeypointIndex); + const FName EnumName{GetHandKeypointEnumName(KeypointIndex)}; + const FString EnumString{EnumName.ToString()}; + + FName LeftName(Left.ToString() + EnumString); + FName RightName(Right.ToString() + EnumString); + MotionSourceToKeypointMap.Add(MoveTemp(LeftName), FSGMotionSourceInfo(EnumValue, true)); + MotionSourceToKeypointMap.Add(MoveTemp(RightName), FSGMotionSourceInfo(EnumValue, false)); + } + + if (bSupportLegacyControllerMotionSources) + { + const FName& LeftLegacyControllerHandTrackingMotionSourceName{ + GetLegacyControllerLeftHandTrackingMotionSourceName()}; + const FName& RightLegacyControllerHandTrackingMotionSourceName{ + GetLegacyControllerRightHandTrackingMotionSourceName()}; + MotionSourceToKeypointMap.Add( + LeftLegacyControllerHandTrackingMotionSourceName, FSGMotionSourceInfo(EHandKeypoint::Wrist, true)); + MotionSourceToKeypointMap.Add( + RightLegacyControllerHandTrackingMotionSourceName, FSGMotionSourceInfo(EHandKeypoint::Wrist, false)); + } + + const FSGWristTrackingSettings& WristTrackingSettings{GetWristTrackingSettings()}; + const FName& LeftHandSGMotionSourceName{WristTrackingSettings.LeftHandMotionSource}; + const FName& RightHandSGMotionSourceName{WristTrackingSettings.RightHandMotionSource}; + + MotionSourceToKeypointMap.Add( + LeftHandSGMotionSourceName, FSGMotionSourceInfo(EHandKeypoint::Wrist, true)); + MotionSourceToKeypointMap.Add( + RightHandSGMotionSourceName, FSGMotionSourceInfo(EHandKeypoint::Wrist, false)); +} + +#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 +void FSGXRTracker::FImpl::CreateHandTracker(XrSession InSession, XrHandEXT HandEXT, FSGXRHandState& HandState) const +{ + XrHandTrackerCreateInfoEXT CreateInfo{XR_TYPE_HAND_TRACKER_CREATE_INFO_EXT}; + CreateInfo.hand = HandEXT; + CreateInfo.handJointSet = XR_HAND_JOINT_SET_DEFAULT_EXT; + + IOpenXRHMD* OpenXRHMD{XRTrackingSystem ? XRTrackingSystem->GetIOpenXRHMD() : nullptr}; + if (OpenXRHMD) + { + TArray ExtensionPlugins{OpenXRHMD->GetExtensionPlugins()}; + for (IOpenXRExtensionPlugin* Plugin : ExtensionPlugins) + { + CreateInfo.next = Plugin->OnCreateHandTracker(CreateInfo.next); + } + } + + XR_ENSURE(XRCreateHandTrackerEXT(InSession, &CreateInfo, &HandState.HandTracker)); +} +#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 7 */ + +bool FSGXRTracker::FImpl::CanOutputTrackingData(const EControllerHand Hand) const +{ + const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected(); + + const bool bIsHandTrackingAvailable = bHandTrackingAvailable; + + bool bGloveConnected = false; + if (Hand == EControllerHand::Left) + { + bGloveConnected = IsLeftGloveConnected(); + } + else if (Hand == EControllerHand::Right) + { + bGloveConnected = IsRightGloveConnected(); + } + + const bool bCanOutputTrackingData = + bGloveConnected || (bFallbackToHandTrackingIfNoGloveDetected && bIsHandTrackingAvailable); + + return bCanOutputTrackingData; +} + +bool FSGXRTracker::FImpl::UpdateXRHandTrackingData( + FSGXRHandState& OutHandState, const XrHandJointsLocateInfoEXT& LocateInfo) const +{ + if (!ensureAlwaysMsgf(XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + + const float WorldToMetersScale = XRTrackingSystem->GetWorldToMetersScale(); + + XR_ENSURE(XRLocateHandJointsEXT(OutHandState.HandTracker, &LocateInfo, &OutHandState.Locations)); + + OutHandState.bTracked = OutHandState.Locations.isActive == XR_TRUE; + OutHandState.bHasReceivedJointPoses |= OutHandState.bTracked; + if (!OutHandState.bTracked) + { + return false; + } + + static_assert( + XR_HAND_JOINT_PALM_EXT == 0 && XR_HAND_JOINT_LITTLE_TIP_EXT == XR_HAND_JOINT_COUNT_EXT - 1, + "XrHandJointEXT enum is not as assumed for the following loop!"); + + for (int32 j = 0; j < XR_HAND_JOINT_COUNT_EXT; ++j) + { + const XrHandJointLocationEXT& JointLocation{OutHandState.JointLocations[j]}; + const XrPosef& Pose{JointLocation.pose}; + FTransform Transform{ToFTransform(Pose, WorldToMetersScale)}; + OutHandState.KeypointTransforms[j] = MoveTemp(Transform); + OutHandState.Radii[j] = JointLocation.radius * WorldToMetersScale; + // velocities would go here + } + + return true; +} + +FName FSGXRTracker::FImpl::GetTargetOpenXRPositionalTrackingProviderName() const +{ + const FSGWristTrackingSettings& WristTrackingSettings{GetWristTrackingSettings()}; + + ESGOpenXRPositionalTrackingProvider PositionalTrackingProvider = + WristTrackingSettings.OpenXRPositionalTrackingProvider; + + if (PositionalTrackingProvider == ESGOpenXRPositionalTrackingProvider::None) + { + const bool bIsAHtcViveDevice = FSGHMDTracker::IsAHtcViveDevice(); + if (bIsAHtcViveDevice) + { +#if PLATFORM_ANDROID + PositionalTrackingProvider = ESGOpenXRPositionalTrackingProvider::OpenXRViveWristTracker; +#else /* PLATFORM_ANDROID */ + // TODO + // Revisit this later! + // For now only `Emulate VIVE Wrist Tracker as VIVE Tracker` option in VBE works on Windows + // const bool bIsViveOpenXRPluginLoaded = FSGPluginUtils::IsViveOpenXRPluginAvailable(); + // if (bIsViveOpenXRPluginLoaded) + // { + // if (WristTrackingSettings.TrackingHardware == ESGPositionalTrackingHardware::ViveFocus3WristTracker) + // { + // PositionalTrackingProvider = ESGOpenXRPositionalTrackingProvider::OpenXRViveWristTracker; + // } + // else + // { + // PositionalTrackingProvider = ESGOpenXRPositionalTrackingProvider::OpenXRViveTracker; + // } + // } + // else + // { + // PositionalTrackingProvider = ESGOpenXRPositionalTrackingProvider::OpenXRViveTracker; + // } + PositionalTrackingProvider = ESGOpenXRPositionalTrackingProvider::OpenXRViveTracker; +#endif /* PLATFORM_ANDROID */ + } + else + { + PositionalTrackingProvider = ESGOpenXRPositionalTrackingProvider::OpenXR; + } + } + + const FName PositionalTrackingProviderName{ + GetOpenXRPositionalTrackingProviderEnumName(PositionalTrackingProvider) + }; + return PositionalTrackingProviderName; +} + +bool FSGXRTracker::FImpl::GetControllerTransform( + const FName MotionSource, const float WorldToMetersScale, + FTransform& OutTransform, bool& bOutMotionSourceHandTracking) const +{ + const FSGMotionSourceInfo* KeyPointInfoPtr{MotionSourceToKeypointMap.Find(MotionSource)}; + if (!KeyPointInfoPtr) + { + return false; + } + + const bool bRight = !KeyPointInfoPtr->Value; + const bool bGlovePresent = + (bRight && IsRightGloveConnected()) || (!bRight && IsLeftGloveConnected()); + const bool bFallbackToHandTrackingIfNoGloveDetected = ShouldFallbackToHandTrackingIfNoGloveDetected(); + + if (!bGlovePresent && !bFallbackToHandTrackingIfNoGloveDetected) + { + return false; + } + + const FSGWristTrackingSettings& WristTrackingSettings{GetWristTrackingSettings()}; + const FName& PositionalTrackingHardwareMotionSource{ + bRight + ? WristTrackingSettings.RightHandMotionSource + : WristTrackingSettings.LeftHandMotionSource + }; + + bool bTracked = false; + + if (MotionSource == PositionalTrackingHardwareMotionSource) + { + const FName TargetPositionalTrackingProviderName{ + GetTargetOpenXRPositionalTrackingProviderName() + }; + + const TArray MotionControllers{ + IModularFeatures::Get().GetModularFeatureImplementations( + IMotionController::GetModularFeatureName()) + }; + + TPromise> Promise; + const TFuture> Future{Promise.GetFuture()}; + + AsyncTask(ENamedThreads::ActualRenderingThread, + [ + this, + WorldToMetersScale, + &PositionalTrackingHardwareMotionSource, + &TargetPositionalTrackingProviderName, + MotionControllers, + Promise = MoveTemp(Promise)]() mutable + { + for (const IMotionController* MotionController: MotionControllers) + { + if (!MotionController) + { + continue; + } + + const ETrackingStatus TrackingStatus = MotionController->GetControllerTrackingStatus( + DeviceIndex, PositionalTrackingHardwareMotionSource); + if (TrackingStatus == ETrackingStatus::NotTracked) + { + continue; + } + + const FName DeviceTypeName{MotionController->GetMotionControllerDeviceTypeName()}; + if (DeviceTypeName != TargetPositionalTrackingProviderName) + { + continue; + } + + FRotator Orientation; + FVector Position; + const bool bGotTransform = MotionController->GetControllerOrientationAndPosition( + DeviceIndex, PositionalTrackingHardwareMotionSource, + Orientation, Position, WorldToMetersScale); + if (bGotTransform) + { + FTransform Transform{Orientation, Position}; + Promise.SetValue(MoveTemp(Transform)); + return; + } + } + + Promise.SetValue(TOptional{}); + }); + + if (Future.WaitFor(FTimespan::FromMilliseconds(100))) + { + TOptional Result{Future.Get()}; + if (Result.IsSet()) + { + OutTransform = Result.GetValue(); + bOutMotionSourceHandTracking = false; + bTracked = true; + } + } + } + + if (!bTracked && bFallbackToHandTrackingIfNoGloveDetected) + { + const FSGXRHandState& HandState{bRight ? Owner->GetRightHandState() : Owner->GetLeftHandState()}; + if (!HandState.bHasReceivedJointPoses) + { + return false; + } + + const EHandKeypoint KeyPoint = KeyPointInfoPtr->Key; + const FTransform& ControllerTransform{HandState.GetTransform(KeyPoint)}; + OutTransform = ControllerTransform; + bOutMotionSourceHandTracking = true; + bTracked = HandState.bTracked; + } + + return bTracked; +} + +bool FSGXRTracker::FImpl::GetWristTransform(const bool bRight, FTransform& OutTransform) const +{ + const FSGWristTrackingSettings& WristTrackingSettings{GetWristTrackingSettings()}; + const FName& MotionSource{ + bRight + ? WristTrackingSettings.RightHandMotionSource + : WristTrackingSettings.LeftHandMotionSource + }; + + if (!ensureAlwaysMsgf(XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + const float WorldToMetersScale = XRTrackingSystem->GetWorldToMetersScale(); + + bool bMotionSourceHandTracking = false; + FTransform ControllerTransform; + const bool bGotTransform = GetControllerTransform( + MotionSource, WorldToMetersScale, ControllerTransform, bMotionSourceHandTracking); + + if (bGotTransform) + { + if (bMotionSourceHandTracking) + { + OutTransform = MoveTemp(ControllerTransform); + } + else + { + const ESGPositionalTrackingHardware TrackingHardware = GetPositionalTrackingHardware(); + if (TrackingHardware == ESGPositionalTrackingHardware::Custom) + { + if (bRight) + { + ControllerTransform.SetRotation( + (ControllerTransform.GetRotation().Rotator() + + WristTrackingSettings.TrackingHardwareRotationOffsetRightHand).Quaternion()); + ControllerTransform.SetLocation( + ControllerTransform.GetLocation() + + WristTrackingSettings.TrackingHardwareLocationOffsetRightHand); + } + else + { + ControllerTransform.SetRotation( + (ControllerTransform.GetRotation().Rotator() + + WristTrackingSettings.TrackingHardwareRotationOffsetLeftHand).Quaternion()); + ControllerTransform.SetLocation( + ControllerTransform.GetLocation() + + WristTrackingSettings.TrackingHardwareLocationOffsetLeftHand); + } + } + + const USGHapticGlove* Glove{GetGlove(bRight)}; + if (!IsValid(Glove)) + { + return false; + } + + FVector WristLocation; + FRotator WristRotation; + Glove->GetWristLocation( + ControllerTransform.GetLocation(), + ControllerTransform.GetRotation().Rotator(), + TrackingHardware, + WristLocation, WristRotation); + + OutTransform = FTransform{MoveTemp(WristRotation), MoveTemp(WristLocation)}; + } + } + + return bGotTransform; +} + +bool FSGXRTracker::FImpl::UpdateSGJointData( + FSGXRHandState& OutHandState, const EHandKeypoint Joint, + const FTransform& JointTransform, const FTransform& WristTransform) const +{ + if (!ensureAlwaysMsgf(XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + + const float WorldToMetersScale = XRTrackingSystem->GetWorldToMetersScale(); + + const int32 JointIndex = static_cast(Joint); + + const FQuat WristRotation{WristTransform.GetRotation()}; + const FVector WristLocation{WristTransform.GetLocation()}; + const FQuat JointRotation{JointTransform.GetRotation()}; + const FVector JointLocation{JointTransform.GetLocation()}; + + FTransform Transform{ + WristRotation * JointRotation, + WristLocation + (WristRotation * JointLocation) + }; + + OutHandState.KeypointTransforms[JointIndex] = MoveTemp(Transform); + OutHandState.Radii[JointIndex] = 0.01f * WorldToMetersScale; + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGWristJointData( + FSGXRHandState& OutHandState, const FTransform& WristTransform) const +{ + if (!ensureAlwaysMsgf(XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + + const float WorldToMetersScale = XRTrackingSystem->GetWorldToMetersScale(); + + static constexpr EHandKeypoint Joint = EHandKeypoint::Wrist; + static constexpr int32 JointIndex = static_cast(Joint); + + OutHandState.KeypointTransforms[JointIndex] = WristTransform; + OutHandState.Radii[JointIndex] = 0.01f * WorldToMetersScale; + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGPalmJointData( + FSGXRHandState& OutHandState, const bool bRight, const FTransform& WristTransform) const +{ + if (!ensureAlwaysMsgf(XRTrackingSystem, TEXT("Invalid XR tracking system!"))) + { + return false; + } + + FTransform JointTransform{GetMeshWristChildBoneRefTransform(bRight, EHandKeypoint::Palm)}; + + if (!UpdateSGJointData(OutHandState, EHandKeypoint::Palm, + MoveTemp(JointTransform), WristTransform)) + { + return false; + } + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGThumbJointData( + FSGXRHandState& OutHandState, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const +{ + static constexpr int32 ThumbFingerIndex = 0; + static constexpr int32 ThumbMetacarpalJointIndex = 0; + static constexpr int32 ThumbProximalJointIndex = 1; + static constexpr int32 ThumbDistalJointIndex = 2; + static constexpr int32 ThumbTipJointIndex = 3; + + FTransform ThumbMetacarpalTransform{ + JointRotations[ThumbFingerIndex][ThumbMetacarpalJointIndex], + JointLocations[ThumbFingerIndex][ThumbMetacarpalJointIndex] + }; + FTransform ThumbProximalTransform{ + JointRotations[ThumbFingerIndex][ThumbProximalJointIndex], + JointLocations[ThumbFingerIndex][ThumbProximalJointIndex] + }; + FTransform ThumbDistalTransform{ + JointRotations[ThumbFingerIndex][ThumbDistalJointIndex], + JointLocations[ThumbFingerIndex][ThumbDistalJointIndex] + }; + FTransform ThumbTipTransform{ + JointRotations[ThumbFingerIndex][ThumbTipJointIndex], + JointLocations[ThumbFingerIndex][ThumbTipJointIndex] + }; + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::ThumbMetacarpal, + MoveTemp(ThumbMetacarpalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::ThumbProximal, + MoveTemp(ThumbProximalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::ThumbDistal, + MoveTemp(ThumbDistalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::ThumbTip, + MoveTemp(ThumbTipTransform), WristTransform)) + { + return false; + } + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGIndexJointData( + FSGXRHandState& OutHandState, const bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const +{ + static constexpr int32 IndexFingerIndex = 1; + + static constexpr int32 IndexProximalJointIndex = 0; + static constexpr int32 IndexIntermediateJointIndex = 1; + static constexpr int32 IndexDistalJointIndex = 2; + static constexpr int32 IndexTipJointIndex = 3; + + FTransform IndexMetacarpalTransform{ + GetMeshWristChildBoneRefTransform(bRight, EHandKeypoint::IndexMetacarpal) + }; + FTransform IndexProximalTransform{ + JointRotations[IndexFingerIndex][IndexProximalJointIndex], + JointLocations[IndexFingerIndex][IndexProximalJointIndex] + }; + FTransform IndexIntermediateTransform{ + JointRotations[IndexFingerIndex][IndexIntermediateJointIndex], + JointLocations[IndexFingerIndex][IndexIntermediateJointIndex] + }; + FTransform IndexDistalTransform{ + JointRotations[IndexFingerIndex][IndexDistalJointIndex], + JointLocations[IndexFingerIndex][IndexDistalJointIndex] + }; + FTransform IndexTipTransform{ + JointRotations[IndexFingerIndex][IndexTipJointIndex], + JointLocations[IndexFingerIndex][IndexTipJointIndex] + }; + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::IndexMetacarpal, + MoveTemp(IndexMetacarpalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::IndexProximal, + MoveTemp(IndexProximalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::IndexIntermediate, + MoveTemp(IndexIntermediateTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::IndexDistal, + MoveTemp(IndexDistalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::IndexTip, + MoveTemp(IndexTipTransform), WristTransform)) + { + return false; + } + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGMiddleJointData( + FSGXRHandState& OutHandState, const bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const +{ + static constexpr int32 MiddleFingerMiddle = 2; + + static constexpr int32 MiddleProximalJointMiddle = 0; + static constexpr int32 MiddleIntermediateJointMiddle = 1; + static constexpr int32 MiddleDistalJointMiddle = 2; + static constexpr int32 MiddleTipJointMiddle = 3; + + FTransform MiddleMetacarpalTransform{ + GetMeshWristChildBoneRefTransform(bRight, EHandKeypoint::MiddleMetacarpal) + }; + FTransform MiddleProximalTransform{ + JointRotations[MiddleFingerMiddle][MiddleProximalJointMiddle], + JointLocations[MiddleFingerMiddle][MiddleProximalJointMiddle] + }; + FTransform MiddleIntermediateTransform{ + JointRotations[MiddleFingerMiddle][MiddleIntermediateJointMiddle], + JointLocations[MiddleFingerMiddle][MiddleIntermediateJointMiddle] + }; + FTransform MiddleDistalTransform{ + JointRotations[MiddleFingerMiddle][MiddleDistalJointMiddle], + JointLocations[MiddleFingerMiddle][MiddleDistalJointMiddle] + }; + FTransform MiddleTipTransform{ + JointRotations[MiddleFingerMiddle][MiddleTipJointMiddle], + JointLocations[MiddleFingerMiddle][MiddleTipJointMiddle] + }; + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::MiddleMetacarpal, + MoveTemp(MiddleMetacarpalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::MiddleProximal, + MoveTemp(MiddleProximalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::MiddleIntermediate, + MoveTemp(MiddleIntermediateTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::MiddleDistal, + MoveTemp(MiddleDistalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::MiddleTip, + MoveTemp(MiddleTipTransform), WristTransform)) + { + return false; + } + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGRingJointData( + FSGXRHandState& OutHandState, const bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const +{ + static constexpr int32 RingFingerRing = 3; + + static constexpr int32 RingProximalJointRing = 0; + static constexpr int32 RingIntermediateJointRing = 1; + static constexpr int32 RingDistalJointRing = 2; + static constexpr int32 RingTipJointRing = 3; + + FTransform RingMetacarpalTransform{ + GetMeshWristChildBoneRefTransform(bRight, EHandKeypoint::RingMetacarpal) + }; + FTransform RingProximalTransform{ + JointRotations[RingFingerRing][RingProximalJointRing], + JointLocations[RingFingerRing][RingProximalJointRing] + }; + FTransform RingIntermediateTransform{ + JointRotations[RingFingerRing][RingIntermediateJointRing], + JointLocations[RingFingerRing][RingIntermediateJointRing] + }; + FTransform RingDistalTransform{ + JointRotations[RingFingerRing][RingDistalJointRing], + JointLocations[RingFingerRing][RingDistalJointRing] + }; + FTransform RingTipTransform{ + JointRotations[RingFingerRing][RingTipJointRing], + JointLocations[RingFingerRing][RingTipJointRing] + }; + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::RingMetacarpal, + MoveTemp(RingMetacarpalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::RingProximal, + MoveTemp(RingProximalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::RingIntermediate, + MoveTemp(RingIntermediateTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::RingDistal, + MoveTemp(RingDistalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::RingTip, + MoveTemp(RingTipTransform), WristTransform)) + { + return false; + } + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGLittleJointData( + FSGXRHandState& OutHandState, const bool bRight, + const TArray>& JointLocations, const TArray>& JointRotations, + const FTransform& WristTransform) const +{ + static constexpr int32 LittleFingerLittle = 4; + + static constexpr int32 LittleProximalJointLittle = 0; + static constexpr int32 LittleIntermediateJointLittle = 1; + static constexpr int32 LittleDistalJointLittle = 2; + static constexpr int32 LittleTipJointLittle = 3; + + FTransform LittleMetacarpalTransform{ + GetMeshWristChildBoneRefTransform(bRight, EHandKeypoint::LittleMetacarpal) + }; + FTransform LittleProximalTransform{ + JointRotations[LittleFingerLittle][LittleProximalJointLittle], + JointLocations[LittleFingerLittle][LittleProximalJointLittle] + }; + FTransform LittleIntermediateTransform{ + JointRotations[LittleFingerLittle][LittleIntermediateJointLittle], + JointLocations[LittleFingerLittle][LittleIntermediateJointLittle] + }; + FTransform LittleDistalTransform{ + JointRotations[LittleFingerLittle][LittleDistalJointLittle], + JointLocations[LittleFingerLittle][LittleDistalJointLittle] + }; + FTransform LittleTipTransform{ + JointRotations[LittleFingerLittle][LittleTipJointLittle], + JointLocations[LittleFingerLittle][LittleTipJointLittle] + }; + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::LittleMetacarpal, + MoveTemp(LittleMetacarpalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::LittleProximal, + MoveTemp(LittleProximalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::LittleIntermediate, + MoveTemp(LittleIntermediateTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::LittleDistal, + MoveTemp(LittleDistalTransform), WristTransform)) + { + return false; + } + + if (!UpdateSGJointData( + OutHandState, EHandKeypoint::LittleTip, + MoveTemp(LittleTipTransform), WristTransform)) + { + return false; + } + + return true; +} + +bool FSGXRTracker::FImpl::UpdateSGHandState(const bool bRight, FSGXRHandState& OutHandState) const +{ + const USGHandPose* HandPose{GetHandPose(bRight)}; + if (!IsValid(HandPose)) + { + return false; + } + + OutHandState.bHasReceivedJointPoses = true; + OutHandState.bTracked = true; + + const TArray> JointLocations{HandPose->GetJointPositions()}; + const TArray> JointRotations{HandPose->GetJointRotationsQ()}; + + FTransform WristTransform; + const bool bGotWristTransform = GetWristTransform(bRight, WristTransform); + + /// NOTE + // Even if we fail to get the wrist transform, the SenseGlove data needs to make it to the FXRHandTrackingState! + // So, we just ignore the bGotWristTransform results! Otherwise, even if bFallbackToHandTrackingIfNoGloveDetected + // is disabled it will output the hand-tracking data. + (void) bGotWristTransform; + + if (!UpdateSGWristJointData(OutHandState, WristTransform)) + { + return false; + } + + if (!UpdateSGPalmJointData(OutHandState, bRight, WristTransform)) + { + return false; + } + + if (!UpdateSGThumbJointData(OutHandState, + JointLocations, JointRotations, + WristTransform)) + { + return false; + } + + if (!UpdateSGIndexJointData(OutHandState, bRight, + JointLocations, JointRotations, + WristTransform)) + { + return false; + } + + if (!UpdateSGMiddleJointData(OutHandState, bRight, + JointLocations, JointRotations, + WristTransform)) + { + return false; + } + + if (!UpdateSGRingJointData(OutHandState, bRight, + JointLocations, JointRotations, + WristTransform)) + { + return false; + } + + if (!UpdateSGLittleJointData(OutHandState, bRight, + JointLocations, JointRotations, + WristTransform)) + { + return false; + } + + return true; +} + +void FSGXRTracker::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTracking.cpp b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTracking.cpp new file mode 100644 index 0000000..afa2c57 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTracking.cpp @@ -0,0 +1,42 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTracking.h" + +#include "Modules/ModuleManager.h" + +#include "SenseGloveTrackingModule.h" + +IMPLEMENT_MODULE(FSenseGloveTrackingModule, SenseGloveTracking) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTracking.h b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTracking.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTracking.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTrackingModule.cpp b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTrackingModule.cpp new file mode 100644 index 0000000..2f9ed09 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTrackingModule.cpp @@ -0,0 +1,183 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTrackingModule.h" + +#include "Framework/Application/SlateApplication.h" + +#include "SGLog/SGLog.h" +#include "SGTracking/SGXRTracker.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveTrackingModule" + +struct FSenseGloveTrackingModule::FImpl +{ + /************************ + * Member variables + ************************/ + + TSharedPtr InputDevice; + + /************************ + * Owner object + ************************/ + + FSenseGloveTrackingModule* Owner; + + /************************ + * Constructor / Destructor + ************************/ + + explicit FImpl(FSenseGloveTrackingModule* InOwner); + ~FImpl(); + + /************************ + * Default copy constructor & copy assignment operator + ************************/ + + FImpl(const FImpl& Rhs) = default; + FImpl& operator=(const FImpl& Rhs) = default; +}; + + +FSenseGloveTrackingModule::FSenseGloveTrackingModule() + : IInputDeviceModule(), + Pimpl(TUniquePtr(new FImpl{this}, PimplDeleter)) +{ +} + +FSenseGloveTrackingModule::FSenseGloveTrackingModule(const FSenseGloveTrackingModule& Rhs) + : IInputDeviceModule(Rhs), + Pimpl(TUniquePtr(new FImpl{*Rhs.Pimpl}, PimplDeleter)) +{ + Pimpl->Owner = this; +} + +FSenseGloveTrackingModule::FSenseGloveTrackingModule(FSenseGloveTrackingModule&& Rhs) SG_NOEXCEPT = default; + +FSenseGloveTrackingModule::~FSenseGloveTrackingModule() = default; + +FSenseGloveTrackingModule& FSenseGloveTrackingModule::operator=(const FSenseGloveTrackingModule& Rhs) +{ + IInputDeviceModule::operator=(Rhs); + *Pimpl = *Rhs.Pimpl; + Pimpl->Owner = this; + return *this; +} + +FSenseGloveTrackingModule& FSenseGloveTrackingModule::operator=(FSenseGloveTrackingModule&& Rhs) SG_NOEXCEPT = default; + +void FSenseGloveTrackingModule::StartupModule() +{ + SGLOG("Starting up SenseGloveTracking module..."); + + IInputDeviceModule::StartupModule(); + + /// HACK! + // Generic Application might not be instantiated at this point so we create the input device with a dummy message + // handler. When the Generic Application creates the input device it passes a valid message handler to it which is + // further on used for all the controller events. This hack fixes issues caused by using a custom input device + // before the Generic Application has instantiated it. Eg. within BeginPlay(). + // This also fixes the warnings that pop up on the custom input keys when the blueprint loads. Those warnings are + // caused because Unreal loads the Blueprints before the input device has been instantiated and has added its keys, + // thus leading Unreal to believe that those keys don't exist. This hack causes an earlier instantiation of the + // input device, and consequently, the custom keys. + TSharedPtr DummyMessageHandler(new FGenericApplicationMessageHandler()); + CreateInputDevice(DummyMessageHandler.ToSharedRef()); +} + +void FSenseGloveTrackingModule::PreUnloadCallback() +{ + SGLOG("Unloading SenseGloveTracking module..."); + + IInputDeviceModule::PreUnloadCallback(); +} + +void FSenseGloveTrackingModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveTracking module has succeeded!"); + + IInputDeviceModule::PostLoadCallback(); +} + +void FSenseGloveTrackingModule::ShutdownModule() +{ + SGLOG("Shutting down SenseGloveTracking module..."); + + IInputDeviceModule::ShutdownModule(); +} + +TSharedPtr FSenseGloveTrackingModule::CreateInputDevice( + const TSharedRef& InMessageHandler) +{ + SGLOG("Creating the SenseGloveTracking input device..."); + + if (!Pimpl->InputDevice.IsValid()) + { + TSharedPtr HandTrackingInputDevice(new FSGXRTracker(InMessageHandler)); + Pimpl->InputDevice = HandTrackingInputDevice; + } + else + { + Pimpl->InputDevice.Get()->SetMessageHandler(InMessageHandler); + } + + return Pimpl->InputDevice; +} + +TSharedPtr FSenseGloveTrackingModule::GetInputDevice() +{ + if (!Pimpl->InputDevice.IsValid()) + { + CreateInputDevice(FSlateApplication::Get().GetPlatformApplication()->GetMessageHandler()); + } + + return Pimpl->InputDevice; +} + +FSenseGloveTrackingModule::FImpl::FImpl(FSenseGloveTrackingModule* InOwner) + : InputDevice(nullptr), + Owner(InOwner) +{ +} + +FSenseGloveTrackingModule::FImpl::~FImpl() = default; + +void FSenseGloveTrackingModule::FImplDeleter::operator()(const FImpl* P) const +{ + delete P; +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTrackingModule.h b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTrackingModule.h new file mode 100644 index 0000000..bf494d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Private/SenseGloveTrackingModule.h @@ -0,0 +1,116 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "IInputDeviceModule.h" +#include "Templates/UniquePtr.h" + +#include "SGBuildHacks/SGPlatform.h" + +#define LOCTEXT_NAMESPACE "SenseGloveTracking" + +class FSenseGloveTrackingModule : public IInputDeviceModule +{ +public: + static FORCEINLINE FSenseGloveTrackingModule& Get() + { + return FModuleManager::LoadModuleChecked("SenseGloveTracking"); + } + + static FORCEINLINE bool IsAvailable() + { + return FModuleManager::Get().IsModuleLoaded("SenseGloveTracking"); + } + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +public: + /** + * The default constructor. + */ + FSenseGloveTrackingModule(); + +public: + /** + * The copy constructor. + */ + FSenseGloveTrackingModule(const FSenseGloveTrackingModule& Rhs); + + /** + * The move constructor. + */ + FSenseGloveTrackingModule(FSenseGloveTrackingModule&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSenseGloveTrackingModule() override; + +public: + /** + * The copy assignment operator. + */ + FSenseGloveTrackingModule& operator=(const FSenseGloveTrackingModule& Rhs); + + /** + * The move assignment operator. + */ + FSenseGloveTrackingModule& operator=(FSenseGloveTrackingModule&& Rhs) SG_NOEXCEPT; + +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; + +public: + virtual TSharedPtr CreateInputDevice( + const TSharedRef& InMessageHandler) override; + + virtual TSharedPtr GetInputDevice(); +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGGloveTracker.h b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGGloveTracker.h new file mode 100644 index 0000000..7be2eb3 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGGloveTracker.h @@ -0,0 +1,117 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Subsystems/WorldSubsystem.h" +#include "Templates/UniquePtr.h" +#include "UObject/Object.h" +#include "UObject/ObjectMacros.h" + +#include "SGCore/SGHapticGlove.h" + +#include "SGGloveTracker.generated.h" + +UCLASS() +class SENSEGLOVETRACKING_API USGGloveTracker : public UWorldSubsystem +{ + GENERATED_BODY() + +public: + static USGGloveTracker* GetInstance(const UObject* WorldContextObject = nullptr); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + UPROPERTY(Transient) + USGHapticGlove* LeftGlove; + + UPROPERTY(Transient) + USGHapticGlove* RightGlove; + +private: + USGGloveTracker(); + +public: + FORCEINLINE USGHapticGlove* GetGlove(const bool bRight) const + { + return bRight ? RightGlove : LeftGlove; + } + + FORCEINLINE USGHapticGlove* GetLeftGlove() const + { + return LeftGlove; + } + + FORCEINLINE USGHapticGlove* GetRightGlove() const + { + return RightGlove; + } + + FORCEINLINE bool IsGloveConnected(const bool bRight) const + { + return IsValid(GetGlove(bRight)); + } + + FORCEINLINE bool IsLeftGloveConnected() const + { + return IsValid(GetLeftGlove()); + } + + FORCEINLINE bool IsRightGloveConnected() const + { + return IsValid(GetRightGlove()); + } + + FORCEINLINE bool IsAnyGloveConnected() const + { + return IsLeftGloveConnected() || IsRightGloveConnected(); + } + +public: + virtual bool ShouldCreateSubsystem(UObject* Outer) const override; + + virtual void Initialize(FSubsystemCollectionBase& Collection) override; + virtual void Deinitialize() override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGHMDTracker.h b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGHMDTracker.h new file mode 100644 index 0000000..fafc76e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGHMDTracker.h @@ -0,0 +1,112 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/NameTypes.h" +#include "UObject/ObjectMacros.h" + +#include "SGTypes/SGTrackingTypes.h" + +#include "SGHMDTracker.generated.h" + +/** + * + */ +USTRUCT() +struct SENSEGLOVETRACKING_API FSGHMDTracker +{ + GENERATED_BODY() + +private: + struct FStaticImpl; + +public: + static FName GetDeviceName(); + + /** + * Checks whether the HMD device is Meta Quest 2, or not. + */ + static bool IsMetaQuest2(); + + /** + * Checks whether the HMD device is Meta Quest Pro, or not. + */ + static bool IsMetaQuestPro(); + + /** + * Checks whether the HMD device is Meta Quest 3, or not. + */ + static bool IsMetaQuest3(); + + FORCEINLINE static bool IsAMetaQuestDevice() + { + return IsMetaQuest2() || IsMetaQuestPro() || IsMetaQuest3(); + } + + /** + * Checks whether the HMD device is HTC VIVE Pro, or not. + */ + static bool IsHtcVivePro(); + + /** + * Checks whether the HMD device is HTC VIVE Focus 3, or not. + * + * @remark At the moment, VIVE Focus 3 cannot be distinguished from VIVE XR Elite, so when IsHtcViveFocus3 returns + * true, IsHtcViveXRElite will return true as well; thus we cannot know for sure which headset we are running on. + */ + static bool IsHtcViveFocus3(); + + /** + * Checks whether the HMD device is HTC VIVE XR Elite, or not. + * + * @remark At the moment, VIVE Focus 3 cannot be distinguished from VIVE XR Elite, so when IsHtcViveXRElite returns + * true, IsHtcViveFocus3 will return true as well; thus we cannot know for sure which headset we are running on. + */ + static bool IsHtcViveXRElite(); + + /** + * Checks whether the HMD device is HTC VIVE Focus Vision, or not. + */ + static bool IsHtcViveFocusVision(); + + FORCEINLINE static bool IsAHtcViveDevice() + { + return IsHtcVivePro() || IsHtcViveFocus3() || IsHtcViveXRElite() || IsHtcViveFocusVision(); + } + + static ESGHeadMountedDisplayDevice GetDeviceType(); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h new file mode 100644 index 0000000..3f933d4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGXRHandState.h @@ -0,0 +1,72 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "IOpenXRExtensionPlugin.h" +#include "Math/MathFwd.h" +#include "Templates/UnrealTemplate.h" + +struct SENSEGLOVETRACKING_API FSGXRHandState final : public FNoncopyable +{ +public: + XrHandTrackerEXT HandTracker; + + XrHandJointLocationEXT JointLocations[XR_HAND_JOINT_COUNT_EXT]; + XrHandJointVelocityEXT JointVelocities[XR_HAND_JOINT_COUNT_EXT]; + + XrHandJointVelocitiesEXT Velocities; + XrHandJointLocationsEXT Locations; + + // Transforms are cached in Unreal Tracking Space. + FTransform KeypointTransforms[EHandKeypointCount]; + + float Radii[EHandKeypointCount]; + + // true if this hand has ever been tracked, and therefore its poses are valid. + bool bHasReceivedJointPoses; + + // true if tracked right now. + bool bTracked; + +public: + FSGXRHandState(); + virtual ~FSGXRHandState(); + +public: + bool GetTransform(EHandKeypoint Keypoint, FTransform& OutTransform) const; + const FTransform& GetTransform(EHandKeypoint Keypoint) const; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGXRTracker.h b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGXRTracker.h new file mode 100644 index 0000000..e049632 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/Public/SGTracking/SGXRTracker.h @@ -0,0 +1,164 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "IHandTracker.h" +#include "IInputDevice.h" +#include "IOpenXRExtensionPlugin.h" +#include "Math/MathFwd.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Templates/UniquePtr.h" +#include "UObject/NameTypes.h" +#include "XRMotionControllerBase.h" + +#include "SGBuildHacks/SGPlatform.h" + +struct SENSEGLOVETRACKING_API FSGXRHandState; + +class SENSEGLOVETRACKING_API FSGXRTracker final : public IOpenXRExtensionPlugin, + public IInputDevice, + public FXRMotionControllerBase, + public IHandTracker +{ +public: + static bool GetMotionControllerState( + UObject* WorldContextObject, + EXRSpaceType XRSpaceType, EControllerHand Hand, EXRControllerPoseType XRControllerPoseType, + FXRMotionControllerState& OutMotionControllerState); + static bool GetHandTrackingState( + UObject* WorldContextObject, + EXRSpaceType XRSpaceType, EControllerHand Hand, + FXRHandTrackingState& OutHandTrackingState); + +private: + struct FImpl; + + struct FImplDeleter + { + void operator()(const FImpl* P) const; + }; + + TUniquePtr Pimpl; + FImplDeleter PimplDeleter; + +private: + FSGXRTracker() = delete; + +public: + FSGXRTracker(const TSharedRef& InMessageHandler); + +public: + /** + * The copy constructor. + */ + FSGXRTracker(const FSGXRTracker& Rhs) = delete; + + /** + * The move constructor. + */ + FSGXRTracker(FSGXRTracker&& Rhs) SG_NOEXCEPT; + +public: + /** + * The destructor. + */ + virtual ~FSGXRTracker() override; + +public: + /** + * The copy assignment operator. + */ + FSGXRTracker& operator=(const FSGXRTracker& Rhs) = delete; + + /** + * The move assignment operator. + */ + FSGXRTracker& operator=(FSGXRTracker&& Rhs) SG_NOEXCEPT; + +public: + bool IsHandTrackingSupportedByDevice() const; + + const FSGXRHandState& GetLeftHandState() const; + const FSGXRHandState& GetRightHandState() const; + +public: + // The IOpenXRExtensionPlugin interface. + + virtual FString GetDisplayName() override; + virtual bool GetRequiredExtensions(TArray& OutExtensions) override; + virtual const void* OnGetSystem(XrInstance InInstance, const void* InNext) override; + virtual const void* OnCreateSession(XrInstance InInstance, XrSystemId InSystem, const void* InNext) override; + virtual const void* OnBeginSession(XrSession InSession, const void* InNext) override; + virtual void UpdateDeviceLocations(XrSession InSession, XrTime DisplayTime, XrSpace TrackingSpace) override; + +public: + // The IMotionController interface. + + virtual bool GetControllerOrientationAndPosition(const int32 ControllerIndex, const FName MotionSource, + FRotator& OutOrientation, FVector& OutPosition, + float WorldToMetersScale) const override; + virtual ETrackingStatus GetControllerTrackingStatus(const int32 ControllerIndex, + const FName MotionSource) const override; + virtual FName GetMotionControllerDeviceTypeName() const override; + virtual void EnumerateSources(TArray& SourcesOut) const override; + +public: + // The IInputDevice interface. + + virtual void Tick(float DeltaTime) override; + virtual void SendControllerEvents() override; + virtual void SetMessageHandler(const TSharedRef& InMessageHandler) override; + virtual bool Exec(UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar) override; + virtual void SetChannelValue(int32 ControllerId, FForceFeedbackChannelType ChannelType, float Value) override; + virtual void SetChannelValues(int32 ControllerId, const FForceFeedbackValues& Values) override; + virtual bool SupportsForceFeedback(int32 ControllerId) override; + virtual bool IsGamepadAttached() const override; + +public: + // The IHandTracker interface. + + virtual FName GetHandTrackerDeviceTypeName() const override; + virtual bool IsHandTrackingStateValid() const override; + virtual bool GetKeypointState( + EControllerHand Hand, + EHandKeypoint Keypoint, FTransform& OutTransform, float& OutRadius) const override; + + virtual bool GetAllKeypointStates( + EControllerHand Hand, + TArray& OutPositions, TArray& OutRotations, TArray& OutRadii, + bool& OutIsTracked) const override; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTracking/SenseGloveTracking.Build.cs b/Plugins/SenseGlove/Source/SenseGloveTracking/SenseGloveTracking.Build.cs new file mode 100644 index 0000000..a9a933e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTracking/SenseGloveTracking.Build.cs @@ -0,0 +1,85 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveTracking : ModuleRules +{ + public SenseGloveTracking(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "ApplicationCore", + "Core", + "CoreUObject", + "Engine", + "HeadMountedDisplay", + "InputCore", + "InputDevice", + "OpenXRHMD", + "OpenXRInput", + "Slate", + "SlateCore", + "XRBase", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveBackend", + "SenseGloveCore", + "SenseGloveLog", + "SenseGloveSettings", + "SenseGloveTypes", + "SenseGloveUtils", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + } + ); + + AddEngineThirdPartyPrivateStaticDependencies(Target, "OpenXR"); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGGloveTrackerKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGGloveTrackerKismetLibrary.cpp new file mode 100644 index 0000000..6b88516 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGGloveTrackerKismetLibrary.cpp @@ -0,0 +1,79 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTrackingKismet/SGGloveTrackerKismetLibrary.h" + +#include "SGCore/SGHapticGlove.h" +#include "SGTracking/SGGloveTracker.h" + +USGGloveTracker* USGGloveTrackerKismetLibrary::GetInstance(UObject* WorldContextObject) +{ + return USGGloveTracker::GetInstance(WorldContextObject); +} + +USGHapticGlove* USGGloveTrackerKismetLibrary::GetGlove(const USGGloveTracker* GloveTracker, const bool bRight) +{ + return GloveTracker->GetGlove(bRight); +} + +USGHapticGlove* USGGloveTrackerKismetLibrary::GetLeftGlove(const USGGloveTracker* GloveTracker) +{ + return GloveTracker->GetLeftGlove(); +} + +USGHapticGlove* USGGloveTrackerKismetLibrary::GetRightGlove(const USGGloveTracker* GloveTracker) +{ + return GloveTracker->GetRightGlove(); +} + +bool USGGloveTrackerKismetLibrary::IsGloveConnected(const USGGloveTracker* GloveTracker, const bool bRight) +{ + return GloveTracker->IsGloveConnected(bRight); +} + +bool USGGloveTrackerKismetLibrary::IsLeftGloveConnected(const USGGloveTracker* GloveTracker) +{ + return GloveTracker->IsLeftGloveConnected(); +} + +bool USGGloveTrackerKismetLibrary::IsRightGloveConnected(const USGGloveTracker* GloveTracker) +{ + return GloveTracker->IsRightGloveConnected(); +} + +bool USGGloveTrackerKismetLibrary::IsAnyGloveConnected(const USGGloveTracker* GloveTracker) +{ + return GloveTracker->IsAnyGloveConnected(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGHMDTrackerKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGHMDTrackerKismetLibrary.cpp new file mode 100644 index 0000000..8322f47 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGHMDTrackerKismetLibrary.cpp @@ -0,0 +1,78 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTrackingKismet/SGHMDTrackerKismetLibrary.h" + +#include "SGTracking/SGHMDTracker.h" + +FName USGHMDTrackerKismetLibrary::GetDeviceName() +{ + return FSGHMDTracker::GetDeviceName(); +} + +bool USGHMDTrackerKismetLibrary::IsMetaQuest2() +{ + return FSGHMDTracker::IsMetaQuest2(); +} + +bool USGHMDTrackerKismetLibrary::IsMetaQuestPro() +{ + return FSGHMDTracker::IsMetaQuestPro(); +} + +bool USGHMDTrackerKismetLibrary::IsMetaQuest3() +{ + return FSGHMDTracker::IsMetaQuest3(); +} + +bool USGHMDTrackerKismetLibrary::IsHtcVivePro() +{ + return FSGHMDTracker::IsHtcVivePro(); +} + +bool USGHMDTrackerKismetLibrary::IsHtcViveFocus3() +{ + return FSGHMDTracker::IsHtcViveFocus3(); +} + +bool USGHMDTrackerKismetLibrary::IsHtcViveXRElite() +{ + return FSGHMDTracker::IsHtcViveXRElite(); +} + +ESGHeadMountedDisplayDevice USGHMDTrackerKismetLibrary::GetDeviceType() +{ + return FSGHMDTracker::GetDeviceType(); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGXRTrackerKismetLibrary.cpp b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGXRTrackerKismetLibrary.cpp new file mode 100644 index 0000000..417c50a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SGTrackingKismet/SGXRTrackerKismetLibrary.cpp @@ -0,0 +1,57 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTrackingKismet/SGXRTrackerKismetLibrary.h" + +#include "UObject/Object.h" + +#include "SGTracking/SGXRTracker.h" + +bool USGXRTrackerKismetLibrary::GetMotionControllerState( + UObject* WorldContextObject, + const EXRSpaceType XRSpaceType, const EControllerHand Hand, const EXRControllerPoseType XRControllerPoseType, + FXRMotionControllerState& OutMotionControllerState) +{ + return FSGXRTracker::GetMotionControllerState( + WorldContextObject, XRSpaceType, Hand, XRControllerPoseType, OutMotionControllerState); +} + +bool USGXRTrackerKismetLibrary::GetHandTrackingState( + UObject* WorldContextObject, + const EXRSpaceType XRSpaceType, const EControllerHand Hand, + FXRHandTrackingState& OutHandTrackingState) +{ + return FSGXRTracker::GetHandTrackingState(WorldContextObject, XRSpaceType, Hand, OutHandTrackingState); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismet.cpp b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismet.cpp new file mode 100644 index 0000000..b93734a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismet.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTrackingKismet.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveTrackingKismetModule.h" + +IMPLEMENT_MODULE(FSenseGloveTrackingKismetModule, SenseGloveTrackingKismet) diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismet.h b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismet.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismet.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismetModule.cpp b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismetModule.cpp new file mode 100644 index 0000000..2c5f940 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismetModule.cpp @@ -0,0 +1,62 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTrackingKismetModule.h" + +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveTrackingKismetModule" + +void FSenseGloveTrackingKismetModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveTrackingKismet module..."); +} + +void FSenseGloveTrackingKismetModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveTrackingKismet module..."); +} + +void FSenseGloveTrackingKismetModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveTrackingKismet module has succeeded!"); +} + +void FSenseGloveTrackingKismetModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveTrackingKismet module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismetModule.h b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismetModule.h new file mode 100644 index 0000000..fc6cef5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Private/SenseGloveTrackingKismetModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTrackingKismet" + +class FSenseGloveTrackingKismetModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGGloveTrackerKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGGloveTrackerKismetLibrary.h new file mode 100644 index 0000000..c0ef7f2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGGloveTrackerKismetLibrary.h @@ -0,0 +1,75 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGGloveTrackerKismetLibrary.generated.h" + +class USGGloveTracker; +class USGHapticGlove; + +UCLASS(meta=(ScriptName = "SenseGloveTrackerKismetLibrary")) +class SENSEGLOVETRACKINGKISMET_API USGGloveTrackerKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | Glove Tracker", + meta=(WorldContext="WorldContextObject")) + static USGGloveTracker* GetInstance(UObject* WorldContextObject); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static USGHapticGlove* GetGlove(const USGGloveTracker* GloveTracker, const bool bRight); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static USGHapticGlove* GetLeftGlove(const USGGloveTracker* GloveTracker); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static USGHapticGlove* GetRightGlove(const USGGloveTracker* GloveTracker); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static bool IsGloveConnected(const USGGloveTracker* GloveTracker, const bool bRight); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static bool IsLeftGloveConnected(const USGGloveTracker* GloveTracker); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static bool IsRightGloveConnected(const USGGloveTracker* GloveTracker); + + UFUNCTION(BlueprintPure, Category="SenseGlove | Tracking | Glove Tracker") + static bool IsAnyGloveConnected(const USGGloveTracker* GloveTracker); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGHMDTrackerKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGHMDTrackerKismetLibrary.h new file mode 100644 index 0000000..74067c0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGHMDTrackerKismetLibrary.h @@ -0,0 +1,98 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/NameTypes.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" +#include "SGTypes/SGTrackingTypes.h" + +#include "SGHMDTrackerKismetLibrary.generated.h" + +UCLASS(meta=(ScriptName = "SenseGloveHMDTrackerKismetLibrary")) +class SENSEGLOVETRACKINGKISMET_API USGHMDTrackerKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static FName GetDeviceName(); + + /** + * Checks whether the HMD device is Meta Quest 2, or not. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static bool IsMetaQuest2(); + + /** + * Checks whether the HMD device is Meta Quest Pro, or not. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static bool IsMetaQuestPro(); + + /** + * Checks whether the HMD device is Meta Quest 3, or not. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static bool IsMetaQuest3(); + + /** + * Checks whether the HMD device is HTC VIVE Pro, or not. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static bool IsHtcVivePro(); + + /** + * Checks whether the HMD device is HTC VIVE Focus 3, or not. + * + * @remark At the moment, VIVE Focus 3 cannot be distinguished from VIVE XR Elite, so when IsHtcViveFocus3 returns + * true, IsHtcViveXRElite will return true as well; thus we cannot know for sure which headset we are running on. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static bool IsHtcViveFocus3(); + + /** + * Checks whether the HMD device is HTC VIVE XR Elite, or not. + * + * @remark At the moment, VIVE Focus 3 cannot be distinguished from VIVE XR Elite, so when IsHtcViveXRElite returns + * true, IsHtcViveFocus3 will return true as well; thus we cannot know for sure which headset we are running on. + */ + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static bool IsHtcViveXRElite(); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | HMD Tracker") + static ESGHeadMountedDisplayDevice GetDeviceType(); +}; diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGXRTrackerKismetLibrary.h b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGXRTrackerKismetLibrary.h new file mode 100644 index 0000000..2ce72e2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/Public/SGTrackingKismet/SGXRTrackerKismetLibrary.h @@ -0,0 +1,67 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HeadMountedDisplayTypes.h" +#include "InputCoreTypes.h" +#include "UObject/ObjectMacros.h" + +#include "SGKismet/SGBlueprintFunctionLibrary.h" + +#include "SGXRTrackerKismetLibrary.generated.h" + +class UObject; + +UCLASS(meta=(ScriptName = "SenseGloveXRTrackerKismetLibrary")) +class SENSEGLOVETRACKINGKISMET_API USGXRTrackerKismetLibrary final : public USGBlueprintFunctionLibrary +{ + GENERATED_BODY() + +public: + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | XR Tracker", + meta=(WorldContext="WorldContextObject")) + static bool GetMotionControllerState( + UObject* WorldContextObject, + EXRSpaceType XRSpaceType, EControllerHand Hand, EXRControllerPoseType XRControllerPoseType, + FXRMotionControllerState& OutMotionControllerState); + + UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | XR Tracker", + meta=(WorldContext="WorldContextObject")) + static bool GetHandTrackingState( + UObject* WorldContextObject, + EXRSpaceType XRSpaceType, EControllerHand Hand, + FXRHandTrackingState& OutHandTrackingState); +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/SenseGloveTrackingKismet.Build.cs b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/SenseGloveTrackingKismet.Build.cs new file mode 100644 index 0000000..0fd3062 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTrackingKismet/SenseGloveTrackingKismet.Build.cs @@ -0,0 +1,76 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveTrackingKismet : ModuleRules +{ + public SenseGloveTrackingKismet(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "HeadMountedDisplay", + "InputCore", + "InputDevice", + "OpenXRHMD", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveCore", + "SenseGloveLog", + "SenseGloveKismet", + "SenseGloveTracking", + "SenseGloveTypes", + } + ); + + PrivateIncludePathModuleNames.AddRange( + new string[] + { + "SenseGloveBuildHacks", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGCoreTypes.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGCoreTypes.cpp new file mode 100644 index 0000000..1d95df9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGCoreTypes.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGCoreTypes.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGDebugTypes.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGDebugTypes.cpp new file mode 100644 index 0000000..bc83f8a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGDebugTypes.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGDebugTypes.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGFloatArray.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGFloatArray.cpp new file mode 100644 index 0000000..a511276 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGFloatArray.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGFloatArray.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGNameArray.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGNameArray.cpp new file mode 100644 index 0000000..9a2ab2b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGNameArray.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGNameArray.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGQuatArray.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGQuatArray.cpp new file mode 100644 index 0000000..7add9fb --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGQuatArray.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGQuatArray.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGRotatorArray.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGRotatorArray.cpp new file mode 100644 index 0000000..10eacf9 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGRotatorArray.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGRotatorArray.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGTrackingTypes.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGTrackingTypes.cpp new file mode 100644 index 0000000..a945a7a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGTrackingTypes.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGTrackingTypes.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGTypes.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGTypes.cpp new file mode 100644 index 0000000..dfa18ad --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGTypes.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGTypes.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGVectorArray.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGVectorArray.cpp new file mode 100644 index 0000000..0f96a7f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SGTypes/SGVectorArray.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGTypes/SGVectorArray.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypes.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypes.cpp new file mode 100644 index 0000000..6d7a1d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypes.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTypes.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveTypesModule.h" + +IMPLEMENT_MODULE(FSenseGloveTypesModule, SenseGloveTypes) diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypes.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypes.h new file mode 100644 index 0000000..334f908 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypes.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypesModule.cpp b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypesModule.cpp new file mode 100644 index 0000000..b45375d --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypesModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTypesModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveTypesModule" + +void FSenseGloveTypesModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveTypes module..."); +} + +void FSenseGloveTypesModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveTypes module..."); +} + +void FSenseGloveTypesModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveTypes module has succeeded!"); +} + +void FSenseGloveTypesModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveTypes module..."); +} + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypesModule.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypesModule.h new file mode 100644 index 0000000..af62b4a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Private/SenseGloveTypesModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveTypes" + +class FSenseGloveTypesModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGCoreTypes.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGCoreTypes.h new file mode 100644 index 0000000..a467b72 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGCoreTypes.h @@ -0,0 +1,665 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +UENUM(BlueprintType) +enum class ESGBackendType : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Back-end info comes from shared memory on the device. */ + SharedMemory UMETA(DisplayName = "Shared Memory"), +}; + +/* Connection type of this device, as detected by the SGConnect library. */ +UENUM(BlueprintType) +enum class ESGConnectionType : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Could not determine which connection type this SGDevice is using, most likely because it is disconnected. */ + Unknown UMETA(DisplayName = "Unknown"), + + /* USB Serial communication. */ + Serial UMETA(DisplayName = "Serial"), + + /* A bluetooth connection that creates up to two Serial Ports. */ + BluetoothSerial UMETA(DisplayName = "Bluetooth Serial"), + + /* Bluetooth Connection Via Android/Java SDK. */ + BluetoothAndroid UMETA(DisplayName = "Bluetooth Android"), +}; + +/** + * Used to access specific positions from the CV output, which is an array of Vect3D positions. + * @remarks Declared in CVHandOutput.cs because these enums are used to index the jointPositions array in that class. + */ +UENUM(BlueprintType) +enum class ESGCVHandPoints : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* The position of the Wrist as determined by the CV Model. */ + Wrist UMETA(DisplayName = "Wrist"), + + /* The position of the Thumb CMC Joint as determined by the CV Model. */ + ThumbCmc UMETA(DisplayName = "Thumb CMC"), + + /* The position of the Thumb MCP Joint as determined by the CV Model. */ + ThumbMcp UMETA(DisplayName = "Thumb MCP"), + + /* The position of the Thumb IP Joint as determined by the CV Model. */ + ThumbIp UMETA(DisplayName = "Thumb IP"), + + /* The position of the Thumb tip as determined by the CV Model. */ + ThumbTip UMETA(DisplayName = "Thumb Tip"), + + /* The position of the Index MCP Joint as determined by the CV Model. */ + IndexMcp UMETA(DisplayName = "Indexx MCP"), + + /* The position of the Index PIP Joint as determined by the CV Model. */ + IndexPip UMETA(DisplayName = "Index PIP"), + + /* The position of the Index DIP Joint as determined by the CV Model. */ + IndexDip UMETA(DisplayName = "Index DIP"), + + /* The position of the Index fingertip as determined by the CV Model. */ + IndexTip UMETA(DisplayName = "Index Tip"), + + /* The position of the Middle MCP Joint as determined by the CV Model. */ + MiddleMcp UMETA(DisplayName = "Middle MCP"), + + /* The position of the Middle PIP Joint as determined by the CV Model. */ + MiddlePip UMETA(DisplayName = "Middle PIP"), + + /* The position of the Middle DIP Joint as determined by the CV Model. */ + MiddleDip UMETA(DisplayName = "Middle DIP"), + + /* The position of the Middle fingertip as determined by the CV Model. */ + MiddleTip UMETA(DisplayName = "Middle Tip"), + + /* The position of the Ring MCP Joint as determined by the CV Model. */ + RingMcp UMETA(DisplayName = "Ring MCP"), + + /* The position of the Ring PIP Joint as determined by the CV Model. */ + RingPip UMETA(DisplayName = "Ring PIP"), + + /* The position of the Ring DIP Joint as determined by the CV Model. */ + RingDip UMETA(DisplayName = "Ring DIP"), + + /* The position of the Ring fingertip as determined by the CV Model. */ + RingTip UMETA(DisplayName = "Rint Tip"), + + /* The position of the Pinky MCP Joint as determined by the CV Model. */ + PinkyMcp UMETA(DisplayName = "Pinky MCP"), + + /* The position of the Pinky PIP Joint as determined by the CV Model. */ + PinkyPip UMETA(DisplayName = "Pinky PIP"), + + /* The position of the Pinky DIP Joint as determined by the CV Model. */ + PinkyDip UMETA(DisplayName = "Pinky DIP"), + + /* The position of the Pinky fingertip as determined by the CV Model. */ + PinkyTip UMETA(DisplayName = "Pinky Tip"), + + /* Utility enumerator to check if an array contains enough values. */ + All UMETA(DisplayName = "All"), +}; + +/* How much of the CV tracking is being used. Used by other APIs. */ +UENUM(BlueprintType) +enum class ESGCVTrackingDepth : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* No computer-vision is enabled. */ + Disabled UMETA(DisplayName = "Disabled"), + + /* Use CV only for the wrist position/rotation. */ + WristOnly UMETA(DisplayName = "Wrist Only"), + + /* Use CV for both the wrist location and Hand Position. */ + WristAndHandPose UMETA(DisplayName = "Wrist and Hand Pose"), +}; + +/* Specific devices within the SGCore library. */ +UENUM(BlueprintType) +enum class ESGDeviceType : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* This device is not recognized by the Sense Glove API. */ + Unknown UMETA(DisplayName = "Unknown"), + + /* A Device that is in development, with direct access to sensor data and commands. */ + BetaDevice UMETA(DisplayName = "Beta Device"), + + /* An exoskeleton glove that provides force- and haptic feedback. */ + SenseGlove UMETA(DisplayName = "Sense Glove"), + + /* A soft glove with basic tracking, as well as force- and Haptic Feedback. */ + Nova UMETA(DisplayName = "Nova"), + + /* A soft glove with basic tracking, as well as force- and Haptic Feedback. */ + Nova2 UMETA(DisplayName = "Nova 2"), +}; + +/* One of the fingers on the hand. */ +UENUM(BlueprintType) +enum class ESGFinger : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Responsible for our evolutionary success! */ + Thumb UMETA(DisplayName = "Thumb"), + + /* Used to point at what you want. */ + Index UMETA(DisplayName = "Index"), + + /* On its own, this one is used to indicate frustration. */ + Middle UMETA(DisplayName = "Middle"), + + /* If you like it then you should have put a ___ on it. */ + Ring UMETA(DisplayName = "Ring"), + + /* The little finger. */ + Pinky UMETA(DisplayName = "Pinky"), +}; + +/* Anatomical movements of the finger joints. */ +UENUM(BlueprintType) +enum class ESGFingerMovement : uint8 +{ + None UMETA(DisplayName = "None"), + + /* Flexion of the first finger joint. */ + McpFlexion UMETA(DisplayName = "MCP Flexion"), + + /* Abduction of the first finger joint. */ + McpAbduction UMETA(DisplayName = "MCP Abduction"), + + /* Flexion of the second finger joint. */ + PipFlexion UMETA(DisplayName = "PIP Flexion"), + + /* Flexion of the third finger joint. */ + DipFlexion UMETA(DisplayName = "DIP Flexion"), +}; + +/* How this Sense Glove converts sensor data into a HandPose. */ +UENUM(BlueprintType) +enum class ESGFingerSolver : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Hand angles are interpolated based on the total flexion / abduction of the exoskeleton. */ + Interpolation UMETA(DisplayName = "Interpolation"), +}; + +/* Different types of Haptic Channels - with different behaviours. */ +UENUM(BlueprintType) +enum class ESGHapticChannelType : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /** + * This type of haptic channel can be constantly overridden. SGConnect will only send a command if a change occurs. + * Ideal for Force-Feedback. + */ + StreamingChannel UMETA(DisplayName = "Streaming Channel"), + + /* These commands must be sent once, after their queue is cleared. */ + FireAndForgetChannel UMETA(DisplayName = "Fire and Forget Channel"), +}; + +/* The Calibration State of this Glove. */ +UENUM(BlueprintType) +enum class ESGHapticGloveCalibrationState : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* No idea what the calibrationState of this glove is... */ + Unknown UMETA(DisplayName = "Unknown"), + + /* One or more sensors still need to move... */ + MoveFingers UMETA(DisplayName = "Move Fingers"), + + /* All sensors have moved. */ + AllSensorsMoved UMETA(DisplayName = "All Sensors Moved"), + + /* Calibration is locked in. Done collecting Data. */ + CalibrationLocked UMETA(DisplayName = "Calibration Locked"), +}; + +/* All of the locations supported by the SenseGlove API. */ +UENUM(BlueprintType) +enum class ESGHapticLocation : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Unknown location. Calling haptic function(s) with this parameter will not play anything. */ + Unknown UMETA(DisplayName = "Unknown"), + + /* Fingertip of the Thumb. */ + ThumbTip UMETA(DisplayName = "Thumb Tip"), + + /* Fingertip of the Index Finger. */ + IndexTip UMETA(DisplayName = "Index Tip"), + + /* Fingertip of the Middle Finger. */ + MiddleTip UMETA(DisplayName = "Middle Tip"), + + /* Fingertip of the Ring Finger. */ + RingTip UMETA(DisplayName = "Ring Tip"), + + /* Fingertip of the Pinky Finger. */ + PinkyTip UMETA(DisplayName = "Pinky Tip"), + + /* Vibration on the hand palm, close to the index finger. */ + PalmIndexSide UMETA(DisplayName = "Palm Index Side"), + + /* Vibration on the hand palm close to the pinky finger. */ + PalmPinkySide UMETA(DisplayName = "Palm Pinky Side"), + + /* Play this Haptic Effect on the whole hand. For General Hand Feedback. */ + WholeHand UMETA(DisplayName = "Whole Hand"), +}; + +/* Indices to access DeviceList data in Shared Memory. */ +UENUM(BlueprintType) +enum class ESGListFormat : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + Connected UMETA(DisplayName = "Connected"), + PpsGot UMETA(DisplayName = "PPS Got"), + DeviceType UMETA(DisplayName = "Device Type"), + CString UMETA(DisplayName = "C String"), + Address UMETA(DisplayName = "Address"), + ConnectType UMETA(DisplayName = "Connect Type"), + PpsSent UMETA(DisplayName = "PPS Sent"), + All UMETA(DisplayName = "All"), +}; + +/* State of the Nova's sensor Normalization. */ +UENUM(BlueprintType) +enum class ESGNormalizationState : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Unable to retrieve the state out of our Sensor Data :( */ + Unknown UMETA(DisplayName = "Unknown"), + + /* Developer has asked the glove to send raw data. */ + SendingRawData UMETA(DisplayName = "Sending Raw Data"), + + /* The glove is currently normalizing, but the fingers haven't moved enough. */ + Normalizing_MoveFingers UMETA(DisplayName = "Normalizing: Move Fingers"), + + /* Fires when all fingers have moved enough and you _could_ stop normalization + /// collection. */ + Normalizing_AwaitConfirm UMETA(DisplayName = "Normalizing: Await Confirm"), + + /* Normalization is completed. */ + NormalizationFinished UMETA(DisplayName = "Normalization Finished"), +}; + +/* Used to access a sensor Movement of the Nova_SensorData class. */ +UENUM(BlueprintType) +enum class ESGNovaSensorLocation : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Sideways motion; finger splay, moving the thumb away from the hand palm. */ + Abduction UMETA(DisplayName = "Abduction"), + + /* Flexion of any sensor. */ + Flexion UMETA(DisplayName = "Flexion"), +}; + +/* Used to access a sensor Movement of the Nova_SensorData class. */ +UENUM(BlueprintType) +enum class ESGNova2SensorLocation : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Sideways motion; finger splay, moving the thumb away from the hand palm. */ + Abduction UMETA(DisplayName = "Abduction"), + + /* Flexion of any sensor close to the thumb. */ + FlexionProximal UMETA(DisplayName = "Flexion Proximal"), + + /* flexion of any sensor further from the hub. */ + FlexionDistal UMETA(DisplayName = "Flexion Distal"), +}; + +/* Which vibration motors to send vibrations to. */ +UENUM(BlueprintType) +enum class ESGNova2VibroMotor : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Not sure which motor this is meant for. */ + Unknown UMETA(DisplayName = "Unknown"), + + /* LRA Vibration Motor that is located on the thumb fingertip. */ + ThumbFingertip UMETA(DisplayName = "Thumb Fingertip"), + + /* LRA Vibration Motor that is located on the index fingertip. */ + IndexFingertip UMETA(DisplayName = "Index Fingertip"), + + /* LRA Vibration Motor that is located on the hand palm, roughly at the Index MCP joint. */ + PalmIndexSide UMETA(DisplayName = "Palm Index Side"), + + /* LRA Vibration Motor that is located on the hand palm, roughly at the Pinky MCP joint. */ + PalmPinkySide UMETA(DisplayName = "Palm Pinky Side"), +}; + +/* Order of values as they come in from the Nova. */ +UENUM(BlueprintType) +enum class ESGNovaCVar : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + ConstOpen UMETA(DisplayName = "Const Open"), + ID UMETA(DisplayName = "ID"), + GloveVersion UMETA(DisplayName = "Glove Version"), + FirmwareVersion UMETA(DisplayName = "Firmware Version"), + LeftRight UMETA(DisplayName = "Left Right"), + Functions UMETA(DisplayName = "Functions"), + ImuCorrection UMETA(DisplayName = "IMU Correction"), + + /* Utility value used in iteration / checking lengths. */ + AllC UMETA(DisplayName = "All C"), +}; + +/* Sensor data blocks. */ +UENUM(BlueprintType) +enum class ESGNovaData : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + Sensors UMETA(DisplayName = "Sensors"), + Imu UMETA(DisplayName = "IMU"), + All UMETA(DisplayName = "All"), +}; + +/* Which vibration motors to send vibrations to. */ +UENUM(BlueprintType) +enum class ESGNovaVibroMotor : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Not sure which motor to send this to. */ + Unknown UMETA(DisplayName = "Unknown"), + + /* Vibration motor located at the back of the hand. A.k.a. "The Thumper". */ + BackOfHand UMETA(DisplayName = "Back of Hand"), + + /* Vibration motor located at the tip of the thumb. */ + ThumbTip UMETA(DisplayName = "Thumb Tip"), + + /* Vibration motor located at the tip of the index finger. */ + IndexFingertip UMETA(DisplayName = "Index Fingertip"), +}; + +/* Tracking Hardware used for positional tracking. */ +UENUM(BlueprintType) +enum class ESGPositionalTrackingHardware : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Custom tracking hardware, we don't apply any offsets. */ + Custom UMETA(DisplayName = "Custom"), + + /* HTC VIVE Tracker (v1.0 or v2.0). */ + ViveTracker UMETA(DisplayName = "VIVE Tracker"), + + /* Touch controller for Oculus Quest 2. */ + Quest2Controller UMETA(DisplayName = "Quest 2 Controller"), + + /* Wrist tracker for the VIVE Focus 3. */ + ViveFocus3WristTracker UMETA(DisplayName = "VIVE Focus 3 Wrist Tracker"), + + /* Oculus Touch Controller that comes with the Meta Quest Pro. */ + QuestProController UMETA(DisplayName = "Quest Pro Controller"), + + /* Oculus Quest 3 Controller. */ + Quest3Controller UMETA(DisplayName = "Quest 3 Controller"), +}; + +/* Indices to access Sensor Data in Shared Memory. */ +UENUM(BlueprintType) +enum class ESGSensorFormat : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + Sensors UMETA(DisplayName = "Sensors"), +}; + +/* Sense Glove C string Variables, enumerated for our convenience. */ +UENUM(BlueprintType) +enum class ESGSenseGloveCVar : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + ID UMETA(DisplayName = "ID"), + GloveVersion UMETA(DisplayName = "Glove Version"), + FirmwareVersion UMETA(DisplayName = "Firmware Version"), + LeftRight UMETA(DisplayName = "Left Right"), + Functions UMETA(DisplayName = "Functions"), + GlovePos UMETA(DisplayName = "Glove Pos"), + + /* All gloves have functionality up to this point. */ + GloveLengths UMETA(DisplayName = "Glove Lengths"), + + NumberOfSensors UMETA(DisplayName = "Number Of Sensors"), + ImuCorrection UMETA(DisplayName = "IMU Correction"), + + /* Utility value used in iteration / checking lengths. */ + AllC UMETA(DisplayName = "All C"), +}; + +/* Sense Glove sensor string Variables, enumerated for our convenience. */ +UENUM(BlueprintType) +enum class ESGSenseGloveSVar : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Real-time error */ + RealtimeError UMETA(DisplayName = "Real-time Error"), + + FingerSensors UMETA(DisplayName = "Finger Sensors"), + + ImuData UMETA(DisplayName = "IMU Data"), + + /* Watchdog error. */ + WatchdogError UMETA(DisplayName = "Watchdog Error"), + + /* Semaphore error */ + SemaphoreError UMETA(DisplayName = "Semaphore Error"), + + /* Utility value used in iteration / checking lengths. */ + AllS UMETA(DisplayName = "All S"), +}; + +/* A command to activate the SenseGlove Thumper module, which is responsible for wrist feedback. */ +UENUM(BlueprintType) +enum class ESGSenseGloveThumperCommand : uint8 +{ + /* None. */ + None UMETA(DisplayName = "None"), + + /* Turn off the thumper effects. */ + TurnOff UMETA(DisplayName = "Turn Off"), + + /* A 5-seconds long, constant vibration. */ + CueGameOver UMETA(DisplayName = "Cue Game Over"), + + /* A double-click at 100% intensity. */ + ButtonDouble100 UMETA(DisplayName = "Button Double 100"), + + /* A double click at 60% intensity. */ + ButtonDouble60 UMETA(DisplayName = "Button Double 60"), + + /* Simulates an impact of the hand at 100% intensity. */ + ImpactThump100 UMETA(DisplayName = "Impact Thump 100"), + + /* Simulates an impact of the hand at 30% intensity. */ + ImpactThump30 UMETA(DisplayName = "Impact Thump 30"), + + /* Simulates an sharp impact of the hand at 10% intensity. */ + ImpactThump10 UMETA(DisplayName = "Impact Thump 10"), + + /* A light vibration to cue the user that an object it picked up. 100% intensity. */ + ObjectGrasp100 UMETA(DisplayName = "Object Grasp 100"), + + /* A light vibration to cue the user that an object it picked up. 60% intensity. */ + ObjectGrasp60 UMETA(DisplayName = "Object Grasp 60"), + + /* A light vibration to cue the user that an object it picked up. 30% intensity. */ + ObjectGrasp30 UMETA(DisplayName = "Object Grasp 30"), +}; + +/* The way handPoses are smoothed in this class. */ +UENUM(BlueprintType) +enum class ESGSmoothingMethod : uint8 +{ + /** + * None. You'll always get the latest pose received. No performance increase, but might result in a "stop-motion" + * effect on lower frame-rates. + */ + None UMETA(DisplayName = "None"), + + /** + * Pretend you're one sample behind, and interpolate along the exact paths. More accurate, but we will lag 1 frame + * behind. + */ + InterpolateBehind UMETA(DisplayName = "Interpolated Behind"), + + /** + * Take the last two handPoses and estimate the current values based on extrapolation. Is perceived as "faster", + * but is more likely to overshoot during sudden changes in direction. + */ + ExtrapolateAhead UMETA(DisplayName = "Extraplate Ahead"), +}; + +/* Anatomical movements of the thumb joints. */ +UENUM(BlueprintType) +enum class ESGThumbMovement : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Pronation/Supination of the first finger joint. */ + CmcTwist UMETA(DisplayName = "CMC Twist"), + + /* Flexion of the first finger joint. */ + CmcFlexion UMETA(DisplayName = "CMC Flexion"), + + /* Abduction of the first finger joint. */ + CmcAbduction UMETA(DisplayName = "CMC Abduction"), + + /* Flexion of the second thumb joint. */ + McpFlexion UMETA(DisplayName = "MCP Flexion"), + + /* Flexion of the third thumb joint. */ + IpFlexion UMETA(DisplayName = "IP Flexion"), +}; + +/* How this Sense Glove converts sensor data into a HandPose. */ +UENUM(BlueprintType) +enum class ESGThumbSolver : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* Hand angles are interpolated based on the total flexion / abduction of the exoskeleton. */ + Interpolation UMETA(DisplayName = "Interpolation"), +}; + +/* Waveform type for an advanced Buzz Command. */ +UENUM(BlueprintType) +enum class ESGWaveformType : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* We're not sure what type of Waveform to use. */ + Unknown UMETA(DisplayName = "Unknown"), + + /* Smooth sine wave. */ + Sine UMETA(DisplayName = "Sine"), + + /* Can shift duty Cycle. */ + Square UMETA(DisplayName = "Square"), + + /* Inverse of SawDown. */ + SawUp UMETA(DisplayName = "Saw Up"), + + /* Inverse of SawUp. */ + SawDown UMETA(DisplayName = "Saw Down"), + + /* Triangle waveform. */ + Triangle UMETA(DisplayName = "Triangle"), + + /* A random, noisy signal. */ + Noise UMETA(DisplayName = "Noise"), +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGDebugTypes.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGDebugTypes.h new file mode 100644 index 0000000..1dd03e2 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGDebugTypes.h @@ -0,0 +1,56 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "CoreTypes.h" +#include "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +/** + * Determines the debug virtual hand drawing mode. + */ +UENUM(BlueprintType) +enum class ESGDebugVirtualHandDrawingMode : uint8 +{ + /** Do not draw any debug virtual hands. */ + None UMETA(DisplayName = "None"), + + /** Draw a debug virtual hand with cubic joints. */ + CubicJoints UMETA(DisplayName = "Cubic Joints"), + + /** Draw a debug virtual hand with gizmo joints. */ + GizmoJoints UMETA(DisplayName = "Gizmo Joints"), +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGFloatArray.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGFloatArray.h new file mode 100644 index 0000000..2c4abe1 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGFloatArray.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "UObject/ObjectMacros.h" + +#include "SGFloatArray.generated.h" + +USTRUCT(BlueprintType) +struct SENSEGLOVETYPES_API FSGFloatArray +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, Category="SenseGlove | Types | Nested Arrays", BlueprintReadWrite) + TArray FloatArray; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGNameArray.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGNameArray.h new file mode 100644 index 0000000..646a126 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGNameArray.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "UObject/NameTypes.h" + +#include "SGNameArray.generated.h" + +USTRUCT(BlueprintType) +struct SENSEGLOVETYPES_API FSGNameArray +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, Category="SenseGlove | Types | Nested Arrays", BlueprintReadWrite) + TArray NameArray; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGQuatArray.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGQuatArray.h new file mode 100644 index 0000000..d12597a --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGQuatArray.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Quat.h" + +#include "SGQuatArray.generated.h" + +USTRUCT(BlueprintType) +struct SENSEGLOVETYPES_API FSGQuatArray +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, Category="SenseGlove | Types | Nested Arrays", BlueprintReadWrite) + TArray QuatArray; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGRotatorArray.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGRotatorArray.h new file mode 100644 index 0000000..16c0057 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGRotatorArray.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Rotator.h" + +#include "SGRotatorArray.generated.h" + +USTRUCT(BlueprintType) +struct SENSEGLOVETYPES_API FSGRotatorArray +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, Category="SenseGlove | Types | Nested Arrays", BlueprintReadWrite) + TArray RotatorArray; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGTrackingTypes.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGTrackingTypes.h new file mode 100644 index 0000000..241f92f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGTrackingTypes.h @@ -0,0 +1,134 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +/** + * The Head-mounted Display device enum to determine the HMD device type. + */ +UENUM(BlueprintType) +enum class ESGHeadMountedDisplayDevice : uint8 +{ + /* The default none value. */ + None UMETA(DisplayName = "None"), + + /* The Meta Quest 2 HMD. */ + MetaQuest2 UMETA(DisplayName = "Meta Quest 2"), + + /* The Meta Quest Pro HMD. */ + MetaQuestPro UMETA(DisplayName = "Meta Quest Pro"), + + /* The Meta Quest 3 HMD. */ + MetaQuest3 UMETA(DisplayName = "Meta Quest 3"), + + /* The HTC VIVE Pro HMD. */ + HtcVivePro UMETA(DisplayName = "HTC VIVE Pro"), + + /* The HTC VIVE Focus 3 HMD. */ + HtcViveFocus3 UMETA(DisplayName = "HTC VIVE Focus 3"), + + /* The HTC VIVE XR Elite HMD. */ + HtcViveXRElite UMETA(DisplayName = "HTC VIVE XR Elite"), + + /* The HTC VIVE Focus 3 HMD. */ + HtcViveFocusVision UMETA(DisplayName = "HTC VIVE Focus Vision"), +}; + +/* OpenXR provider for the positional tracking hardware. */ +UENUM(BlueprintType) +enum class ESGOpenXRPositionalTrackingProvider : uint8 +{ + /* The default none value. Setting to 'None' will fall back to auto-detection. */ + None UMETA(DisplayName = "None"), + + /** + * OpenXR: + * - Quest 2 Controller + * - Quest Pro Controller + * - Quest 3 Controller + */ + OpenXR UMETA(DisplayName = "OpenXR"), + + /** + * OpenXRViveTracker: + * - PCVR: + * - VIVE Tracker + * - VIVE Focus 3 Wrist Tracker + * - Ultimate Tracker + */ + OpenXRViveTracker UMETA(DisplayName = "OpenXRViveTracker"), + + /** + * OpenXRViveWristTracker: + * - Standalone: + * - VIVE Focus 3 Wrist Tracker + */ + OpenXRViveWristTracker UMETA(DisplayName = "OpenXRViveWristTracker"), + + /** + * OpenXRXrTracker: + * - Standalone: + * - Ultimate Tracker + */ + OpenXRXrTracker UMETA(DisplayName = "OpenXRXrTracker"), +}; + +/* + * The HTC VIVE HMD detection priority for HTC devices that we cannot distinguish. + */ +UENUM(BlueprintType) +enum class ESGViveHMDDetectionPriority : uint8 +{ + /* First try to detect HTC VIVE Focus Vision, then XR Elite, and then Focus 3. */ + FocusVision_XRElite_Focus3 UMETA(DisplayName = "Focus Vision (1st), XR Elite (2nd), Focus3 (3rd)"), + + /* First try to detect HTC VIVE Focus Vision, then Focus 3, and then XR Elite. */ + FocusVision_Focus3_XRElite UMETA(DisplayName = "Focus Vision (1st), Focus3 (2nd), XR Elite (3rd)"), + + /* First try to detect HTC VIVE XR Elite, then Focus Vision, and then Focus 3. */ + XRElite_FocusVision_Focus3 UMETA(DisplayName = "XR Elite (1st), Focus Vision (2nd), Focus3 (3rd)"), + + /* First try to detect HTC VIVE XR Elite, then Focus 3, and then Focus Vision. */ + XRElite_Focus3_FocusVision UMETA(DisplayName = "XR Elite (1st), Focus3 (2nd), Focus Vision (3rd)"), + + /* First try to detect HTC VIVE Focus 3, then Focus Vision, and then XR Elite. */ + Focus3_FocusVision_XRElite UMETA(DisplayName = "Focus3 (1st), Focus Vision (2nd), XR Elite (3rd)"), + + /* First try to detect HTC VIVE Focus 3, then XR Elite, and then Focus Vision. */ + Focus3_XRElite_FocusVision UMETA(DisplayName = "Focus3 (1st), XR Elite (2nd), Focus Vision (3rd)"), +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGTypes.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGTypes.h new file mode 100644 index 0000000..3cbdcdc --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGTypes.h @@ -0,0 +1,59 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "UObject/ObjectMacros.h" + +/** + * The engine scalability settings. + */ +UENUM(BlueprintType) +enum class ESGEngineScalabilitySettings : uint8 +{ + Low = 0 UMETA(DisplayName = "Low"), + Medium = 1 UMETA(DisplayName = "Medium"), + High = 2 UMETA(DisplayName = "High"), + Epic = 3 UMETA(DisplayName = "Epic"), + Cinematic = 4 UMETA(DisplayName = "Cinematic"), + + /** + * This will be used for benchmarking purpose. Then it should set the engine scalability settings to one of the + * other levels. + */ + Auto = 254 UMETA(DisplayName = "Auto"), + Custom = 255 UMETA(DisplayName = "Custom"), +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGVectorArray.h b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGVectorArray.h new file mode 100644 index 0000000..7238fe0 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/Public/SGTypes/SGVectorArray.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "HAL/Platform.h" +#include "Math/Vector.h" + +#include "SGVectorArray.generated.h" + +USTRUCT(BlueprintType) +struct SENSEGLOVETYPES_API FSGVectorArray +{ + GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, Category="SenseGlove | Types | Nested Arrays", BlueprintReadWrite) + TArray VectorArray; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveTypes/SenseGloveTypes.Build.cs b/Plugins/SenseGlove/Source/SenseGloveTypes/SenseGloveTypes.Build.cs new file mode 100644 index 0000000..7bbc6c4 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveTypes/SenseGloveTypes.Build.cs @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveTypes : ModuleRules +{ + public SenseGloveTypes(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGAngles.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGAngles.cpp new file mode 100644 index 0000000..6212fd7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGAngles.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGUtils/SGAngles.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGArrayUtils.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGArrayUtils.cpp new file mode 100644 index 0000000..7f81009 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGArrayUtils.cpp @@ -0,0 +1,140 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGUtils/SGArrayUtils.h" + +#include "SGUtils/SGUnits.h" + +TArray FSGArrayUtils::QuatsToRotators(const TArray& QuatsArray) +{ + TArray RotatorsArray; + + for (const FQuat& Quat: QuatsArray) + { + FRotator Rotator{Quat.Rotator()}; + RotatorsArray.Add(MoveTemp(Rotator)); + } + + return RotatorsArray; +} + +TArray> FSGArrayUtils::QuatsToRotators(const TArray>& QuatsNestedArray) +{ + TArray> RotatorsNestedArray; + + for (const TArray& InnerQuatsArray: QuatsNestedArray) + { + TArray InnerRotatorsArray{QuatsToRotators(InnerQuatsArray)}; + RotatorsNestedArray.Add(MoveTemp(InnerRotatorsArray)); + } + + return RotatorsNestedArray; +} + +TArray FSGArrayUtils::RotatorsToQuats(const TArray& RotatorsArray) +{ + TArray QuatsArray; + + for (const FRotator& Rotator: RotatorsArray) + { + FQuat Quat{Rotator.Quaternion()}; + QuatsArray.Add(MoveTemp(Quat)); + } + + return QuatsArray; +} + +TArray> FSGArrayUtils::RotatorsToQuats(const TArray>& RotatorsNestedArray) +{ + TArray> QuatsNestedArray; + + for (const TArray& RotatorsInnerArray: RotatorsNestedArray) + { + TArray InnerQuatsArray{RotatorsToQuats(RotatorsInnerArray)}; + QuatsNestedArray.Add(MoveTemp(InnerQuatsArray)); + } + + return QuatsNestedArray; +} + +TArray FSGArrayUtils::FromMillimeters(const std::vector& Vector) +{ + TArray Array; + + for (const float Value: Vector) + { + Array.Add(FSGUnits::MillimetersToCentimeters(Value)); + } + + return Array; +} + +TArray> FSGArrayUtils::FromMillimeters(const std::vector>& NestedVector) +{ + TArray> NestedArray; + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromMillimeters(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; +} + +std::vector FSGArrayUtils::ToMillimeters(const TArray& Array) +{ + std::vector Vector; + + for (const float Value: Array) + { + Vector.emplace_back(FSGUnits::CentimetersToMillimeters(Value)); + } + + return Vector; +} + +std::vector> FSGArrayUtils::ToMillimeters(const TArray>& NestedArray) +{ + std::vector> NestedVector; + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToMillimeters(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGEditorUtils.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGEditorUtils.cpp new file mode 100644 index 0000000..4209caa --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGEditorUtils.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGUtils/SGEditorUtils.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGEngineUtils.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGEngineUtils.cpp new file mode 100644 index 0000000..d4253e5 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGEngineUtils.cpp @@ -0,0 +1,106 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGUtils/SGEngineUtils.h" + +#include "CoreGlobals.h" +#if WITH_EDITOR +#include "Editor.h" +#endif /* WITH_EDITOR */ +#include "Engine/Engine.h" +#include "Engine/GameViewportClient.h" +#include "Engine/World.h" +#include "Runtime/Launch/Resources/Version.h" +#include "Subsystems/EngineSubsystem.h" + +UWorld* FSGEngineUtils::GetWorld() +{ + UWorld* World{nullptr}; + +#if WITH_EDITOR + if (GIsEditor) + { + if (IsValid(GEditor)) + { + { + const bool bIsPIE = UE::GetPlayInEditorID() != -1; + const int32 WorldPIEInstance = bIsPIE ? UE::GetPlayInEditorID() : 1; + const FWorldContext* WorldContext{GEditor->GetPIEWorldContext(WorldPIEInstance)}; + if (WorldContext) + { + World = WorldContext->World(); + } + } + + if (!IsValid(World) && IsInGameThread() && !(GEditor->PlayWorld || GIsPlayInEditorWorld)) + { + World = GEditor->GetEditorWorldContext(false).World(); + } + } + + if (!IsValid(World) && IsValid(GEngine)) + { + const UGameViewportClient* Viewport{GEngine->GameViewport}; + if (IsValid(Viewport)) + { + World = Viewport->GetWorld(); + } + } + } + else + { + if (IsValid(GEngine)) + { + World = GEngine->GetCurrentPlayWorld(nullptr); + } + } +#else /* WITH_EDITOR */ + if (IsValid(GEngine)) + { + World = GEngine->GetCurrentPlayWorld(nullptr); + } +#endif /* WITH_EDITOR */ + + if (!IsValid(World) && IsValid(GEngine)) + { + UEngineSubsystem* EngineSubsystem{GEngine->GetEngineSubsystem()}; + if (IsValid(EngineSubsystem)) + { + World = EngineSubsystem->GetWorld(); + } + } + + return World; +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGPluginUtils.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGPluginUtils.cpp new file mode 100644 index 0000000..bcd247b --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGPluginUtils.cpp @@ -0,0 +1,54 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGUtils/SGPluginUtils.h" + +#include "Interfaces/IPluginManager.h" +#include "Modules/ModuleManager.h" + +bool FSGPluginUtils::IsPluginEnabled(const FString& PluginName) +{ + TSharedPtr Plugin{IPluginManager::Get().FindPlugin(*PluginName)}; + if (Plugin.IsValid()) + { + return Plugin->IsEnabled(); + } + return false; +} + +bool FSGPluginUtils::IsModuleLoaded(const FString& ModuleName) +{ + return FModuleManager::Get().IsModuleLoaded(FName{*ModuleName}); +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGUnits.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGUnits.cpp new file mode 100644 index 0000000..ccdb96e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SGUtils/SGUnits.cpp @@ -0,0 +1,36 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SGUtils/SGUnits.h" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtils.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtils.cpp new file mode 100644 index 0000000..1ee237e --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtils.cpp @@ -0,0 +1,40 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveUtils.h" +#include "Modules/ModuleManager.h" +#include "SenseGloveUtilsModule.h" + +IMPLEMENT_MODULE(FSenseGloveUtilsModule, SenseGloveUtils) \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtils.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtils.h new file mode 100644 index 0000000..65941e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtils.h @@ -0,0 +1,38 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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" \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtilsModule.cpp b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtilsModule.cpp new file mode 100644 index 0000000..fec1049 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtilsModule.cpp @@ -0,0 +1,61 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveUtilsModule.h" +#include "SGLog/SGLog.h" + +#define LOCTEXT_NAMESPACE "FSenseGloveUtilsModule" + +void FSenseGloveUtilsModule::StartupModule() +{ + SGLOG("Starting up the SenseGloveUtils module..."); +} + +void FSenseGloveUtilsModule::PreUnloadCallback() +{ + SGLOG("Unloading the SenseGloveUtils module..."); +} + +void FSenseGloveUtilsModule::PostLoadCallback() +{ + SGLOG("Loading of SenseGloveUtils module has succeeded!"); +} + +void FSenseGloveUtilsModule::ShutdownModule() +{ + SGLOG("Shutting down the SenseGloveUtils module..."); +} + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtilsModule.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtilsModule.h new file mode 100644 index 0000000..5c8d400 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Private/SenseGloveUtilsModule.h @@ -0,0 +1,51 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "SenseGloveUtils" + +class FSenseGloveUtilsModule : public IModuleInterface +{ +public: + virtual void StartupModule() override; + virtual void PreUnloadCallback() override; + virtual void PostLoadCallback() override; + virtual void ShutdownModule() override; +}; + +#undef LOCTEXT_NAMESPACE \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h new file mode 100644 index 0000000..e83cdce --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGAngles.h @@ -0,0 +1,129 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" + +#include "SGTypes/SGCoreTypes.h" + +class SENSEGLOVEUTILS_API FSGAngles final +{ +public: + static FORCEINLINE float TransformToSenseGlove(const float Degrees) + { + return FMath::DegreesToRadians(Degrees); + } + + static FORCEINLINE float TransformToSenseGlove(const int32 Movement, const float Direction) + { + // 0 = twist, 1 = flexion/extension, 2 = abduction + return FMath::DegreesToRadians(Movement != 1 ? -Direction : Direction); + } + + static FORCEINLINE FVector TransformToSenseGlove(const FVector& Vector) + { + return FMath::DegreesToRadians(FVector(-Vector.X, Vector.Y, -Vector.Z)); + } + + template + static FORCEINLINE V TransformToSenseGlove(const FVector& Vector) + { + return FMath::DegreesToRadians(V(-Vector.X, Vector.Y, -Vector.Z)); + } + + static FORCEINLINE float TransformToUnreal(const float Radians) + { + return FMath::RadiansToDegrees(Radians); + } + + static FORCEINLINE constexpr float TransformToUnreal(const int32 Movement, const float Direction) + { + /// TODO + /// values require validation. + + // 0 = twist, 1 = flexion/extension, 2 = abduction + return Movement != 1 ? -Direction : Direction; + } + + static FORCEINLINE constexpr float TransformToUnreal(const ESGFingerMovement Movement, const float Direction) + { + ensureAlwaysMsgf(Movement != ESGFingerMovement::None, TEXT("none is not a valid value!")); + + /// TODO + /// values require validation. + + // 0 = twist, 1 = flexion/extension, 2 = abduction + /// TODO + /// Which flexions should be ignored? + return (Movement != ESGFingerMovement::McpFlexion && Movement != ESGFingerMovement::PipFlexion && Movement != + ESGFingerMovement::PipFlexion) + ? -Direction + : Direction; + } + + static FORCEINLINE float TransformToUnreal(const ESGThumbMovement Movement, const float Direction) + { + ensureAlwaysMsgf(Movement != ESGThumbMovement::None, TEXT("none is not a valid value!")); + + /// TODO + /// values require validation. + + // 0 = twist, 1 = flexion/extension, 2 = abduction + /// TODO + /// Which flexions should be ignored? + return FMath::RadiansToDegrees( + Movement != ESGThumbMovement::CmcFlexion + && Movement != ESGThumbMovement::McpFlexion + && Movement != ESGThumbMovement::IpFlexion + ? -Direction + : Direction); + } + + static FORCEINLINE FVector TransformToUnreal(const FVector& Vector) + { + return FMath::RadiansToDegrees(FVector(-Vector.X, Vector.Y, -Vector.Z)); + } + + template + static FORCEINLINE FVector TransformToUnreal(const V& Vector) + { + return FMath::RadiansToDegrees(FVector(-Vector.GetX(), Vector.GetY(), -Vector.GetZ())); + } + +public: + FSGAngles() = delete; + virtual ~FSGAngles() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGArrayUtils.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGArrayUtils.h new file mode 100644 index 0000000..6c731ff --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGArrayUtils.h @@ -0,0 +1,799 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 +#include + +#include "SGAngles.h" +#include "Containers/Array.h" +#include "Containers/StringConv.h" +#include "Math/Quat.h" +#include "Math/Rotator.h" +#include "Math/Vector.h" +#include "Templates/UnrealTemplate.h" + +#include "SGUtils/SGUnits.h" + +class SENSEGLOVEUTILS_API FSGArrayUtils final +{ +public: + template + static FORCEINLINE TArray FromStdVector(const std::vector& Vector) + { + const TArray Array{&Vector[0], StaticCast(Vector.size())}; + return Array; + } + + /// NOTE + /// std::vector is a non-conforming container. Since it packs booleans to be stored in one bit, + /// it cannot provide a bool reference. Thus, FSGArrayUtils::FromStdVector() cannot be used. + /// Hence, the specialization. + static TArray FromStdVector(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const bool bValue: Vector) + { + Array.Add(bValue); + } + + return Array; + } + + static TArray FromStdVector(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const std::string& StdString: Vector) + { + FString String{UTF8_TO_TCHAR(StdString.c_str())}; + Array.Add(MoveTemp(String)); + } + + return Array; + } + + template + static TArray> FromStdVector(const std::vector>& NestedVector) + { + TArray> NestedArray; + NestedArray.Reserve(NestedVector.size()); + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromStdVector(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + template + static TArray FromStdVector(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const T1& T1Element: Vector) + { + T2 T2Element(T1Element); + Array.Add(MoveTemp(T2Element)); + } + + return Array; + } + + template + static TArray> FromStdVector(const std::vector>& NestedVector) + { + TArray> NestedArray; + NestedArray.Reserve(NestedVector.size()); + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromStdVector(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + template + static TArray FromStdVector(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const T1& T1Element: Vector) + { + IntermediateImpl ImplElement(T1Element); + T2 T2Element((ImplElement.*ToT2TypeMethod)()); + Array.Add(MoveTemp(T2Element)); + } + + return Array; + } + + template + static TArray> FromStdVector(const std::vector>& NestedVector) + { + TArray> NestedArray; + NestedArray.Reserve(NestedVector.size()); + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromStdVector(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + template + static FORCEINLINE std::vector ToStdVector(const TArray& Array) + { + std::vector Vector(&Array[0], &Array[0] + Array.Num()); + return Vector; + } + + static std::vector ToStdVector(const TArray& Array) + { + std::vector Vector; + Vector.reserve(Array.Num()); + + for (const FString& String: Array) + { + std::string StdString{TCHAR_TO_UTF8(*String)}; + Vector.emplace_back(MoveTemp(StdString)); + } + + return Vector; + } + + template + static std::vector> ToStdVector(const TArray>& NestedArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToStdVector(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + template + static std::vector ToStdVector(const TArray& Array) + { + std::vector Vector; + Vector.reserve(Array.Num()); + + for (const T1& T1Element: Array) + { + T2 T2Element((T1Element.*ToUnderlyingTypeMethod)()); + Vector.emplace_back(MoveTemp(T2Element)); + } + + return Vector; + } + + template + static std::vector> ToStdVector(const TArray>& NestedArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToStdVector(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + template + static std::vector ToStdVector(const TArray& Array) + { + std::vector Vector; + Vector.reserve(Array.Num()); + + for (const T1& T1Element: Array) + { + IntermediateImpl ImplElement(T1Element); + T2 T2Element((ImplElement.*ToUnderlyingTypeMethod)()); + Vector.emplace_back(MoveTemp(T2Element)); + } + + return Vector; + } + + template + static std::vector> ToStdVector(const TArray>& NestedArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToStdVector(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + template + static TArray FromImplType(const TArray& ImplArray) + { + TArray Array; + Array.Reserve(ImplArray.Num()); + + for (const T1& T1Element: ImplArray) + { + T2 T2Element(T1Element); + Array.Add(MoveTemp(T2Element)); + } + + return Array; + } + + template + static TArray FromImplType(UObject* Outer, const TArray& ImplArray) + { + TArray Array; + Array.Reserve(ImplArray.Num()); + + for (const T1& T1Element: ImplArray) + { + T2* T2Element(NewObjectMethod(Outer, T1Element)); + Array.Add(MoveTemp(T2Element)); + } + + return Array; + } + + template + static TArray> FromImplType(const TArray>& NestedImplArray) + { + TArray> NestedArray; + NestedArray.Reserve(NestedImplArray.Num()); + + for (const TArray& InnerImplArray: NestedImplArray) + { + TArray InnerArray{FromImplType(InnerImplArray)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + template + static TArray> FromImplType(UObject* Outer, const TArray>& NestedImplArray) + { + TArray> NestedArray; + NestedArray.Reserve(NestedImplArray.Num()); + + for (const TArray& InnerImplArray: NestedImplArray) + { + TArray InnerArray{FromImplType(Outer, InnerImplArray)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + template + static TArray FromImplType(const TArray>& NestedImplArray) + { + TArray NestedBPArray; + NestedBPArray.Reserve(NestedImplArray.Num()); + + for (const TArray& InnerImplArray: NestedImplArray) + { + TArray InnerArray{FromImplType(InnerImplArray)}; + S InnerArrayContainer{MoveTemp(InnerArray)}; + NestedBPArray.Add(MoveTemp(InnerArrayContainer)); + } + + return NestedBPArray; + } + + template + static TArray FromImplType(UObject* Outer, const TArray>& NestedImplArray) + { + TArray NestedArray; + NestedArray.Reserve(NestedImplArray.Num()); + + for (const TArray& InnerImplArray: NestedImplArray) + { + TArray InnerArray{FromImplType(Outer, InnerImplArray)}; + S InnerArrayContainer{MoveTemp(InnerArray)}; + NestedArray.Add(MoveTemp(InnerArrayContainer)); + } + + return NestedArray; + } + + template + static TArray FromImplType(const TArray>& NestedImplArray) + { + TArray NestedArray; + NestedArray.Reserve(NestedImplArray.Num()); + + for (const TArray& InnerImplArray: NestedImplArray) + { + TArray InnerArray{FromImplType(InnerImplArray)}; + S InnerArrayContainer{MoveTemp(InnerArray)}; + NestedArray.Add(MoveTemp(InnerArrayContainer)); + } + + return NestedArray; + } + + template + static TArray ToImplType(const TArray& Array) + { + TArray ImplArray; + ImplArray.Reserve(Array.Num()); + + for (const T1& T1Element: Array) + { + T2 T2Element((T1Element.*ToUnderlyingTypeMethod)()); + ImplArray.Add(MoveTemp(T2Element)); + } + + return ImplArray; + } + + template + static TArray ToImplType(const TArray& Array) + { + TArray ImplArray; + ImplArray.Reserve(Array.Num()); + + for (const T1* T1Element: Array) + { + T2 T2Element((T1Element->*ToUnderlyingTypeMethod)()); + ImplArray.Add(MoveTemp(T2Element)); + } + + return ImplArray; + } + + template + static TArray> ToImplType(const TArray>& Array) + { + TArray> ImplArray; + ImplArray.Reserve(Array.Num()); + + for (const TArray& InnerArray: Array) + { + TArray InnerImplArray{ToImplType(InnerArray)}; + ImplArray.Add(MoveTemp(InnerImplArray)); + } + + return ImplArray; + } + + template + static TArray> ToImplType(const TArray>& NestedArray) + { + TArray> NestedImplArray; + NestedImplArray.Reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + TArray InnerImplArray{ToImplType(InnerArray)}; + NestedImplArray.Add(MoveTemp(InnerImplArray)); + } + + return NestedImplArray; + } + + template S::* + InnerArray> + static TArray> ToImplType(const TArray& NestedArray) + { + TArray> NestedImplArray; + NestedImplArray.Reserve(NestedArray.Num()); + + for (const S& InnerArrayContainer: NestedArray) + { + TArray InnerImplArray{ToImplType(InnerArrayContainer.*InnerArray)}; + NestedImplArray.Add(MoveTemp(InnerImplArray)); + } + + return NestedImplArray; + } + + template S::* + InnerArray> + static TArray> ToImplType(const TArray& NestedArray) + { + TArray> NestedImplArray; + NestedImplArray.Reserve(NestedArray.Num()); + + for (const S& InnerArrayContainer: NestedArray) + { + TArray InnerImplArray{ToImplType(InnerArrayContainer.*InnerArray)}; + NestedImplArray.Add(MoveTemp(InnerImplArray)); + } + + return NestedImplArray; + } + + template S::*InnerArray> + static TArray> FromNestedBPArray(const TArray& NestedBPArray) + { + TArray> NestedArray; + NestedArray.Reserve(NestedBPArray.Num()); + + for (const S& InnerBPArrayContainer: NestedBPArray) + { + NestedArray.Add(InnerBPArrayContainer.*InnerArray); + } + + return NestedArray; + } + + template + static TArray ToNestedBPArray(const TArray>& NestedArray) + { + TArray NestedBPArray; + NestedBPArray.Reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + S InnerBPArrayContainer{InnerArray}; + NestedBPArray.Add(MoveTemp(InnerBPArrayContainer)); + } + + return NestedBPArray; + } + + template + static TArray ToNestedBPArray(const TArray>& NestedArray) + { + TArray NestedBPArray; + NestedBPArray.Reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + S InnerBPArrayContainer{InnerArray}; + NestedBPArray.Add(MoveTemp(InnerBPArrayContainer)); + } + + return NestedBPArray; + } + + static TArray QuatsToRotators(const TArray& QuatsArray); + static TArray> QuatsToRotators(const TArray>& QuatsArray); + + template S::*InnerArray> + static TArray> QuatsToRotators(const TArray& QuatsNestedArray) + { + TArray> RotatorsNestedArray; + RotatorsNestedArray.Reserve(QuatsNestedArray.Num()); + + for (const S& QuatsInnerBPArrayContainer: QuatsNestedArray) + { + RotatorsNestedArray.Add(QuatsToRotators(QuatsInnerBPArrayContainer.*InnerArray)); + } + + return RotatorsNestedArray; + } + + template + static TArray QuatsToRotators(const TArray>& QuatsNestedArray) + { + TArray RotatorsNestedBPArray; + RotatorsNestedBPArray.Reserve(QuatsNestedArray.Num()); + + for (const TArray& QuatsInnerArray: QuatsNestedArray) + { + S RotatorsInnerBPArrayContainer{QuatsToRotators(QuatsInnerArray)}; + RotatorsNestedBPArray.Add(MoveTemp(RotatorsInnerBPArrayContainer)); + } + + return RotatorsNestedBPArray; + } + + template Q::*InnerArray> + static TArray QuatsToRotators(const TArray& QuatsNestedArray) + { + TArray RotatorsNestedBPArray; + RotatorsNestedBPArray.Reserve(QuatsNestedArray.Num()); + + for (const Q& QuatsInnerArrayContainer: QuatsNestedArray) + { + R RotatorsInnerBPArrayContainer{QuatsToRotators(QuatsInnerArrayContainer.*InnerArray)}; + RotatorsNestedBPArray.Add(MoveTemp(RotatorsInnerBPArrayContainer)); + } + + return RotatorsNestedBPArray; + } + + static TArray RotatorsToQuats(const TArray& RotatorsNestedArray); + static TArray> RotatorsToQuats(const TArray>& RotatorsNestedArray); + + template S::*InnerArray> + static TArray> RotatorsToQuats(const TArray& RotatorsNestedArray) + { + TArray> QuatsNestedArray; + QuatsNestedArray.Reserve(RotatorsNestedArray.Num()); + + for (const S& RotatorsInnerBPArrayContainer: RotatorsNestedArray) + { + QuatsNestedArray.Add(RotatorsToQuats(RotatorsInnerBPArrayContainer.*InnerArray)); + } + + return QuatsNestedArray; + } + + template + static TArray RotatorsToQuats(const TArray>& RotatorsNestedArray) + { + TArray QuatsNestedBPArray; + QuatsNestedBPArray.Reserve(RotatorsNestedArray.Num()); + + for (const TArray& RotatorsInnerArray: RotatorsNestedArray) + { + S QuatsInnerBPArrayContainer{RotatorsToQuats(RotatorsInnerArray)}; + QuatsNestedBPArray.Add(MoveTemp(QuatsInnerBPArrayContainer)); + } + + return QuatsNestedBPArray; + } + + template Q::*InnerArray> + static TArray RotatorsToQuats(const TArray& RotatorsNestedArray) + { + TArray QuatsNestedBPArray; + QuatsNestedBPArray.Reserve(RotatorsNestedArray.Num()); + + for (const Q& RotatorsInnerArrayContainer: RotatorsNestedArray) + { + R QuatsInnerBPArrayContainer{RotatorsToQuats(RotatorsInnerArrayContainer.*InnerArray)}; + QuatsNestedBPArray.Add(MoveTemp(QuatsInnerBPArrayContainer)); + } + + return QuatsNestedBPArray; + } + + static TArray FromMillimeters(const std::vector& Vector); + static TArray> FromMillimeters(const std::vector>& NestedVector); + + template + static TArray FromMillimeters(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const V3D& Value: Vector) + { + Array.Add(FSGUnits::MillimetersToCentimeters(Value)); + } + + return Array; + } + + template + static TArray> FromMillimeters(const std::vector>& NestedVector) + { + TArray> NestedArray; + NestedArray.Reserve(NestedVector.size()); + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromMillimeters(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + static std::vector ToMillimeters(const TArray& Array); + static std::vector> ToMillimeters(const TArray>& NestedArray); + + template S::*InnerArray> + static std::vector> ToMillimeters(const TArray& NestedBPArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedBPArray.Num()); + + for (const S& InnerBPArrayContainer: NestedBPArray) + { + std::vector InnerVector{ToMillimeters(InnerBPArrayContainer.*InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + template + static std::vector ToMillimeters(const TArray& Array) + { + std::vector Vector; + Vector.reserve(Array.Num()); + + for (const FVector& Value: Array) + { + Vector.emplace_back(FSGUnits::CentimetersToMillimeters(Value)); + } + + return Vector; + } + + template + static std::vector> ToMillimeters(const TArray>& NestedArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToMillimeters(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + static std::vector ToSenseGloveAngles(const TArray& Array) + { + std::vector Vector; + Vector.reserve(Array.Num()); + + for (const float Value: Array) + { + Vector.emplace_back(FSGAngles::TransformToSenseGlove(Value)); + } + + return Vector; + } + + static std::vector> ToSenseGloveAngles(const TArray>& NestedArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToSenseGloveAngles(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + template + static std::vector ToSenseGloveAngles(const TArray& Array) + { + std::vector Vector; + Vector.reserve(Array.Num()); + + for (const FVector& Value: Array) + { + Vector.emplace_back(FSGAngles::TransformToSenseGlove(Value)); + } + + return Vector; + } + + template + static std::vector> ToSenseGloveAngles(const TArray>& NestedArray) + { + std::vector> NestedVector; + NestedVector.reserve(NestedArray.Num()); + + for (const TArray& InnerArray: NestedArray) + { + std::vector InnerVector{ToSenseGloveAngles(InnerArray)}; + NestedVector.emplace_back(MoveTemp(InnerVector)); + } + + return NestedVector; + } + + static TArray FromSenseGloveAngles(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const float Value: Vector) + { + Array.Add(FSGAngles::TransformToUnreal(Value)); + } + + return Array; + } + + static TArray> FromSenseGloveAngles(const std::vector>& NestedVector) + { + TArray> NestedArray; + NestedArray.Reserve(NestedVector.size()); + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromSenseGloveAngles(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + + template + static TArray FromSenseGloveAngles(const std::vector& Vector) + { + TArray Array; + Array.Reserve(Vector.size()); + + for (const V3D& Value: Vector) + { + Array.Add(FSGAngles::TransformToUnreal(Value)); + } + + return Array; + } + + template + static TArray> FromSenseGloveAngles(const std::vector>& NestedVector) + { + TArray> NestedArray; + NestedArray.Reserve(NestedVector.size()); + + for (const std::vector& InnerVector: NestedVector) + { + TArray InnerArray{FromSenseGloveAngles(InnerVector)}; + NestedArray.Add(MoveTemp(InnerArray)); + } + + return NestedArray; + } + +public: + FSGArrayUtils() = delete; + virtual ~FSGArrayUtils() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGEditorUtils.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGEditorUtils.h new file mode 100644 index 0000000..2181207 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGEditorUtils.h @@ -0,0 +1,43 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + +class SENSEGLOVEUTILS_API FSGEditorUtils final +{ +public: + FSGEditorUtils() = delete; + virtual ~FSGEditorUtils() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGEngineUtils.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGEngineUtils.h new file mode 100644 index 0000000..0a4d4cf --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGEngineUtils.h @@ -0,0 +1,48 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 + +class UWorld; + +class SENSEGLOVEUTILS_API FSGEngineUtils final +{ +public: + static UWorld* GetWorld(); + +public: + FSGEngineUtils() = delete; + virtual ~FSGEngineUtils() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGPluginUtils.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGPluginUtils.h new file mode 100644 index 0000000..fb10f78 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGPluginUtils.h @@ -0,0 +1,85 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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/UnrealString.h" +#include "HAL/Platform.h" + +class SENSEGLOVEUTILS_API FSGPluginUtils final +{ +public: + static bool IsPluginEnabled(const FString& PluginName); + static bool IsModuleLoaded(const FString& ModuleName); + + static FORCENOINLINE bool IsPluginAvailable(const FString& PluginName, const FString& ModuleName) + { + return IsPluginEnabled(*PluginName) && IsModuleLoaded(ModuleName); + } + + FORCENOINLINE static bool IsMetaXRPluginEnabled() + { + return IsPluginEnabled(TEXT("OculusXR")); + } + + FORCENOINLINE static bool IsMetaXRPluginLoaded() + { + return IsModuleLoaded(TEXT("OculusXRHMD")); + } + + FORCENOINLINE static bool IsMetaXRPluginAvailable() + { + return IsMetaXRPluginEnabled() && IsMetaXRPluginLoaded(); + } + + FORCENOINLINE static bool IsViveOpenXRPluginEnabled() + { + return IsPluginEnabled(TEXT("ViveOpenXR")); + } + + FORCENOINLINE static bool IsViveOpenXRPluginLoaded() + { + return IsModuleLoaded(TEXT("ViveOpenXRCommon")); + } + + FORCENOINLINE static bool IsViveOpenXRPluginAvailable() + { + return IsViveOpenXRPluginEnabled() && IsViveOpenXRPluginLoaded(); + } + +public: + FSGPluginUtils() = delete; + virtual ~FSGPluginUtils() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGUnits.h b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGUnits.h new file mode 100644 index 0000000..30c7420 --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/Public/SGUtils/SGUnits.h @@ -0,0 +1,78 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 "Math/Vector.h" + +class SENSEGLOVEUTILS_API FSGUnits final +{ +public: + static FORCEINLINE constexpr float CentimetersToMillimetersMultiplier() + { + return 10.0f; + } + + static FORCEINLINE constexpr float MillimetersToCentimetersMultiplier() + { + return 0.1f; + } + + static FORCEINLINE float CentimetersToMillimeters(const float Value) + { + return Value * CentimetersToMillimetersMultiplier(); + } + + template + static FORCEINLINE V3D CentimetersToMillimeters(const FVector& Vector) + { + return V3DImpl(Vector * CentimetersToMillimetersMultiplier()).ToVect3D(); + } + + static FORCEINLINE float MillimetersToCentimeters(const float Value) + { + return Value * MillimetersToCentimetersMultiplier(); + } + + template + static FORCEINLINE FVector MillimetersToCentimeters(const V3D& Vect3D) + { + return V3DImpl(Vect3D).ToFVector() * MillimetersToCentimetersMultiplier(); + } + +public: + FSGUnits() = delete; + virtual ~FSGUnits() = delete; +}; \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/SenseGloveUtils/SenseGloveUtils.Build.cs b/Plugins/SenseGlove/Source/SenseGloveUtils/SenseGloveUtils.Build.cs new file mode 100644 index 0000000..1025d6f --- /dev/null +++ b/Plugins/SenseGlove/Source/SenseGloveUtils/SenseGloveUtils.Build.cs @@ -0,0 +1,73 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 SenseGloveUtils : ModuleRules +{ + public SenseGloveUtils(ReadOnlyTargetRules Target) : base(Target) + { + PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "Core", + "CoreUObject", + "Engine", + "Projects", + } + ); + + if (Target.bBuildEditor) + { + PrivateDependencyModuleNames.AddRange( + new string[] + { + "UnrealEd", + } + ); + } + + PrivateDependencyModuleNames.AddRange( + new string[] + { + "SenseGloveLog", + "SenseGloveTypes", + } + ); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGBleThirdPartyLibs/SGBleThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGBleThirdPartyLibs/SGBleThirdPartyLibs.Build.cs new file mode 100644 index 0000000..e277920 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGBleThirdPartyLibs/SGBleThirdPartyLibs.Build.cs @@ -0,0 +1,157 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGBleThirdPartyLibs : ModuleRules +{ + public SGBleThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sgble"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc")); + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc")); + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "rustc")); + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + + if (bIsWin64) + { + PublicAdditionalLibraries.AddRange(new string[] + { + "bcrypt.lib", + "ntdll.lib", + "propsys.lib", + "runtimeobject.lib", + "userenv.lib", + "ws2_32.lib" + }); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs new file mode 100644 index 0000000..36e2253 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGCommonThirdPartyLibs/SGCommonThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGCommonThirdPartyLibs : ModuleRules +{ + public SGCommonThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sgcommon"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs new file mode 100644 index 0000000..c132956 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGConnectShmThirdPartyLibs/SGConnectShmThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGConnectShmThirdPartyLibs : ModuleRules +{ + public SGConnectShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sgconnectshm"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGConnectThirdPartyHeaders/SGConnectThirdPartyHeaders.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGConnectThirdPartyHeaders/SGConnectThirdPartyHeaders.Build.cs new file mode 100644 index 0000000..d0327c3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGConnectThirdPartyHeaders/SGConnectThirdPartyHeaders.Build.cs @@ -0,0 +1,53 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGConnectThirdPartyHeaders : ModuleRules +{ + public SGConnectThirdPartyHeaders(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + + PublicIncludePaths.Add(IncludePath); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs new file mode 100644 index 0000000..2553212 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGConnectThirdPartyLibs/SGConnectThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGConnectThirdPartyLibs : ModuleRules +{ + public SGConnectThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidx64 = ""; + string LibraryName = "sgconnect"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidx64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidx64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidx64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs new file mode 100644 index 0000000..ff69bf9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGCoreShmThirdPartyLibs/SGCoreShmThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGCoreShmThirdPartyLibs : ModuleRules +{ + public SGCoreShmThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sgcoreshm"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGCoreThirdPartyHeaders/SGCoreThirdPartyHeaders.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGCoreThirdPartyHeaders/SGCoreThirdPartyHeaders.Build.cs new file mode 100644 index 0000000..215b93f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGCoreThirdPartyHeaders/SGCoreThirdPartyHeaders.Build.cs @@ -0,0 +1,53 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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 CoreION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * @section DESCRIPTION + * + * + */ + + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGCoreThirdPartyHeaders : ModuleRules +{ + public SGCoreThirdPartyHeaders(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + + PublicIncludePaths.Add(IncludePath); + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs new file mode 100644 index 0000000..3265eef --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGCoreThirdPartyLibs/SGCoreThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGCoreThirdPartyLibs : ModuleRules +{ + public SGCoreThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sgcore"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs new file mode 100644 index 0000000..4d0d2ab --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGFmtThirdPartyLibs/SGFmtThirdPartyLibs.Build.cs @@ -0,0 +1,178 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGFmtThirdPartyLibs : ModuleRules +{ + public SGFmtThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "fmt"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsDebugBuild) + { + LibraryName += "d"; + } + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs new file mode 100644 index 0000000..126a0e0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGLogThirdPartyLibs/SGLogThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGLogThirdPartyLibs : ModuleRules +{ + public SGLogThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sglog"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs new file mode 100644 index 0000000..8a22fc4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGLoguruThirdPartyLibs/SGLoguruThirdPartyLibs.Build.cs @@ -0,0 +1,178 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGLoguruThirdPartyLibs : ModuleRules +{ + public SGLoguruThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "loguru"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsDebugBuild) + { + LibraryName += "d"; + } + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs new file mode 100644 index 0000000..1f33184 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGSerialThirdPartyLibs/SGSerialThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGSerialThirdPartyLibs : ModuleRules +{ + public SGSerialThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "sgserial"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs b/Plugins/SenseGlove/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs new file mode 100644 index 0000000..4b6ab61 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/SGWjwwoodSerialThirdPartyLibs/SGWjwwoodSerialThirdPartyLibs.Build.cs @@ -0,0 +1,173 @@ +/** + * @file + * + * @author Mamadou Babaei + * + * @section LICENSE + * + * (The MIT License) + * + * Copyright (c) 2020 - 2026 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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using UnrealBuildTool; + +public class SGWjwwoodSerialThirdPartyLibs : ModuleRules +{ + public SGWjwwoodSerialThirdPartyLibs(ReadOnlyTargetRules Target) : base(Target) + { + Type = ModuleType.External; + + string ThirdPartyDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..")); + string LibraryPath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "lib")); + string LibraryPathAnroidAArch64 = ""; + string LibraryPathAnroidX64 = ""; + string LibraryName = "serial"; + + bool bIsAndroid = Target.IsInPlatformGroup(UnrealPlatformGroup.Android); + bool bIsLinux = Target.Platform == UnrealTargetPlatform.Linux; + bool bIsLinuxArm64 = Target.Platform == UnrealTargetPlatform.LinuxArm64; + bool bIsWin64 = Target.IsInPlatformGroup(UnrealPlatformGroup.Windows) && + Target.WindowsPlatform.Architecture == UnrealArch.X64; + bool bIsDebugBuild = (Target.Configuration == UnrealTargetConfiguration.Debug); + + if (bIsAndroid) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "android")); + +#if UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r27c")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "r25b")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinux) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsLinuxArm64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "linux")); + +#if UE_5_7_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v26")); +#elif UE_5_6_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v25")); +#elif UE_5_5_OR_LATER + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v23")); +#else + Debug.Assert(false, "Unsupported engine version or compiler!"); +#endif + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "aarch64")); + + LibraryName = string.Format("lib{0}.a", LibraryName); + } + else if (bIsWin64) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "windows")); + switch (Target.WindowsPlatform.Compiler) + { + case WindowsCompiler.VisualStudio2022: + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "v143")); + break; + default: + Debug.Assert(false, "Unsupported engine version or compiler!"); + break; + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "x86-64")); + + LibraryName = string.Format("{0}.lib", LibraryName); + } + else + { + Debug.Assert(false, "Unsupported platform!"); + } + + string IncludePath = Path.GetFullPath(Path.Combine(ThirdPartyDirectory, "include")); + PrivateIncludePaths.Add(IncludePath); + + if (bIsAndroid) + { + if (bIsDebugBuild) + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "debug")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "debug")); + } + else + { + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, "release")); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, "release")); + } + + LibraryPathAnroidAArch64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidAArch64, LibraryName)); + LibraryPathAnroidX64 = Path.GetFullPath(Path.Combine(LibraryPathAnroidX64, LibraryName)); + + PublicAdditionalLibraries.Add(LibraryPathAnroidAArch64); + PublicAdditionalLibraries.Add(LibraryPathAnroidX64); + } + else + { + if (bIsDebugBuild) + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "debug")); + } + else + { + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, "release")); + } + + LibraryPath = Path.GetFullPath(Path.Combine(LibraryPath, LibraryName)); + PublicAdditionalLibraries.Add(LibraryPath); + } + } +} \ No newline at end of file diff --git a/Plugins/SenseGlove/Source/ThirdParty/android/debug/droidplug.aar b/Plugins/SenseGlove/Source/ThirdParty/android/debug/droidplug.aar new file mode 100644 index 0000000..cd11539 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/android/debug/droidplug.aar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d02a13bc38608cc8e38a8bf92a212c37956e8c78896742ea9600f90f96c7c397 +size 35726 diff --git a/Plugins/SenseGlove/Source/ThirdParty/android/release/droidplug.aar b/Plugins/SenseGlove/Source/ThirdParty/android/release/droidplug.aar new file mode 100644 index 0000000..74f09ce --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/android/release/droidplug.aar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87af3ac54b84b580a100967b1591aebd4a7bd1c7abce14cf16e829a6cf7d291a +size 34572 diff --git a/Plugins/SenseGlove/Source/ThirdParty/android/sgconnect.jar b/Plugins/SenseGlove/Source/ThirdParty/android/sgconnect.jar new file mode 100644 index 0000000..64a112f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/android/sgconnect.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45a49eda894544eda8f533de953b530ae0881d143422c411a4855d5993d48e70 +size 64818 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/SGBLExx.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/SGBLExx.hpp new file mode 100644 index 0000000..b4e53a0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/SGBLExx.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bf3b9b2ca49c567dba5131c9d9dafeef4fa2b28bea1c8c4b2a98d1ae553fcb5 +size 79721 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/sgble.h b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/sgble.h new file mode 100644 index 0000000..dcec247 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/sgble.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc81941c5d9406a9dba309a2ab156a494bdd71de1e32ae9f7705dc8bcf29a6c7 +size 12724 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/sgble.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/sgble.hpp new file mode 100644 index 0000000..ff10431 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/BLE/sgble.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47ecfbc23db1fb29c17c26408544fe4dc514bb8783759a1c36d95a7f253aa0a2 +size 9062 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/FloatUtils.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/FloatUtils.hpp new file mode 100644 index 0000000..f79052a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/FloatUtils.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:821bc09ebac372d985100c6ec7a7350c3eedf869a2bd9c0f4e1d70bae86d90c0 +size 3735 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/HybridMutex.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/HybridMutex.hpp new file mode 100644 index 0000000..71207f6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/HybridMutex.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b7e597fbff5361a0b3f1f5e689e017890ab594ee54778b8e2078efe0302f7dc +size 1323 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/HybridSharedMutex.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/HybridSharedMutex.hpp new file mode 100644 index 0000000..81e64a1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/HybridSharedMutex.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83958f815c20885a1b389283a5e987f73d86e377481806cb19c3da96a2d7664a +size 1502 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/Intrinsics.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/Intrinsics.hpp new file mode 100644 index 0000000..27381c2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/Intrinsics.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d30649ba075750b806a6c54ff69bbd1ef162637bfb028f7838af9366c3d43835 +size 1210 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/MathDefines.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/MathDefines.hpp new file mode 100644 index 0000000..1c2e2c1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/MathDefines.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f6159bd075a6b07b3e76d1af42dcf62be8ed7fe4d953656e055deaa321f809a +size 1006 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/Platform.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/Platform.hpp new file mode 100644 index 0000000..942c5f0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Common/Platform.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c7f50319fa694014331d350bbd61031388d6491ccad929623885383b4e7b302 +size 16321 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Android.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Android.hpp new file mode 100644 index 0000000..8814da3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Android.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e77ddd30d03a0b425091135ff71a6c3266a8a775653584e74d3e6e2c2c5a7d51 +size 4206 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/BleInfo.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/BleInfo.hpp new file mode 100644 index 0000000..8b4a07d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/BleInfo.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8680a4dd20fb222bbb0180066f0dfe57f022ae16ca151037eea79e3ba95ba70c +size 2160 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/BleUtil.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/BleUtil.hpp new file mode 100644 index 0000000..3fedb73 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/BleUtil.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16fc2df4ad0854af95075253987cf975d8cdb3072354c4987dad977fbc7d62f0 +size 1184 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Connection.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Connection.hpp new file mode 100644 index 0000000..8048e3b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Connection.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2dc073e41e6003e7a5c1ee66091fe63fa92a821338c77a99e4eaca121b81ea2 +size 5738 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionData.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionData.hpp new file mode 100644 index 0000000..adbfc24 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionData.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9e178e74cb039a440fe040e4e0c33732a62553dda61d640fd1dab5ffd59c17f +size 2156 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionFactory.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionFactory.hpp new file mode 100644 index 0000000..1f83d4e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionFactory.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fff5126c51353b833f4baed3d613a2825047a5e2c5211d6fd9ba6d262b2bd84 +size 846 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionTester.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionTester.hpp new file mode 100644 index 0000000..ac8ac1b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionTester.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75fa01627dab1dfad79253aebdbfd33eb4adc6531fefd7c45cae9190c7ed3aa8 +size 2269 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionsTracker.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionsTracker.hpp new file mode 100644 index 0000000..3376f81 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ConnectionsTracker.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a40a5ecad4e49225d830bbbc6ef10e26684c4b35819c98f37ff17db891ca4aaf +size 2481 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Debugger.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Debugger.hpp new file mode 100644 index 0000000..e0c7205 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Debugger.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d35d69a6e169d6b460f3ca58bab709254af1c54e54d29de1b3b765dd72414b07 +size 1336 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/DeviceScanner.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/DeviceScanner.hpp new file mode 100644 index 0000000..730f134 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/DeviceScanner.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2631c9a1bd221a19499f0da8f6f2d61e24a8ce114e22bf316092aa34849371b +size 3905 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/EFWErrorCodes.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/EFWErrorCodes.hpp new file mode 100644 index 0000000..c525bdf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/EFWErrorCodes.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:334f52e446b90722d20ddcb9f5153ae455196813a51833944f740db7fabdb3dc +size 4261 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ExitCodes.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ExitCodes.hpp new file mode 100644 index 0000000..9f92e93 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/ExitCodes.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b7282b057d381365c45d03871489859f308d35b31f2e05047463bd15451142e +size 2557 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/FirmwareUploader.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/FirmwareUploader.hpp new file mode 100644 index 0000000..f238999 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/FirmwareUploader.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c1109afc062a65f669995fbadadd44de81f7c19cb34b0194ec3a61b408a0aec +size 2148 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/HapticResponse.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/HapticResponse.hpp new file mode 100644 index 0000000..a9e7b8d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/HapticResponse.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5332b253f97f150672fe7491b1b1d85786c7aa43a1d0a56aae8bb74c51b92f6 +size 5863 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/IdResponse.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/IdResponse.hpp new file mode 100644 index 0000000..6437413 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/IdResponse.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1217ab52d5dbb76956d6e61d6ab8f811ff49ff0610a5f35b4b397e48b5f36082 +size 2424 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/IpcCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/IpcCommand.hpp new file mode 100644 index 0000000..9345231 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/IpcCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:365f0f263fd1244c638670b83105eea3062a534dab00cb249e247c60f2d77490 +size 2057 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/NewSGDevice.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/NewSGDevice.hpp new file mode 100644 index 0000000..0b9c62b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/NewSGDevice.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d60ed3d4e2db7248216a4ceef47ffd89b2f89019651d5797407a55eb47b0815 +size 2392 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Nova2BleDevice.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Nova2BleDevice.hpp new file mode 100644 index 0000000..70a52e3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/Nova2BleDevice.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a5ece924262342687321fcb3873fefac0ef7c301b49843970cbdb4c758720dd +size 4432 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/PortInfo.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/PortInfo.hpp new file mode 100644 index 0000000..2a05a3e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/PortInfo.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c06f72a7119066997e439c7e07e19564a15b033e2e875ca1e44ad73e252f4a62 +size 3049 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGBleDevice.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGBleDevice.hpp new file mode 100644 index 0000000..f3a3113 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGBleDevice.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adf9037a13f42eb82856b13e1c83b0c90246a46a5e0f2e66ec66a5f078140be9 +size 1470 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGConnect.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGConnect.hpp new file mode 100644 index 0000000..15d043f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGConnect.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:576a26b5c9c6c6c45208dc48f6db2bcb562d80dd86cb2faeadcd6e05ccf65c8a +size 13255 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGDevice.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGDevice.hpp new file mode 100644 index 0000000..7084f0d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SGDevice.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9836d83ce01e2ac902c639d9368cad4c54e442a3b09be92a0e2bc2a77dafc4 +size 4662 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SerialConnection.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SerialConnection.hpp new file mode 100644 index 0000000..74065a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SerialConnection.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d24294be819701a811830f2aefdbd65026adca325acab807c3e8b0bf8e8082e +size 2874 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SerialPorts.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SerialPorts.hpp new file mode 100644 index 0000000..3a538ce --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/SerialPorts.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4834f22e4b8b9ee1847d670e64f550f3d11c214be25cc08e47630d572497764c +size 2482 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/StringUtils.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/StringUtils.hpp new file mode 100644 index 0000000..2846ed8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/StringUtils.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95a70a0f4e9544425ef6343fc50b1f4d8798712d150eeeb9b4d3d59c2805b566 +size 2810 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/TestingState.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/TestingState.hpp new file mode 100644 index 0000000..931a14d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/TestingState.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b82281292eda2d6f78bb09c7d2ebb626259df90f7657ca379e93fa5a4d0b476 +size 2067 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/TransmissionMode.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/TransmissionMode.hpp new file mode 100644 index 0000000..29bf0aa --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Connect/TransmissionMode.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53c1212a28f7dc232c8446da6afa857c907f1ac5cde0e2b33478802f81a56d36 +size 975 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Anatomy.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Anatomy.hpp new file mode 100644 index 0000000..56c8836 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Anatomy.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e16fd3a2c8ebef30e96fbe3249152293de30cb572d8b5889d74c2bf1d5633ea0 +size 3479 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Android.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Android.hpp new file mode 100644 index 0000000..8b76f3f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Android.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc08a6a7a0bca4ac6e89eac5b638205972c3a5c4977f2b17c3a8a6394d068f32 +size 3812 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BasicHandModel.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BasicHandModel.hpp new file mode 100644 index 0000000..dc7cfaf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BasicHandModel.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84ed1ea97ee572d2289174b80f993f1d2890c67ba0ffb1f74d8763e43b2f398f +size 7665 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BetaDevice.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BetaDevice.hpp new file mode 100644 index 0000000..80a18b2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BetaDevice.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db9abed553df3e3963a7a70c53f7fed337e32bd23fea602f70bea474412f9ff5 +size 3775 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BuzzCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BuzzCommand.hpp new file mode 100644 index 0000000..173c2cb --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/BuzzCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef89c6967aefe59a59c00e711570a800f4ec2ab58dfd089d773e777e529c25d6 +size 3043 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandDataSmoother.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandDataSmoother.hpp new file mode 100644 index 0000000..cd0a84c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandDataSmoother.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e30807511ba770103f4e5dd1079233a82d4db6a167fb348612420bc37d53f33f +size 6652 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandLayer.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandLayer.hpp new file mode 100644 index 0000000..74426b4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandLayer.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36481a85283dbcc4778432bf1cb193851a22d115ee3bf80a9d56f8bf7edb9d3a +size 5129 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandTrackingData.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandTrackingData.hpp new file mode 100644 index 0000000..55db0a8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVHandTrackingData.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d62181298f46d554e80f0f0814fa93107c08df72656f18e0371a0f8307f9db73 +size 9594 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVKinematics.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVKinematics.hpp new file mode 100644 index 0000000..6f73f85 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVKinematics.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c492d555ce922899db442c3a5412f5dc3a669ab7ba9b63c39ea8fda382cf202 +size 5628 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVProcessedHandData.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVProcessedHandData.hpp new file mode 100644 index 0000000..a34eab9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CVProcessedHandData.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4f650d2f5747d7f8b4bb15963fb016c2ef308efdde7f78bfd02c448b6238d23 +size 6299 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CalibrationDataPoint.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CalibrationDataPoint.hpp new file mode 100644 index 0000000..2a9bcd5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CalibrationDataPoint.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc1d388e26ec5a28d2661ec4b7ccf8cbfe1af9b5b90ae6c6e7b02742c69cd8fc +size 2242 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Communications.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Communications.hpp new file mode 100644 index 0000000..fd16904 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Communications.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6164a198e4144026f53e44f87450ae359a2495d86e9f0525d2d1d0a321eb728b +size 4307 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ConnectionStatus.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ConnectionStatus.hpp new file mode 100644 index 0000000..fb03fb1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ConnectionStatus.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b274e0e354ba01cf4d60242ab92e8db7796b64bd23a37c44b0c100fe27fda586 +size 3356 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CustomWaveform.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CustomWaveform.hpp new file mode 100644 index 0000000..f33bb9e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/CustomWaveform.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44ae966e463982383259de1e9e1970173623c3fe6649701448451c8db704f0e9 +size 8612 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceList.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceList.hpp new file mode 100644 index 0000000..a1972d7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceList.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:834487b8e016c91c3740b50b86b77f3eb826454cc5c90702530b8b8259c2220e +size 5543 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceModel.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceModel.hpp new file mode 100644 index 0000000..6caaba7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceModel.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb63c944e88001144681cfbef9f84f287c276c2cfe5faf98a8f0eeb856a50181 +size 4131 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceTypes.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceTypes.hpp new file mode 100644 index 0000000..384978e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/DeviceTypes.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf5e66f15069d68223b65e3ec5d2148e8d563a1eb37b073076edea08f3161339 +size 1366 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Environment.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Environment.hpp new file mode 100644 index 0000000..ffd9bcc --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Environment.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:984fa0da589d68b28218396a400de1b1b4a5a69ee129ce78a5bfced0c67559bb +size 571 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/FileIO.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/FileIO.hpp new file mode 100644 index 0000000..758ad68 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/FileIO.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af294bbabcb56dd87dc0da6d2b0f1f7fa91798852521c854b8cffe8e39c720dc +size 3724 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/FingerCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/FingerCommand.hpp new file mode 100644 index 0000000..22e3cdc --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/FingerCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0b57aff85be93a043dd5e8853e1e921ed9f4778ef4f9581ba25f8e85edc50f9 +size 2517 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Fingers.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Fingers.hpp new file mode 100644 index 0000000..248e8a4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Fingers.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b58955e0b83d1dc54ac41a5d3ae9af7a6193be3377af26775dc4f51a28a5626 +size 2652 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ForceFeedbackCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ForceFeedbackCommand.hpp new file mode 100644 index 0000000..cd42ecf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ForceFeedbackCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e26a4abbf00e500f792333fba45633719404f3aa168002a3d55fd6579a0c8a9 +size 3413 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandInterpolator.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandInterpolator.hpp new file mode 100644 index 0000000..7e14c23 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandInterpolator.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32a8ff468cd61b6e159cc921a90b9613b4667653a01aca040f7029e38f3b7d19 +size 3596 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandLayer.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandLayer.hpp new file mode 100644 index 0000000..ad4d14f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandLayer.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5fae43072b990c6be2680dfc24c5e3cb8d998e42b7a15ac21507ac011393ad0 +size 10399 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandPose.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandPose.hpp new file mode 100644 index 0000000..f961750 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandPose.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56f7d88d67eae83beba8cb301e158322a77caeb16193e42234b0e9e641720976 +size 7977 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandProfile.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandProfile.hpp new file mode 100644 index 0000000..a53e84e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HandProfile.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0dfc30941945e28f7c12805847de84288656138fcbd52cbb8c31a2e41cd62480 +size 5351 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticChannelInfo.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticChannelInfo.hpp new file mode 100644 index 0000000..d1f29e1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticChannelInfo.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10bad68debb793dbb76101f092c8da0e5475ee33343708251e92973e187466eb +size 5758 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGlove.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGlove.hpp new file mode 100644 index 0000000..7b44349 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGlove.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64284abd0f456aa98c72509ce5f4af493873c8305cfffe9d00a25104da8a4acb +size 14080 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCalibrationCheck.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCalibrationCheck.hpp new file mode 100644 index 0000000..0a656db --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCalibrationCheck.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37dfefde9e2cedb031c872647908e970fdf8e1cef799514ee255399ea9523293 +size 6689 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCalibrationSequence.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCalibrationSequence.hpp new file mode 100644 index 0000000..1c2b8ed --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCalibrationSequence.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e30c06d9f254bf3afef690d49861fe0781a177bc220f0ad1106028afae104834 +size 7955 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCommandBuffer.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCommandBuffer.hpp new file mode 100644 index 0000000..3250dbd --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveCommandBuffer.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3df20e2d4eae03ba95d65a7d189cd25b50b1f9eec43a8a07998977cd46c85352 +size 6821 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveHandProfiles.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveHandProfiles.hpp new file mode 100644 index 0000000..901d3a1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveHandProfiles.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c605f1f7a4b64bdacca1a27b8beb4f31d0545b3fba615458307f5822f4f79fa +size 4409 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveQuickCalibration.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveQuickCalibration.hpp new file mode 100644 index 0000000..0fdc5ca --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/HapticGloveQuickCalibration.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89c6cae2f4e8f568b0f013177422c53a0548a8114cf7ac88f4bf40df829d8c1e +size 5542 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/InterpolationSet.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/InterpolationSet.hpp new file mode 100644 index 0000000..c5a8a34 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/InterpolationSet.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40593124d4a4c46814cbaf29f6814fa83a30abb7c059218ad2427930a7d4f622 +size 3735 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/JointKinematics.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/JointKinematics.hpp new file mode 100644 index 0000000..8df90d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/JointKinematics.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97324adb2190e4229c2cc811351e8fc6ccae8f7b4309c493d96caf1b6553b431 +size 1690 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Library.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Library.hpp new file mode 100644 index 0000000..a52de91 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Library.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d49e186b3f2f868a23e2b4ee04a991af5cbc12dc9bc8a0d19b9b7e32042a775 +size 1616 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NormalizationState.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NormalizationState.hpp new file mode 100644 index 0000000..4cc8972 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NormalizationState.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c539558d796d2cee5f3e31eca934a8bf3409c345f1f12b83bb3305dcb1b3aa7d +size 1282 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Nova2Glove.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Nova2Glove.hpp new file mode 100644 index 0000000..1b0044e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Nova2Glove.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62de73cb8e7df530e84270834e3dcf1562b74a52a0c3de0eb8904322e47e8bb1 +size 22010 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Nova2GloveSensorData.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Nova2GloveSensorData.hpp new file mode 100644 index 0000000..0a42154 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Nova2GloveSensorData.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0bcfff3d795da59a154e6bc63dd3566471487244391b76dd790926b97e0da74 +size 5622 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGlove.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGlove.hpp new file mode 100644 index 0000000..9c1606c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGlove.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71e8b5a12ad05eba644748b064ad6d7a1fc5d065204e2510de96e1fb0c472583 +size 23410 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveCalibration.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveCalibration.hpp new file mode 100644 index 0000000..27d12ef --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveCalibration.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02f5ad696239da2d595c618363c3fa7d38b5a8095609f2b3f2bb265c27a86708 +size 1951 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHandProfile.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHandProfile.hpp new file mode 100644 index 0000000..a0f917b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHandProfile.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bff647f9bca73cf9b8672ebdbb7e7c6cd49e73edda7707a8e0bfeadc3a14382 +size 3240 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHapticEncoder.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHapticEncoder.hpp new file mode 100644 index 0000000..7f9bc20 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHapticEncoder.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a82f4427f30d9887884062979cfa725fd969b8df576d93bd27e584575089f9e +size 4987 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHapticStream.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHapticStream.hpp new file mode 100644 index 0000000..f4b41f4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveHapticStream.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a3dc424b6f06f591e1d0428a84a03ce4e8a93adceda1e15a006772ea8da911c +size 6146 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveInfo.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveInfo.hpp new file mode 100644 index 0000000..eeda701 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveInfo.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd88aa45a5d8ee3b3e614c9858d1ea3bac34fbc7f106a6be6cc3b8d9d18e7c50 +size 5166 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveSensorData.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveSensorData.hpp new file mode 100644 index 0000000..69316af --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveSensorData.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d7ad7b27b6ebec8d102b083ae2fb22d400768d367dbc956a1b73c596c80df0d +size 6053 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveVars.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveVars.hpp new file mode 100644 index 0000000..a8a8f37 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/NovaGloveVars.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:254fa1994eeaca1cd4947fb7610a652fdba2865490920e09071af3de1a8e419b +size 1253 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/OnDiskCalibration.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/OnDiskCalibration.hpp new file mode 100644 index 0000000..a3fc64d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/OnDiskCalibration.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0729b0f7865ae18cf0f7b88d15f0abfea293efa4573c5b2e5e86107b5df9df7a +size 3732 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Quat.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Quat.hpp new file mode 100644 index 0000000..3463ce8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Quat.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3a941208fa01f0f9b1c94185371b436b2e428c3666b944ec3fa5434902a2062 +size 6166 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SGDevice.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SGDevice.hpp new file mode 100644 index 0000000..c4ff04b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SGDevice.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccd8b0a2e326e4d9fa6ff7f4de84e42c41b0c32fc1dfe34808b93f47971f565e +size 8859 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseCom.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseCom.hpp new file mode 100644 index 0000000..2abc2c8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseCom.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fb42a8eea944b6b74cfd0a4373a013f6347e2d724f948fb8bfb6d163d71ca87 +size 1653 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGlove.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGlove.hpp new file mode 100644 index 0000000..2d9e1b0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGlove.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01f68847a6951acc0597cefb2782f086c2875719b93b4366380c1c385c3fd194 +size 21784 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveHandProfile.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveHandProfile.hpp new file mode 100644 index 0000000..de93536 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveHandProfile.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2f240a4c86d5422265d834b7adaa8a60034d14774807261487b3200dd70d7c4 +size 4409 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveHapticStream.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveHapticStream.hpp new file mode 100644 index 0000000..258bae1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveHapticStream.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50cf374171fe163ee3b67f362987ca09226962b49cf885913d2c3b8b731f6b4c +size 4597 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveInfo.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveInfo.hpp new file mode 100644 index 0000000..dfb9cce --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveInfo.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03fb897ee07ebeb4d2996a62bb0cb70608ca2b3b34c96f6e8a9c1fb0fece33b8 +size 5990 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGlovePose.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGlovePose.hpp new file mode 100644 index 0000000..701f313 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGlovePose.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64b71e34056c601a9df3ce36dd060ab32e8a0151bfe584cf8e3d50111693ecf4 +size 4553 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveSensorData.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveSensorData.hpp new file mode 100644 index 0000000..7c41bf7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveSensorData.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7553b868acb47d6b939608b11ea5cc7add98450aeb9dc654b88ff51002df1604 +size 3893 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveSensorNormalizer.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveSensorNormalizer.hpp new file mode 100644 index 0000000..7e6c10c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveSensorNormalizer.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8ab300d320d4c34c6df7b4b3bca6feca09bd88cbcb02ece086ef52a42333a7a +size 3048 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveThumperCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveThumperCommand.hpp new file mode 100644 index 0000000..6f9684e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveThumperCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1cc2a9eec6135e4098650d09506b6c92fcc591be4a2e5479d202887857c4a6e +size 2063 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveVars.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveVars.hpp new file mode 100644 index 0000000..d140df2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SenseGloveVars.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e43b658bb85bb640348d5d328522cd3f29d24b8c0b631a46aad2cf51bb9f4d38 +size 5667 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SensorNormalization.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SensorNormalization.hpp new file mode 100644 index 0000000..75c0e70 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SensorNormalization.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:594acc81843080ee3f1940cce769aa3b9193e4fbff07b262ac986513d8e7a6ea +size 4861 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SensorRange.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SensorRange.hpp new file mode 100644 index 0000000..4bda939 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/SensorRange.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e463797518ef0917b2a8e8d040c9a1a1923202e61fbbc55a86776b8de0f4cbf +size 4580 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Serializer.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Serializer.hpp new file mode 100644 index 0000000..a9e6118 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Serializer.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e159ccd2562301d1b625b381dc6b64c29872b999512651a01c334a228ef6790b +size 4927 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/StringUtils.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/StringUtils.hpp new file mode 100644 index 0000000..edb2933 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/StringUtils.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4623b57602ee597ab11c0fedb663dc2a3a9503fb2484e3242d10df6561d8e438 +size 2776 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ThresholdCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ThresholdCommand.hpp new file mode 100644 index 0000000..3383df7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ThresholdCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c8ff7f879ac92ca17365ba34e232dac05d5c48638144ec777b761de4ff045dd +size 4305 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ThumperCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ThumperCommand.hpp new file mode 100644 index 0000000..e0ce4e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/ThumperCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17023dae29a2703c2049fee49cc568f116c0e719c21da95820459bf2de0eab43 +size 2625 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/TimedBuzzCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/TimedBuzzCommand.hpp new file mode 100644 index 0000000..5d96fc6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/TimedBuzzCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c3a05f2c1ad5bf323bf57564754f79d0984edc8e4a1de43823048a2b4378c1c +size 4540 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/TimedThumpCommand.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/TimedThumpCommand.hpp new file mode 100644 index 0000000..1ab3640 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/TimedThumpCommand.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa7939bb54b1f08729aa1c52cdd770701e5cbadf4c9d1397afe3747f9d35a98d +size 3111 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Tracking.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Tracking.hpp new file mode 100644 index 0000000..2e64e3c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Tracking.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a85656bf5d91fe3e9f0bddb28a388a95e5e118ecec75096334b11e6b769dd822 +size 13045 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Values.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Values.hpp new file mode 100644 index 0000000..bd1e5a5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Values.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f6cf532e6c5baa60a8f71b86f360984c681c97bae2dc1724230a807ed0c82cc +size 6038 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Vect3D.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Vect3D.hpp new file mode 100644 index 0000000..bd83a5a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Core/Vect3D.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abc03d77ddb3275f6ef01e34b3f0b06f87bf78faa9cba8b051535433fbc71b86 +size 4163 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLog.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLog.hpp new file mode 100644 index 0000000..c9cb514 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLog.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cf385ce7484cb65da602f27c01ba28cc6213f715cfe899dc18346cd554d561d +size 10661 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLogExportedFunctions.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLogExportedFunctions.hpp new file mode 100644 index 0000000..e771f8d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLogExportedFunctions.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52fb4c4b57746883831517feb9fff30505908c44202d509f75e677b5cff3088f +size 1393 diff --git a/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLogFfiTypes.hpp b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLogFfiTypes.hpp new file mode 100644 index 0000000..60b79fe --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/include/SenseGlove/Log/SGLogFfiTypes.hpp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:719a0a3fa04b565c1b1ca0b62341108925a62e0dc271b832989ce624d2764c59 +size 404 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libfmtd.a new file mode 100644 index 0000000..227871b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85fbe82ea2fc177b1feb58604687b4eaabf99af59208a83fe3698d7869ccff03 +size 1352978 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/liblogurud.a new file mode 100644 index 0000000..64144f1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90c66fde13c20d93cc5f236d1b2e3dd2be47be27ec6af744da9a898c17d9d468 +size 821706 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libserial.a new file mode 100644 index 0000000..50da1dc --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0adc77576403a3b50a41e677a2b71576d122bd651c5bc4df76cf5a0c73fd6fee +size 927538 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgble.a new file mode 100644 index 0000000..d518f1e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d7f2d991e9587b266b7029f95ab79a7067772dcecc749cfabcb7360d0740559 +size 157089764 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcommon.a new file mode 100644 index 0000000..1753173 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62c9e44ee312dc0eb5a9695576eddfc00291a8be4071ed9f68ff2c3b612c138a +size 126986 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgconnect.a new file mode 100644 index 0000000..453597d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:012bf19fc797260bc32ee0106f2d91b8785c97aadf124f079a13cbe38fa6eb5a +size 9058382 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgconnectshm.a new file mode 100644 index 0000000..f451009 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8556494f6ce3e607d8143ea13bdcd4dde6320e9fe943719d498f2db49c706bbf +size 1891868 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcore.a new file mode 100644 index 0000000..d027e4c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ad6b6400bfc6b4c594fbad37b2e530191434a449a291c9be4c134bff931ba01 +size 5595440 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcoreshm.a new file mode 100644 index 0000000..59b0268 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35ceb505926d2b1f661ca04a2241b86e3841403620991a4ef5c48e91b5771f4b +size 1680808 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsglog.a new file mode 100644 index 0000000..f746cc0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d3d9cc4ddd7302acf89028cb948b6963121e5638c81266a46df1a9b439b5b0e +size 572510 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgserial.a new file mode 100644 index 0000000..b93ddf1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea9c1684435c71bfe7db94cbe2bb13d5c469208d4e91611da3428b76316fdb34 +size 1819778 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libfmt.a new file mode 100644 index 0000000..ceded10 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4cb424b0b0e1c886e9d3cbea7fdad3747130db7d33e81d7649cdd28d3c25b0e +size 254014 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libloguru.a new file mode 100644 index 0000000..eb419b4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24bd98f97075f7107bd446b9cbcba025b44e7651416a4ce3d379773f8098e883 +size 110018 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libserial.a new file mode 100644 index 0000000..6098269 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b2c29f6ccc1080acd8078fa5cabfad0dc78f8dde3970d3ee52ec06f753549a2 +size 169904 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgble.a new file mode 100644 index 0000000..9e83d7c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18fcaf8bb6c88f5a6d73771442f0c3c913575ebc34297a3e5377dabd526ad9e6 +size 35531910 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcommon.a new file mode 100644 index 0000000..8dcde28 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:212155795d1ab511100757996588ebc7ef991988eb5197dd3d9051cef027bb32 +size 16700 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgconnect.a new file mode 100644 index 0000000..ff4bf19 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c26d2219b6c03e60b61ac79c5f8c2dfe2eb449e54cc7b847aa018c9bf9cc0db1 +size 1103048 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgconnectshm.a new file mode 100644 index 0000000..72e0200 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2b0334b6e1103d3100b2d5c5ff04c2614109d1c551823841adcc3ba10ae43ce +size 269564 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcore.a new file mode 100644 index 0000000..24627a0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e01d12893ca38b0ed2c256038de59612e6aa81b68af272e91398570270b3fa0 +size 1405414 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcoreshm.a new file mode 100644 index 0000000..3780b48 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80500cf2e96c6f4d0e218aa32fe8f3a73cdf7e104bb77286004845cb02901501 +size 239956 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsglog.a new file mode 100644 index 0000000..225ec06 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5e0a71ad6828fedf5bf738b3dfe9c7a0cff072560a9ea02345381d5eaa15500 +size 54222 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgserial.a new file mode 100644 index 0000000..2ba8119 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/aarch64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14415a5665d1c3156eb9d76bf3501a1015e6d0a4823243ef834cf644ac1d9869 +size 256172 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libfmtd.a new file mode 100644 index 0000000..38c6b8b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b769a8d6675f80760beca856b174fb47ce4dcf36cfdb91a94d40a13f9f73c16f +size 1361558 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/liblogurud.a new file mode 100644 index 0000000..47fed18 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:114e264e69b7d1ba7d1f4fe78cc24d195b3ead9b07049319271bd2c42d0cffff +size 822178 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libserial.a new file mode 100644 index 0000000..490c1f5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d39810f3b540df67b06b1919d56062d27b005b3db69af3a5fd33b55d5c3bd1e8 +size 927270 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgble.a new file mode 100644 index 0000000..59fecfd --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:090a55eead12ca13c246dd089d35df229d98f6eb515c9c8854d65f922cc9f0ce +size 157830132 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcommon.a new file mode 100644 index 0000000..0270382 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9604560fde4edea5cf6276f1d236c08ebfdf17570a6ebf0e2f1eac96603403ff +size 126746 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgconnect.a new file mode 100644 index 0000000..d26b1d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08e273a7757f1e2f5a1dd259b63b5fb9f202811165dbb6367ed7dcf8a5636f1f +size 9047518 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgconnectshm.a new file mode 100644 index 0000000..9b8a12a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fed10363d86d68ed8a7f0b6166cf19ea7dbcef7ab4792b75579a58433c6fec41 +size 1892900 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcore.a new file mode 100644 index 0000000..eee13eb --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e54063e64455e0d83b7bfbedff915b2cddcead59c1ea1869adc871d87166918d +size 5593696 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcoreshm.a new file mode 100644 index 0000000..204e875 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:093069c46a455175ce63a77bf7e6a08d8ee7c88224bade17197a143724b6c273 +size 1681444 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsglog.a new file mode 100644 index 0000000..c67fc17 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1827031d0805782017b9a061ccaec1307be33bf046e228919e396fdf1c8ff82 +size 573174 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgserial.a new file mode 100644 index 0000000..806a7b2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de1f32483f8bf8a8e62dd567b6e335e546a71be5542ac6ef269d2f9c0b887e43 +size 1821502 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libfmt.a new file mode 100644 index 0000000..0608ae3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e70dc14ffca422962d38e9f428b2b9ffaff899bcd684129110266c59b657570 +size 254618 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libloguru.a new file mode 100644 index 0000000..68ea464 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:180b516b650ebabd580eafff46e386623623842f89f1cc2410b10a81daf051d4 +size 111338 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libserial.a new file mode 100644 index 0000000..0d91c1b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32b3fc9cf3a7148165adc8c698b545122741e2326e8453a7ab2afa0057e8fee8 +size 171384 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgble.a new file mode 100644 index 0000000..2623661 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3823eb00a2cb257eb8309a174e1a040f53e55f1fc05da4c3feb9583c2f094982 +size 34308910 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcommon.a new file mode 100644 index 0000000..dfcff3a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96e0f9cc10d5003718727af86c8665408825badc59570cb80b1a8d85bff8e150 +size 16888 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgconnect.a new file mode 100644 index 0000000..1b6522e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4df80c3c13511e67fd03a1ddfc78fde33981b336e14fa95d61bb12455318e3c9 +size 1098580 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgconnectshm.a new file mode 100644 index 0000000..cb1e1c1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:061dcd0dacefa51462eed4208fb9c4bfa00a680465e0a14ce8ae7372be430a5a +size 271872 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcore.a new file mode 100644 index 0000000..bad3074 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ee2bda1e4007d00e5a943f7cb45a0e39346764edd421c87f8d218ed217d9872 +size 1404248 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcoreshm.a new file mode 100644 index 0000000..c2d5a17 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12635cdeb6fa839e45882fb831c91a090527e0646d55faef51c6eeb4da1c132a +size 242056 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsglog.a new file mode 100644 index 0000000..2313af2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c13515ebaaeb1b162f288e35f6a42f323f4f0ff34b2c182da27d4d3700952945 +size 54870 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgserial.a new file mode 100644 index 0000000..cb506be --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r25b/x86-64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f243f94147ac17bd3fca08decee2386cae68bf8515d6a15de3de95c8195112ae +size 257844 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libfmtd.a new file mode 100644 index 0000000..f6a5330 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87891e0efed25882167218bea5ce5a42609f6031bb801c4524457cb0cab89fb8 +size 1342958 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/liblogurud.a new file mode 100644 index 0000000..988bdbe --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c8ec2dba181501a99d6f27a90f0035ba62127248607d29ca22b3ea6c50b4d27 +size 899984 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libserial.a new file mode 100644 index 0000000..5be38e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d55d7c4a156d2bbda5f2a42c0c665d6bc90094c693d80b20eed0145dd691bdd4 +size 1064098 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgble.a new file mode 100644 index 0000000..d518f1e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d7f2d991e9587b266b7029f95ab79a7067772dcecc749cfabcb7360d0740559 +size 157089764 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcommon.a new file mode 100644 index 0000000..50c32fb --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fc802d4dcfdd501c42e4cfa116a0171c8ceac79bba3d5c844d04d858aa7d5c4 +size 137858 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgconnect.a new file mode 100644 index 0000000..d5dfc59 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4aa4700bb31da54c4996c3a690d2968e6638c9866ebd43d509c8ab115d2289ca +size 8644136 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgconnectshm.a new file mode 100644 index 0000000..3b1d6a6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7293def630db6c40b64b5cb6a2f74c1bdb1ea5ec33996f78f20758b8fffa2f07 +size 1940974 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcore.a new file mode 100644 index 0000000..d89d074 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a5ad76dabef01fc056538ebcfff945b5ecb0120c9b3cedc6a2a90d3046d1c7d +size 6127264 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcoreshm.a new file mode 100644 index 0000000..0755580 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d737ecbd6810a03a9f00ef1c2cf11e420232aab36e3c655460da859e50689e46 +size 1689218 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsglog.a new file mode 100644 index 0000000..c0295f5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35cdfb56e3063c2f965684cc4565b34b53ce98a9846f44c5c248c3497069956e +size 611088 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgserial.a new file mode 100644 index 0000000..a0bd1b8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04547e510740109d300bdd97eec94f6baf688a8ad636156607dff19cc146025d +size 1822978 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libfmt.a new file mode 100644 index 0000000..d7c8a08 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:481cf391589726eba4020677b83f5bf224c3203353b2c9f1a3a023a6e6e3f58c +size 258136 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libloguru.a new file mode 100644 index 0000000..85513ca --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a375397f6bb5a0811e4dce54dbb8254f49e72b3c6807c8b128cb93ad58704acc +size 113046 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libserial.a new file mode 100644 index 0000000..55b21d4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bf2e55ab1451fcb80a5db6b8d5fad97bfed843e8460313c965da36e6b4c9149 +size 139358 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgble.a new file mode 100644 index 0000000..9e83d7c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18fcaf8bb6c88f5a6d73771442f0c3c913575ebc34297a3e5377dabd526ad9e6 +size 35531910 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcommon.a new file mode 100644 index 0000000..3cdf4ad --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:309e23b1fc8830be8424fe48a2ee81efde774fd42e3fd2ea2b2415755e851be7 +size 16092 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgconnect.a new file mode 100644 index 0000000..69f5f57 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e78372968defb57ae9ffdb6206f2af8620b9b0b7405a671c9ca5dd2335a2062 +size 998850 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgconnectshm.a new file mode 100644 index 0000000..c27782f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f7ad94bc8de3aa6c0b7e7449d72e5cbbd163c1dd703efb322e0884b16adf7a0 +size 254564 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcore.a new file mode 100644 index 0000000..cec99d3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac2ad7372ed77551b4651b1addf74b0584d31f3dec669320ace98fee41333863 +size 1140258 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcoreshm.a new file mode 100644 index 0000000..6d33451 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a1d9eba2c2e3b9a103e0d567a17ac5eba4eb97d5bdd9be0b29e2ce2ecffbed6 +size 227454 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsglog.a new file mode 100644 index 0000000..8443419 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15e64e7834d804dffc27618f50f11adab72f6a4f2f5d777ee997750e3f5b19a0 +size 35930 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgserial.a new file mode 100644 index 0000000..e7421d5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/aarch64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b6da4319be05c9f8b76ee2ce172484791dc49a4dc7b81a74109411c6b9badbf +size 234032 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libfmtd.a new file mode 100644 index 0000000..1f953d0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94232bf159e9f018b784bd1feed67cdb1da9cfa35f207666fa437c6d8ef4d1d8 +size 1347830 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/liblogurud.a new file mode 100644 index 0000000..ff0042c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fd0f9e74171be9da248e86a5b48ecc4fb0485a588c9df715a00b42e9670d9bf +size 903448 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libserial.a new file mode 100644 index 0000000..103c4cc --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12275cc882859db43211171f478b6b19bb125d7579f853a710ceda5672777094 +size 1068298 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgble.a new file mode 100644 index 0000000..59fecfd --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:090a55eead12ca13c246dd089d35df229d98f6eb515c9c8854d65f922cc9f0ce +size 157830132 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcommon.a new file mode 100644 index 0000000..a2331e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b0d590b35f8cf44f5e8b7839b6c2af618107cb820ae67229e8549750185a98d +size 138170 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgconnect.a new file mode 100644 index 0000000..e991c67 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac0e863e69f460c4de83fb805acaa8b7fddfea725a48cc4c2b61d9c61da64cb3 +size 8648712 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgconnectshm.a new file mode 100644 index 0000000..606b71d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7b77e6c909768fe11956a2685abdf0f1e5bac7bcfa22d7e2b5389ba2b7f3dae +size 1943186 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcore.a new file mode 100644 index 0000000..4a6b12e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab64d357890386e2df66c88bac628230b6a633f1b6fa0c4c2502153ed7153bf1 +size 6147616 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcoreshm.a new file mode 100644 index 0000000..a917a81 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe966755fcafc60ce5caae6625c2230e93bf6f30eb6f97938c71a278bebb5efd +size 1690510 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsglog.a new file mode 100644 index 0000000..5750d7a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f56ab89350da5d8dcb7a7acd0b1f3d1d2ea057990740bae1e577ec57823b558d +size 612472 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgserial.a new file mode 100644 index 0000000..d46e5c8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26e1abf4e14efac5221b78af23e172c253d9af85eb0026705660c6a387c802e1 +size 1827118 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libfmt.a new file mode 100644 index 0000000..5c506a0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80e838b99abaafc56aff3a175f80e9ed44569631888fd3823d65c2ce8ceb9b84 +size 258448 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libloguru.a new file mode 100644 index 0000000..08d8c4a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:944a3243e023d030e5af63176d9df3ddeece23c92feed14b8ba6e86594270958 +size 113986 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libserial.a new file mode 100644 index 0000000..7a5efbd --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f075e54757e0c2bbca297b033fc681e7d3986d6bade3f22a3ccff0176a1376d +size 140622 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgble.a new file mode 100644 index 0000000..2623661 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3823eb00a2cb257eb8309a174e1a040f53e55f1fc05da4c3feb9583c2f094982 +size 34308910 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcommon.a new file mode 100644 index 0000000..f90dfec --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bf00a9599e54f5244f0a7228b80469bdb713799776a3609a67fe308baf8669b +size 16312 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgconnect.a new file mode 100644 index 0000000..0c334e6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8375b74b087236d20d16cae10dc1345f3867736db516c7475c9463af5dae04e8 +size 990930 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgconnectshm.a new file mode 100644 index 0000000..a1eb4c1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73ad2cb96a116ebae69ac9d110ec378c1655f2b57258ef0f17f8b95c4acce711 +size 256560 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcore.a new file mode 100644 index 0000000..1b45b79 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a018361526bac456ce7eb99b0fcb62a3d47cd0f481777fcabb495bbc8e220053 +size 1145686 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcoreshm.a new file mode 100644 index 0000000..fb3427c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83c37bb04dc35faeba549d670e79d76dce806de8944e8b59ec70116ddad822a5 +size 229386 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsglog.a new file mode 100644 index 0000000..963f87d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cbf27d4ceb859cf999cf45a1028cd185fbbb74d985ed5cb786d67a1125292dd +size 36358 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgserial.a new file mode 100644 index 0000000..6e86857 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/android/r27c/x86-64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86f49ef2933e6ededb7afb5777eea9bb35f367aaf17d7e7cfd70ec42bb85ece4 +size 235372 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/aarch64/debug/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/aarch64/debug/libsgble.a new file mode 100644 index 0000000..c12b1c8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/aarch64/debug/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:046b53b1863920b46d89f371f7b9cdd9bb3c66cac7714d0dc4fa9c37311b29ad +size 183083540 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/aarch64/release/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/aarch64/release/libsgble.a new file mode 100644 index 0000000..1415b93 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/aarch64/release/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:baca2b944e6348303f6cd0e7ac1e424f6a9c66e9e2fcf8fe5f922e115941d665 +size 39178806 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/x86-64/debug/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/x86-64/debug/libsgble.a new file mode 100644 index 0000000..2a940bf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/x86-64/debug/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80c7fdc1c4e2ca627fec60cdc38af9b7bb6f23236bbe6caa9698352b1757c8b3 +size 183440694 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/x86-64/release/libsgble.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/x86-64/release/libsgble.a new file mode 100644 index 0000000..6c3acc2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/rustc/x86-64/release/libsgble.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f0cdf8274e08b6f6b4d8329272c051d1c20f7a9ac4f14fdc71bdae74d611527 +size 37613290 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libfmtd.a new file mode 100644 index 0000000..828f1fb --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12255b7d01fcbc98b358366323829525e24fc643f730f4693631a99b95f71163 +size 1463566 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/liblogurud.a new file mode 100644 index 0000000..2401db4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e944024b5a7f818441dee207497e1a6f1ed72dc58b5cb26188cfdd76da2c380c +size 2909716 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libserial.a new file mode 100644 index 0000000..06629b1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ff4b67df3cf42146fcfeab7d9082a7da190ed04c96124c6fd78af05b2166b94 +size 1127500 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcommon.a new file mode 100644 index 0000000..28b6abb --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:869032948203a9b150d1c55a2f094186ae67af85bf21784becc34bb1c0c5ed72 +size 140558 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgconnect.a new file mode 100644 index 0000000..59a57e4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2a9a9273248febfc234289b9e48d5b11c95624c82844a8a805d3b298c84724c +size 9254318 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgconnectshm.a new file mode 100644 index 0000000..7aa5e55 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e620945d747fe0cc541fb9255a5d6511b01c99a16eb906b3877f11bff58eb6ae +size 2145070 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcore.a new file mode 100644 index 0000000..86c9de2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48cfeb1d20f19778189c5e6da9314e3720713673ab25e707f35dc2a72fa62bfd +size 6602212 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcoreshm.a new file mode 100644 index 0000000..27b859f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5882a0f8d6a604277e83e186ad8b8a78c14a74db00deb5b5ab3a52df7c63b8b3 +size 1835560 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsglog.a new file mode 100644 index 0000000..54a2ece --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5de128b494a6dfceb1a31891a3b16c0214fd8977fb21abfd55daebca786a47aa +size 540742 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgserial.a new file mode 100644 index 0000000..9404c13 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76e72fbf3fefb3e3a9e888582d37e0153cfe32ecb2e084118251ce417a1d4b35 +size 2208626 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libfmt.a new file mode 100644 index 0000000..7ef6a9c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f5bfd9b63a0bae0dcd55cd63e869ecbce31d2bc633934236e898a135466e2a9 +size 238466 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libloguru.a new file mode 100644 index 0000000..11ca543 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ed69a57c391432fec243634154515cab51b3fb2d65991ce35269f0ca98478c6 +size 285298 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libserial.a new file mode 100644 index 0000000..0b888ac --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:596a081f92925c80403be5fcf115b9544ea93b9c1f5fac5949c4cab5cdde05eb +size 212498 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcommon.a new file mode 100644 index 0000000..db4b125 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b552c33b2c5dbc0acb82fcc02b2fea2e1c66b2cc61c0782cfbc71759a8bdc43e +size 14516 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgconnect.a new file mode 100644 index 0000000..54c20cf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34fbb8211cd6990dfd7b669580664393a7c5f97f99e89a92213a97b2e3f941a1 +size 936932 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgconnectshm.a new file mode 100644 index 0000000..16566d8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d33d14d7c0a96344f2c13a4d23681422eb294b7e7971ac8c84c288885de0589 +size 232154 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcore.a new file mode 100644 index 0000000..5d68f8b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02e1202e5816d3061ec766940766928065823e8b9f97a2942931434883eb9660 +size 1174568 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcoreshm.a new file mode 100644 index 0000000..72d1e91 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dffde2be9c09d5a88ad973fb291df0d49fc79df7743950b2e3e53b2a0db33cca +size 189500 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsglog.a new file mode 100644 index 0000000..6e9441e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8bd3f26292da7e6b796b9a4db6b879cb09cc64d7951e8ac2c18716c4c45d83c +size 46578 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgserial.a new file mode 100644 index 0000000..89547d6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/aarch64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88f992076682c46c517487ee27ad45fa5492b5559746cf2cdf39828febe6544a +size 264878 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libfmtd.a new file mode 100644 index 0000000..4cb012c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:809e8e80f48876ee984fdb2dec93157253e4c9e46337db63c35b35c1561f51b4 +size 1431590 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/liblogurud.a new file mode 100644 index 0000000..fbaf198 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f485f156c17f49b4c8f6317f151829facb39bad229a83ebf055ee6172398f4 +size 2834616 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libserial.a new file mode 100644 index 0000000..65319dc --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57c167c200c9c5af15ae1478f478b4b59b461ea18bf59ebf80cfe435ccc18a19 +size 1097364 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcommon.a new file mode 100644 index 0000000..3cc9bf5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a46dffc7cfd5bf3b7fb8c9b71317981fa4ecd239f72236fba2159d2ebe76cc95 +size 135126 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgconnect.a new file mode 100644 index 0000000..161c0c6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47f2ce2f538fde71fba614eaca094f7fd1ad1407ec6e3009fb3e05a43b9e1b8a +size 9048030 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgconnectshm.a new file mode 100644 index 0000000..65ccce8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:540957c224fbc2bd07f17939e6f5126b3a6f206c2e172ef4f8d7b4fdd87627af +size 2100654 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcore.a new file mode 100644 index 0000000..45f1710 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3cad0301c813bf60ae922d5331a28eb9f36a169c3ee9fdec14da7df4b501491 +size 6439588 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcoreshm.a new file mode 100644 index 0000000..ae31bfa --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7720e06d0988312a4eb258bfcefb2d900c9d2aa2385833680aca35a68cc60ae +size 1800304 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsglog.a new file mode 100644 index 0000000..706d889 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7c9d33495a544776557959249efdd051095760d5ca763f2f828286721890340 +size 528446 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgserial.a new file mode 100644 index 0000000..f7b1ff7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9759f64d2b1de486299c7bb796031256959eb9fa7a634e32fc52c24f55d1014a +size 2140924 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libfmt.a new file mode 100644 index 0000000..0b0c784 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbc7ca56f97771b598acf28e80c00c3d68bef1ad1f940bd378c784814db499a4 +size 236842 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libloguru.a new file mode 100644 index 0000000..0da1448 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:820630c92ec1b30cbf912c3b0d4f703698b5a14df712687c7f60d69a30f3fd6c +size 293094 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libserial.a new file mode 100644 index 0000000..f9e1474 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d0eef3b55b7ebc727aea5f8d08efe3b45ba5edc40f7865ccec466061fc13e1a +size 202674 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcommon.a new file mode 100644 index 0000000..7af2f6c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91db63ece9509bcdfc9d9655531aaeeab5f31f19ffebfb8e3438fa77a0710081 +size 12388 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgconnect.a new file mode 100644 index 0000000..f8611d7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c59d2c85404c01b70833b9f7865ff41dbd85254637d1cfcf8356b55dd955da3 +size 941632 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgconnectshm.a new file mode 100644 index 0000000..d71004c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb0fb52cd76d67435b1071b70032c378039638feb63668b0032ae4a0bd40c13e +size 224450 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcore.a new file mode 100644 index 0000000..3bbdea6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3674a6a1c74d70f4160db891a49b37f67dea4d54b6b9e07df82a6cec2f822e9d +size 1226884 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcoreshm.a new file mode 100644 index 0000000..adc8084 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:677fb5ac83a713d3084135031a435305852fe18585d8b08706ffc4a4e25ed73a +size 184604 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsglog.a new file mode 100644 index 0000000..cc072a9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa6e17d2fa331f6d46a7702680cbe38e7df7d358871457cf277c09a2ca4561d8 +size 44394 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgserial.a new file mode 100644 index 0000000..29e5d3c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v22/x86-64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d47f7cde024ce3c31ecd1341b1f355a64a69012bb36ef5edf3cc66b699a8065 +size 245574 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libfmtd.a new file mode 100644 index 0000000..aa899d3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f9931c581d26b105c78bda9d1bdc9ee0eb61f91829f28b558254bab41cfe438 +size 1299998 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/liblogurud.a new file mode 100644 index 0000000..a5667fe --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1c88c846cfde007b1f4a6a710f1b8c59818c7134164568c52bef12f1c024deb +size 2950734 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libserial.a new file mode 100644 index 0000000..38912d6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd2753192d41b7cd34d513e0ba6a9cbf279bb77469cf22d3e7ecddf250b9d13b +size 542356 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcommon.a new file mode 100644 index 0000000..942d507 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2f8d35b073b55d185d964a0d5bcd146a6f35ab19e960273b97a62cd91edc7bd +size 168274 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgconnect.a new file mode 100644 index 0000000..9f75f81 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f7171452df607956ce76db3e4517b960dff42db057f25934335f02e1cc5520c +size 6270868 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgconnectshm.a new file mode 100644 index 0000000..f25f470 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d71c6898ba5d23205531e53841ea620460377af0b45f0120e9a3567516730236 +size 1838234 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcore.a new file mode 100644 index 0000000..32d3568 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b424efeb6ebaf6ccb769388aa5d5b79f7bf374d56dcc637734a64ed82470b85 +size 5357198 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcoreshm.a new file mode 100644 index 0000000..f1a88e6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdcf1e111e797c777b5d08eb71076f4becc011432a2a4d57470f42448fe2db83 +size 1658592 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsglog.a new file mode 100644 index 0000000..d6b9f38 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb43b9e5f4ef212e736229834d83dc56b8c0473d0689da326160b8e69e746521 +size 341626 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgserial.a new file mode 100644 index 0000000..72f25a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dc51f71ccfccfdf08c7474cf9cf56391cb7a80b19feaa081668cdd2ff811ac5 +size 1853986 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libfmt.a new file mode 100644 index 0000000..a2702d9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:957876b1df9736ec98aded9633f95d2f2e7514de4674808951d22412f7fe201c +size 252610 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libloguru.a new file mode 100644 index 0000000..b89b702 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:faff2ccc2346a9a64afb47503fa3dc9eef065f73c0d62072df1b18acfa9355f2 +size 380758 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libserial.a new file mode 100644 index 0000000..2a31a7c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab170361553359ca8afd559b3c91d6e26ac4ef773e1263efcbc506f2e8b9ad18 +size 156432 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcommon.a new file mode 100644 index 0000000..8bb8fb3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:369560f66cd841fb46fcad3b62126c1dc9e493fd8dfc38c20bc0cde59a45ebbf +size 15252 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgconnect.a new file mode 100644 index 0000000..f114407 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27b414f87ddb5b9a67b39074adfdbeba245a9c868e332027b594f62cbcff7931 +size 1010640 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgconnectshm.a new file mode 100644 index 0000000..33ab08c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26498169ede668819901e87014ada3e973f3e9390ce6e2eed8f9526d0b1d386d +size 219758 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcore.a new file mode 100644 index 0000000..56d75d8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76d07f00f08bd8008e9062147433e10fc2588eeb39aacead97a09e4c2483bd42 +size 1209360 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcoreshm.a new file mode 100644 index 0000000..1c96805 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92695126bbc3134b55e2b052491d718449abff1674b3e3cc175ab27f2748d47b +size 180782 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsglog.a new file mode 100644 index 0000000..1c6c103 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:500fb94914cd8652c68b12fa314ee153d03868d4888dd6179cbdc5a464f10a23 +size 35978 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgserial.a new file mode 100644 index 0000000..0790012 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/aarch64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d49c07c09d1ad7b9b481e1a523f0fd55640d33988433866043405140235bc73 +size 267078 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libfmtd.a new file mode 100644 index 0000000..b3942f9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79295bacb19549ac9c6c01e0745aaf2c4e100b69fd35d90f17d3704a61ccbd03 +size 1269670 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/liblogurud.a new file mode 100644 index 0000000..3b6650b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28aa90a2340bdfddfd47455d2cca9e1e57cff30cb7ea16b597d9232c0e4856ec +size 2481130 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libserial.a new file mode 100644 index 0000000..accbd53 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c669c8393188e627234d5f5ad8583f913672d5af087983c3238dd483822bba2 +size 986220 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcommon.a new file mode 100644 index 0000000..3b6924c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:264f4857d890ff7be5ac3b5b8cf22f7daf1e71fd78e544daff3b3cb12820d5a0 +size 128646 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgconnect.a new file mode 100644 index 0000000..bc78f12 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:631d574eb195bc033043e9e9181c4e0c6b48507740c27cfb8b8d5533d2e807ec +size 8027994 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgconnectshm.a new file mode 100644 index 0000000..00aeccf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d8a480d2457c5f3a4e81bc94a6c2f2550a87642ca3ef2c705b9d8d17798f647 +size 1917538 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcore.a new file mode 100644 index 0000000..0759098 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:135616ce499e4d1e6e2b14e0c831ed7a27dc0bec4958ad32bc573609a7939df5 +size 5669370 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcoreshm.a new file mode 100644 index 0000000..7b2cdf3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cce10048d313bb483b62adacc7bb49fe32f365dc658ff5a207a0f801b67efe2d +size 1652156 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsglog.a new file mode 100644 index 0000000..80354dd --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71b84129825facf77127870110a8e26f64b7d505b375cf409a6e8a29ac2353cc +size 480596 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgserial.a new file mode 100644 index 0000000..4dd9676 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e558601426c5940924fcdb943eeb618df43d8d04bc32ac6ef82c16944ac634c2 +size 1921906 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libfmt.a new file mode 100644 index 0000000..22cffc2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c71a105acace6d12ab973d0d07ebbebbacbddb72ed5cf716b412675a9ff8feb +size 245122 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libloguru.a new file mode 100644 index 0000000..275b983 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3fc3da0032480e8594fa6d7952b2fb1cc6fca5c1c531f71aa8c46ae14542e37 +size 293990 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libserial.a new file mode 100644 index 0000000..ec68681 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b5b50657eab97ede4973ad8f89df4a1dec18baafa1f02ad0cac21d2e2b902bc +size 202458 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcommon.a new file mode 100644 index 0000000..9272bd9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe5f8202fbf98cbda9f6af212110953f5fad1890483fe76b770b3464058b6489 +size 12388 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgconnect.a new file mode 100644 index 0000000..08c1747 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09bd367ff51d7d61324d04dea82065067156f95de9ce5dd31f3f47f042484c45 +size 937064 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgconnectshm.a new file mode 100644 index 0000000..b301c31 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:012bf1f0d2ec8061c6a7f37b1720e18244b51cc39c3513e355f072689f80134c +size 224942 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcore.a new file mode 100644 index 0000000..8fca98c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5fe41ea208d1c3275d72c1047e0dab39b6c575d55773ef62f4a3e53b6d0dca0 +size 1229924 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcoreshm.a new file mode 100644 index 0000000..d21d55e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:477494b8cdf7c84397eab7e9c460e1c447005209f642507747467f38b55144d9 +size 185206 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsglog.a new file mode 100644 index 0000000..402eac3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:086ceee138bda29685a4b17f6162239c4069cd48d759526969d7e89d288b20ff +size 44354 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgserial.a new file mode 100644 index 0000000..55f306f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v23/x86-64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d8102763ed72b139445c0081d4641c0fa4f0d26ccc8d182262e54c89e612cad +size 245776 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libfmtd.a new file mode 100644 index 0000000..4aa17e3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc01e9edf7d9052ce18150dda454f9bb3cb4d366d5782873fc7969c999b75c03 +size 1292168 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/liblogurud.a new file mode 100644 index 0000000..a5acdf2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6403aac9f2c7697bb070131e6e9af752d2168427b75acc582fe577b8fcd48beb +size 2686702 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libserial.a new file mode 100644 index 0000000..00f2896 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5a9bfec6db08b154f113b6bf2033401ae54aefef6a7b35e1bc35f7f9e27ed9e +size 945280 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcommon.a new file mode 100644 index 0000000..9f753e8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7359c1de04a73c295ccd41fb4ce123f4d3e595dae77c90526b615ae16bf80f0d +size 135582 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgconnect.a new file mode 100644 index 0000000..dd7bd4b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75f9cace6178a477d5041904233761f9fc6e38ee5ce415bc37b0b2242e5a3938 +size 8349498 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgconnectshm.a new file mode 100644 index 0000000..00f3120 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67b3c3232a5db7ce81177288eaa51945158f6ca996f5cc83b5bf68738595c387 +size 1961786 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcore.a new file mode 100644 index 0000000..30b0aee --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5298db08c920396e576b6e6190a9b44d940d3ba2f45ac1f5ba9cd5b895d48055 +size 6166120 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcoreshm.a new file mode 100644 index 0000000..090e362 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff5c8acf1ab775ca43dd3c49f31551af9fed5a442e6a468d6f463187a8e4d3b7 +size 1683734 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsglog.a new file mode 100644 index 0000000..a0289a4 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56274a3308e722946e6035dd222426dd46f446c3c2f05f90c6bfb1a6ed3ed23d +size 434020 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgserial.a new file mode 100644 index 0000000..b427897 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47a9d049f8c757323e92c2e97f84a757c1b0b1f16a73cebdcb9eb685de5e4eac +size 1985536 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libfmt.a new file mode 100644 index 0000000..0bb701c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ca70d7a61cbc83e622447b87bb6165148977f3d378688c5ad08c4af7a189b3c +size 245148 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libloguru.a new file mode 100644 index 0000000..dee17d3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f36499f348b120469206ea7449ebc79a4e479fc0c95020c38141bd4fe25705ba +size 295840 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libserial.a new file mode 100644 index 0000000..1bbaf47 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3f4e8e4da2370a4494bfea9340ee452ad93c1ff080f90314b1dc685921e042f +size 172822 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcommon.a new file mode 100644 index 0000000..ac80aab --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:622eb34848d340d1e4d24e89841e0ddb8505a72138e0979ec36f45a7df9d04fe +size 14468 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgconnect.a new file mode 100644 index 0000000..dc539ea --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48838528e8f1daf8cb988d5876493934186cfeaa6be973dc4454b616273ec892 +size 893562 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgconnectshm.a new file mode 100644 index 0000000..784a3fd --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b384fcf7e56033ea4a6114489b87884edaa41762678dabe92edfbc9c836b7977 +size 213680 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcore.a new file mode 100644 index 0000000..e62f460 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:378a192de1a04480b63b81dd0295b253ce940d913bb8055c10acc125141793a0 +size 1153688 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcoreshm.a new file mode 100644 index 0000000..e7b9b18 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b879b11b97eb8aaa668b84856cb0cadbde38b6f994d60a57b234e621bfc7fe0a +size 178510 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsglog.a new file mode 100644 index 0000000..5084354 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:172f58fbff5357ea01512211aad6625e0bf38057b6803ca790a1cf15e9bef90b +size 33404 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgserial.a new file mode 100644 index 0000000..88031cc --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/aarch64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f1f3ecf73e49b0eab64c5158c6ee03d2d8ebe79db76bd12b5563d6394ea7f9c +size 268072 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libfmtd.a new file mode 100644 index 0000000..9b313c1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf7872f548ce7be883e1a2a51f76495e46bea8a2e8acfed15095b1f4b0503da2 +size 1269424 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/liblogurud.a new file mode 100644 index 0000000..717d8e8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:189aff7c32144c239bc11b5fab8384f1b3a4db2e78716d5f1d2778925041f187 +size 2622770 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libserial.a new file mode 100644 index 0000000..02f27c3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1b1407d2c33edb55e8d98c461fc719d77256f855fd79eddc7b5166db34903ad +size 920520 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcommon.a new file mode 100644 index 0000000..66335cb --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0727204b080255430e78014821a571364953975fc2acc6c327fd901e7873e6ca +size 131390 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgconnect.a new file mode 100644 index 0000000..aa49db7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:daf04bb42cd5bf5444516eacf5efa637ff646ad6747a1d0e4d8409128b2fb57b +size 8166754 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgconnectshm.a new file mode 100644 index 0000000..032eae7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cca2ceddc9587d1f29bb835c614b49106d1cfdbf210ce947a50a112e9725015 +size 1926330 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcore.a new file mode 100644 index 0000000..b332451 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f79cc43e1d60f2579469ca5654cae843995f45bd88c88edb3802ab33cbc5e814 +size 6029832 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcoreshm.a new file mode 100644 index 0000000..78984a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b703792af345fc0ba9983ea640d23b3b43340b09b6ca31f42396ad7be3fe5fbf +size 1656142 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsglog.a new file mode 100644 index 0000000..88f34ee --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41ebbc9b0006e293a63a4f66c1275ce4c6d539aee8e9411451be7a64bdd21e68 +size 423556 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgserial.a new file mode 100644 index 0000000..e70c15e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83582c5f32bf53ae36f65fed25c67a403f9fd9f1871823b587c89448d60fab3d +size 1924872 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libfmt.a new file mode 100644 index 0000000..fcc0d33 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6385ab03051a24d38f694a0dd9b1cbeaadd45cf84a292909030d09fbc7dc067 +size 246628 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libloguru.a new file mode 100644 index 0000000..615b9f0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5af79d18f2d5dda5551fe5a37bfce9bfc16232f5a6cb04d82c7d2c3a09f5ee4 +size 307790 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libserial.a new file mode 100644 index 0000000..ccb57ca --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdce88da377eb96f9ecd468c76ec184c9566a0955d49215bc46057d29dd25eb9 +size 165014 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcommon.a new file mode 100644 index 0000000..9272bd9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe5f8202fbf98cbda9f6af212110953f5fad1890483fe76b770b3464058b6489 +size 12388 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgconnect.a new file mode 100644 index 0000000..d6df26a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b21b4e871f22bb4ba4741f0d10924bad04aeec2753a4a592fb29535a7db9a895 +size 896316 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgconnectshm.a new file mode 100644 index 0000000..19b2872 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3e68e5c5ea8de41a34fa25e5e3c1ec35da47c89a5c803e8ad29c6fb655208ed +size 204414 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcore.a new file mode 100644 index 0000000..2078ae0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:233f5bc97538fd29b7cf97e9e85df9302ec534b3bc04d6b220bec763695075c0 +size 1209276 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcoreshm.a new file mode 100644 index 0000000..59782ba --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08e4bd9636b2af5601bcbfc7c43a0a6b3b48984766c07876457024ae140a59f7 +size 172654 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsglog.a new file mode 100644 index 0000000..cb8be0f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54d51f07f32cc1689b20f6b3a4a6ebc6a2217ab723bc63b5e9a148dee5b69a63 +size 31988 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgserial.a new file mode 100644 index 0000000..d4cace5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v25/x86-64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45026f3548041639f6f706d5ef3e14e0d197c5c65602599f5e73b0bd7b6a7470 +size 245810 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libfmtd.a new file mode 100644 index 0000000..3dc143a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cbeb99dc905fb260449363e78e7e744abc57a25d87d83c189945820f760bce6e +size 1268140 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/liblogurud.a new file mode 100644 index 0000000..ebcfb2b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:392f10f65727c20c8d6e8b7c127ecf691f455714aa88f7a22c40f3f3a55530fd +size 2190712 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libserial.a new file mode 100644 index 0000000..e1a612e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e15cb8a07fa6fc3549ae2328c5f5c04180addb93a37ce52c87751bd8ae2f46b9 +size 753794 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcommon.a new file mode 100644 index 0000000..02fbdc2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05b26b6e9278652ae9e292575cf7535381843e731355c268deb2f245dcb85c9a +size 116050 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgconnect.a new file mode 100644 index 0000000..58b077c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d63c6bd81618a0aabc6cefaf7034c76a46e41021be60197b06f56b304e16d2db +size 7365322 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgconnectshm.a new file mode 100644 index 0000000..c65a8b8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d05723f33501a9b83cd6e087c97ee7424ee64f365b81d7176a0b144bc0bbfc2 +size 1843738 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcore.a new file mode 100644 index 0000000..83dde6d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af51c61a8f7950cce90c1c326890ef1957dc84bb127d68a488dfe5683d387aee +size 4941120 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcoreshm.a new file mode 100644 index 0000000..29f8032 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94d83933ce748ad1ca8fabab961092af2454f46cb960fc9860cc1894276e8ef6 +size 1640656 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsglog.a new file mode 100644 index 0000000..abf651b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4909abca7814f99a7b631e1f4f2981fd9401a0d11f2d09de7c06d51e7d0a5416 +size 359356 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgserial.a new file mode 100644 index 0000000..2b9f7a3 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:766ef5f711d2078624b5a8f50fde0e87f52e69ffad938152887c09f6caeb63fb +size 1730816 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libfmt.a new file mode 100644 index 0000000..ad356aa --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66c04777a3dfb407dec695a03573d527dad976296cb4fdf4328d9829a881cce4 +size 243348 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libloguru.a new file mode 100644 index 0000000..553e2d0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a17f61bf7ad7e642996627353f409bf1d50c1c5a0d2f69f9cdaf5dc8d7de23f4 +size 292468 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libserial.a new file mode 100644 index 0000000..2fef24f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc156dd4eeddd48a3b499dd7ef4cd4781de0f2ff08e631d8f9bebfbf2200ca45 +size 172972 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcommon.a new file mode 100644 index 0000000..655eca8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96f038d0ec7e4dcab0fdc063698dc40709faf4238679bb8bbdff26ffeef3fbb4 +size 14372 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgconnect.a new file mode 100644 index 0000000..b7d4173 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c52bc6b8212e0f683d30c648928e234afa6a7a6b2d09117a6e528e0a6b596a7f +size 1026996 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgconnectshm.a new file mode 100644 index 0000000..9e974b5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6409417dbbdaa4b489496292a3fa927aa8acdd7db6b1e2346da3a6dc2a8a2b0e +size 209778 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcore.a new file mode 100644 index 0000000..c9536d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81083c4ec41404f229021a0f53e794ff9f39282548785b38f6f57fd80c914ae1 +size 1148064 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcoreshm.a new file mode 100644 index 0000000..d7aa18a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a743394272dc58848bb9b805a5c5f3e9a79978a8e25259806b0d2e9f0df8af1c +size 175098 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsglog.a new file mode 100644 index 0000000..a0fa7b5 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2089ac40dbc4370cb84f43baf73c5179626439494fdd244f896454628f031930 +size 33042 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgserial.a new file mode 100644 index 0000000..028dd74 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/aarch64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13e3de77d6ac330f32748111c3b62310644d65377241aa4e0b24c1395a040eeb +size 264456 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libfmtd.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libfmtd.a new file mode 100644 index 0000000..7f6af95 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libfmtd.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e357e6f3318340548dfdc1726a32782591f5ae17191a89a02e4d7a81b0d9adf +size 1244132 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/liblogurud.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/liblogurud.a new file mode 100644 index 0000000..d365520 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/liblogurud.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4087ff38be137ae594c3794ea76bb07c7a40caff1247445b8294ca6d3cc36d16 +size 2145732 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libserial.a new file mode 100644 index 0000000..cecee73 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28e81d65b2cf38d3360ba032de109d53fea845151e0093d4094a2d5cd4339261 +size 734874 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcommon.a new file mode 100644 index 0000000..bf16a95 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9c242e3ec0e261acb9429296da105657c42c9294617fff97999aae59e20af36 +size 112554 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgconnect.a new file mode 100644 index 0000000..2904547 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:517435b706d1b3d0d5a25806f8dfd7d4c744fdeb9e5f8ecf0666c9a71c5d1501 +size 7226162 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgconnectshm.a new file mode 100644 index 0000000..5f33979 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eeb0b0a29dc0a8360fe15425af57e846205e48a1cae957268b33b0a2faa5803a +size 1813882 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcore.a new file mode 100644 index 0000000..35636e8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:931a9a0d0d7e2b923e24f41a4cd41f3fa31956c025a00aacff634e14387f64d0 +size 4854224 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcoreshm.a new file mode 100644 index 0000000..a6a4553 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9db8ddade8d3209b73ead87b7e3eb116b2697fb0ba17d430c37cd770ef0b8e74 +size 1616336 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsglog.a new file mode 100644 index 0000000..e724ff1 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26f34e6f76783e5aeafa3ec1c3e92bfdc19504f0843bd1fe2a79eb583c67448d +size 352108 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgserial.a new file mode 100644 index 0000000..c1fadba --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/debug/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14e0d862b0a95414b65a19a80a2e7e97582bb9df64fa4a44c80bbecb9bbc23f3 +size 1682306 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libfmt.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libfmt.a new file mode 100644 index 0000000..927edff --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libfmt.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5694188a676d714c04416ee4e66e50801c7e9bdd13134f63041297b70043032c +size 245492 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libloguru.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libloguru.a new file mode 100644 index 0000000..4f10513 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libloguru.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5400147acec640fba5f7d59bb357e73e0dda8f6e58a0ef3947dfea97f56ee585 +size 305756 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libserial.a new file mode 100644 index 0000000..296044a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21c7e32b5752afa5bf36df6f75a47c1e08cdb89ddbc54f7c97943808af25612f +size 167068 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcommon.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcommon.a new file mode 100644 index 0000000..9ab0ebf --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcommon.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f31dde3b0a0959cbc1b1e1d54157114bb2caf62d6c7f714f3be306373293c01 +size 12412 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgconnect.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgconnect.a new file mode 100644 index 0000000..9f8f43d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgconnect.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22ed81e46efd2ac37e4acf96ca1c82704215020662d790d871ae4ff7764790c6 +size 1064370 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgconnectshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgconnectshm.a new file mode 100644 index 0000000..a11ea4a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgconnectshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f7d85ffaaf2613a7065e66db4c51c77d81ca7f89b57ec81fd5247282e2d4696 +size 202754 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcore.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcore.a new file mode 100644 index 0000000..2f36fe6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcore.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e37234819d43c229e58d7cd886c2a0ef9a80daff5ef30241ce22c330eacee87a +size 1211404 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcoreshm.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcoreshm.a new file mode 100644 index 0000000..d016f00 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgcoreshm.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd317fc186707f6921b91c53ac7c663aac8a27302b381058c112f52945610622 +size 170914 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsglog.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsglog.a new file mode 100644 index 0000000..b9b5071 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsglog.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac74d4c9a9d13a3c00aac399f340c521ac7bcbc55837d0c41c4ff8ff1f123709 +size 31746 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgserial.a b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgserial.a new file mode 100644 index 0000000..077c10c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/linux/v26/x86-64/release/libsgserial.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f37df6591aed207036c6a4eb47a4b08e81c72dfa6301cd76a255c7fa12f636c +size 245210 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/rustc/x86-64/debug/sgble.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/rustc/x86-64/debug/sgble.lib new file mode 100644 index 0000000..02b3b6b --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/rustc/x86-64/debug/sgble.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28a01857d61ef9b0acb1c9106ea3454d854f2e36bfd441bf311990d8c1585ac9 +size 220401290 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/rustc/x86-64/release/sgble.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/rustc/x86-64/release/sgble.lib new file mode 100644 index 0000000..cdb8b48 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/rustc/x86-64/release/sgble.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:886d4820c9f06b4c9603528d6c7f4992e7777d87870f63646086335de3507eb6 +size 30915150 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/fmtd.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/fmtd.lib new file mode 100644 index 0000000..f42210e --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/fmtd.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9a512b0cd050d895fdae66f656b6ca078cbbb8bbfafa2df7c7a9fbf859e535c +size 2923824 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/fmtd.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/fmtd.pdb new file mode 100644 index 0000000..89747e8 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/fmtd.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0882f2220ba539b92e399c43555ae7c6201b9d19af8c58bbabf51cf95436f108 +size 782336 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/logurud.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/logurud.lib new file mode 100644 index 0000000..acb3dc9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/logurud.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bb36147e8d43fef9835797a023c79de2ee9321680f4b12c1eeb9a2208e524ab +size 3641952 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/logurud.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/logurud.pdb new file mode 100644 index 0000000..987852d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/logurud.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b8c0736a9270bcc3aa4581bceffc4aaf9b7920a716f431f35275010f04c3bc3 +size 1052672 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/serial.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/serial.lib new file mode 100644 index 0000000..37c438c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/serial.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37836964cbf17d7de6f0b67f7369e9d2d7b1c68f0b8a68e248c213eed5481e84 +size 1858368 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/serial.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/serial.pdb new file mode 100644 index 0000000..831dfb6 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/serial.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b980d58acf20fd2ae5fad250c9d794721c64e602e010792e12a98f28def6261 +size 602112 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcommon.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcommon.lib new file mode 100644 index 0000000..bdcbb8c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcommon.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb4388d315c9a940ce11f1c9e025f1b441e581afa9e018e234852162470eed46 +size 834036 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcommon.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcommon.pdb new file mode 100644 index 0000000..cbdda7f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcommon.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0f83d12a6b4784a150fa6289c8e9b70df6b0829ee33b966ad7968e123b5416d +size 397312 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnect.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnect.lib new file mode 100644 index 0000000..fca14ed --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnect.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56abc3c0f46fdb2fbe2e78ef4f1f7dc752e5e0a1f882c6b217ec09c648e6d64e +size 10017730 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnect.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnect.pdb new file mode 100644 index 0000000..5dee297 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnect.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1976fa83be959faeb6128bb4998550492dd35c6abb84944ee14a3d19418d6e21 +size 2568192 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnectshm.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnectshm.lib new file mode 100644 index 0000000..e285a90 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnectshm.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a44ec903da81d7dab5e34289d669202285e607239a016f26fcf8c0be1116e4ae +size 7200618 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnectshm.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnectshm.pdb new file mode 100644 index 0000000..38ff8d0 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgconnectshm.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97c2b489d10b01ffe7c598ee6cb81199bedd479fe701b693b6c8bf3927fa22e8 +size 2527232 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcore.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcore.lib new file mode 100644 index 0000000..b4e4e83 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcore.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3baabff9a7421c228d5ebc065bfe92873393ea97a1de874345931ce98078881 +size 7895728 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcore.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcore.pdb new file mode 100644 index 0000000..c709f7d --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcore.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fef56cc2cf61dc7aa982d66ba06820d2c156dccd3333944569573149ccb1e93 +size 1921024 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcoreshm.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcoreshm.lib new file mode 100644 index 0000000..3f9b2b9 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcoreshm.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:071e7cb31dbc37ac4bf78df76bf0fe1fe96feae9b4e772422e7ada389cba4934 +size 6948592 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcoreshm.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcoreshm.pdb new file mode 100644 index 0000000..eba1246 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgcoreshm.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bce78a8033e24fd83425120fb477a0cb905cc7c6e6ddbe4a7d8fffb32a665ac1 +size 2437120 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sglog.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sglog.lib new file mode 100644 index 0000000..d55425f --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sglog.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb26029655989d5e400b26fd932548ce89131afa450ffdbe78346d2b02f37a5b +size 1277186 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sglog.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sglog.pdb new file mode 100644 index 0000000..aff45d2 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sglog.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8db3c7b4e179003716f2efa5f32caa4e1001de0cb49e5eda307967af5f198c32 +size 520192 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgserial.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgserial.lib new file mode 100644 index 0000000..1e46b44 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgserial.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:701b2287064768e8a20553251ed332960bd9f9eb4dc5a6cc9bacbb34492591ee +size 6526520 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgserial.pdb b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgserial.pdb new file mode 100644 index 0000000..00ea75c --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/debug/sgserial.pdb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75228a0edf0642b709da40d020bc548e7ee90fc5b5a431135153d1c754d00ca9 +size 2027520 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/fmt.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/fmt.lib new file mode 100644 index 0000000..d038288 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/fmt.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcd47126bc3364886fd5d825b5a93b3978959262fabb75a55238c7b6d2ad956d +size 3560964 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/loguru.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/loguru.lib new file mode 100644 index 0000000..10bc11a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/loguru.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdfd69c68b7e0d12819cbd235182d9dafba7bd9a2195650b953d948c08793140 +size 4432300 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/serial.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/serial.lib new file mode 100644 index 0000000..f70a7e7 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/serial.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:375f5fecbd3f623fa07cebc0b9a1b823b239bc49618a596682ec94b208198bcd +size 2293364 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcommon.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcommon.lib new file mode 100644 index 0000000..206de14 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcommon.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75d35b94a879d87906f368b0a6e0dbe753e166a521a18dda4c8d31136b3879a2 +size 1130018 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgconnect.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgconnect.lib new file mode 100644 index 0000000..a538e81 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgconnect.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52fe3236051d4932d39664d33dbf8a60bc46b5767b0c85cd746b6ee7e480af24 +size 12033264 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgconnectshm.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgconnectshm.lib new file mode 100644 index 0000000..414e75a --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgconnectshm.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11b0d94518df971dd1144fc6e40b4c56d2f388620d855e0959ec3b1b69e9308f +size 9241890 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcore.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcore.lib new file mode 100644 index 0000000..54f0358 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcore.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee33caf7688b86dedc0d666eee69f435d1f55abfff2e6a6c19483dc67e4e1344 +size 9393792 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcoreshm.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcoreshm.lib new file mode 100644 index 0000000..746cd66 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgcoreshm.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb7c9537d3fe3f272328799d56e67352024e93f06e6041af477e6c743bcd5a5 +size 8918068 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sglog.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sglog.lib new file mode 100644 index 0000000..0f69505 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sglog.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b585f310985b6ac414f79c5906f0de2d11b528e4cb63a5aa632257afd095c5aa +size 1685586 diff --git a/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgserial.lib b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgserial.lib new file mode 100644 index 0000000..1616283 --- /dev/null +++ b/Plugins/SenseGlove/Source/ThirdParty/lib/windows/v143/x86-64/release/sgserial.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2e633608521a4d47609d55071c34952a09f9c03a49abba00863c2b2926ed146 +size 8015692