[Visualization] Use forced 3D mode in window

Windowed style should always use the perspective camera mode.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-05-22 17:45:51 -07:00
parent 438634d6df
commit 84eadd1f33
1 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,7 @@ extern NSString *CogPlaybackDidStopNotficiation;
}
- (void)updateControls {
BOOL projectionMode = [[NSUserDefaults standardUserDefaults] boolForKey:@"spectrumProjectionMode"];
BOOL projectionMode = cameraControlEnabled ? NO : [[NSUserDefaults standardUserDefaults] boolForKey:@"spectrumProjectionMode"];
SCNNode *rootNode = [[self scene] rootNode];
SCNNode *cameraNode = [rootNode childNodeWithName:@"camera" recursively:NO];
SCNCamera *camera = [cameraNode camera];
@ -118,6 +118,7 @@ extern NSString *CogPlaybackDidStopNotficiation;
- (void)enableCameraControl {
[self setAllowsCameraControl:YES];
cameraControlEnabled = YES;
[self updateControls];
}
- (void)setup {