Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
570 B
18 lines
570 B
#include "precomp.hpp" |
|
|
|
|
|
temp_viz::LineWidget::LineWidget(const Point3f &pt1, const Point3f &pt2, const Color &color) |
|
{ |
|
vtkSmartPointer<vtkLineSource> line = vtkSmartPointer<vtkLineSource>::New(); |
|
line->SetPoint1 (pt1.x, pt1.y, pt1.z); |
|
line->SetPoint2 (pt2.x, pt2.y, pt2.z); |
|
line->Update (); |
|
|
|
vtkSmartPointer<vtkDataSetMapper> mapper = vtkSmartPointer<vtkDataSetMapper>::New (); |
|
mapper->SetInput(line->GetOutput ()); |
|
|
|
vtkSmartPointer<vtkLODActor> actor = WidgetAccessor::getActor(*this); |
|
actor->SetMapper(mapper); |
|
|
|
setColor(color); |
|
}
|
|
|