Ocean
scenedescription/sdx/x3d/Text.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_TEXT_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_TEXT_H
10 
13 
14 #include "ocean/rendering/Text.h"
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 text node.
30  * @ingroup scenedescriptionsdxx3d
31  */
32 class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT Text : virtual public X3DGeometryNode
33 {
34  public:
35 
36  /**
37  * Creates a x3d cylinder node.
38  * @param environment Node environment
39  */
40  explicit Text(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 the string field.
70  */
71  void applyString(Rendering::Text& text) const;
72 
73  protected:
74 
75  /// FontStyle field.
77 
78  /// Lenght field.
80 
81  /// MaxExtent field.
83 
84  /// String field.
86 
87  /// LineBounds field.
89 
90  /// Origin field.
92 
93  /// TextBounds field.
95 
96  /// Solid filed.
98 };
99 
100 }
101 
102 }
103 
104 }
105 
106 }
107 
108 #endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_TEXT_H
This class is the base class for all texts.
Definition: rendering/Text.h:39
This class implements a node specification object.
Definition: scenedescription/Node.h:77
This class implements a x3d text node.
Definition: scenedescription/sdx/x3d/Text.h:33
void applyString(Rendering::Text &text) const
Applies the string field.
MultiVector2 lineBounds_
LineBounds field.
Definition: scenedescription/sdx/x3d/Text.h:88
MultiString string_
String field.
Definition: scenedescription/sdx/x3d/Text.h:85
SingleFloat maxExtent_
MaxExtent field.
Definition: scenedescription/sdx/x3d/Text.h:82
SingleVector2 textBounds_
TextBounds field.
Definition: scenedescription/sdx/x3d/Text.h:94
Text(const SDXEnvironment *environment)
Creates a x3d cylinder node.
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.
SingleBool solid_
Solid filed.
Definition: scenedescription/sdx/x3d/Text.h:97
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.
SingleVector3 origin_
Origin field.
Definition: scenedescription/sdx/x3d/Text.h:91
MultiFloat length_
Lenght field.
Definition: scenedescription/sdx/x3d/Text.h:79
SingleNode fontStyle_
FontStyle field.
Definition: scenedescription/sdx/x3d/Text.h:76
This class implements an abstract x3d geometry node.
Definition: X3DGeometryNode.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