Ocean
Loading...
Searching...
No Matches
SDXUpdateNode.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_UPDATE_NODE_H
9#define META_OCEAN_SCENEDESCRIPTION_SDX_UPDATE_NODE_H
10
13
14namespace Ocean
15{
16
17namespace SceneDescription
18{
19
20/**
21 * This class implements the base class for all nodes needing update calls regularly.
22 * @ingroup scenedescription
23 */
24class OCEAN_SCENEDESCRIPTION_EXPORT SDXUpdateNode : virtual public SDXNode
25{
26 friend class Manager;
27
28 public:
29
30 /**
31 * Creates a new update node and registers it at the scene description manager.
32 * @param environment Node environment
33 */
34 SDXUpdateNode(const SDXEnvironment* environment);
35
36 /**
37 * Destructs an update node and unregisters it from the scene description manager.
38 */
39 ~SDXUpdateNode() override;
40
41 protected:
42
43 /**
44 * Pre update event function.
45 * A derivated object must re-implement this function to receive pre-update events.
46 * @param view Rendering view to be used for rendering
47 * @param timestamp Preferred update timestamp
48 * @return Actually used update timestamp
49 */
50 virtual Timestamp onPreUpdate(const Rendering::ViewRef& view, const Timestamp timestamp);
51
52 /**
53 * Update event function.
54 * A derivated object must re-implement this function to receive update events.
55 * @param view Rendering view to be used for rendering
56 * @param timestamp Preferred update timestamp
57 */
58 virtual void onUpdate(const Rendering::ViewRef& view, const Timestamp timestamp);
59};
60
61}
62
63}
64
65#endif // META_OCEAN_SCENEDESCRIPTION_SDX_UPDATE_NODE_H
This class implements the manager for all scene descriptions.
Definition scenedescription/Manager.h:101
This class implements a node environment container.
Definition SDXNode.h:62
This class implements the base class for all SDX scene description nodes.
Definition SDXNode.h:50
This class implements the base class for all nodes needing update calls regularly.
Definition SDXUpdateNode.h:25
virtual Timestamp onPreUpdate(const Rendering::ViewRef &view, const Timestamp timestamp)
Pre update event function.
~SDXUpdateNode() override
Destructs an update node and unregisters it from the scene description manager.
SDXUpdateNode(const SDXEnvironment *environment)
Creates a new update node and registers it at the scene description manager.
virtual void onUpdate(const Rendering::ViewRef &view, const Timestamp timestamp)
Update event function.
This class implements a timestamp.
Definition Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15