Ocean
MultiTexture.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_SCENEDESCRIPTION_SDX_X3D_MULTI_TEXTURE_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_MULTI_TEXTURE_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace SceneDescription
20 {
21 
22 namespace SDX
23 {
24 
25 namespace X3D
26 {
27 
28 /**
29  * This class implements a x3d multi texture node.
30  * @ingroup scenedescriptionsdxx3d
31  */
32 class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT MultiTexture : virtual public X3DTextureNode
33 {
34  public:
35 
36  /**
37  * Creates a new x3d multi texture node.
38  * @param environment Node environment
39  */
40  MultiTexture(const SDXEnvironment* environment);
41 
42  protected:
43 
44  /**
45  * Destructs a xed multi texture node.
46  */
47  ~MultiTexture() override;
48 
49  /**
50  * Specifies the node type and the fields of this node.
51  * @return Unique node specification of this node
52  */
54 
55  /**
56  * Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
57  * @see SDXNode::onInitialize().
58  */
59  void onInitialize(const Rendering::SceneRef& scene, const Timestamp timestamp) override;
60 
61  /**
62  * Event function to inform the node about a changed field.
63  * @see SDXNode::onFieldChanged().
64  */
65  void onFieldChanged(const std::string& fieldName) override;
66 
67  /**
68  * Translates the environment mode.
69  * @param mode X3D environment mode to translate
70  * @return Resulting rendering environment mode
71  */
73 
74  /**
75  * Returns the address of the most derived object.
76  * @see Node::objectAddress().
77  */
78  size_t objectAddress() const override;
79 
80  protected:
81 
82  /// Alpha field.
84 
85  /// Color field.
87 
88  /// Function field.
90 
91  /// Mode field.
93 
94  /// Source field.
96 
97  /// Texture field.
99 };
100 
101 }
102 
103 }
104 
105 }
106 
107 }
108 
109 #endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_MULTI_TEXTURE_H
EnvironmentMode
Definition of possible texture environment modes.
Definition: rendering/Texture.h:45
This class implements a node specification object.
Definition: scenedescription/Node.h:77
This class implements a x3d multi texture node.
Definition: MultiTexture.h:33
NodeSpecification specifyNode()
Specifies the node type and the fields of this node.
MultiTexture(const SDXEnvironment *environment)
Creates a new x3d multi texture node.
static Rendering::Texture::EnvironmentMode translateEnvironmentMode(const std::string &mode)
Translates the environment mode.
size_t objectAddress() const override
Returns the address of the most derived object.
void onFieldChanged(const std::string &fieldName) override
Event function to inform the node about a changed field.
SingleFloat alpha_
Alpha field.
Definition: MultiTexture.h:83
SingleColor color_
Color field.
Definition: MultiTexture.h:86
MultiNode texture_
Texture field.
Definition: MultiTexture.h:98
MultiString function_
Function field.
Definition: MultiTexture.h:89
~MultiTexture() override
Destructs a xed multi texture node.
void onInitialize(const Rendering::SceneRef &scene, const Timestamp timestamp) override
Event function to inform the node that it has been initialized and can apply all internal values to c...
MultiString source_
Source field.
Definition: MultiTexture.h:95
MultiString mode_
Mode field.
Definition: MultiTexture.h:92
This class implemenst an abstract x3d texture node.
Definition: X3DTextureNode.h:31
This class implements a node environment container.
Definition: SDXNode.h:62
This class implements a timestamp.
Definition: Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15