Ocean
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 
14 #include "ocean/math/Quaternion.h"
15 
17 
18 #ifndef __OBJC__
19  #error Platform::Apple::IOS::OpenGLFrameMediumViewController.h needs to be included from an ObjectiveC++ file
20 #endif
21 
22 /**
23  * The OpenGLViewController implements a view controller that is mainly able to display medium objects.
24  * The view controller is derived from an OpenGLES view controller so that we can ensure the best performance possible.<br>
25  * This class can be seen as a FrameMediumView equivalent using OpenGLES.
26  * @see Apple::MacOS::FrameMediumView.
27  * @ingroup platformappleios
28  */
30 
31 /**
32  * Sets or changes the frame medium to be displayed.
33  * @param frameMedium The frame medium to be displayed, must be valid
34  */
35 -(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium;
36 
37 /**
38  * Sets or changes the frame medium to be displayed.
39  * @param frameMedium The frame medium to be displayed, must be valid
40  * @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
41  */
42 -(void)setFrameMedium:(const Ocean::Media::FrameMediumRef&)frameMedium withRotation:(const Ocean::Quaternion&)display_R_medium;
43 
44 /**
45  * Returns the current frame medium.
46  * @return The frame medium which is currently displayed
47  */
48 -(Ocean::Media::FrameMediumRef)frameMedium;
49 
50 /**
51  * 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).
52  * @param viewPoint The 2D location within this view
53  * @return The corresponding 2D location within the image frame of the medium, a negative coordinate (-1, -1), in case no valid mapping exists
54  */
55 -(CGPoint)view2medium:(CGPoint)viewPoint;
56 
57 @end
58 
59 #endif // META_OCEAN_PLATFORM_APPLE_IOS_OPEN_GL_FRAME_MEDIUM_VIEW_CONTROLLER_H
QuaternionT< Scalar > Quaternion
Definition of the Quaternion object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with sin...
Definition: Quaternion.h:33
SmartMediumRef< FrameMedium > FrameMediumRef
Definition of a smart medium reference holding a frame medium object.
Definition: FrameMedium.h:32
The OpenGLViewController implements a view controller that is mainly able to display medium objects.
Definition: OpenGLFrameMediumViewController.h:30
The ViewController responsible for the OpenGL context.
Definition: OpenGLViewController.h:25
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15