fix collsion box for shields when scale_factor is used #2381
This commit is contained in:
parent
3db8d34117
commit
5651a8b9db
2 changed files with 5 additions and 1 deletions
|
@ -111,6 +111,7 @@ protected:
|
|||
|
||||
text_placement_info_ptr placement_;
|
||||
boost::scoped_ptr<placement_finder<DetectorT> > finder_;
|
||||
double scale_factor_;
|
||||
};
|
||||
|
||||
template <typename FaceManagerT, typename DetectorT>
|
||||
|
@ -182,6 +183,7 @@ protected:
|
|||
using text_symbolizer_helper<FaceManagerT, DetectorT>::point_placement_;
|
||||
using text_symbolizer_helper<FaceManagerT, DetectorT>::angle_;
|
||||
using text_symbolizer_helper<FaceManagerT, DetectorT>::finder_;
|
||||
using text_symbolizer_helper<FaceManagerT, DetectorT>::scale_factor_;
|
||||
};
|
||||
} //namespace
|
||||
#endif // SYMBOLIZER_HELPERS_HPP
|
||||
|
|
|
@ -62,7 +62,8 @@ text_symbolizer_helper<FaceManagerT, DetectorT>::text_symbolizer_helper(text_sym
|
|||
angle_(0.0),
|
||||
placement_valid_(false),
|
||||
points_on_line_(false),
|
||||
finder_(0)
|
||||
finder_(0),
|
||||
scale_factor_(scale_factor)
|
||||
{
|
||||
initialize_geometries();
|
||||
if (!geometries_to_process_.size()) return;
|
||||
|
@ -469,6 +470,7 @@ void shield_symbolizer_helper<FaceManagerT, DetectorT>::init_marker()
|
|||
marker_ext_.init(px0, py0, px1, py1);
|
||||
marker_ext_.expand_to_include(px2, py2);
|
||||
marker_ext_.expand_to_include(px3, py3);
|
||||
marker_ext_ *= scale_factor_;
|
||||
}
|
||||
|
||||
template <typename FaceManagerT, typename DetectorT>
|
||||
|
|
Loading…
Add table
Reference in a new issue