Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Nov 15, 2023
1 parent f244ab4 commit 65dab49
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/rviz/default_plugin/screw_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,13 @@ void ScrewDisplay<MessageType>::processMessagePrivate(const std_msgs::Header& he
visual->setFramePosition(position);
visual->setFrameOrientation(orientation);
float alpha = alpha_property_->getFloat();
float linear_scale = linear_scale_property_->getFloat();
float angular_scale = angular_scale_property_->getFloat();
float width = width_property_->getFloat();
Ogre::ColourValue linear_color = linear_color_property_->getOgreColor();
Ogre::ColourValue angular_color = angular_color_property_->getOgreColor();
visual->setLinearColor(linear_color.r, linear_color.g, linear_color.b, alpha);
visual->setAngularColor(angular_color.r, angular_color.g, angular_color.b, alpha);
visual->setLinearScale(linear_scale);
visual->setAngularScale(angular_scale);
visual->setWidth(width);
visual->setScrew(linear, angular);
visual->setLinearScale(linear_scale_property_->getFloat());
visual->setAngularScale(angular_scale_property_->getFloat());
visual->setWidth(width_property_->getFloat());
visual->setHideSmallValues(hide_small_values_property_->getBool());

// And send it to the end of the circular buffer
Expand Down

0 comments on commit 65dab49

Please sign in to comment.