Ocean
TextureTransform.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_TEXTURE_TRANSFORM_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_TEXTURE_TRANSFORM_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace SceneDescription
18 {
19 
20 namespace SDX
21 {
22 
23 namespace X3D
24 {
25 
26 /**
27  * This class implements a x3d texture transform node.
28  * @ingroup scenedescriptionsdxx3d
29  */
30 class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT TextureTransform : virtual public X3DTextureTransformNode
31 {
32  friend class MultiTextureTransform;
33 
34  public:
35 
36  /**
37  * Creates a new x3d texture transform node.
38  * @param environment Node environment
39  */
40  explicit TextureTransform(const SDXEnvironment* environment);
41 
42  protected:
43 
44  /**
45  * Specifies the node type and the fields of this node.
46  * @return Unique node specification of this node
47  */
49 
50  /**
51  * Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
52  * @see SDXNode::onInitialize().
53  */
54  void onInitialize(const Rendering::SceneRef& scene, const Timestamp timestamp) override;
55 
56  /**
57  * Event function to inform the node about a changed field.
58  * @see SDXNode::onFieldChanged().
59  */
60  void onFieldChanged(const std::string& fieldName) override;
61 
62  /**
63  * Returns the address of the most derived object.
64  * @see Node::objectAddress().
65  */
66  size_t objectAddress() const override;
67 
68  /**
69  * Applies this texture transformation to all corresponding texture objects.
70  */
72 
73  protected:
74 
75  /// Center field.
77 
78  /// Rotation field.
80 
81  /// Scale field.
83 
84  /// Translation field.
86 };
87 
88 }
89 
90 }
91 
92 }
93 
94 }
95 
96 #endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_TEXTURE_TRANSFORM_H
This class implements a node specification object.
Definition: scenedescription/Node.h:77
This class implements a x3d multi texture transform node.
Definition: MultiTextureTransform.h:31
This class implements a x3d texture transform node.
Definition: TextureTransform.h:31
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...
void onFieldChanged(const std::string &fieldName) override
Event function to inform the node about a changed field.
NodeSpecification specifyNode()
Specifies the node type and the fields of this node.
size_t objectAddress() const override
Returns the address of the most derived object.
SingleFloat rotation_
Rotation field.
Definition: TextureTransform.h:79
SingleVector2 center_
Center field.
Definition: TextureTransform.h:76
SingleVector2 scale_
Scale field.
Definition: TextureTransform.h:82
SingleVector2 translation_
Translation field.
Definition: TextureTransform.h:85
void applyTextureTransform()
Applies this texture transformation to all corresponding texture objects.
TextureTransform(const SDXEnvironment *environment)
Creates a new x3d texture transform node.
This class implements an abstract x3d texture transform node.
Definition: X3DTextureTransformNode.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