BWAPI
Classes | Public Types | Protected Types | Protected Attributes
_Conic_x_monotone_arc_2< Conic_arc_ > Class Template Reference

#include <Conic_x_monotone_arc_2.h>

List of all members.

Classes

struct  Less_conic_pair

Public Types

typedef Conic_arc_ Conic_arc_2
typedef
_Conic_x_monotone_arc_2
< Conic_arc_2
Self
typedef Conic_arc_2::Alg_kernel Alg_kernel
typedef Conic_arc_2::Algebraic Algebraic
typedef Conic_arc_2::Point_2 Point_2
typedef Conic_arc_2::Conic_point_2 Conic_point_2
typedef Conic_point_2::Conic_id Conic_id
typedef std::pair< Conic_id,
Conic_id
Conic_pair
typedef std::pair
< Conic_point_2, unsigned int > 
Intersection_point_2
typedef std::list
< Intersection_point_2
Intersection_list
typedef std::map< Conic_pair,
Intersection_list,
Less_conic_pair
Intersection_map
typedef
Intersection_map::value_type 
Intersection_map_entry
typedef Intersection_map::iterator Intersection_map_iterator

Public Member Functions

Constrcution methods.
 _Conic_x_monotone_arc_2 ()
 _Conic_x_monotone_arc_2 (const Self &arc)
 _Conic_x_monotone_arc_2 (const Base &arc)
 _Conic_x_monotone_arc_2 (const Base &arc, const Conic_id &id)
 _Conic_x_monotone_arc_2 (const Base &arc, const Point_2 &source, const Point_2 &target, const Conic_id &id)
 _Conic_x_monotone_arc_2 (const Point_2 &source, const Point_2 &target)
 _Conic_x_monotone_arc_2 (const Algebraic &a, const Algebraic &b, const Algebraic &c, const Point_2 &source, const Point_2 &target)
const Selfoperator= (const Self &arc)
Accessing the arc properties.
const Integerr () const
const Integers () const
const Integert () const
const Integeru () const
const Integerv () const
const Integerw () const
const Conic_point_2source () const
const Conic_point_2target () const
Orientation orientation () const
const Conic_point_2left () const
const Conic_point_2right () const
bool is_directed_right () const
Bbox_2 bbox () const
Predicates.
bool is_vertical () const
bool contains_point (const Conic_point_2 &p) const
Constructing points on the arc.
Point_2 point_at_x (const Point_2 &p) const
template<class OutputIterator >
OutputIterator polyline_approximation (size_t n, OutputIterator oi) const
Comparison_result compare_to_right (const Self &arc, const Conic_point_2 &p) const
Comparison_result compare_to_left (const Self &arc, const Conic_point_2 &p) const
template<class OutputIterator >
OutputIterator intersect (const Self &arc, Intersection_map &inter_map, OutputIterator oi) const
Constructing x-monotone arcs.
void split (const Conic_point_2 &p, Self &c1, Self &c2) const
Self flip () const
Self trim (const Conic_point_2 &ps, const Conic_point_2 &pt) const
bool equals (const Self &arc) const
bool can_merge_with (const Self &arc) const
void merge (const Self &arc)
bool is_upper () const
bool is_lower () const

Protected Types

enum  {
  IS_VERTICAL_SEGMENT = 4, IS_DIRECTED_RIGHT = 8, DEGREE_1 = 16, DEGREE_2 = 32,
  DEGREE_MASK = 16 + 32, PLUS_SQRT_DISC_ROOT = 64, FACING_UP = 128, FACING_DOWN = 256,
  FACING_MASK = 128 + 256, IS_SPECIAL_SEGMENT = 512
}
typedef Conic_arc_2 Base
typedef Conic_arc_2::Integer Integer
typedef Conic_arc_2::Nt_traits Nt_traits
typedef Conic_arc_2::Rat_kernel Rat_kernel

Protected Attributes

Algebraic alg_r
Algebraic alg_s
Algebraic alg_t
Algebraic alg_u
Algebraic alg_v
Algebraic alg_w
Conic_id _id

Detailed Description

template<class Conic_arc_>
class _Conic_x_monotone_arc_2< Conic_arc_ >

Representation of an x-monotone conic arc. The class is templated by a representation of a general bounded conic arc.


Member Typedef Documentation

template<class Conic_arc_>
typedef Conic_arc_2::Alg_kernel _Conic_x_monotone_arc_2< Conic_arc_ >::Alg_kernel
template<class Conic_arc_>
typedef Conic_arc_2::Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::Algebraic
template<class Conic_arc_>
typedef Conic_arc_2 _Conic_x_monotone_arc_2< Conic_arc_ >::Base [protected]
template<class Conic_arc_>
typedef Conic_arc_ _Conic_x_monotone_arc_2< Conic_arc_ >::Conic_arc_2
template<class Conic_arc_>
typedef Conic_point_2::Conic_id _Conic_x_monotone_arc_2< Conic_arc_ >::Conic_id
template<class Conic_arc_>
typedef std::pair<Conic_id, Conic_id> _Conic_x_monotone_arc_2< Conic_arc_ >::Conic_pair
template<class Conic_arc_>
typedef Conic_arc_2::Conic_point_2 _Conic_x_monotone_arc_2< Conic_arc_ >::Conic_point_2
template<class Conic_arc_>
typedef Conic_arc_2::Integer _Conic_x_monotone_arc_2< Conic_arc_ >::Integer [protected]
template<class Conic_arc_>
typedef std::list<Intersection_point_2> _Conic_x_monotone_arc_2< Conic_arc_ >::Intersection_list
template<class Conic_arc_>
typedef std::map<Conic_pair, Intersection_list, Less_conic_pair> _Conic_x_monotone_arc_2< Conic_arc_ >::Intersection_map
template<class Conic_arc_>
typedef Intersection_map::value_type _Conic_x_monotone_arc_2< Conic_arc_ >::Intersection_map_entry
template<class Conic_arc_>
typedef Intersection_map::iterator _Conic_x_monotone_arc_2< Conic_arc_ >::Intersection_map_iterator
template<class Conic_arc_>
typedef std::pair<Conic_point_2, unsigned int> _Conic_x_monotone_arc_2< Conic_arc_ >::Intersection_point_2
template<class Conic_arc_>
typedef Conic_arc_2::Nt_traits _Conic_x_monotone_arc_2< Conic_arc_ >::Nt_traits [protected]
template<class Conic_arc_>
typedef Conic_arc_2::Point_2 _Conic_x_monotone_arc_2< Conic_arc_ >::Point_2
template<class Conic_arc_>
typedef Conic_arc_2::Rat_kernel _Conic_x_monotone_arc_2< Conic_arc_ >::Rat_kernel [protected]
template<class Conic_arc_>
typedef _Conic_x_monotone_arc_2<Conic_arc_2> _Conic_x_monotone_arc_2< Conic_arc_ >::Self

Member Enumeration Documentation

template<class Conic_arc_>
anonymous enum [protected]
Enumerator:
IS_VERTICAL_SEGMENT 
IS_DIRECTED_RIGHT 
DEGREE_1 
DEGREE_2 
DEGREE_MASK 
PLUS_SQRT_DISC_ROOT 
FACING_UP 
FACING_DOWN 
FACING_MASK 
IS_SPECIAL_SEGMENT 

Constructor & Destructor Documentation

template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( ) [inline]

Default constructor.

template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( const Self arc) [inline]

Copy constructor.

Parameters:
arcThe copied arc.
template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( const Base arc) [inline]

Construct an x-monotone arc from a conic arc.

Parameters:
arcThe given (base) arc.
Precondition:
The given arc is x-monotone.
template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( const Base arc,
const Conic_id id 
) [inline]

Construct an x-monotone arc from a conic arc.

Parameters:
arcThe given (base) arc.
idThe ID of the base arc.
template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( const Base arc,
const Point_2 source,
const Point_2 target,
const Conic_id id 
) [inline]

Construct an x-monotone sub-arc from a conic arc.

Parameters:
arcThe given (base) arc.
sourceThe source point.
targetThe target point.
idThe ID of the base arc.

Here is the call graph for this function:

template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( const Point_2 source,
const Point_2 target 
) [inline]

Construct a special segment connecting to given endpoints (for the usage of the landmarks point-location strategy).

Parameters:
sourceThe source point.
targetThe target point.

Here is the call graph for this function:

template<class Conic_arc_>
_Conic_x_monotone_arc_2< Conic_arc_ >::_Conic_x_monotone_arc_2 ( const Algebraic a,
const Algebraic b,
const Algebraic c,
const Point_2 source,
const Point_2 target 
) [inline]

Construct a special segment of a given line connecting to given endpoints.

Parameters:
a,b,cThe coefficients of the supporting line (ax + by + c = 0).
sourceThe source point.
targetThe target point.

Here is the call graph for this function:


Member Function Documentation

template<class Conic_arc_>
Bbox_2 _Conic_x_monotone_arc_2< Conic_arc_ >::bbox ( ) const [inline]

Get a bounding box for the conic arc.

Returns:
The bounding box.
template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::can_merge_with ( const Self arc) const [inline]

Check whether it is possible to merge the arc with the given arc.

Parameters:
arcThe query arc.
Returns:
(true) if it is possible to merge the two arcs; (false) otherwise.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
Comparison_result _Conic_x_monotone_arc_2< Conic_arc_ >::compare_to_left ( const Self arc,
const Conic_point_2 p 
) const [inline]

Compare to arcs immediately to the leftt of their intersection point.

Parameters:
arcThe compared arc.
pThe reference intersection point.
Returns:
The relative position of the arcs to the left of p.
Precondition:
Both arcs we compare are not vertical segments.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
Comparison_result _Conic_x_monotone_arc_2< Conic_arc_ >::compare_to_right ( const Self arc,
const Conic_point_2 p 
) const [inline]

Compare to arcs immediately to the right of their intersection point.

Parameters:
arcThe compared arc.
pThe reference intersection point.
Returns:
The relative position of the arcs to the right of p.
Precondition:
Both arcs we compare are not vertical segments.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::contains_point ( const Conic_point_2 p) const [inline]

Check whether the given point lies on the arc.

Parameters:
pThe qury point.
(true)if p lies on the arc; (false) otherwise.

Here is the caller graph for this function:

template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::equals ( const Self arc) const [inline]

Check whether the two arcs are equal (have the same graph).

Parameters:
arcThe compared arc.
Returns:
(true) if the two arcs have the same graph; (false) otherwise.

Here is the caller graph for this function:

template<class Conic_arc_>
Self _Conic_x_monotone_arc_2< Conic_arc_ >::flip ( ) const [inline]

Flip the arc.

Returns:
An arc with swapped source and target and a reverse orienation.

Here is the caller graph for this function:

template<class Conic_arc_>
template<class OutputIterator >
OutputIterator _Conic_x_monotone_arc_2< Conic_arc_ >::intersect ( const Self arc,
Intersection_map inter_map,
OutputIterator  oi 
) const [inline]

Compute the intersections with the given arc.

Parameters:
arcThe given intersecting arc.
inter_mapMaps conic pairs to lists of their intersection points.
oiThe output iterator.
Returns:
The past-the-end iterator.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::is_directed_right ( ) const [inline]

Return true iff the conic arc is directed right iexicographically.

Here is the caller graph for this function:

template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::is_lower ( ) const [inline]
template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::is_upper ( ) const [inline]
template<class Conic_arc_>
bool _Conic_x_monotone_arc_2< Conic_arc_ >::is_vertical ( ) const [inline]

Check if the conic arc is a vertical segment.

Here is the caller graph for this function:

template<class Conic_arc_>
const Conic_point_2& _Conic_x_monotone_arc_2< Conic_arc_ >::left ( ) const [inline]

Get the left endpoint of the arc.

Here is the caller graph for this function:

template<class Conic_arc_>
void _Conic_x_monotone_arc_2< Conic_arc_ >::merge ( const Self arc) [inline]

Merge the current arc with the given arc.

Parameters:
arcThe arc to merge with.
Precondition:
The two arcs are mergeable.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
const Self& _Conic_x_monotone_arc_2< Conic_arc_ >::operator= ( const Self arc) [inline]

Assignment operator.

Parameters:
arcThe copied arc.
template<class Conic_arc_>
Orientation _Conic_x_monotone_arc_2< Conic_arc_ >::orientation ( ) const [inline]

Get the orientation of the arc.

Returns:
The orientation.

Here is the caller graph for this function:

template<class Conic_arc_>
Point_2 _Conic_x_monotone_arc_2< Conic_arc_ >::point_at_x ( const Point_2 p) const [inline]

Compute a point on the arc with the same x-coordiante as the given point.

Parameters:
pThe given point.
Precondition:
The arc is not vertical and p is in the x-range of the arc.
Returns:
A point on the arc with the same x-coordiante as p.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
template<class OutputIterator >
OutputIterator _Conic_x_monotone_arc_2< Conic_arc_ >::polyline_approximation ( size_t  n,
OutputIterator  oi 
) const [inline]

Get a polyline approximating the conic arc.

Parameters:
nThe maximal number of sample points.
oiAn output iterator, whose value-type is pair<double,double> (representing an approximated point). In case the arc is a line segment, there are 2 output points, otherwise the arc is approximated by the polyline defined by (p_0, p_1, ..., p_n), where p_0 and p_n are the left and right endpoints of the arc, respectively.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
const Integer& _Conic_x_monotone_arc_2< Conic_arc_ >::r ( ) const [inline]

Get the coefficients of the underlying conic.

Here is the caller graph for this function:

template<class Conic_arc_>
const Conic_point_2& _Conic_x_monotone_arc_2< Conic_arc_ >::right ( ) const [inline]

Get the right endpoint of the arc.

Here is the caller graph for this function:

template<class Conic_arc_>
const Integer& _Conic_x_monotone_arc_2< Conic_arc_ >::s ( ) const [inline]

Here is the caller graph for this function:

template<class Conic_arc_>
const Conic_point_2& _Conic_x_monotone_arc_2< Conic_arc_ >::source ( ) const [inline]

Get the arc's source.

Returns:
The source point.

Here is the caller graph for this function:

template<class Conic_arc_>
void _Conic_x_monotone_arc_2< Conic_arc_ >::split ( const Conic_point_2 p,
Self c1,
Self c2 
) const [inline]

Split the arc into two at a given split point.

Parameters:
pThe split point.
c1Output: The first resulting arc, lying to the left of p.
c2Output: The first resulting arc, lying to the right of p.
Precondition:
p lies in the interior of the arc (not one of its endpoints).

Here is the call graph for this function:

Here is the caller graph for this function:

template<class Conic_arc_>
const Integer& _Conic_x_monotone_arc_2< Conic_arc_ >::t ( ) const [inline]

Here is the caller graph for this function:

template<class Conic_arc_>
const Conic_point_2& _Conic_x_monotone_arc_2< Conic_arc_ >::target ( ) const [inline]

Get the arc's target.

Returns:
The target point.

Here is the caller graph for this function:

template<class Conic_arc_>
Self _Conic_x_monotone_arc_2< Conic_arc_ >::trim ( const Conic_point_2 ps,
const Conic_point_2 pt 
) const [inline]

Trim the arc given its new endpoints.

Parameters:
psThe new source point.
ptThe new target point.
Returns:
The new trimmed arc.
Precondition:
Both ps and pt lies on the arc and must conform with the current direction of the arc.

Here is the call graph for this function:

template<class Conic_arc_>
const Integer& _Conic_x_monotone_arc_2< Conic_arc_ >::u ( ) const [inline]

Here is the caller graph for this function:

template<class Conic_arc_>
const Integer& _Conic_x_monotone_arc_2< Conic_arc_ >::v ( ) const [inline]

Here is the caller graph for this function:

template<class Conic_arc_>
const Integer& _Conic_x_monotone_arc_2< Conic_arc_ >::w ( ) const [inline]

Here is the caller graph for this function:


Member Data Documentation

template<class Conic_arc_>
Conic_id _Conic_x_monotone_arc_2< Conic_arc_ >::_id [protected]
template<class Conic_arc_>
Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::alg_r [protected]
template<class Conic_arc_>
Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::alg_s [protected]
template<class Conic_arc_>
Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::alg_t [protected]
template<class Conic_arc_>
Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::alg_u [protected]
template<class Conic_arc_>
Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::alg_v [protected]
template<class Conic_arc_>
Algebraic _Conic_x_monotone_arc_2< Conic_arc_ >::alg_w [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines