Ocean
StereoAttribute.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_STEREO_ATTRIBUTE_H
9 #define META_OCEAN_RENDERING_STEREO_ATTRIBUTE_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace Rendering
18 {
19 
20 // Forward declaration
21 class StereoAttribute;
22 
23 /**
24  * Definition of a smart object reference holding a stereo attribute.
25  * @see SmartObjectRef, StereoAttribute.
26  * @ingroup rendering
27  */
29 
30 /**
31  * This class implements a stereo attribute specifying the stereo behavior for associated objects.
32  * @ingroup rendering
33  */
34 class OCEAN_RENDERING_EXPORT StereoAttribute : virtual public Attribute
35 {
36  public:
37 
38  /**
39  * Definition of different stereo visibilities.
40  */
42  {
43  /// The object is neither visible in the left nor in the right stereo view.
44  SV_NONE = 0,
45  /// The object is visible in the left stereo view.
46  SV_LEFT = 1,
47  /// The object is visible in the right stereo view.
48  SV_RIGHT = 2,
49  /// The object is visbile in left and right stereo view, this is the default property.
50  SV_LEFT_AND_RIGHT = SV_LEFT | SV_RIGHT
51  };
52 
53  public:
54 
55  /**
56  * Returns the stereo visibility property.
57  * @return Stereo visibility
58  * @exception NotSupportedException Is thrown if this function is not supported
59  */
61 
62  /**
63  * Sets the stereo visibility property.
64  * @param stereoVisibility The stereo visibility to be set
65  * @exception NotSupportedException Is thrown if this function is not supported
66  */
67  virtual void setStereoVisibility(const StereoVisibility stereoVisibility);
68 
69  /**
70  * Returns the type of this object.
71  * @see Object::type().
72  */
73  ObjectType type() const override;
74 
75  protected:
76 
77  /**
78  * Creates a new stereo attribute object.
79  */
81 };
82 
83 }
84 
85 }
86 
87 #endif // META_OCEAN_RENDERING_STEREO_ATTRIBUTE_H
This class is the base class for all rendering attribute objects.
Definition: Attribute.h:39
ObjectType
Definition of different object type.
Definition: Object.h:63
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
This class implements a stereo attribute specifying the stereo behavior for associated objects.
Definition: StereoAttribute.h:35
StereoAttribute()
Creates a new stereo attribute object.
virtual StereoVisibility stereoVisibility() const
Returns the stereo visibility property.
ObjectType type() const override
Returns the type of this object.
virtual void setStereoVisibility(const StereoVisibility stereoVisibility)
Sets the stereo visibility property.
StereoVisibility
Definition of different stereo visibilities.
Definition: StereoAttribute.h:42
SmartObjectRef< StereoAttribute > StereoAttributeRef
Definition of a smart object reference holding a stereo attribute.
Definition: StereoAttribute.h:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15