Ocean
Loading...
Searching...
No Matches
ParallelView.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_RENDERING_PARALLEL_VIEW_H
9#define META_OCEAN_RENDERING_PARALLEL_VIEW_H
10
13
14namespace Ocean
15{
16
17namespace Rendering
18{
19
20// Forward declaration
21class ParallelView;
22
23/**
24 * Definition of a smart object reference holding a parallel view node.
25 * @see SmartObjectRef, ParallelView.
26 * @ingroup rendering
27 */
29
30/**
31 * This class is the base class for all parallel views
32 * @ingroup rendering
33 */
34class OCEAN_RENDERING_EXPORT ParallelView : virtual public View
35{
36 public:
37
38 /**
39 * Returns the type of this object.
40 * @see Object::type().
41 */
42 ObjectType type() const override;
43
44 /**
45 * Returns the width of the orthographic viewing box in world units.
46 * @return The view width in world units
47 * @exception NotSupportedException Is thrown if this function is not supported
48 */
49 virtual Scalar width() const;
50
51 /**
52 * Sets the width of the orthographic viewing box in world units.
53 * The height is automatically derived from the width and aspect ratio.
54 * @param width The view width in world units, with range (0, infinity)
55 * @return True if succeeded
56 * @exception NotSupportedException Is thrown if this function is not supported
57 */
58 virtual bool setWidth(const Scalar width);
59
60 protected:
61
62 /**
63 * Creates a new parallel view object.
64 */
66
67 /**
68 * Destructs a parallel view object.
69 */
70 ~ParallelView() override;
71};
72
73}
74
75}
76
77#endif // META_OCEAN_RENDERING_PARALLEL_VIEW_H
ObjectType
Definition of different object type.
Definition Object.h:63
This class is the base class for all parallel views.
Definition ParallelView.h:35
virtual Scalar width() const
Returns the width of the orthographic viewing box in world units.
virtual bool setWidth(const Scalar width)
Sets the width of the orthographic viewing box in world units.
~ParallelView() override
Destructs a parallel view object.
ObjectType type() const override
Returns the type of this object.
ParallelView()
Creates a new parallel view object.
This class implements a smart rendering object reference.
Definition rendering/ObjectRef.h:34
This class is the base class for all rendering views.
Definition View.h:46
float Scalar
Definition of a scalar type.
Definition Math.h:129
The namespace covering the entire Ocean framework.
Definition Accessor.h:15