Ocean
Loading...
Searching...
No Matches
SDLScene.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_SCENE_H
9#define META_OCEAN_SCENEDESCRIPTION_SDL_SCENE_H
10
14
15namespace Ocean
16{
17
18namespace SceneDescription
19{
20
21// Forward declaration.
22class SDLScene;
23
24/**
25 * Definition of a smart object reference for scene desciption loader scenes.
26 * @see SDLScene, Node.
27 * @ingroup scenedescription
28 */
30
31/**
32 * This class implements the base class for all sdl scene object providing access to all elements of a scene.
33 * A new scene object can be created by the scene description Manager object.
34 * @ingroup scenedescription
35 */
36class OCEAN_SCENEDESCRIPTION_EXPORT SDLScene :
37 virtual public Scene,
38 virtual public SDLNode
39{
40 public:
41
42 /**
43 * Applies the entire scene to the rendering engine.
44 * @param engine Rendering engine to use
45 * @return Resulting rendering scene object
46 */
48
49 protected:
50
51 /**
52 * Creates a new scene object.
53 * @param filename Scene filename
54 */
55 SDLScene(const std::string& filename);
56
57 /**
58 * Internal function to apply the entire scene to the rendering engine.
59 * @param engine Rendering engine to use
60 * @return Resulting rendering scene object
61 */
63
64 /**
65 * Applies this node to the rendering engine.
66 * Don't use this function for a scene, use Scene::apply(Rendering::Engine&) instead.
67 * @see Node::apply().
68 */
69 Rendering::ObjectRef apply(const Rendering::EngineRef& engine, const SDLScene& scene, SDLNode& parentDescription, const Rendering::ObjectRef& parentRendering) override;
70};
71
72}
73
74}
75
76#endif // META_OCEAN_SCENEDESCRIPTION_SDL_SCENE_H
This class implements the base class for all scene description nodes.
Definition SDLNode.h:39
This class implements the base class for all sdl scene object providing access to all elements of a s...
Definition SDLScene.h:39
Rendering::SceneRef apply(const Rendering::EngineRef &engine)
Applies the entire scene to the rendering engine.
virtual Rendering::SceneRef internalApply(const Rendering::EngineRef &engine)=0
Internal function to apply the entire scene to the rendering engine.
SDLScene(const std::string &filename)
Creates a new scene object.
Rendering::ObjectRef apply(const Rendering::EngineRef &engine, const SDLScene &scene, SDLNode &parentDescription, const Rendering::ObjectRef &parentRendering) override
Applies this node to the rendering engine.
This class implements the base class for all scene objects providing access to all elements of a scen...
Definition scenedescription/Scene.h:36
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition SmartObjectRef.h:90
SmartObjectRef< SDLScene, Node > SDLSceneRef
Definition of a smart object reference for scene desciption loader scenes.
Definition SDLScene.h:29
The namespace covering the entire Ocean framework.
Definition Accessor.h:15