Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::strategy::buffer::join_miter Class Reference

Let the buffer create sharp corners. More...

#include <buffer_join_miter.hpp>

Public Member Functions

 join_miter (double miter_limit=5.0)
 Constructs the strategy. More...
 
template<typename Point , typename DistanceType , typename RangeOut >
bool apply (Point const &ip, Point const &vertex, Point const &perp1, Point const &perp2, DistanceType const &buffer_distance, RangeOut &range_out) const
 Fills output_range with a sharp shape around a vertex. More...
 
template<typename NumericType >
NumericType max_distance (NumericType const &distance) const
 

Detailed Description

Let the buffer create sharp corners.

This strategy can be used as JoinStrategy for the buffer algorithm. It creates a sharp corners around each convex vertex. It can be applied for (multi)linestrings and (multi)polygons. If corners are sharp by themselves, the miters might become very long. Therefore there is a limit (miter_limit), in terms of the used distance, which limits their length. The miter is not changed to a bevel form (as done in some other software), it is just adapted to the specified miter_limit but keeps its miter form. This strategy is only applicable for Cartesian coordinate systems.

{ [heading Example] [buffer_join_miter] [heading Output] [$img/strategies/buffer_join_miter.png] [heading See also]

  • [link geometry.reference.algorithms.buffer.buffer_7_with_strategies buffer (with strategies)]
  • [link geometry.reference.strategies.strategy_buffer_join_round join_round] }

Constructor & Destructor Documentation

boost::geometry::strategy::buffer::join_miter::join_miter ( double  miter_limit = 5.0)
inlineexplicit

Constructs the strategy.

Parameters
miter_limitThe miter limit, to avoid excessively long miters around sharp corners

Member Function Documentation

template<typename Point , typename DistanceType , typename RangeOut >
bool boost::geometry::strategy::buffer::join_miter::apply ( Point const &  ip,
Point const &  vertex,
Point const &  perp1,
Point const &  perp2,
DistanceType const &  buffer_distance,
RangeOut &  range_out 
) const
inline
template<typename NumericType >
NumericType boost::geometry::strategy::buffer::join_miter::max_distance ( NumericType const &  distance) const
inline

Referenced by apply().


The documentation for this class was generated from the following file: