Skip to content
Snippets Groups Projects
Commit 89a41e0a authored by Harald Scheirich's avatar Harald Scheirich
Browse files

[BUG] Swigwrapper did not like the private NamedMap

parent 9bd16690
No related branches found
No related tags found
No related merge requests found
......@@ -362,8 +362,9 @@ Scene::removeLight(const std::string& lightName)
std::string
Scene::getCameraName(const std::shared_ptr<Camera> cam) const
{
using MapType = std::unordered_map<std::string, std::shared_ptr<Camera>>;
auto i = std::find_if(m_cameras.begin(), m_cameras.end(),
[&cam](const NamedMap<Camera>::value_type& j) { return j.second == cam; });
[&cam](const MapType::value_type& j) { return j.second == cam; });
if (i != m_cameras.end())
{
return i->first;
......
......@@ -78,10 +78,10 @@ struct SceneConfig
///
class Scene : public EventObject
{
template<class T>
using NamedMap = std::unordered_map<std::string, std::shared_ptr<T>>;
public:
template<class T>
using NamedMap = std::unordered_map<std::string, std::shared_ptr<T>>;
Scene(const std::string& name, std::shared_ptr<SceneConfig> config = std::make_shared<SceneConfig>());
virtual ~Scene() override = default;
......@@ -185,7 +185,8 @@ public:
///
/// \brief Get and unordered map of cameras with names
///
const NamedMap<Camera>& getCameras() const { return m_cameras; }
const std::unordered_map<std::string, std::shared_ptr<Camera>>&
getCameras() const { return m_cameras; }
///
/// \brief Add light from the scene
......@@ -288,10 +289,10 @@ protected:
std::string m_name; ///> Name of the scene
std::unordered_set<std::shared_ptr<SceneObject>> m_sceneObjects;
NamedMap<Light> m_lightsMap;
std::unordered_map<std::string, std::shared_ptr<Light>> m_lightsMap;
std::shared_ptr<IBLProbe> m_globalIBLProbe = nullptr;
NamedMap<Camera> m_cameras;
std::unordered_map<std::string, std::shared_ptr<Camera>> m_cameras;
std::shared_ptr<Camera> m_activeCamera;
std::shared_ptr<CollisionGraph> m_collisionGraph;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment