Skip to content

Commit

Permalink
Avoid unnecessary addPoints in PointCloudCommon::update by switching …
Browse files Browse the repository at this point in the history
…setRenderMode and addPoints (#1122)
  • Loading branch information
Thomas authored and wjwwood committed Aug 17, 2017
1 parent c5c5c1c commit b01e255
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rviz/default_plugin/point_cloud_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ void PointCloudCommon::update(float wall_dt, float ros_dt)
bool per_point_alpha = findChannelIndex(cloud_info->message_, "rgba") != -1;

cloud_info->cloud_.reset( new PointCloud() );
cloud_info->cloud_->addPoints( &(cloud_info->transformed_points_.front()), cloud_info->transformed_points_.size() );
cloud_info->cloud_->setRenderMode( mode );
cloud_info->cloud_->addPoints( &(cloud_info->transformed_points_.front()), cloud_info->transformed_points_.size() );
cloud_info->cloud_->setAlpha( alpha_property_->getFloat(), per_point_alpha);
cloud_info->cloud_->setDimensions( size, size, size );
cloud_info->cloud_->setAutoSize(auto_size_);
Expand Down

0 comments on commit b01e255

Please sign in to comment.