Ocean
GITexture.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_GI_TEXTURE_H
9 #define META_OCEAN_RENDERING_GI_TEXTURE_H
10 
13 
15 
17 
18 #include "ocean/base/Frame.h"
19 
20 namespace Ocean
21 {
22 
23 namespace Rendering
24 {
25 
26 namespace GlobalIllumination
27 {
28 
29 /**
30  * This class is the base class for all Global Illumination texture objects.
31  * @ingroup renderinggi
32  */
33 class OCEAN_RENDERING_GI_EXPORT GITexture :
34  virtual public GIObject,
35  virtual public Texture
36 {
37  public:
38 
39  /**
40  * Returns the name of the texture e.g., in a shader.
41  * @see Texture::textureName().
42  */
43  std::string textureName() const override;
44 
45  /**
46  * Sets the name of the texture e.g., in a shader.
47  * @see Texture::setTextureName().
48  */
49  bool setTextureName(const std::string& name) override;
50 
51  /**
52  * Returns the texture transformation matrix.
53  * @see Texture::transformation().
54  */
56 
57  /**
58  * Returns the environment mode for this texture.
59  * @see Texture::environmentMode().
60  */
61  EnvironmentMode environmentMode() const override;
62 
63  /**
64  * Returns the minification filter mode for this texture.
65  * @see Texture::minificationFilterMode().
66  */
68 
69  /**
70  * Returns the magnification filter mode for this texture.
71  * @see Texture::magnificationFilterMode().
72  */
74 
75  /**
76  * Sets the texture transformation matrix.
77  * @see Texture::setTransformation().
78  */
79  void setTransformation(const HomogenousMatrix4& transformation) override;
80 
81  /**
82  * Sets the environment mode for this texture.
83  * @see Texture::setEnvironmentMode().
84  */
85  void setEnvironmentMode(const EnvironmentMode mode) override;
86 
87  /**
88  * Sets the minification filter mode for this texture.
89  * @see Texture::setMinificationFilterMode().
90  */
91  void setMinificationFilterMode(const MinFilterMode mode) override;
92 
93  /**
94  * Sets the magnification filter mode for this texture.
95  * @see Texture::setMagnificationFilterMode().
96  */
97  void setMagnificationFilterMode(const MagFilterMode mode) override;
98 
99  protected:
100 
101  /**
102  * Creates a new Global Illumination texture object.
103  */
105 
106  /**
107  * Destructs a Global Illumination texture object.
108  */
109  ~GITexture() override;
110 
111  protected:
112 
113  /// Homogeneous texture transformation matrix.
115 
116  /// Texture environment mode.
118 
119  /// Texture minification filter mode.
121 
122  /// Texture magnification filter mode.
124 
125  /// Flag determining whether the texture should be a mipmap texture.
127 
128  /// The name of the texture, actually not used.
129  std::string textureName_ = std::string("texture");
130 };
131 
132 }
133 
134 }
135 
136 }
137 
138 #endif // META_OCEAN_RENDERING_GLES_TEXTURE_H
This class is the base class for all Global Illumination objects.
Definition: GIObject.h:29
This class is the base class for all Global Illumination texture objects.
Definition: GITexture.h:36
EnvironmentMode textureEnvironmentMode
Texture environment mode.
Definition: GITexture.h:117
MagFilterMode textureMagnificationFilterMode
Texture magnification filter mode.
Definition: GITexture.h:123
MinFilterMode textureMinificationFilterMode
Texture minification filter mode.
Definition: GITexture.h:120
~GITexture() override
Destructs a Global Illumination texture object.
void setMagnificationFilterMode(const MagFilterMode mode) override
Sets the magnification filter mode for this texture.
HomogenousMatrix4 transformation() const override
Returns the texture transformation matrix.
HomogenousMatrix4 textureTransformation
Homogeneous texture transformation matrix.
Definition: GITexture.h:114
void setEnvironmentMode(const EnvironmentMode mode) override
Sets the environment mode for this texture.
bool setTextureName(const std::string &name) override
Sets the name of the texture e.g., in a shader.
EnvironmentMode environmentMode() const override
Returns the environment mode for this texture.
MagFilterMode magnificationFilterMode() const override
Returns the magnification filter mode for this texture.
bool textureShouldUseMipmaps
Flag determining whether the texture should be a mipmap texture.
Definition: GITexture.h:126
void setTransformation(const HomogenousMatrix4 &transformation) override
Sets the texture transformation matrix.
std::string textureName() const override
Returns the name of the texture e.g., in a shader.
GITexture()
Creates a new Global Illumination texture object.
MinFilterMode minificationFilterMode() const override
Returns the minification filter mode for this texture.
void setMinificationFilterMode(const MinFilterMode mode) override
Sets the minification filter mode for this texture.
This class is the base class for all textures.
Definition: rendering/Texture.h:38
MagFilterMode
Definition of possible magnification filter modes.
Definition: rendering/Texture.h:83
EnvironmentMode
Definition of possible texture environment modes.
Definition: rendering/Texture.h:45
MinFilterMode
Definition of possible minification filter modes.
Definition: rendering/Texture.h:61
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15