add a new overload to FSGDebugVirtualHand::Draw() to allow visualizing any FSGDebugGizmoSettings instance directly
This commit is contained in:
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- A new `FSGDebugVirtualHand::Draw()` overload has been added to allow visualizing `FSGDebugGizmoSettings` directly. This is used internally by the new `USGHandTrackerComponent` to visualize its `FXRHandTrackingState` if `bVisualize` is enabled.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix some copyright notices with wrong copyright owner. These propably has happend during bulk replaces with class or struct names.
|
||||
@@ -14,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
- List existing SenseGlove components under `SenseGlove` `ClassGroup` inside Unreal's Blueprint Editor. This chagnes `ClassGroup` for `USGGrabComponent`, `USGTouchComponent`, `USGVirtualHandComponent`, and `USGWristTrackerComponent`.
|
||||
- Force `USGVirtualHandComponent` and `USGWristTrackerComponent` to update their XR hand-tracking state when their handedness is updated.
|
||||
- Force `USGVirtualHandComponent` and `USGWristTrackerComponent` to update their XR hand-tracking data when their handedness is updated.
|
||||
- Bumped the SenseGlove Unreal Engine Marketplace Packager to `v0.6.1-85c5a6e`.
|
||||
- Bumped the copyright years.
|
||||
|
||||
|
||||
@@ -87,4 +87,33 @@ void FSGDebugVirtualHand::Draw(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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<FVector>::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);
|
||||
}
|
||||
}
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
|
||||
@@ -53,6 +53,11 @@ public:
|
||||
const UWorld* World,
|
||||
const FXRHandTrackingState& HandTrackingState,
|
||||
const FSGVirtualHandDebuggingSettings& Settings);
|
||||
|
||||
static void Draw(
|
||||
const UWorld* World,
|
||||
const FXRHandTrackingState& HandTrackingState,
|
||||
const FSGDebugGizmoSettings& Settings);
|
||||
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user