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
173b7f51
Commit
173b7f51
authored
Jun 24, 2019
by
dnandha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ovis: fix play / stop animation for multiple entities
ovis: fix build on windows platform (type conversion)
parent
f0d30f2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
ovis.cpp
modules/ovis/src/ovis.cpp
+7
-6
No files found.
modules/ovis/src/ovis.cpp
View file @
173b7f51
...
...
@@ -12,6 +12,7 @@
#include <opencv2/calib3d.hpp>
#include <opencv2/core/utils/configuration.private.hpp>
namespace
cv
{
namespace
ovis
...
...
@@ -277,7 +278,7 @@ class WindowSceneImpl : public WindowScene
RenderWindow
*
rWin
;
Ptr
<
OgreBites
::
CameraMan
>
camman
;
Ptr
<
Rectangle2D
>
bgplane
;
std
::
unordered_map
<
String
,
Controller
<
Real
>*>
frameCtrlrs
;
std
::
unordered_map
<
AnimationState
*
,
Controller
<
Real
>*>
frameCtrlrs
;
Ogre
::
RenderTarget
*
depthRTT
;
int
flags
;
...
...
@@ -600,9 +601,9 @@ public:
animstate
->
setEnabled
(
true
);
animstate
->
setLoop
(
loop
);
if
(
frameCtrlrs
.
find
(
anim
nam
e
)
!=
frameCtrlrs
.
end
())
return
;
if
(
frameCtrlrs
.
find
(
anim
stat
e
)
!=
frameCtrlrs
.
end
())
return
;
frameCtrlrs
.
insert
({
anim
nam
e
,
anim
stat
e
,
Ogre
::
ControllerManager
::
getSingleton
().
createFrameTimePassthroughController
(
Ogre
::
AnimationStateControllerValue
::
create
(
animstate
,
true
)
)
...
...
@@ -620,8 +621,8 @@ public:
animstate
->
setEnabled
(
false
);
animstate
->
setTimePosition
(
0
);
Ogre
::
ControllerManager
::
getSingleton
().
destroyController
(
frameCtrlrs
[
anim
nam
e
]);
frameCtrlrs
.
erase
(
anim
nam
e
);
Ogre
::
ControllerManager
::
getSingleton
().
destroyController
(
frameCtrlrs
[
anim
stat
e
]);
frameCtrlrs
.
erase
(
anim
stat
e
);
}
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
String
&
value
)
CV_OVERRIDE
...
...
@@ -659,7 +660,7 @@ public:
Entity
*
ent
=
dynamic_cast
<
Entity
*>
(
node
.
getAttachedObject
(
name
));
CV_Assert
(
ent
&&
"invalid entity"
);
ent
->
getSkeleton
()
->
setBlendMode
(
static_cast
<
Ogre
::
SkeletonAnimationBlendMode
>
(
value
[
0
]
));
ent
->
getSkeleton
()
->
setBlendMode
(
static_cast
<
Ogre
::
SkeletonAnimationBlendMode
>
(
int
(
value
[
0
])
));
break
;
}
default
:
...
...
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