Ocean
Loading...
Searching...
No Matches
Appearance.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_APPEARANCE_H
9#define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_APPEARANCE_H
10
13
15
16namespace Ocean
17{
18
19namespace SceneDescription
20{
21
22namespace SDX
23{
24
25namespace X3D
26{
27
28/**
29 * This class implements an x3d apperance node.
30 * @ingroup scenedescriptionsdxx3d
31 */
32class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT Appearance : virtual public X3DAppearanceNode
33{
34 public:
35
36 /**
37 * Creates a new appearance node.
38 * @param environment Node environment
39 */
40 explicit Appearance(const SDXEnvironment* environment);
41
42 /**
43 * Destructs an appearance node.
44 */
45 ~Appearance() override;
46
47 /**
48 * (Re-)Checks whether the connected rendering object must contain a blend attribute.
49 * Further, the blend attribute is added or removed if necessary.
50 * @return True, if a blend attribute is necessary
51 */
53
54 protected:
55
56 /**
57 * Specifies the node type and the fields of this node.
58 * @return Unique node specification of this node
59 */
61
62 /**
63 * Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
64 * @see SDXNode::onInitialize().
65 */
66 void onInitialize(const Rendering::SceneRef& scene, const Timestamp timestamp) override;
67
68 /**
69 * Explicit changing event function for node fields.
70 * @see X3DNode::onFieldChanging().
71 */
72 bool onFieldChanging(const std::string& fieldName, const Field& field) override;
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 /// FillProperties field.
84
85 /// LineProperties field.
87
88 /// Material field.
90
91 /// Shaders field.
93
94 /// Texture field.
96
97 /// TextureTransform.
99
100 /// IsPhantom field.
102
103 /// Explicit rendering textures object.
105};
106
107}
108
109}
110
111}
112
113}
114
115#endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_APPEARANCE_H
This class is the base class for all scene description fields.
Definition Field.h:36
This class implements a node specification object.
Definition scenedescription/Node.h:77
This class implements an x3d apperance node.
Definition Appearance.h:33
bool checkTransparencyState()
(Re-)Checks whether the connected rendering object must contain a blend attribute.
bool onFieldChanging(const std::string &fieldName, const Field &field) override
Explicit changing event function for node fields.
SingleNode textureTransform_
TextureTransform.
Definition Appearance.h:98
NodeSpecification specifyNode()
Specifies the node type and the fields of this node.
SingleNode material_
Material field.
Definition Appearance.h:89
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...
SingleBool isPhantom_
IsPhantom field.
Definition Appearance.h:101
SingleNode texture_
Texture field.
Definition Appearance.h:95
~Appearance() override
Destructs an appearance node.
MultiNode shaders_
Shaders field.
Definition Appearance.h:92
SingleNode fillProperties_
FillProperties field.
Definition Appearance.h:83
size_t objectAddress() const override
Returns the address of the most derived object.
Appearance(const SDXEnvironment *environment)
Creates a new appearance node.
SingleNode lineProperties_
LineProperties field.
Definition Appearance.h:86
Rendering::TexturesRef explicitRenderingTextures_
Explicit rendering textures object.
Definition Appearance.h:104
This class implements an abstract x3d appearance node.
Definition X3DAppearanceNode.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