Ocean
PhantomAttribute.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_PHANTOM_ATTRIBUTE_H
9 #define META_OCEAN_RENDERING_PHANTOM_ATTRIBUTE_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace Rendering
18 {
19 
20 // Forward declaration
21 class PhantomAttribute;
22 
23 /**
24  * Definition of a smart object reference holding a phantom attribute.
25  * @see SmartObjectRef, PhantomAttribute.
26  * @ingroup rendering
27  */
29 
30 /**
31  * This class is the base class for all phantom attributes.
32  * @see Attribute
33  * @ingroup rendering
34  */
35 class OCEAN_RENDERING_EXPORT PhantomAttribute : virtual public Attribute
36 {
37  public:
38 
39  /**
40  * Definition of different phantom modes.
41  */
43  {
44  /// Invalid phantom mode.
46  /// Default phantom mode.
48  /// Background color phantom mode.
50  /// Debug phantom mode.
52  /// Background view phantom mode.
53  PM_VIDEO
54  };
55 
56  /**
57  * Definition of extenced phantom modes.
58  * **TODO** Merge this enum with enum PhantomMode
59  */
61  {
62  /// Invalid mode.
63  EPM_INVALID = 0,
64  // The default phantom video mode.
65  EPM_VIDEO = PM_VIDEO,
66  /// The fast phantom video mode.
68  /// The default phantom video mode with explicit texture coordinates.
70  /// The fast phantom video mode with explicit texture coordinates.
72  };
73 
74  public:
75 
76  /**
77  * Returns the type of this object.
78  * @see Object::type().
79  */
80  ObjectType type() const override;
81 
82  protected:
83 
84  /**
85  * Creates a new phantom attribute.
86  */
88 
89  protected:
90 
91  /// Attribute phantom mode.
92  unsigned int attributePhantomMode;
93 };
94 
95 }
96 
97 }
98 
99 #endif // META_OCEAN_RENDERING_PHANTOM_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 is the base class for all phantom attributes.
Definition: PhantomAttribute.h:36
ObjectType type() const override
Returns the type of this object.
PhantomMode
Definition of different phantom modes.
Definition: PhantomAttribute.h:43
@ PM_COLOR
Background color phantom mode.
Definition: PhantomAttribute.h:49
@ PM_INVALID
Invalid phantom mode.
Definition: PhantomAttribute.h:45
@ PM_DEBUG
Debug phantom mode.
Definition: PhantomAttribute.h:51
@ PM_DEFAULT
Default phantom mode.
Definition: PhantomAttribute.h:47
ExtendedPhantomMode
Definition of extenced phantom modes.
Definition: PhantomAttribute.h:61
@ EPM_VIDEO_FAST
The fast phantom video mode.
Definition: PhantomAttribute.h:67
@ EPM_VIDEO_FAST_TEXTURE_COORDINATES
The fast phantom video mode with explicit texture coordinates.
Definition: PhantomAttribute.h:71
@ EPM_VIDEO_TEXTURE_COORDINATES
The default phantom video mode with explicit texture coordinates.
Definition: PhantomAttribute.h:69
PhantomAttribute()
Creates a new phantom attribute.
unsigned int attributePhantomMode
Attribute phantom mode.
Definition: PhantomAttribute.h:92
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
SmartObjectRef< PhantomAttribute > PhantomAttributeRef
Definition of a smart object reference holding a phantom attribute.
Definition: PhantomAttribute.h:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15