Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
iMSTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Boeckel
iMSTK
Commits
89a41e0a
Commit
89a41e0a
authored
3 years ago
by
Harald Scheirich
Browse files
Options
Downloads
Patches
Plain Diff
[BUG] Swigwrapper did not like the private NamedMap
parent
9bd16690
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Scene/imstkScene.cpp
+2
-1
2 additions, 1 deletion
Source/Scene/imstkScene.cpp
Source/Scene/imstkScene.h
+7
-6
7 additions, 6 deletions
Source/Scene/imstkScene.h
with
9 additions
and
7 deletions
Source/Scene/imstkScene.cpp
+
2
−
1
View file @
89a41e0a
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Source/Scene/imstkScene.h
+
7
−
6
View file @
89a41e0a
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment