Ocean
Loading...
Searching...
No Matches
GITexture2D.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_2D_H
9#define META_OCEAN_RENDERING_GI_TEXTURE_2D_H
10
13
16
17namespace Ocean
18{
19
20namespace Rendering
21{
22
23namespace GlobalIllumination
24{
25
26/**
27 * This class wraps a Global Illumination texture object.
28 * @ingroup renderinggi
29 */
30class OCEAN_RENDERING_GI_EXPORT GITexture2D :
31 virtual public GITexture,
32 virtual public Texture2D,
33 virtual protected DynamicObject
34{
35 friend class GIFactory;
36
37 public:
38
39 /**
40 * Returns the texture wrap type in s direction.
41 * @see Texture2D::wrapTypeS().
42 */
43 WrapType wrapTypeS() const override;
44
45 /**
46 * Returns the texture wrap type in t direction.
47 * @see Texture2D::wrapTypeT().
48 */
49 WrapType wrapTypeT() const override;
50
51 /**
52 * Sets the texture wrap type in s direction.
53 * @see Texture2D::setWrapTypeS().
54 */
55 bool setWrapTypeS(const WrapType type) override;
56
57 /**
58 * Sets the texture wrap type in t direction.
59 * @see Texture2D::setWrapTypeT().
60 */
61 bool setWrapTypeT(const WrapType type) override;
62
63 /**
64 * Returns the texture color for a given texture coordinate.
65 * @param textureCoordinate Texture coordinate to return the color for
66 * @param color Resulting texture color
67 * @return True, if succeeded
68 */
69 virtual bool textureColor(const TextureCoordinate& textureCoordinate, RGBAColor& color) const = 0;
70
71 protected:
72
73 /**
74 * Creates a new Global Illumination texture 2D object.
75 */
77
78 /**
79 * Destructs a Global Illumination texture 2D object.
80 */
81 ~GITexture2D() override;
82
83 protected:
84
85 /// Wrap type in S direction.
87
88 /// Warp type in T direction.
90};
91
92}
93
94}
95
96}
97
98#endif // META_OCEAN_RENDERING_GLES_TEXTURE_2D_H
This class implements a color defined by red, green, blue and alpha parameters.
Definition RGBAColor.h:41
This class is the base class for all dynamic scene graph objects.
Definition DynamicObject.h:40
This class implements a class factory for all Global Illumination objects.
Definition GIFactory.h:30
This class wraps a Global Illumination texture object.
Definition GITexture2D.h:34
WrapType wrapTypeS() const override
Returns the texture wrap type in s direction.
WrapType wrapTypeT_
Warp type in T direction.
Definition GITexture2D.h:89
~GITexture2D() override
Destructs a Global Illumination texture 2D object.
bool setWrapTypeS(const WrapType type) override
Sets the texture wrap type in s direction.
WrapType wrapTypeT() const override
Returns the texture wrap type in t direction.
virtual bool textureColor(const TextureCoordinate &textureCoordinate, RGBAColor &color) const =0
Returns the texture color for a given texture coordinate.
GITexture2D()
Creates a new Global Illumination texture 2D object.
bool setWrapTypeT(const WrapType type) override
Sets the texture wrap type in t direction.
WrapType wrapTypeS_
Wrap type in S direction.
Definition GITexture2D.h:86
This class is the base class for all Global Illumination texture objects.
Definition GITexture.h:36
This class is the base class for all 2D textures.
Definition Texture2D.h:38
WrapType
Definition of different texture wrapping types.
Definition rendering/Texture.h:96
The namespace covering the entire Ocean framework.
Definition Accessor.h:15