Remove lens vector usage from Breezy GNOME when 6DoF position is provided
This commit is contained in:
parent
eae448cc14
commit
9cfb19284a
|
|
@ -229,6 +229,13 @@ export default class BreezyDesktopExtension extends Extension {
|
||||||
this._virtual_displays_overlay.set_position(targetMonitor.x, targetMonitor.y);
|
this._virtual_displays_overlay.set_position(targetMonitor.x, targetMonitor.y);
|
||||||
this._virtual_displays_overlay.set_size(targetMonitor.width, targetMonitor.height);
|
this._virtual_displays_overlay.set_size(targetMonitor.width, targetMonitor.height);
|
||||||
|
|
||||||
|
const state = this._read_state();
|
||||||
|
const pose_has_position = state['connected_device_pose_has_position'] === 'true';
|
||||||
|
|
||||||
|
Globals.logger.log_debug(
|
||||||
|
`connected_device_pose_has_position=${pose_has_position}`
|
||||||
|
);
|
||||||
|
|
||||||
Globals.data_stream.refresh_data();
|
Globals.data_stream.refresh_data();
|
||||||
this._virtual_displays_actor = new VirtualDisplaysActor({
|
this._virtual_displays_actor = new VirtualDisplaysActor({
|
||||||
width: targetMonitor.width,
|
width: targetMonitor.width,
|
||||||
|
|
@ -248,7 +255,8 @@ export default class BreezyDesktopExtension extends Extension {
|
||||||
framerate_cap: this.settings.get_double('framerate-cap'),
|
framerate_cap: this.settings.get_double('framerate-cap'),
|
||||||
imu_snapshots: Globals.data_stream.imu_snapshots,
|
imu_snapshots: Globals.data_stream.imu_snapshots,
|
||||||
show_banner: Globals.data_stream.show_banner,
|
show_banner: Globals.data_stream.show_banner,
|
||||||
custom_banner_enabled: Globals.data_stream.custom_banner_enabled
|
custom_banner_enabled: Globals.data_stream.custom_banner_enabled,
|
||||||
|
pose_has_position
|
||||||
});
|
});
|
||||||
|
|
||||||
this._virtual_displays_overlay.set_child(this._virtual_displays_actor);
|
this._virtual_displays_overlay.set_child(this._virtual_displays_actor);
|
||||||
|
|
|
||||||
|
|
@ -443,6 +443,13 @@ export const VirtualDisplaysActor = GObject.registerClass({
|
||||||
'Latest IMU quaternion snapshots and epoch timestamp for when it was collected',
|
'Latest IMU quaternion snapshots and epoch timestamp for when it was collected',
|
||||||
GObject.ParamFlags.READWRITE
|
GObject.ParamFlags.READWRITE
|
||||||
),
|
),
|
||||||
|
'pose-has-position': GObject.ParamSpec.boolean(
|
||||||
|
'pose-has-position',
|
||||||
|
'Pose Has Position',
|
||||||
|
'Whether the IMU snapshots contain pose data',
|
||||||
|
GObject.ParamFlags.READWRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
'curved-display': GObject.ParamSpec.boolean(
|
'curved-display': GObject.ParamSpec.boolean(
|
||||||
'curved-display',
|
'curved-display',
|
||||||
'Curved Display',
|
'Curved Display',
|
||||||
|
|
@ -457,13 +464,6 @@ export const VirtualDisplaysActor = GObject.registerClass({
|
||||||
GObject.ParamFlags.READWRITE,
|
GObject.ParamFlags.READWRITE,
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
'smooth-follow-toggle-epoch-ms': GObject.ParamSpec.uint64(
|
|
||||||
'smooth-follow-toggle-epoch-ms',
|
|
||||||
'Smooth follow toggle epoch time',
|
|
||||||
'ms since epoch when smooth follow was toggled',
|
|
||||||
GObject.ParamFlags.READWRITE,
|
|
||||||
0, Number.MAX_SAFE_INTEGER, 0
|
|
||||||
),
|
|
||||||
'show-banner': GObject.ParamSpec.boolean(
|
'show-banner': GObject.ParamSpec.boolean(
|
||||||
'show-banner',
|
'show-banner',
|
||||||
'Show banner',
|
'Show banner',
|
||||||
|
|
@ -903,7 +903,7 @@ export const VirtualDisplaysActor = GObject.registerClass({
|
||||||
const viewportYBegin = this.headset_display_as_viewport_center ? targetMonitor.y : allDisplaysCenterYBegin;
|
const viewportYBegin = this.headset_display_as_viewport_center ? targetMonitor.y : allDisplaysCenterYBegin;
|
||||||
|
|
||||||
this.fov_details = this._fov_details();
|
this.fov_details = this._fov_details();
|
||||||
this.lens_vector = [0.0, 0.0, -this.fov_details.lensDistancePixels];
|
this.lens_vector = [0.0, 0.0, this.pose_has_position ? -this.fov_details.lensDistancePixels : 0.0];
|
||||||
this.monitor_placements = monitorsToPlacements(
|
this.monitor_placements = monitorsToPlacements(
|
||||||
this.fov_details,
|
this.fov_details,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 975e5886e35147c5c2a77920e73576de8ba66a5d
|
Subproject commit 907032a68f8f872f02082dbaa4f0f82b440291c3
|
||||||
Loading…
Reference in New Issue