Ocean
Loading...
Searching...
No Matches
GLFrameViewController.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_PLATFORM_APPLE_IOS_GL_FRAME_VIEW_CONTROLLER_H
9#define META_OCEAN_PLATFORM_APPLE_IOS_GL_FRAME_VIEW_CONTROLLER_H
10
13
14#include "ocean/math/Line3.h"
16
18
20
21#ifndef __OBJC__
22 #error Platform::Apple::IOS::GLFrameViewController.h needs to be included from an ObjectiveC++ file
23#endif
24
25/**
26 * The GLFrameViewController implements a view controller that is mainly able to display medium objects.
27 * The view controller is derived from an OpenGLES view controller so that we can ensure the best performance possible.
28 * @see Apple::MacOS::FrameMediumView.
29 * @ingroup platformappleios
30 */
32
33/**
34 * Sets or changes the frame medium to be displayed.
35 * @param frameMedium The frame medium to be displayed, must be valid
36 */
37-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium;
38
39/**
40 * Sets or changes the frame medium to be displayed.
41 * @param frameMedium The frame medium to be displayed, must be valid
42 * @param adjustFov True, to adjust the view's field of view to the medium's field of view; False, to keep the view's field of view as is
43 */
44-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium andAdjustFov:(bool)adjustFov;
45
46/**
47 * Sets or changes the frame medium to be displayed.
48 * @param frameMedium The frame medium to be displayed, must be valid
49 * @param display_R_medium Explicit rotation between medium and display, and invalid rotation to use the medium's and framebuffer's transformations to determine the rotation
50 */
51-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium;
52
53/**
54 * Sets or changes the frame medium to be displayed.
55 * @param frameMedium The frame medium to be displayed, must be valid
56 * @param display_R_medium Explicit rotation between medium and display, and invalid rotation to use the medium's and framebuffer's transformations to determine the rotation
57 * @param adjustFov True, to adjust the view's field of view to the medium's field of view; False, to keep the view's field of view as is
58 */
59-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium andAdjustFov:(bool)adjustFov;
60
61/**
62 * Returns the current frame medium.
63 * @return The frame medium which is currently displayed
64 */
65-(Ocean::Media::FrameMediumRef)frameMedium;
66
67/**
68 * Converts a 2D location defined in the view's coordinate system to a location defined in the coordinate system of the medium (an image frame).
69 * @param viewPoint The 2D location within this view
70 * @return The corresponding 2D location within the image frame of the medium, a negative coordinate (-1, -1), in case no valid mapping exists
71 */
72-(CGPoint)view2medium:(CGPoint)viewPoint;
73
74@end
75
76@interface GLFrameViewController ()
77{
78 @protected
79
80 /// The undistorted background.
82
83 /// The frame medium of the background which is stored as long as the view hasn't been initialized.
85
86 /// True, to adjust the field of view of the view automatically so that the background medium is entirely covered.
88
89 /// State determining that the view's field of view has to be adjusted to the background's field of view.
91}
92
93@end
94
95#endif // META_OCEAN_PLATFORM_APPLE_IOS_GL_FRAME_VIEW_CONTROLLER_H
SmartMediumRef< FrameMedium > FrameMediumRef
Definition of a smart medium reference holding a frame medium object.
Definition FrameMedium.h:39
The GLFrameViewController implements a view controller that is mainly able to display medium objects.
Definition GLFrameViewController.h:32
bool adjustFovXToBackground_
Definition GLFrameViewController.h:90
bool intermediateBackgroundAdjustFov_
Definition GLFrameViewController.h:87
Ocean::Rendering::UndistortedBackgroundRef renderingUndistortedBackground_
Definition GLFrameViewController.h:81
Ocean::Media::FrameMediumRef intermediateBackgroundFrameMedium_
Definition GLFrameViewController.h:84
The GLRendererViewController implements a view controller using the OpenGLESceneGraph renderer for iO...
Definition GLRendererViewController.h:32
The namespace covering the entire Ocean framework.
Definition Accessor.h:15