Ocean
SDLNode.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_SDL_NODE_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDL_NODE_H
10 
13 
14 #include "ocean/rendering/Object.h"
15 
16 namespace Ocean
17 {
18 
19 namespace SceneDescription
20 {
21 
22 // Forward declaration.
23 class SDLNode;
24 // Forward declaration.
25 class SDLScene;
26 
27 /**
28  * Definition of a smart object reference for loader scene description nodes.
29  * @see SDLNode, Node.
30  * @ingroup scenedescription
31  */
33 
34 /**
35  * This class implements the base class for all scene description nodes.
36  * @ingroup scenedescription
37  */
38 class OCEAN_SCENEDESCRIPTION_EXPORT SDLNode : virtual public Node
39 {
40  public:
41 
42  /**
43  * Returns the scene description type of this node.
44  * @see Node::descriptionType().
45  */
46  DescriptionType descriptionType() const override;
47 
48  /**
49  * Applies this node to the rendering engine.
50  * @param engine Rendering engine to apply to
51  * @param scene Scene object holding all nodes
52  * @param parentDescription Parent scene description node
53  * @param parentRendering Parent rendering node
54  * @return Resulting rendering object
55  */
56  virtual Rendering::ObjectRef apply(const Rendering::EngineRef& engine, const SDLScene& scene, SDLNode& parentDescription, const Rendering::ObjectRef& parentRendering) = 0;
57 };
58 
59 }
60 
61 }
62 
63 #endif // META_OCEAN_SCENEDESCRIPTION_SDL_NODE_H
This class is the base class for all scene description nodes.
Definition: scenedescription/Node.h:49
This class implements the base class for all scene description nodes.
Definition: SDLNode.h:39
DescriptionType descriptionType() const override
Returns the scene description type of this node.
virtual Rendering::ObjectRef apply(const Rendering::EngineRef &engine, const SDLScene &scene, SDLNode &parentDescription, const Rendering::ObjectRef &parentRendering)=0
Applies this node to the rendering engine.
This class implements the base class for all sdl scene object providing access to all elements of a s...
Definition: SDLScene.h:39
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
SmartObjectRef< SDLNode, Node > SDLNodeRef
Definition of a smart object reference for loader scene description nodes.
Definition: SDLNode.h:25
DescriptionType
Definition of different scene description types.
Definition: SceneDescription.h:64
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15