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
93a79a6f
Commit
93a79a6f
authored
Mar 10, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2454 from paroj:ovisup
parents
1d77931b
788b7836
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
ovis.hpp
modules/ovis/include/opencv2/ovis.hpp
+2
-1
ovis.cpp
modules/ovis/src/ovis.cpp
+6
-1
No files found.
modules/ovis/include/opencv2/ovis.hpp
View file @
93a79a6f
...
...
@@ -109,7 +109,8 @@ public:
CV_WRAP
virtual
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
Scalar
&
value
)
=
0
;
/// @overload
CV_WRAP
virtual
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
String
&
value
)
=
0
;
CV_WRAP
virtual
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
String
&
value
,
int
subEntityIdx
=
-
1
)
=
0
;
/**
* get the property of an entity
...
...
modules/ovis/src/ovis.cpp
View file @
93a79a6f
...
...
@@ -687,7 +687,7 @@ public:
frameCtrlrs
.
erase
(
animstate
);
}
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
String
&
value
)
CV_OVERRIDE
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
String
&
value
,
int
subEntityIdx
)
CV_OVERRIDE
{
CV_Assert
(
prop
==
ENTITY_MATERIAL
);
SceneNode
&
node
=
_getSceneNode
(
sceneMgr
,
name
);
...
...
@@ -698,13 +698,18 @@ public:
Camera
*
cam
=
dynamic_cast
<
Camera
*>
(
node
.
getAttachedObject
(
name
));
if
(
cam
)
{
CV_Assert
(
subEntityIdx
==
-
1
&&
"Camera Entities do not have SubEntities"
);
cam
->
setMaterial
(
mat
);
return
;
}
Entity
*
ent
=
dynamic_cast
<
Entity
*>
(
node
.
getAttachedObject
(
name
));
CV_Assert
(
ent
&&
"invalid entity"
);
if
(
subEntityIdx
<
0
)
ent
->
setMaterial
(
mat
);
else
ent
->
getSubEntities
()[
subEntityIdx
]
->
setMaterial
(
mat
);
}
void
setEntityProperty
(
const
String
&
name
,
int
prop
,
const
Scalar
&
value
)
CV_OVERRIDE
...
...
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