Ocean
scenedescription/Scene.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_SCENE_H
9 #define META_OCEAN_SCENEDESCRIPTION_SCENE_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace SceneDescription
18 {
19 
20 // Forward declaration
21 class Scene;
22 
23 /**
24  * Definition of a smart object reference for scene desciption scenes.
25  * @see Scene, Node.
26  * @ingroup scenedescription
27  */
29 
30 /**
31  * This class implements the base class for all scene objects providing access to all elements of a scene.
32  * A new scene object can be created by the scene description Manager object.
33  * @ingroup scenedescription
34  */
35 class OCEAN_SCENEDESCRIPTION_EXPORT Scene : virtual public Node
36 {
37  public:
38 
39  /**
40  * Creates a new scene object.
41  * @param filename Scene filename
42  */
43  explicit Scene(const std::string& filename);
44 
45  /**
46  * Returns the filename of this scene.
47  * @return Scene filename
48  */
49  inline const std::string& filename() const;
50 
51  protected:
52 
53  /// Filename of this scene.
54  std::string filename_;
55 };
56 
57 inline const std::string& Scene::filename() const
58 {
59  return filename_;
60 }
61 
62 }
63 
64 }
65 
66 #endif // META_OCEAN_SCENEDESCRIPTION_SCENE_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 objects providing access to all elements of a scen...
Definition: scenedescription/Scene.h:36
const std::string & filename() const
Returns the filename of this scene.
Definition: scenedescription/Scene.h:57
Scene(const std::string &filename)
Creates a new scene object.
std::string filename_
Filename of this scene.
Definition: scenedescription/Scene.h:54
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
SmartObjectRef< Scene, Node > SceneRef
Definition of a smart object reference for scene desciption scenes.
Definition: scenedescription/Scene.h:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15