BWAPI
|
#include <Conic_arc_2.h>
Classes | |
struct | Extra_data |
Public Types | |
typedef Rat_kernel_ | Rat_kernel |
typedef Alg_kernel_ | Alg_kernel |
typedef Nt_traits_ | Nt_traits |
typedef _Conic_arc_2 < Rat_kernel, Alg_kernel, Nt_traits > | Self |
typedef Rat_kernel::FT | Rational |
typedef Rat_kernel::Point_2 | Rat_point_2 |
typedef Rat_kernel::Segment_2 | Rat_segment_2 |
typedef Rat_kernel::Circle_2 | Rat_circle_2 |
typedef Nt_traits::Integer | Integer |
typedef Alg_kernel::FT | Algebraic |
typedef Alg_kernel::Point_2 | Point_2 |
typedef _Conic_point_2 < Alg_kernel > | Conic_point_2 |
Public Member Functions | |
Construction and destruction functions. | |
_Conic_arc_2 () | |
_Conic_arc_2 (const Self &arc) | |
_Conic_arc_2 (const Rational &r, const Rational &s, const Rational &t, const Rational &u, const Rational &v, const Rational &w) | |
_Conic_arc_2 (const Rational &r, const Rational &s, const Rational &t, const Rational &u, const Rational &v, const Rational &w, const Orientation &orient, const Point_2 &source, const Point_2 &target) | |
_Conic_arc_2 (const Rat_segment_2 &seg) | |
_Conic_arc_2 (const Rat_circle_2 &circ) | |
_Conic_arc_2 (const Rat_circle_2 &circ, const Orientation &orient, const Point_2 &source, const Point_2 &target) | |
_Conic_arc_2 (const Rat_point_2 &p1, const Rat_point_2 &p2, const Rat_point_2 &p3) | |
_Conic_arc_2 (const Rat_point_2 &p1, const Rat_point_2 &p2, const Rat_point_2 &p3, const Rat_point_2 &p4, const Rat_point_2 &p5) | |
_Conic_arc_2 (const Rational &r, const Rational &s, const Rational &t, const Rational &u, const Rational &v, const Rational &w, const Orientation &orient, const Point_2 &app_source, const Rational &r_1, const Rational &s_1, const Rational &t_1, const Rational &u_1, const Rational &v_1, const Rational &w_1, const Point_2 &app_target, const Rational &r_2, const Rational &s_2, const Rational &t_2, const Rational &u_2, const Rational &v_2, const Rational &w_2) | |
virtual | ~_Conic_arc_2 () |
const Self & | operator= (const Self &arc) |
Get the arc properties. | |
bool | is_valid () const |
const Integer & | r () const |
const Integer & | s () const |
const Integer & | t () const |
const Integer & | u () const |
const Integer & | v () const |
const Integer & | w () const |
bool | is_x_monotone () const |
bool | is_y_monotone () const |
bool | is_full_conic () const |
const Point_2 & | source () const |
const Point_2 & | target () const |
Orientation | orientation () const |
Bbox_2 | bbox () const |
Modifying functions. | |
void | set_source (const Point_2 &ps) |
void | set_target (const Point_2 &pt) |
Compute points on the arc. | |
int | vertical_tangency_points (Point_2 *vpts) const |
int | horizontal_tangency_points (Point_2 *hpts) const |
int | points_at_x (const Point_2 &p, Point_2 *ps) const |
int | points_at_y (const Point_2 &p, Point_2 *ps) const |
Protected Types | |
enum | { IS_VALID = 1, IS_FULL_CONIC = 2 } |
Protected Member Functions | |
Auxiliary functions. | |
Sign | _sign_of_extra_data (const Algebraic &px, const Algebraic &py) const |
bool | _is_on_supporting_conic (const Point_2 &p) const |
bool | _is_between_endpoints (const Point_2 &p) const |
bool | _is_strictly_between_endpoints (const Point_2 &p) const |
int | _conic_vertical_tangency_points (Point_2 *ps) const |
int | _conic_horizontal_tangency_points (Point_2 *ps) const |
int | _conic_get_y_coordinates (const Algebraic &x, Algebraic *ys) const |
int | _conic_get_x_coordinates (const Algebraic &y, Algebraic *xs) const |
int | _solve_quadratic_equation (const Algebraic &A, const Algebraic &B, const Algebraic &C, Algebraic &x_minus, Algebraic &x_plus) const |
Protected Attributes | |
Integer | _r |
Integer | _s |
Integer | _t |
Integer | _u |
Integer | _v |
Integer | _w |
Orientation | _orient |
int | _info |
Conic_point_2 | _source |
Conic_point_2 | _target |
Extra_data * | _extra_data_P |
Representation of a conic arc -- a bounded segment that lies on a conic curve, the loci of all points satisfying the equation: r*x^2 + s*y^2 + t*xy + u*x + v*y +w = 0
The class is templated with three parameters: Rat_kernel A kernel that provides the input objects or coefficients. Rat_kernel::FT should be an integral or a rational type. Alg_kernel A geometric kernel, where Alg_kernel::FT is the number type for the coordinates of arrangement vertices, which are algebraic numbers of degree up to 4 (preferably it is CORE::Expr). Nt_traits A traits class for performing various operations on the integer, rational and algebraic types.
typedef Alg_kernel_ _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Alg_kernel |
typedef Alg_kernel::FT _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Algebraic |
typedef _Conic_point_2<Alg_kernel> _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Conic_point_2 |
typedef Nt_traits::Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Integer |
typedef Nt_traits_ _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Nt_traits |
typedef Alg_kernel::Point_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Point_2 |
typedef Rat_kernel::Circle_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Rat_circle_2 |
typedef Rat_kernel_ _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Rat_kernel |
typedef Rat_kernel::Point_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Rat_point_2 |
typedef Rat_kernel::Segment_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Rat_segment_2 |
typedef Rat_kernel::FT _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Rational |
typedef _Conic_arc_2<Rat_kernel, Alg_kernel, Nt_traits> _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::Self |
anonymous enum [protected] |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | ) | [inline] |
Default constructor.
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Self & | arc | ) | [inline] |
Copy constructor.
arc | The copied arc. |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rational & | r, |
const Rational & | s, | ||
const Rational & | t, | ||
const Rational & | u, | ||
const Rational & | v, | ||
const Rational & | w | ||
) | [inline] |
Construct a conic arc which is the full conic: C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rational & | r, |
const Rational & | s, | ||
const Rational & | t, | ||
const Rational & | u, | ||
const Rational & | v, | ||
const Rational & | w, | ||
const Orientation & | orient, | ||
const Point_2 & | source, | ||
const Point_2 & | target | ||
) | [inline] |
Construct a conic arc which lies on the conic: C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0
orient | The orientation of the arc (clockwise or counterclockwise). |
source | The source point. |
target | The target point. |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rat_segment_2 & | seg | ) | [inline] |
Construct a conic arc from the given line segment.
seg | The line segment with rational endpoints. |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rat_circle_2 & | circ | ) | [inline] |
Set a circular arc that corresponds to a full circle.
circ | The circle (with rational center and rational squared radius). |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rat_circle_2 & | circ, |
const Orientation & | orient, | ||
const Point_2 & | source, | ||
const Point_2 & | target | ||
) | [inline] |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rat_point_2 & | p1, |
const Rat_point_2 & | p2, | ||
const Rat_point_2 & | p3 | ||
) | [inline] |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rat_point_2 & | p1, |
const Rat_point_2 & | p2, | ||
const Rat_point_2 & | p3, | ||
const Rat_point_2 & | p4, | ||
const Rat_point_2 & | p5 | ||
) | [inline] |
Construct a conic arc from the given five points, specified by the points p1, p2, p3, p4 and p5.
p1 | The source point of the given arc. |
p2,p3,p4 | Points lying on the conic arc, between p1 and p5. |
p5 | The target point of the given arc. |
_Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_Conic_arc_2 | ( | const Rational & | r, |
const Rational & | s, | ||
const Rational & | t, | ||
const Rational & | u, | ||
const Rational & | v, | ||
const Rational & | w, | ||
const Orientation & | orient, | ||
const Point_2 & | app_source, | ||
const Rational & | r_1, | ||
const Rational & | s_1, | ||
const Rational & | t_1, | ||
const Rational & | u_1, | ||
const Rational & | v_1, | ||
const Rational & | w_1, | ||
const Point_2 & | app_target, | ||
const Rational & | r_2, | ||
const Rational & | s_2, | ||
const Rational & | t_2, | ||
const Rational & | u_2, | ||
const Rational & | v_2, | ||
const Rational & | w_2 | ||
) | [inline] |
Construct a conic arc which lies on the conic: C: r*x^2 + s*y^2 + t*xy + u*x + v*y + w = 0 The source and the target are specified by the intersection of the conic with: C_1: r_1*x^2 + s_1*y^2 + t_1*xy + u_1*x + v_1*y + w_1 = 0 C_2: r_2*x^2 + s_2*y^2 + t_2*xy + u_2*x + v_2*y + w_2 = 0 The user must also specify the source and the target with approximated coordinates. The actual intersection points that best fits the source (or the target) will be selected.
virtual _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::~_Conic_arc_2 | ( | ) | [inline, virtual] |
Destructor.
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_conic_get_x_coordinates | ( | const Algebraic & | y, |
Algebraic * | xs | ||
) | const [inline, protected] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_conic_get_y_coordinates | ( | const Algebraic & | x, |
Algebraic * | ys | ||
) | const [inline, protected] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_conic_horizontal_tangency_points | ( | Point_2 * | ps | ) | const [inline, protected] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_conic_vertical_tangency_points | ( | Point_2 * | ps | ) | const [inline, protected] |
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_is_between_endpoints | ( | const Point_2 & | p | ) | const [inline, protected] |
Check whether the given point is between the source and the target. The point is assumed to be on the conic's boundary.
p | The query point. |
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_is_on_supporting_conic | ( | const Point_2 & | p | ) | const [inline, protected] |
Check whether the given point lies on the supporting conic of the arc.
p | The query point. |
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_is_strictly_between_endpoints | ( | const Point_2 & | p | ) | const [inline, protected] |
Check whether the given point is strictly between the source and the target (but not any of them). The point is assumed to be on the conic's boundary.
p | The query point. |
Sign _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_sign_of_extra_data | ( | const Algebraic & | px, |
const Algebraic & | py | ||
) | const [inline, protected] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_solve_quadratic_equation | ( | const Algebraic & | A, |
const Algebraic & | B, | ||
const Algebraic & | C, | ||
Algebraic & | x_minus, | ||
Algebraic & | x_plus | ||
) | const [inline, protected] |
Solve the given quadratic equation: Ax^2 + B*x + C = 0.
x_minus | The root obtained from taking -sqrt(discriminant). |
x_plus | The root obtained from taking -sqrt(discriminant). |
Bbox_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::bbox | ( | ) | const [inline] |
Get a bounding box for the conic arc.
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::horizontal_tangency_points | ( | Point_2 * | hpts | ) | const [inline] |
Calculate the horizontal tangency points of the arc.
hpts | The horizontal tangency points. |
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::is_full_conic | ( | ) | const [inline] |
Check whether the arc represents a full conic curve.
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::is_valid | ( | ) | const [inline] |
Check if the arc is valid.
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::is_x_monotone | ( | ) | const [inline] |
Check whether the arc is x-monotone.
bool _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::is_y_monotone | ( | ) | const [inline] |
Check whether the arc is y-monotone.
const Self& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::operator= | ( | const Self & | arc | ) | [inline] |
Assignment operator.
arc | The copied arc. |
Orientation _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::orientation | ( | ) | const [inline] |
Get the orientation of the arc.
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::points_at_x | ( | const Point_2 & | p, |
Point_2 * | ps | ||
) | const [inline] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::points_at_y | ( | const Point_2 & | p, |
Point_2 * | ps | ||
) | const [inline] |
const Integer& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::r | ( | ) | const [inline] |
Get the coefficients of the underlying conic.
const Integer& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::s | ( | ) | const [inline] |
void _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::set_source | ( | const Point_2 & | ps | ) | [inline] |
void _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::set_target | ( | const Point_2 & | pt | ) | [inline] |
const Point_2& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::source | ( | ) | const [inline] |
const Integer& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::t | ( | ) | const [inline] |
const Point_2& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::target | ( | ) | const [inline] |
const Integer& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::u | ( | ) | const [inline] |
const Integer& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::v | ( | ) | const [inline] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::vertical_tangency_points | ( | Point_2 * | vpts | ) | const [inline] |
const Integer& _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::w | ( | ) | const [inline] |
Extra_data* _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_extra_data_P [protected] |
int _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_info [protected] |
Orientation _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_orient [protected] |
Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_r [protected] |
Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_s [protected] |
Conic_point_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_source [protected] |
Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_t [protected] |
Conic_point_2 _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_target [protected] |
Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_u [protected] |
Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_v [protected] |
Integer _Conic_arc_2< Rat_kernel_, Alg_kernel_, Nt_traits_ >::_w [protected] |