Commit ba89a6a3 authored by ozantonkal's avatar ozantonkal

line widget set/get line width

parent 158ed299
......@@ -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();
};
......
......@@ -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
......@@ -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.1f;
angle_y -= 0.1f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment