Ocean
Loading...
Searching...
No Matches
OpenGLFrameMediumViewController.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_OPEN_GL_FRAME_MEDIUM_VIEW_CONTROLLER_H
9#define META_OCEAN_PLATFORM_APPLE_IOS_OPEN_GL_FRAME_MEDIUM_VIEW_CONTROLLER_H
10
13
15
17
22
23#ifndef __OBJC__
24 #error Platform::Apple::IOS::OpenGLFrameMediumViewController.h needs to be included from an ObjectiveC++ file
25#endif
26
27/**
28 * The OpenGLViewController implements a view controller that is mainly able to display medium objects.
29 * The view controller is derived from an OpenGLES view controller so that we can ensure the best performance possible.<br>
30 * This class can be seen as a FrameMediumView equivalent using OpenGLES.
31 * @see Apple::MacOS::FrameMediumView.
32 * @ingroup platformappleios
33 */
35
36/**
37 * Sets or changes the frame medium to be displayed.
38 * @param frameMedium The frame medium to be displayed, must be valid
39 */
40-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium;
41
42/**
43 * Sets or changes the frame medium to be displayed.
44 * @param frameMedium The frame medium to be displayed, must be valid
45 * @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
46 */
47-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium andAdjustFov:(bool)adjustFov;
48
49/**
50 * Sets or changes the frame medium to be displayed.
51 * @param frameMedium The frame medium to be displayed, must be valid
52 * @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
53 */
54-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium;
55
56/**
57 * Sets or changes the frame medium to be displayed.
58 * @param frameMedium The frame medium to be displayed, must be valid
59 * @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
60 * @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
61 */
62-(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium andAdjustFov:(bool)adjustFov;
63
64/**
65 * Returns the current frame medium.
66 * @return The frame medium which is currently displayed
67 */
68-(Ocean::Media::FrameMediumRef)frameMedium;
69
70/**
71 * 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).
72 * @param viewPoint The 2D location within this view
73 * @return The corresponding 2D location within the image frame of the medium, a negative coordinate (-1, -1), in case no valid mapping exists
74 */
75-(CGPoint)view2medium:(CGPoint)viewPoint;
76
77/**
78 * Updates the rendering engine.
79 */
80-(void)update;
81
82@end
83
85{
86 @protected
87
88 /// The rendering engine to be used.
90
91 /// The framebuffer in which the result will be rendered.
93
94 /// The rendering view.
96
97 /// The undistorted background.
99
100 /// State determining that the view's field of view has to be adjusted to the background's field of view.
102}
103
104@end
105
106#endif // META_OCEAN_PLATFORM_APPLE_IOS_OPEN_GL_FRAME_MEDIUM_VIEW_CONTROLLER_H
SmartObjectRef< PerspectiveView > PerspectiveViewRef
Definition of a smart object reference holding a perspective view node.
Definition PerspectiveView.h:30
The OpenGLViewController implements a view controller that is mainly able to display medium objects.
Definition OpenGLFrameMediumViewController.h:35
bool adjustFovXToBackground_
Definition OpenGLFrameMediumViewController.h:101
Ocean::Rendering::UndistortedBackgroundRef renderingUndistortedBackground_
Definition OpenGLFrameMediumViewController.h:98
Ocean::Rendering::PerspectiveViewRef renderingView_
Definition OpenGLFrameMediumViewController.h:95
Ocean::Rendering::FramebufferRef renderingFramebuffer_
Definition OpenGLFrameMediumViewController.h:92
void update()
Updates the rendering engine.
Ocean::Rendering::EngineRef renderingEngine_
Definition OpenGLFrameMediumViewController.h:89
The ViewController responsible for the OpenGL context.
Definition OpenGLViewController.h:25
The namespace covering the entire Ocean framework.
Definition Accessor.h:15