Ocean
Loading...
Searching...
No Matches
GLFrameMediumViewController.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_MEDIUM_VIEW_CONTROLLER_H
9#define META_OCEAN_PLATFORM_APPLE_IOS_GL_FRAME_MEDIUM_VIEW_CONTROLLER_H
10
13
14#include "ocean/math/Line3.h"
16
18
20
21#ifndef __OBJC__
22 #error Platform::Apple::IOS::GLFrameMediumViewController.h needs to be included from an ObjectiveC++ file
23#endif
24
25/**
26 * The GLFrameMediumViewController 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.<br>
28 * This class can be seen as a FrameMediumView equivalent using OpenGLES.
29 * @see Apple::MacOS::FrameMediumView.
30 * @ingroup platformappleios
31 */
33
34/**
35 * Sets or changes the frame medium to be displayed.
36 * @param frameMedium The frame medium to be displayed, must be valid
37 */
38-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium;
39
40/**
41 * Sets or changes the frame medium to be displayed.
42 * @param frameMedium The frame medium to be displayed, must be valid
43 * @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
44 */
45-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium andAdjustFov:(bool)adjustFov;
46
47/**
48 * Sets or changes the frame medium to be displayed.
49 * @param frameMedium The frame medium to be displayed, must be valid
50 * @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
51 */
52-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium;
53
54/**
55 * Sets or changes the frame medium to be displayed.
56 * @param frameMedium The frame medium to be displayed, must be valid
57 * @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
58 * @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
59 */
60-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium andAdjustFov:(bool)adjustFov;
61
62/**
63 * Returns the current frame medium.
64 * @return The frame medium which is currently displayed
65 */
66-(Ocean::Media::FrameMediumRef)frameMedium;
67
68/**
69 * 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).
70 * @param viewPoint The 2D location within this view
71 * @return The corresponding 2D location within the image frame of the medium, a negative coordinate (-1, -1), in case no valid mapping exists
72 */
73-(CGPoint)view2medium:(CGPoint)viewPoint;
74
75@end
76
78{
79 @protected
80
81 /// The undistorted background.
83
84 /// The frame medium of the background which is stored as long as the view hasn't been initialized.
86
87 /// True, to adjust the field of view of the view automatically so that the background medium is entirely covered.
89
90 /// State determining that the view's field of view has to be adjusted to the background's field of view.
92}
93
94@end
95
96#endif // META_OCEAN_PLATFORM_APPLE_IOS_GL_FRAME_MEDIUM_VIEW_CONTROLLER_H
SmartMediumRef< FrameMedium > FrameMediumRef
Definition of a smart medium reference holding a frame medium object.
Definition FrameMedium.h:39
The GLFrameMediumViewController implements a view controller that is mainly able to display medium ob...
Definition GLFrameMediumViewController.h:33
Ocean::Media::FrameMediumRef intermediateBackgroundFrameMedium_
Definition GLFrameMediumViewController.h:85
Ocean::Rendering::UndistortedBackgroundRef renderingUndistortedBackground_
Definition GLFrameMediumViewController.h:82
bool intermediateBackgroundAdjustFov_
Definition GLFrameMediumViewController.h:88
bool adjustFovXToBackground_
Definition GLFrameMediumViewController.h:91
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