Commit ec756afe authored by ozantonkal's avatar ozantonkal

trajectorywidget display modes are combined with & instead of |

parent 64cdd821
......@@ -1166,7 +1166,8 @@ cv::viz::TrajectoryWidget::TrajectoryWidget(const std::vector<Affine3f> &path, i
{
vtkSmartPointer<vtkAppendPolyData> appendFilter = vtkSmartPointer<vtkAppendPolyData>::New();
if (display_mode & TrajectoryWidget::DISPLAY_PATH)
// Bitwise and with 3 in order to limit the domain to 2 bits
if ((~display_mode & 3) ^ TrajectoryWidget::DISPLAY_PATH)
{
// Create a poly line along the path
vtkIdType nr_points = path.size();
......@@ -1207,7 +1208,7 @@ cv::viz::TrajectoryWidget::TrajectoryWidget(const std::vector<Affine3f> &path, i
appendFilter->AddInputConnection(polyData->GetProducerPort());
}
if (display_mode & TrajectoryWidget::DISPLAY_FRAMES)
if ((~display_mode & 3) ^ TrajectoryWidget::DISPLAY_FRAMES)
{
// Create frames and transform along the path
vtkSmartPointer<vtkAxes> axes = vtkSmartPointer<vtkAxes>::New();
......
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