Ocean
GITextures.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_TEXTURES_H
9 #define META_OCEAN_RENDERING_GI_TEXTURES_H
10 
13 
14 #include "ocean/math/RGBAColor.h"
15 
17 
18 namespace Ocean
19 {
20 
21 namespace Rendering
22 {
23 
24 namespace GlobalIllumination
25 {
26 
27 /**
28  * This class implements a Global Illumination texture attributes object.
29  * @ingroup renderinggi
30  */
31 class OCEAN_RENDERING_GI_EXPORT GITextures :
32  virtual public GIAttribute,
33  virtual public Textures
34 {
35  friend class GIFactory;
36 
37  public:
38 
39  /**
40  * Sets the texture and attribute for a specified texture layer.
41  * @see Textures::setTexture().
42  */
43  void setTexture(const TextureRef& texture, const unsigned int layerIndex) override;
44 
45  /**
46  * Returns the texture color for a given texture coordinate.
47  * @param textureCoordinate Texture coordinate to return the color for
48  * @param color Resulting texture color
49  * @return True, if succeeded
50  */
51  bool textureColor(const TextureCoordinate& textureCoordinate, RGBAColor& color) const;
52 
53  protected:
54 
55  /**
56  * Creates a new Global Illumination textures object.
57  */
59 
60  /**
61  * Destructs a Global Illumination textures objets.
62  */
63  ~GITextures() override;
64 };
65 
66 }
67 
68 }
69 
70 }
71 
72 #endif // META_OCEAN_RENDERING_GI_TEXTURES_H
This class implements a color defined by red, green, blue and alpha parameters.
Definition: RGBAColor.h:41
This class wraps a Global Illumination attribute object.
Definition: GIAttribute.h:35
This class implements a class factory for all Global Illumination objects.
Definition: GIFactory.h:30
This class implements a Global Illumination texture attributes object.
Definition: GITextures.h:34
~GITextures() override
Destructs a Global Illumination textures objets.
bool textureColor(const TextureCoordinate &textureCoordinate, RGBAColor &color) const
Returns the texture color for a given texture coordinate.
GITextures()
Creates a new Global Illumination textures object.
void setTexture(const TextureRef &texture, const unsigned int layerIndex) override
Sets the texture and attribute for a specified texture layer.
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
This class is the base class for all textures objects.
Definition: Textures.h:39
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15