Ocean
Loading...
Searching...
No Matches
GLRendererViewController.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_RENDERER_VIEW_CONTROLLER_H
9#define META_OCEAN_PLATFORM_APPLE_IOS_GL_RENDERER_VIEW_CONTROLLER_H
10
13
14#include "ocean/base/Lock.h"
16
18
22
23#ifndef __OBJC__
24 #error Platform::Apple::IOS::GLRendererViewController.h needs to be included from an ObjectiveC++ file
25#endif
26
27/**
28 * The GLRendererViewController implements a view controller using the OpenGLESceneGraph renderer for iOS platform applications.
29 * @ingroup platformappleios
30 */
32
33/**
34 * Sets the horizontal field of view for this view.
35 * @param fovx Field of view to set in radian
36 * @return True, if succeeded
37 */
38-(bool)setFovX:(Ocean::Scalar)fovx;
39
40/**
41 * Sets the background color of this view.
42 * @param color Background color to set
43 * @return True, if succeeded
44 */
45-(bool)setBackgroundColor:(const Ocean::RGBAColor&)color;
46
47/**
48 * Sets whether the user can change the view's position and rotation by touch events.
49 * @param enabled True, to allow the interaction; False, to disable the interaction
50 */
51-(void)setViewInteractionEnabled:(bool)enabled;
52
53/**
54 * Updates the rendering engine.
55 */
56-(void)update;
57
58@end
59
60@interface GLRendererViewController ()
61{
62 @protected
63
64 /// The rendering engine to be used.
66
67 /// The framebuffer in which the result will be rendered.
69
70 /// The rendering view.
72
73 /// Previous horizontal touch position.
75
76 /// Previous vertical touch position.
78
79 /// Rendering start timestamp.
81
82 /// Rendering iterations.
84
85 /// True, to allow the user to change the view's position and rotation by touch events; False, to disable the user interaction.
87
88 /// View lock object.
90}
91
92@end
93
94#endif // META_OCEAN_PLATFORM_APPLE_IOS_GL_RENDERER_VIEW_CONTROLLER_H
This class implements a recursive lock object.
Definition Lock.h:31
This class implements a timestamp.
Definition Timestamp.h:64
SmartObjectRef< PerspectiveView > PerspectiveViewRef
Definition of a smart object reference holding a perspective view node.
Definition PerspectiveView.h:30
The GLRendererViewController implements a view controller using the OpenGLESceneGraph renderer for iO...
Definition GLRendererViewController.h:32
Ocean::Timestamp renderingStartTimestamp_
Definition GLRendererViewController.h:80
Ocean::Rendering::FramebufferRef renderingFramebuffer_
Definition GLRendererViewController.h:68
Ocean::Lock lock_
Definition GLRendererViewController.h:89
void update()
Updates the rendering engine.
bool viewInteractionEnabled_
Definition GLRendererViewController.h:86
unsigned int renderingIterations_
Definition GLRendererViewController.h:83
float previousTouchY_
Definition GLRendererViewController.h:77
float previousTouchX_
Definition GLRendererViewController.h:74
Ocean::Rendering::EngineRef renderingEngine_
Definition GLRendererViewController.h:65
Ocean::Rendering::PerspectiveViewRef renderingView_
Definition GLRendererViewController.h:71
The ViewController responsible for the OpenGL context.
Definition GLViewController.h:25
The namespace covering the entire Ocean framework.
Definition Accessor.h:15