Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Camera System Refactor #517

Merged
merged 106 commits into from
Apr 24, 2020
Merged

Camera System Refactor #517

merged 106 commits into from
Apr 24, 2020

Conversation

StephenHodgson
Copy link
Contributor

@StephenHodgson StephenHodgson commented Apr 11, 2020

XRTK - Mixed Reality Toolkit Change Request

Overview

Refactored the Camera System to have per platform data providers and settings on top of the global ones.

Target of the change:

Is this enhancement for:

  • Core (core framework, interfaces and definitions)

Breaking Changes:

Are there any breaking changes included in this change that would prevent or cause issue for existing projects.

  • Completely changed the IMixedRealityCameraSystem
  • Added IMixedRealityDataProvider, all of the original logic in the camera system was moved into the BaseCameraDataProvider class.
  • Updated all the namespaces for the camera system files. (Some classes didn't have a namespace to begin with)

Submodule Changes

XRTK/com.xrtk.sdk#153
XRTK/com.xrtk.oculus#54
XRTK/com.xrtk.lumin#60
XRTK/com.xrtk.wmr#66

TODO

Tests should also include moving the playspace to ensure that both spatial awareness and teleportation is keeping the tracked objects in sync with the playspace.

@StephenHodgson StephenHodgson added Breaking Change In Progress PR currently still being developed labels Apr 11, 2020
@StephenHodgson StephenHodgson changed the title CameraSystem refactor Camera System Refactor Apr 11, 2020
@StephenHodgson StephenHodgson mentioned this pull request Apr 11, 2020
@StephenHodgson StephenHodgson marked this pull request as ready for review April 11, 2020 23:58
@StephenHodgson StephenHodgson added Ready for review PR finished primary development, open for review and removed In Progress PR currently still being developed labels Apr 11, 2020
@StephenHodgson
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@SimonDarksideJ
Copy link
Contributor

This PR needs a lot of cleaning up as it contains so many different changes unrelated to the Camera System update

FejZa
FejZa previously approved these changes Apr 23, 2020
Copy link
Contributor

@FejZa FejZa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and reviewed. Works for me.

/// </summary>
float DefaultHeadHeight { get; }
/// <param name="dataProvider"></param>
void RegisterCameraDataProvider(IMixedRealityCameraDataProvider dataProvider);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit surprised here. The way you implemented this reminds me a bit of how I did the diagnostics system and hands back then. But then we changed it and decided to not have custom registries in the systems for consistency with the how it's setup in other modules. What made you change your mind here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was mainly bc of the event handlers we are using.

We're not using event handling for anything in the camera system afaik.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk I can go either way with this.

I'll look back at the Input and Diagnostics systems to see if we can do something similar.

The biggest difference is that the Diagnostics and Input Systems are Event Systems, while the Camera System is not. No one is listening for events here.

cleaned up profile value assignments
cleaned up magic numbers
@StephenHodgson StephenHodgson requested a review from FejZa April 23, 2020 22:54
…RealityCameraDataProviderProfileInspector.cs
Copy link
Contributor

@FejZa FejZa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good. I'd like to see some syntactic sugar for accessing camera position and rotation, as well as playspace transform in a later revision of the SDK.

@StephenHodgson StephenHodgson merged commit 53e1245 into development Apr 24, 2020
@StephenHodgson StephenHodgson deleted the fix/camera-system branch April 24, 2020 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Breaking Change Ready for review PR finished primary development, open for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants