line widget set/get line width
This commit is contained in:
parent
158ed299c1
commit
ba89a6a34a
@ -38,6 +38,9 @@ namespace temp_viz
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color = Color::white());
|
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);
|
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();
|
||||||
|
}
|
@ -115,6 +115,7 @@ TEST(Viz_viz3d, accuracy)
|
|||||||
v.setShapePose("sphere1", cloudPosition);
|
v.setShapePose("sphere1", cloudPosition);
|
||||||
v.setShapePose("arrow1", cloudPosition);
|
v.setShapePose("arrow1", cloudPosition);
|
||||||
lw2.setColor(temp_viz::Color(col_blue, col_green, col_red));
|
lw2.setColor(temp_viz::Color(col_blue, col_green, col_red));
|
||||||
|
lw.setLineWidth(lw.getLineWidth()+pos_x * 10);
|
||||||
|
|
||||||
angle_x += 0.1f;
|
angle_x += 0.1f;
|
||||||
angle_y -= 0.1f;
|
angle_y -= 0.1f;
|
||||||
|
Loading…
Reference in New Issue
Block a user