Ocean
LiveVideoTexture.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_LIVE_VIDEO_TEXTURE_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_LIVE_VIDEO_TEXTURE_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 unspecified x3d live video texture node.
29  * The x3d specification does not contain this node.
30  * @ingroup scenedescriptionsdxx3d
31  */
32 class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT LiveVideoTexture :
33  virtual public X3DTexture2DNode,
34  virtual public X3DUrlObject
35 {
36  public:
37 
38  /**
39  * Creates a new live video texture node.
40  * @param environment Node environment
41  */
42  LiveVideoTexture(const SDXEnvironment* environment);
43 
44  protected:
45 
46  /**
47  * Specifies the node type and the fields of this node.
48  * @return Unique node specification of this node
49  */
51 
52  /**
53  * Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
54  * @see SDXNode::onInitialize().
55  */
56  void onInitialize(const Rendering::SceneRef& scene, const Timestamp timestamp) override;
57 
58  /**
59  * Event function to inform the node about a changed field.
60  * @see SDXNode::onFieldChanged().
61  */
62  void onFieldChanged(const std::string& fieldName) override;
63 
64  /**
65  * Event function to modify properties of a new medium before it will be started and used as texture.
66  * @see X3DTexture2DNode::onMediumChanged().
67  */
68  void onMediumChanged(const Media::MediumRef& medium) override;
69 
70  /**
71  * Returns the address of the most derived object.
72  * @see Node::objectAddress().
73  */
74  size_t objectAddress() const override;
75 
76  protected:
77 
78  /// Dimension field.
80 
81  /// Frequency field.
83 };
84 
85 }
86 
87 }
88 
89 }
90 
91 }
92 
93 #endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_LIVE_VIDEO_TEXTURE_H
This template class implements a object reference with an internal reference counter.
Definition: base/ObjectRef.h:58
This class implements a node specification object.
Definition: scenedescription/Node.h:77
This class implements an unspecified x3d live video texture node.
Definition: LiveVideoTexture.h:35
LiveVideoTexture(const SDXEnvironment *environment)
Creates a new live video 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...
size_t objectAddress() const override
Returns the address of the most derived object.
void onMediumChanged(const Media::MediumRef &medium) override
Event function to modify properties of a new medium before it will be started and used as texture.
void onFieldChanged(const std::string &fieldName) override
Event function to inform the node about a changed field.
SingleFloat frequency_
Frequency field.
Definition: LiveVideoTexture.h:82
NodeSpecification specifyNode()
Specifies the node type and the fields of this node.
SingleVector2 dimension_
Dimension field.
Definition: LiveVideoTexture.h:79
This class implements an abstract x3d texture 2D node.
Definition: X3DTexture2DNode.h:38
This class implements an abstract x3d url object.
Definition: X3DUrlObject.h:35
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