Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
ba89a6a3
Commit
ba89a6a3
authored
Jul 04, 2013
by
ozantonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
line widget set/get line width
parent
158ed299
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
widgets.hpp
modules/viz/include/opencv2/viz/widgets.hpp
+3
-0
simple_widgets.cpp
modules/viz/src/simple_widgets.cpp
+13
-0
test_viz3d.cpp
modules/viz/test/test_viz3d.cpp
+1
-0
No files found.
modules/viz/include/opencv2/viz/widgets.hpp
View file @
ba89a6a3
...
...
@@ -38,6 +38,9 @@ namespace temp_viz
{
public
:
LineWidget
(
const
Point3f
&
pt1
,
const
Point3f
&
pt2
,
const
Color
&
color
=
Color
::
white
());
void
setLineWidth
(
float
line_width
);
float
getLineWidth
();
};
...
...
modules/viz/src/simple_widgets.cpp
View file @
ba89a6a3
...
...
@@ -16,3 +16,15 @@ temp_viz::LineWidget::LineWidget(const Point3f &pt1, const Point3f &pt2, const C
setColor
(
color
);
}
void
temp_viz
::
LineWidget
::
setLineWidth
(
float
line_width
)
{
vtkSmartPointer
<
vtkLODActor
>
actor
=
WidgetAccessor
::
getActor
(
*
this
);
actor
->
GetProperty
()
->
SetLineWidth
(
line_width
);
}
float
temp_viz
::
LineWidget
::
getLineWidth
()
{
vtkSmartPointer
<
vtkLODActor
>
actor
=
WidgetAccessor
::
getActor
(
*
this
);
return
actor
->
GetProperty
()
->
GetLineWidth
();
}
\ No newline at end of file
modules/viz/test/test_viz3d.cpp
View file @
ba89a6a3
...
...
@@ -115,6 +115,7 @@ TEST(Viz_viz3d, accuracy)
v
.
setShapePose
(
"sphere1"
,
cloudPosition
);
v
.
setShapePose
(
"arrow1"
,
cloudPosition
);
lw2
.
setColor
(
temp_viz
::
Color
(
col_blue
,
col_green
,
col_red
));
lw
.
setLineWidth
(
lw
.
getLineWidth
()
+
pos_x
*
10
);
angle_x
+=
0.1
f
;
angle_y
-=
0.1
f
;
...
...
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