Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
310ca2b4
Commit
310ca2b4
authored
Apr 09, 2019
by
Pavel Rojtberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ovis: addResourceLocation - only retain unique locations
parent
2c32791a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ovis.cpp
modules/ovis/src/ovis.cpp
+7
-5
No files found.
modules/ovis/src/ovis.cpp
View file @
310ca2b4
...
...
@@ -22,7 +22,7 @@ const char* RESOURCEGROUP_NAME = "OVIS";
Ptr
<
Application
>
_app
;
static
const
char
*
RENDERSYSTEM_NAME
=
"OpenGL 3+ Rendering Subsystem"
;
static
std
::
vector
<
String
>
_extraResourceLocations
;
static
std
::
set
<
String
>
_extraResourceLocations
;
// convert from OpenCV to Ogre coordinates:
static
Quaternion
toOGRE
(
Degree
(
180
),
Vector3
::
UNIT_X
);
...
...
@@ -245,10 +245,9 @@ struct Application : public OgreBites::ApplicationContext, public OgreBites::Inp
ResourceGroupManager
&
rgm
=
ResourceGroupManager
::
getSingleton
();
rgm
.
createResourceGroup
(
RESOURCEGROUP_NAME
);
for
(
size_t
i
=
0
;
i
<
_extraResourceLocations
.
size
();
i
++
)
for
(
auto
loc
:
_extraResourceLocations
)
{
String
loc
=
_extraResourceLocations
[
i
];
String
type
=
StringUtil
::
endsWith
(
loc
,
".zip"
)
?
"Zip"
:
"FileSystem"
;
const
char
*
type
=
StringUtil
::
endsWith
(
loc
,
".zip"
)
?
"Zip"
:
"FileSystem"
;
if
(
!
FileSystemLayer
::
fileExists
(
loc
))
{
...
...
@@ -786,7 +785,10 @@ public:
}
};
CV_EXPORTS_W
void
addResourceLocation
(
const
String
&
path
)
{
_extraResourceLocations
.
push_back
(
path
);
}
CV_EXPORTS_W
void
addResourceLocation
(
const
String
&
path
)
{
_extraResourceLocations
.
insert
(
Ogre
::
StringUtil
::
normalizeFilePath
(
path
,
false
));
}
Ptr
<
WindowScene
>
createWindow
(
const
String
&
title
,
const
Size
&
size
,
int
flags
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment