Ocean
X3DShapeNode.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_X3D_SHAPE_NODE_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_X3D_SHAPE_NODE_H
10 
14 
15 namespace Ocean
16 {
17 
18 namespace SceneDescription
19 {
20 
21 namespace SDX
22 {
23 
24 namespace X3D
25 {
26 
27 /**
28  * This class implements an abstract x3d shape node.
29  * @ingroup scenedescriptionsdxx3d
30  */
31 class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT X3DShapeNode :
32  virtual public X3DBoundedObject,
33  virtual public X3DChildNode
34 {
35  protected:
36 
37  /**
38  * Creates a new abstract x3d shape node.
39  * @param environment Node environment
40  */
41  explicit X3DShapeNode(const SDXEnvironment* environment);
42 
43  protected:
44 
45  /**
46  * Destructs a x3d shape node.
47  */
48  ~X3DShapeNode() override;
49 
50  /**
51  * Registers the fields of this node.
52  * @param specification Node specification receiving the field informations
53  */
54  void registerFields(NodeSpecification& specification);
55 
56  /**
57  * Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
58  * @see SDXNode::onInitialize().
59  */
60  void onInitialize(const Rendering::SceneRef& scene, const Timestamp timestamp) override;
61 
62  /**
63  * Explicit changing event function for node fields.
64  * @see X3DNode::onFieldChanging().
65  */
66  bool onFieldChanging(const std::string& fieldName, const Field& field) override;
67 
68  protected:
69 
70  /// Appearance field.
72 
73  /// Geometry field.
75 };
76 
77 }
78 
79 }
80 
81 }
82 
83 }
84 
85 #endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_X3D_SHAPE_NODE_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 abstract x3d bounded object.
Definition: X3DBoundedObject.h:33
This class implements an abstract x3d child node.
Definition: X3DChildNode.h:31
This class implements an abstract x3d shape node.
Definition: X3DShapeNode.h:34
~X3DShapeNode() override
Destructs a x3d shape node.
SingleNode appearance_
Appearance field.
Definition: X3DShapeNode.h:71
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...
SingleNode geometry_
Geometry field.
Definition: X3DShapeNode.h:74
bool onFieldChanging(const std::string &fieldName, const Field &field) override
Explicit changing event function for node fields.
void registerFields(NodeSpecification &specification)
Registers the fields of this node.
X3DShapeNode(const SDXEnvironment *environment)
Creates a new abstract x3d shape node.
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