Skip to content

Commit

Permalink
XR Module (#2106)
Browse files Browse the repository at this point in the history
* rename _sessionMode

* implement IsTrackFloorLevelEnabled
  • Loading branch information
nkast authored Dec 15, 2024
1 parent 5aac73d commit 7db57bb
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 20 deletions.
16 changes: 12 additions & 4 deletions Platforms/XR/.Android/ConcreteXRDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ namespace Microsoft.Xna.Framework.XR
internal class ConcreteXRDevice : XRDeviceStrategy
{
IGraphicsDeviceService _graphics;
XRSessionMode _xrMode;
XRSessionMode _sessionMode;
bool _isTrackFloorLevelEnabled = false;

HandsState _handsState;
HeadsetState _headsetState;
Expand All @@ -36,7 +37,7 @@ public override bool IsARSupported

public override XRSessionMode SessionMode
{
get { return _xrMode; }
get { return _sessionMode; }
}

public override XRDeviceState DeviceState
Expand All @@ -46,7 +47,7 @@ public override XRDeviceState DeviceState

public override bool IsTrackFloorLevelEnabled
{
get { throw new NotImplementedException(); }
get { return _isTrackFloorLevelEnabled; }
}


Expand Down Expand Up @@ -132,7 +133,14 @@ public override void EndSessionAsync()

public override void TrackFloorLevelAsync(bool enable)
{
throw new NotImplementedException();
if (enable == true)
{
throw new NotImplementedException();
}
else
{
_isTrackFloorLevelEnabled = enable;
}
}


Expand Down
16 changes: 12 additions & 4 deletions Platforms/XR/.SDL2/ConcreteXRDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ namespace Microsoft.Xna.Framework.XR
internal class ConcreteXRDevice : XRDeviceStrategy
{
IGraphicsDeviceService _graphics;
XRSessionMode _xrMode;
XRSessionMode _sessionMode;
bool _isTrackFloorLevelEnabled = false;

HandsState _handsState;
HeadsetState _headsetState;
Expand All @@ -36,7 +37,7 @@ public override bool IsARSupported

public override XRSessionMode SessionMode
{
get { return _xrMode; }
get { return _sessionMode; }
}

public override XRDeviceState DeviceState
Expand All @@ -46,7 +47,7 @@ public override XRDeviceState DeviceState

public override bool IsTrackFloorLevelEnabled
{
get { throw new NotImplementedException(); }
get { return _isTrackFloorLevelEnabled; }
}


Expand Down Expand Up @@ -132,7 +133,14 @@ public override void EndSessionAsync()

public override void TrackFloorLevelAsync(bool enable)
{
throw new NotImplementedException();
if (enable == true)
{
throw new NotImplementedException();
}
else
{
_isTrackFloorLevelEnabled = enable;
}
}


Expand Down
16 changes: 12 additions & 4 deletions Platforms/XR/.UAP/ConcreteXRDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ namespace Microsoft.Xna.Framework.XR
internal class ConcreteXRDevice : XRDeviceStrategy
{
IGraphicsDeviceService _graphics;
XRSessionMode _xrMode;
XRSessionMode _sessionMode;
bool _isTrackFloorLevelEnabled = false;

HandsState _handsState;
HeadsetState _headsetState;
Expand All @@ -36,7 +37,7 @@ public override bool IsARSupported

public override XRSessionMode SessionMode
{
get { return _xrMode; }
get { return _sessionMode; }
}

public override XRDeviceState DeviceState
Expand All @@ -46,7 +47,7 @@ public override XRDeviceState DeviceState

public override bool IsTrackFloorLevelEnabled
{
get { throw new NotImplementedException(); }
get { return _isTrackFloorLevelEnabled; }
}


Expand Down Expand Up @@ -132,7 +133,14 @@ public override void EndSessionAsync()

public override void TrackFloorLevelAsync(bool enable)
{
throw new NotImplementedException();
if (enable == true)
{
throw new NotImplementedException();
}
else
{
_isTrackFloorLevelEnabled = enable;
}
}


Expand Down
16 changes: 12 additions & 4 deletions Platforms/XR/.WindowsDX/ConcreteXRDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ namespace Microsoft.Xna.Framework.XR
internal class ConcreteXRDevice : XRDeviceStrategy
{
IGraphicsDeviceService _graphics;
XRSessionMode _xrMode;
XRSessionMode _sessionMode;
bool _isTrackFloorLevelEnabled = false;

HandsState _handsState;
HeadsetState _headsetState;
Expand All @@ -36,7 +37,7 @@ public override bool IsARSupported

public override XRSessionMode SessionMode
{
get { return _xrMode; }
get { return _sessionMode; }
}

public override XRDeviceState DeviceState
Expand All @@ -46,7 +47,7 @@ public override XRDeviceState DeviceState

public override bool IsTrackFloorLevelEnabled
{
get { throw new NotImplementedException(); }
get { return _isTrackFloorLevelEnabled; }
}


Expand Down Expand Up @@ -132,7 +133,14 @@ public override void EndSessionAsync()

public override void TrackFloorLevelAsync(bool enable)
{
throw new NotImplementedException();
if (enable == true)
{
throw new NotImplementedException();
}
else
{
_isTrackFloorLevelEnabled = enable;
}
}


Expand Down
16 changes: 12 additions & 4 deletions Platforms/XR/.iOS/ConcreteXRDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ namespace Microsoft.Xna.Framework.XR
internal class ConcreteXRDevice : XRDeviceStrategy
{
IGraphicsDeviceService _graphics;
XRSessionMode _xrMode;
XRSessionMode _sessionMode;
bool _isTrackFloorLevelEnabled = false;

HandsState _handsState;
HeadsetState _headsetState;
Expand All @@ -36,7 +37,7 @@ public override bool IsARSupported

public override XRSessionMode SessionMode
{
get { return _xrMode; }
get { return _sessionMode; }
}

public override XRDeviceState DeviceState
Expand All @@ -46,7 +47,7 @@ public override XRDeviceState DeviceState

public override bool IsTrackFloorLevelEnabled
{
get { throw new NotImplementedException(); }
get { return _isTrackFloorLevelEnabled; }
}


Expand Down Expand Up @@ -132,7 +133,14 @@ public override void EndSessionAsync()

public override void TrackFloorLevelAsync(bool enable)
{
throw new NotImplementedException();
if (enable == true)
{
throw new NotImplementedException();
}
else
{
_isTrackFloorLevelEnabled = enable;
}
}


Expand Down

0 comments on commit 7db57bb

Please sign in to comment.