Ocean
Loading...
Searching...
No Matches
DynamicObject.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_RENDERING_DYNAMIC_OBJECT_H
9#define META_OCEAN_RENDERING_DYNAMIC_OBJECT_H
10
14
16
17namespace Ocean
18{
19
20namespace Rendering
21{
22
23// Forward declaration
24class DynamicObject;
25
26/**
27 * Definition of a smart object reference holding a dynamic object.
28 * @see SmartObjectRef, DynamicObject.
29 * @ingroup rendering
30 */
32
33
34/**
35 * This class is the base class for all dynamic scene graph objects.<br>
36 * The class holds an internal update function which is called by the framebuffer.
37 * @ingroup rendering
38 */
39class OCEAN_RENDERING_EXPORT DynamicObject : virtual public Object
40{
41 friend class Engine;
42
43 protected:
44
45 /**
46 * Creates a new dynamic object.
47 */
49
50 /**
51 * Destructs a dynamic object.
52 */
53 ~DynamicObject() override;
54
55 /**
56 * Registers this dynamic object at the framebuffer update queue.
57 */
59
60 /**
61 * Unregisteres this dynamic object at the frambuffer update queue.
62 */
64
65 /**
66 * Update function called by the framebuffer.
67 * @param view Associated view
68 * @param timestamp Update timestamp
69 */
70 virtual void onDynamicUpdate(const ViewRef& view, const Timestamp timestamp) = 0;
71};
72
73}
74
75}
76
77#endif // META_OCEAN_RENDERING_DYNAMIC_OBJECT_H
This class is the base class for all dynamic scene graph objects.
Definition DynamicObject.h:40
void registerDynamicUpdateObject()
Registers this dynamic object at the framebuffer update queue.
void unregisterDynamicUpdateObject()
Unregisteres this dynamic object at the frambuffer update queue.
DynamicObject()
Creates a new dynamic object.
virtual void onDynamicUpdate(const ViewRef &view, const Timestamp timestamp)=0
Update function called by the framebuffer.
~DynamicObject() override
Destructs a dynamic object.
This class is the base class for all rendering engines like.
Definition Engine.h:46
This class is the base class for all rendering objects.
Definition Object.h:54
This class implements a smart rendering object reference.
Definition rendering/ObjectRef.h:34
This class implements a timestamp.
Definition Timestamp.h:36
SmartObjectRef< DynamicObject > DynamicObjectRef
Definition of a smart object reference holding a dynamic object.
Definition DynamicObject.h:31
The namespace covering the entire Ocean framework.
Definition Accessor.h:15