Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | Friends
vsol_conic_2d Class Reference

Euclidean general conic class, part of the vsol_curve_2d hierarchy. More...

#include <vsol_conic_2d.h>

Inheritance diagram for vsol_conic_2d:
Inheritance graph
[legend]

List of all members.

Public Types

enum  vsol_conic_type {
  invalid = 0, real_ellipse, real_circle, complex_ellipse,
  complex_circle, hyperbola, parabola, real_intersecting_lines,
  complex_intersecting_lines, real_parallel_lines, complex_parallel_lines, coincident_lines
}
 the different kinds of conic. More...
enum  vsol_spatial_object_2d_type {
  SPATIAL_NO_TYPE = 0, TOPOLOGYOBJECT, POINT, CURVE,
  REGION, SPATIALGROUP, VOLUME, NUM_SPATIALOBJECT_TYPES
}
enum  vgl_conic_type

Public Member Functions

 vsol_conic_2d ()
 Default Constructor.
 vsol_conic_2d (double ta, double tb, double tc, double td, double te, double tf)
 Constructor from coefficients of the cartesian equation.
 vsol_conic_2d (vsol_point_2d const &cntr, double rx, double ry, double theta)
 Ellipse/hyperbola constructor from centre, size and orientation.
 vsol_conic_2d (vgl_vector_2d< double > const &dir, vsol_point_2d const &top, double theta)
 Parabola constructor from direction, top and eccentricity parameter.
void set_central_parameters (vsol_point_2d const &cntr, double rx, double ry, double theta)
 Set ellipse/hyperbola from centre, size and orientation.
void set_parabola_parameters (vgl_vector_2d< double > const &dir, vsol_point_2d const &top, double theta)
 Set parabola from direction, top and eccentricity parameter.
 vsol_conic_2d (vgl_conic_segment_2d< double > &cs)
 Constructor from vgl_conic_segment_2d.
 vsol_conic_2d (vsol_conic_2d const &co)
 Copy constructor.
virtual ~vsol_conic_2d ()
 Destructor.
virtual vsol_spatial_object_2dclone () const
 Clone `this': creation of a new object and initialization.
virtual vsol_point_2d_sptr p0 () const
 Return the first point of `this'; pure virtual of vsol_curve_2d.
virtual vsol_point_2d_sptr p1 () const
 Return the last point of `this'; pure virtual of vsol_curve_2d.
virtual bool operator== (vsol_conic_2d const &other) const
 Has `this' the same coefficients and the same end points than `other' ?.
virtual bool operator== (vsol_spatial_object_2d const &) const
 spatial object equality.
bool operator!= (vsol_conic_2d const &o) const
 Has `this' not the same coeffs than `other', or different end points ?.
vsol_conic_type real_type () const
 Return the real type of the conic from its coefficients.
vcl_string real_conic_type () const
bool is_real_ellipse () const
 Is `this' a real ellipse ?.
bool is_real_circle () const
 Is `this' a real circle ?.
bool is_complex_ellipse () const
 Is `this' a complex ellipse ?.
bool is_complex_circle () const
 Is `this' a complex circle ?.
bool is_parabola () const
 Is `this' a parabola ?.
bool is_hyperbola () const
 Is `this' a hyperbola ?.
bool is_real_intersecting_lines () const
 Is `this' a pair of real intersecting lines ?.
bool is_complex_intersecting_lines () const
 Is `this' a pair of complex intersecting lines ?.
bool is_coincident_lines () const
 Is `this' a pair of coincident lines ?.
void ellipse_parameters (double &cx, double &cy, double &phi, double &width, double &height) const
 Return 3 ellipse parameters:.
double ellipse_angular_position (vsol_point_2d_sptr const &pt) const
 Return ellipse angular position.
void hyperbola_parameters (double &cx, double &cy, double &phi, double &main_axis, double &secondary_axis) const
 Return 3 hyperbola parameters:.
void parabola_parameters (double &cx, double &cy, double &cosphi, double &sinphi) const
 Return 2 parabola parameters:.
virtual double length () const
 Return the length of `this'.
vnl_double_3x3 matrix () const
 Return the matrix associated with the coefficients.
virtual void set_p0 (vsol_point_2d_sptr const &new_p0)
 Set the first point of the curve.
virtual void set_p1 (vsol_point_2d_sptr const &new_p1)
 Set the last point of the curve.
vsol_point_2d_sptr midpoint () const
 Return the centre or symmetry point of a central conic.
vsol_line_2d_sptr axis () const
 Return the main symmetry axis, if not degenerate.
virtual bool in (vsol_point_2d_sptr const &p) const
 Is `p' in `this' ? (ie `p' verifies the equation, within some margin).
virtual vgl_homg_line_2d
< double > * 
tangent_at_point (vsol_point_2d_sptr const &p) const
 Returns the tangent to the conic in the point p, if p is on the conic.
vcl_list< vsol_point_2d_sptrintersection (vsol_line_2d const &line) const
 Return the set of (real) intersection points of this conic with a line.
vcl_list< vsol_point_2d_sptrintersection (vsol_conic_2d const &co) const
 Return the set of (real) intersection points of two conics.
vsol_point_2d_sptr closest_point_on_curve (vsol_point_2d_sptr const &pt) const
 Return the point on the conic boundary which is closest to the given point.
double distance (vsol_point_2d_sptr const &pt) const
 Return the shortest distance of the point to the conic boundary.
void describe (vcl_ostream &strm, int blanking=0) const
 output description to stream.
virtual vsol_conic_2d const * cast_to_conic () const
 Return `this' if `this' is a conic, 0 otherwise.
virtual vsol_conic_2dcast_to_conic ()
void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
void b_read (vsl_b_istream &is)
 Binary load self from stream.
short version () const
 Return IO version number;.
void print_summary (vcl_ostream &os) const
 Print an ascii summary to the stream.
virtual vcl_string is_a () const
 Return a platform independent string identifying the class.
virtual bool is_class (vcl_string const &cls) const
 Return true if the argument matches the string identifying the class or any parent class.
vsol_spatial_object_2d_type spatial_type () const
 return the spatial type.
virtual vsol_curve_2dcast_to_curve ()
 Return `this' if `this' is a curve, 0 otherwise.
virtual const vsol_curve_2dcast_to_curve () const
virtual vsol_line_2d const * cast_to_line () const
 Return `this' if `this' is a line, 0 otherwise.
virtual vsol_line_2dcast_to_line ()
virtual dbsol_circ_arc_2d const * cast_to_circ_arc () const
 Return `this' if `this' is a conic, 0 otherwise.
virtual dbsol_circ_arc_2d * cast_to_circ_arc ()
virtual vsol_polyline_2d const * cast_to_polyline () const
 Return `this' if `this' is a polyline, 0 otherwise.
virtual vsol_polyline_2dcast_to_polyline ()
virtual vsol_digital_curve_2d
const * 
cast_to_digital_curve () const
 Return `this' if `this' is a digital_curve_2d, 0 otherwise.
virtual vsol_digital_curve_2dcast_to_digital_curve ()
virtual vdgl_digital_curve const * cast_to_vdgl_digital_curve () const
 Return `this' if `this' is a vdgl_digital_curve, 0 otherwise.
virtual vdgl_digital_curve * cast_to_vdgl_digital_curve ()
const char * get_name () const
void un_protect ()
 unprotect the object.
virtual void print (vcl_ostream &strm=vcl_cout) const
bool operator!= (vsol_spatial_object_2d const &obj)
vsol_box_2d_sptr get_bounding_box () const
double get_min_x () const
double get_max_x () const
double get_min_y () const
double get_max_y () const
virtual vsol_spatial_object_2dcast_to_spatial_object ()
 The same behavior than dynamic_cast<>.
virtual vsol_spatial_object_2d
const * 
cast_to_spatial_object () const
virtual vtol_topology_object * cast_to_topology_object ()
virtual vtol_topology_object
const * 
cast_to_topology_object () const
virtual vsol_spatial_object_2dcast_to_vsol_spatial_object ()
virtual vsol_spatial_object_2d
const * 
cast_to_vsol_spatial_object () const
virtual vsol_point_2dcast_to_point ()
virtual vsol_point_2d const * cast_to_point () const
virtual vsol_region_2dcast_to_region ()
virtual vsol_region_2d const * cast_to_region () const
virtual vsol_group_2dcast_to_group ()
virtual vsol_group_2d const * cast_to_group () const
void touch ()
unsigned long get_time_stamp () const
bool older (vul_timestamp const &t) const
bool older (vul_timestamp const *t) const
void ref ()
void unref ()
int get_references () const
bool is_referenced () const
int get_id () const
 get id of object.
void set_id (int i)
 set id of object.
void set_user_flag (unsigned int flag)
 set a flag for a spatial object; flag can be VSOL_FLAG[1-6].
bool get_user_flag (unsigned int flag)
 check if a flag is set for a spatial object; flag can be VSOL_FLAG[1-6].
void unset_user_flag (unsigned int flag)
 un-set a flag for a spatial object; flag can be VSOL_FLAG[1-6].
void set_tagged_union_flag ()
 set the flag used by TAGGED_UNION.
bool get_tagged_union_flag ()
 check if the flag used by TAGGED_UNION is set.
void unset_tagged_union_flag ()
 un-set the flag used by TAGGED_UNION.
int get_tag_id ()
void set_tag_id (int id)
vgl_conic_type type () const
double a () const
double b () const
double c () const
double d () const
double e () const
double f () const
void set (doublea, doubleb, doublec, doubled, doublee, doublef)
bool operator== (vgl_conic< double > const &c) const
bool is_degenerate () const
bool is_central () const
bool contains (vgl_homg_point_2d< double > const &pt) const
vcl_list< vgl_homg_line_2d
< double > > 
components () const
vgl_homg_line_2d< double > polar_line (vgl_homg_point_2d< double > const &p) const
vgl_homg_point_2d< double > polar_point (vgl_homg_line_2d< double > const &l) const
vgl_homg_line_2d< double > tangent_at (vgl_homg_point_2d< double > const &p) const
vgl_homg_point_2d< double > centre () const
double curvature_at (vgl_point_2d< double > const &p) const
bool ellipse_geometry (double &xc, double &yc, double &major_axis_length, double &minor_axis_length, double &angle_in_radians) const
vgl_conic dual_conic () const
vgl_conic tangential_form () const
void translate_by (doublex, doubley)
vcl_ostream & operator<< (vcl_ostream &s, vgl_conic< double > const &c)
vcl_istream & operator>> (vcl_istream &s, vgl_conic< double > &c)

Static Public Member Functions

static vgl_conic_type type_by_name (vcl_string const &name)
static vcl_string type_by_number (vgl_conic_type type)

Public Attributes

 no_type
 imaginary_ellipse
 imaginary_circle
 num_conic_types

Static Public Attributes

static const char * SpatialTypes []
static const float eps = 1.0e-3f

Protected Types

enum  vsol_curve_2d_type {
  CURVE_NO_TYPE = 0, LINE, CIRCULAR_ARC, CONIC,
  POLYLINE, DIGITAL_CURVE, NUM_CURVE_TYPES
}

Protected Member Functions

bool endpoints_equal (const vsol_curve_2d &other) const
 Helper function to determine if curve endpoints are equal (in any order).
void not_applicable (vcl_string const &message) const
void empty_bounding_box () const
 make the bounding box empty; often first step in bounding box calculation.
void set_bounding_box (vsol_box_2d_sptr const &box) const
 set the bounding box; to be used in bounding box calculation.
void set_bounding_box (double x, double y) const
 set the bounding box to a single point, discarding the old bounding box.
void add_to_bounding_box (double x, double y) const
 add a point to the bounding box and take the convex union.
void add_to_bounding_box (vsol_box_2d_sptr const &box) const
 set the existing bounding box to the convex union of it with the given box.
void grow_minmax_bounds (vsol_box_2d_sptr const &b) const
 grow to the largest dim. of this and box, i.e., take the convex union.
virtual void compute_bounding_box () const
 compute bounding box, do nothing in this case except touching the box.
void check_update_bounding_box () const
 Test consistency of bound.

Protected Attributes

unsigned long timestamp_
unsigned int tag_
int id_

Static Protected Attributes

static int tagcount_ = 0

Private Member Functions

virtual vsol_curve_2d_type curve_type () const
 Return the curve type.

Private Attributes

vsol_point_2d_sptr p0_
 First point of the curve.
vsol_point_2d_sptr p1_
 Last point of the curve.

Friends

vcl_ostream & operator<< (vcl_ostream &, vsol_spatial_object_2d const &)
vcl_ostream & operator<< (vcl_ostream &, vsol_spatial_object_2d const *)

Detailed Description

Euclidean general conic class, part of the vsol_curve_2d hierarchy.

Definition at line 49 of file vsol_conic_2d.h.


Member Enumeration Documentation

enum vgl_conic::vgl_conic_type [inherited]

the different kinds of conic.

Enumerator:
invalid 
real_ellipse 
real_circle 
complex_ellipse 
complex_circle 
hyperbola 
parabola 
real_intersecting_lines 
complex_intersecting_lines 
real_parallel_lines 
complex_parallel_lines 
coincident_lines 

Definition at line 66 of file vsol_conic_2d.h.

enum vsol_curve_2d::vsol_curve_2d_type [protected, inherited]
Enumerator:
CURVE_NO_TYPE 
LINE 
CIRCULAR_ARC 
CONIC 
POLYLINE 
DIGITAL_CURVE 
NUM_CURVE_TYPES 

Definition at line 35 of file vsol_curve_2d.h.

Enumerator:
SPATIAL_NO_TYPE 
TOPOLOGYOBJECT 
POINT 
CURVE 
REGION 
SPATIALGROUP 
VOLUME 
NUM_SPATIALOBJECT_TYPES 

Definition at line 66 of file vsol_spatial_object_2d.h.


Constructor & Destructor Documentation

vsol_conic_2d::vsol_conic_2d ( ) [inline]

Default Constructor.

produces and invalid conic (needed for binary I/O)

Definition at line 94 of file vsol_conic_2d.h.

vsol_conic_2d::vsol_conic_2d ( double  ta,
double  tb,
double  tc,
double  td,
double  te,
double  tf 
) [inline]

Constructor from coefficients of the cartesian equation.

`a'x^2+`b'xy+`c'y^2+`d'x+`e'y+`f'

Definition at line 99 of file vsol_conic_2d.h.

vsol_conic_2d::vsol_conic_2d ( vsol_point_2d const &  c,
double  rx,
double  ry,
double  theta 
)

Ellipse/hyperbola constructor from centre, size and orientation.

This constructor can only be used for non-degenerate, real ellipses and hyperbolas: if rx and ry have the same sign, an ellipse is defined (and any ellipse can uniquely be specified this way); rx is the length of one main axis, ry of the other axis. Hyperbolas are obtained if rx and ry have opposite sign; the positive one determines the distance from bots tops to the centre, and the other one specified the 'minor' axis length.

Definition at line 47 of file vsol_conic_2d.cxx.

vsol_conic_2d::vsol_conic_2d ( vgl_vector_2d< double > const &  dir,
vsol_point_2d const &  top,
double  theta 
)

Parabola constructor from direction, top and eccentricity parameter.

This constructor can only be used for non-degenerate parabolas: specify the direction of the symmetry axis, the top, and an eccentricity parameter theta.

Definition at line 72 of file vsol_conic_2d.cxx.

vsol_conic_2d::vsol_conic_2d ( vgl_conic_segment_2d< double > &  cs) [inline]

Constructor from vgl_conic_segment_2d.

Definition at line 141 of file vsol_conic_2d.h.

vsol_conic_2d::vsol_conic_2d ( vsol_conic_2d const &  co) [inline]

Copy constructor.

Definition at line 146 of file vsol_conic_2d.h.

virtual vsol_conic_2d::~vsol_conic_2d ( ) [inline, virtual]

Destructor.

Definition at line 150 of file vsol_conic_2d.h.


Member Function Documentation

double vgl_conic< double >::a ( ) const [inherited]
void vsol_spatial_object_2d::add_to_bounding_box ( double  x,
double  y 
) const [protected, inherited]

add a point to the bounding box and take the convex union.

This is a "const" method since the bounding box is a "mutable" data member: calculating the bounding box does not change the object.

Definition at line 79 of file vsol_spatial_object_2d.cxx.

void vsol_spatial_object_2d::add_to_bounding_box ( vsol_box_2d_sptr const &  box) const [protected, inherited]

set the existing bounding box to the convex union of it with the given box.

Definition at line 84 of file vsol_spatial_object_2d.cxx.

vsol_line_2d_sptr vsol_conic_2d::axis ( ) const

Return the main symmetry axis, if not degenerate.

Definition at line 559 of file vsol_conic_2d.cxx.

double vgl_conic< double >::b ( ) const [inherited]
void vsol_conic_2d::b_read ( vsl_b_istream is) [virtual]

Binary load self from stream.

Binary load self from stream (not typically used).

Reimplemented from vsol_spatial_object_2d.

Definition at line 594 of file vsol_conic_2d.cxx.

void vsol_conic_2d::b_write ( vsl_b_ostream os) const [virtual]

Binary save self to stream.

Reimplemented from vsol_spatial_object_2d.

Definition at line 585 of file vsol_conic_2d.cxx.

double vgl_conic< double >::c ( ) const [inherited]
virtual dbsol_circ_arc_2d const* vsol_curve_2d::cast_to_circ_arc ( ) const [inline, virtual, inherited]

Return `this' if `this' is a conic, 0 otherwise.

Definition at line 89 of file vsol_curve_2d.h.

virtual dbsol_circ_arc_2d* vsol_curve_2d::cast_to_circ_arc ( ) [inline, virtual, inherited]

Definition at line 90 of file vsol_curve_2d.h.

virtual vsol_conic_2d const* vsol_conic_2d::cast_to_conic ( ) const [inline, virtual]

Return `this' if `this' is a conic, 0 otherwise.

Reimplemented from vsol_curve_2d.

Definition at line 339 of file vsol_conic_2d.h.

virtual vsol_conic_2d* vsol_conic_2d::cast_to_conic ( ) [inline, virtual]

Reimplemented from vsol_curve_2d.

Definition at line 340 of file vsol_conic_2d.h.

virtual vsol_curve_2d* vsol_curve_2d::cast_to_curve ( ) [inline, virtual, inherited]

Return `this' if `this' is a curve, 0 otherwise.

Reimplemented from vsol_spatial_object_2d.

Definition at line 79 of file vsol_curve_2d.h.

virtual const vsol_curve_2d* vsol_curve_2d::cast_to_curve ( ) const [inline, virtual, inherited]

Reimplemented from vsol_spatial_object_2d.

Definition at line 80 of file vsol_curve_2d.h.

virtual vsol_digital_curve_2d const* vsol_curve_2d::cast_to_digital_curve ( ) const [inline, virtual, inherited]

Return `this' if `this' is a digital_curve_2d, 0 otherwise.

Reimplemented in vsol_digital_curve_2d.

Definition at line 105 of file vsol_curve_2d.h.

virtual vsol_digital_curve_2d* vsol_curve_2d::cast_to_digital_curve ( ) [inline, virtual, inherited]

Reimplemented in vsol_digital_curve_2d.

Definition at line 106 of file vsol_curve_2d.h.

virtual vsol_group_2d* vsol_spatial_object_2d::cast_to_group ( void  ) [inline, virtual, inherited]

Reimplemented in vsol_group_2d, and vsol_group_2d.

Definition at line 184 of file vsol_spatial_object_2d.h.

virtual vsol_group_2d const* vsol_spatial_object_2d::cast_to_group ( void  ) const [inline, virtual, inherited]

Reimplemented in vsol_group_2d.

Definition at line 185 of file vsol_spatial_object_2d.h.

virtual vsol_line_2d const* vsol_curve_2d::cast_to_line ( ) const [inline, virtual, inherited]

Return `this' if `this' is a line, 0 otherwise.

Reimplemented in vsol_line_2d.

Definition at line 84 of file vsol_curve_2d.h.

virtual vsol_line_2d* vsol_curve_2d::cast_to_line ( ) [inline, virtual, inherited]

Reimplemented in vsol_line_2d.

Definition at line 85 of file vsol_curve_2d.h.

virtual vsol_point_2d* vsol_spatial_object_2d::cast_to_point ( void  ) [inline, virtual, inherited]

Reimplemented in vsol_point_2d.

Definition at line 178 of file vsol_spatial_object_2d.h.

virtual vsol_point_2d const* vsol_spatial_object_2d::cast_to_point ( void  ) const [inline, virtual, inherited]

Reimplemented in vsol_point_2d, and vsol_point_2d.

Definition at line 179 of file vsol_spatial_object_2d.h.

virtual vsol_polyline_2d const* vsol_curve_2d::cast_to_polyline ( ) const [inline, virtual, inherited]

Return `this' if `this' is a polyline, 0 otherwise.

Reimplemented in vsol_polyline_2d.

Definition at line 100 of file vsol_curve_2d.h.

virtual vsol_polyline_2d* vsol_curve_2d::cast_to_polyline ( ) [inline, virtual, inherited]

Reimplemented in vsol_polyline_2d.

Definition at line 101 of file vsol_curve_2d.h.

virtual vsol_region_2d* vsol_spatial_object_2d::cast_to_region ( void  ) [inline, virtual, inherited]

Reimplemented in vsol_region_2d.

Definition at line 182 of file vsol_spatial_object_2d.h.

virtual vsol_region_2d const* vsol_spatial_object_2d::cast_to_region ( void  ) const [inline, virtual, inherited]

Reimplemented in vsol_region_2d, and vsol_region_2d.

Definition at line 183 of file vsol_spatial_object_2d.h.

virtual vsol_spatial_object_2d* vsol_spatial_object_2d::cast_to_spatial_object ( ) [inline, virtual, inherited]

The same behavior than dynamic_cast<>.

Needed because VXL is not necessarily compiled with -frtti

Definition at line 170 of file vsol_spatial_object_2d.h.

virtual vsol_spatial_object_2d const* vsol_spatial_object_2d::cast_to_spatial_object ( ) const [inline, virtual, inherited]

Definition at line 171 of file vsol_spatial_object_2d.h.

virtual vtol_topology_object* vsol_spatial_object_2d::cast_to_topology_object ( ) [inline, virtual, inherited]

Definition at line 173 of file vsol_spatial_object_2d.h.

virtual vtol_topology_object const* vsol_spatial_object_2d::cast_to_topology_object ( ) const [inline, virtual, inherited]

Definition at line 174 of file vsol_spatial_object_2d.h.

virtual vdgl_digital_curve const* vsol_curve_2d::cast_to_vdgl_digital_curve ( ) const [inline, virtual, inherited]

Return `this' if `this' is a vdgl_digital_curve, 0 otherwise.

Definition at line 110 of file vsol_curve_2d.h.

virtual vdgl_digital_curve* vsol_curve_2d::cast_to_vdgl_digital_curve ( ) [inline, virtual, inherited]

Definition at line 111 of file vsol_curve_2d.h.

virtual vsol_spatial_object_2d* vsol_spatial_object_2d::cast_to_vsol_spatial_object ( ) [inline, virtual, inherited]

Definition at line 176 of file vsol_spatial_object_2d.h.

virtual vsol_spatial_object_2d const* vsol_spatial_object_2d::cast_to_vsol_spatial_object ( ) const [inline, virtual, inherited]

Definition at line 177 of file vsol_spatial_object_2d.h.

vgl_homg_point_2d< double > vgl_conic< double >::centre ( ) const [inherited]
void vsol_spatial_object_2d::check_update_bounding_box ( ) const [protected, inherited]

Test consistency of bound.

Bounds Accessors:.

min_ and max_ are provided as methods on vsol_spatial_object_2d to be consistent with the previous interface Additional bounds accessors are available directly on vsol_box_2d. - JLM

Definition at line 97 of file vsol_spatial_object_2d.cxx.

vsol_spatial_object_2d * vsol_conic_2d::clone ( void  ) const [virtual]

Clone `this': creation of a new object and initialization.

See Prototype pattern

Implements vsol_spatial_object_2d.

Definition at line 93 of file vsol_conic_2d.cxx.

vsol_point_2d_sptr vsol_conic_2d::closest_point_on_curve ( vsol_point_2d_sptr const &  pt) const

Return the point on the conic boundary which is closest to the given point.

Definition at line 514 of file vsol_conic_2d.cxx.

vcl_list< vgl_homg_line_2d< double > > vgl_conic< double >::components ( ) const [inherited]
void vsol_spatial_object_2d::compute_bounding_box ( void  ) const [protected, virtual, inherited]

compute bounding box, do nothing in this case except touching the box.

Reimplemented in vsol_line_2d, vsol_digital_curve_2d, vsol_polyline_2d, vsol_point_2d, vsol_polygon_2d, vsol_poly_set_2d, and vsol_group_2d.

Definition at line 59 of file vsol_spatial_object_2d.cxx.

bool vgl_conic< double >::contains ( vgl_homg_point_2d< double > const &  pt) const [inherited]
double vgl_conic< double >::curvature_at ( vgl_point_2d< double > const &  p) const [inherited]
virtual vsol_curve_2d_type vsol_conic_2d::curve_type ( ) const [inline, private, virtual]

Return the curve type.

Reimplemented from vsol_curve_2d.

Definition at line 84 of file vsol_conic_2d.h.

double vgl_conic< double >::d ( ) const [inherited]
void vsol_conic_2d::describe ( vcl_ostream &  strm,
int  blanking = 0 
) const [inline, virtual]

output description to stream.

Reimplemented from vsol_spatial_object_2d.

Definition at line 330 of file vsol_conic_2d.h.

double vsol_conic_2d::distance ( vsol_point_2d_sptr const &  pt) const

Return the shortest distance of the point to the conic boundary.

Definition at line 551 of file vsol_conic_2d.cxx.

vgl_conic vgl_conic< double >::dual_conic ( ) const [inherited]
double vgl_conic< double >::e ( ) const [inherited]
double vsol_conic_2d::ellipse_angular_position ( vsol_point_2d_sptr const &  pt) const

Return ellipse angular position.

Definition at line 271 of file vsol_conic_2d.cxx.

bool vgl_conic< double >::ellipse_geometry ( double &  xc,
double &  yc,
double &  major_axis_length,
double &  minor_axis_length,
double &  angle_in_radians 
) const [inherited]
void vsol_conic_2d::ellipse_parameters ( double &  cx,
double &  cy,
double &  phi,
double &  width,
double &  height 
) const

Return 3 ellipse parameters:.

Return 3 ellipse parameters: centre (`cx',`cy'), orientation `phi', size (`width',`height').

  • centre (`cx',`cy'),
  • orientation `phi',
  • size (`width',`height') REQUIRE: is_real_ellipse()

Require: is_real_ellipse()

Definition at line 226 of file vsol_conic_2d.cxx.

void vsol_spatial_object_2d::empty_bounding_box ( ) const [protected, inherited]

make the bounding box empty; often first step in bounding box calculation.

Definition at line 64 of file vsol_spatial_object_2d.cxx.

bool vsol_curve_2d::endpoints_equal ( const vsol_curve_2d other) const [protected, inherited]

Helper function to determine if curve endpoints are equal (in any order).

Useful for curve equality tests.

Definition at line 8 of file vsol_curve_2d.cxx.

double vgl_conic< double >::f ( ) const [inherited]
vsol_box_2d_sptr vsol_spatial_object_2d::get_bounding_box ( ) const [inline, inherited]

Definition at line 137 of file vsol_spatial_object_2d.h.

int vsol_flags_id::get_id ( ) const [inline, inherited]

get id of object.

Definition at line 52 of file vsol_flags_id.h.

double vsol_spatial_object_2d::get_max_x ( ) const [inherited]

Definition at line 118 of file vsol_spatial_object_2d.cxx.

double vsol_spatial_object_2d::get_max_y ( ) const [inherited]

Definition at line 128 of file vsol_spatial_object_2d.cxx.

double vsol_spatial_object_2d::get_min_x ( ) const [inherited]

Definition at line 113 of file vsol_spatial_object_2d.cxx.

double vsol_spatial_object_2d::get_min_y ( ) const [inherited]

Definition at line 123 of file vsol_spatial_object_2d.cxx.

const char * vsol_spatial_object_2d::get_name ( ) const [inherited]

Definition at line 40 of file vsol_spatial_object_2d.cxx.

int vsol_flags_id::get_tag_id ( ) [inline, inherited]

Definition at line 106 of file vsol_flags_id.h.

bool vsol_flags_id::get_tagged_union_flag ( ) [inline, inherited]

check if the flag used by TAGGED_UNION is set.

Definition at line 95 of file vsol_flags_id.h.

bool vsol_flags_id::get_user_flag ( unsigned int  flag) [inline, inherited]

check if a flag is set for a spatial object; flag can be VSOL_FLAG[1-6].

Definition at line 77 of file vsol_flags_id.h.

void vsol_spatial_object_2d::grow_minmax_bounds ( vsol_box_2d_sptr const &  b) const [inline, protected, inherited]

grow to the largest dim. of this and box, i.e., take the convex union.

Definition at line 160 of file vsol_spatial_object_2d.h.

void vsol_conic_2d::hyperbola_parameters ( double &  cx,
double &  cy,
double &  phi,
double &  width,
double &  height 
) const

Return 3 hyperbola parameters:.

Return 3 hyperbola parameters: centre (`cx',`cy'), orientation `phi', size (`half-axis',`half-secondary-axis').

  • centre (`cx',`cy'),
  • orientation `phi',
  • size (`half-axis',-`half-secondary-axis') REQUIRE: is_hyperbola()

Require: is_hyperbola()

Definition at line 299 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::in ( vsol_point_2d_sptr const &  p) const [virtual]

Is `p' in `this' ? (ie `p' verifies the equation, within some margin).

Definition at line 461 of file vsol_conic_2d.cxx.

vcl_list< vsol_point_2d_sptr > vsol_conic_2d::intersection ( vsol_line_2d const &  line) const

Return the set of (real) intersection points of this conic with a line.

Definition at line 481 of file vsol_conic_2d.cxx.

vcl_list< vsol_point_2d_sptr > vsol_conic_2d::intersection ( vsol_conic_2d const &  co) const

Return the set of (real) intersection points of two conics.

Definition at line 499 of file vsol_conic_2d.cxx.

virtual vcl_string vsol_conic_2d::is_a ( ) const [inline, virtual]

Return a platform independent string identifying the class.

Implements vsol_spatial_object_2d.

Definition at line 357 of file vsol_conic_2d.h.

bool vgl_conic< double >::is_central ( ) const [inherited]
virtual bool vsol_conic_2d::is_class ( vcl_string const &  cls) const [inline, virtual]

Return true if the argument matches the string identifying the class or any parent class.

Definition at line 360 of file vsol_conic_2d.h.

bool vsol_conic_2d::is_coincident_lines ( ) const

Is `this' a pair of coincident lines ?.

Definition at line 218 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_complex_circle ( ) const

Is `this' a complex circle ?.

Definition at line 183 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_complex_ellipse ( ) const

Is `this' a complex ellipse ?.

Definition at line 175 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_complex_intersecting_lines ( ) const

Is `this' a pair of complex intersecting lines ?.

Definition at line 211 of file vsol_conic_2d.cxx.

bool vgl_conic< double >::is_degenerate ( ) const [inherited]
bool vsol_conic_2d::is_hyperbola ( ) const

Is `this' a hyperbola ?.

Definition at line 197 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_parabola ( ) const

Is `this' a parabola ?.

Definition at line 190 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_real_circle ( ) const

Is `this' a real circle ?.

Definition at line 168 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_real_ellipse ( ) const

Is `this' a real ellipse ?.

Definition at line 160 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::is_real_intersecting_lines ( ) const

Is `this' a pair of real intersecting lines ?.

Definition at line 204 of file vsol_conic_2d.cxx.

double vsol_conic_2d::length ( void  ) const [virtual]

Return the length of `this'.

Currently only implemented for ellipse segment and accurate to 0.001 of the major axis length. Alternatively provide code for the incomplete elliptic integral of the second kind. However, that would be numerical integration anyway.

Implements vsol_curve_2d.

Definition at line 369 of file vsol_conic_2d.cxx.

vnl_double_3x3 vsol_conic_2d::matrix ( ) const

Return the matrix associated with the coefficients.

Definition at line 401 of file vsol_conic_2d.cxx.

vsol_point_2d_sptr vsol_conic_2d::midpoint ( ) const

Return the centre or symmetry point of a central conic.

Definition at line 453 of file vsol_conic_2d.cxx.

void vsol_spatial_object_2d::not_applicable ( vcl_string const &  message) const [inline, protected, inherited]

Definition at line 89 of file vsol_spatial_object_2d.h.

bool vsol_spatial_object_2d::operator!= ( vsol_spatial_object_2d const &  obj) [inline, inherited]

Definition at line 133 of file vsol_spatial_object_2d.h.

bool vsol_conic_2d::operator!= ( vsol_conic_2d const &  o) const [inline]

Has `this' not the same coeffs than `other', or different end points ?.

Definition at line 180 of file vsol_conic_2d.h.

vcl_ostream & vgl_conic< double >::operator<< ( vcl_ostream &  s,
vgl_conic< double > const &  c 
) [inherited]
bool vgl_conic< double >::operator== ( vgl_conic< double > const &  c) const [inherited]
bool vsol_conic_2d::operator== ( vsol_conic_2d const &  other) const [virtual]

Has `this' the same coefficients and the same end points than `other' ?.

Has `this' the same coefficients and (geometrical) end points than `other'?.

The test anticipates that the conic may have null endpoints

Definition at line 105 of file vsol_conic_2d.cxx.

bool vsol_conic_2d::operator== ( vsol_spatial_object_2d const &  obj) const [virtual]

spatial object equality.

Reimplemented from vsol_spatial_object_2d.

Definition at line 118 of file vsol_conic_2d.cxx.

vcl_istream & vgl_conic< double >::operator>> ( vcl_istream &  s,
vgl_conic< double > &  c 
) [inherited]
virtual vsol_point_2d_sptr vsol_conic_2d::p0 ( void  ) const [inline, virtual]

Return the first point of `this'; pure virtual of vsol_curve_2d.

Implements vsol_curve_2d.

Definition at line 163 of file vsol_conic_2d.h.

virtual vsol_point_2d_sptr vsol_conic_2d::p1 ( void  ) const [inline, virtual]

Return the last point of `this'; pure virtual of vsol_curve_2d.

Implements vsol_curve_2d.

Definition at line 167 of file vsol_conic_2d.h.

void vsol_conic_2d::parabola_parameters ( double &  cx,
double &  cy,
double &  cosphi,
double &  sinphi 
) const

Return 2 parabola parameters:.

Return 2 parabola parameters: top (`cx',`cy'), orientation (`cosphi',`sinphi').

  • top (`cx',`cy'),
  • orientation (`cosphi',`sinphi') REQUIRE: is_parabola()

Require: is_parabola()

Todo:
not yet fully implemented

Definition at line 342 of file vsol_conic_2d.cxx.

vgl_homg_line_2d< double > vgl_conic< double >::polar_line ( vgl_homg_point_2d< double > const &  p) const [inherited]
vgl_homg_point_2d< double > vgl_conic< double >::polar_point ( vgl_homg_line_2d< double > const &  l) const [inherited]
virtual void vsol_spatial_object_2d::print ( vcl_ostream &  strm = vcl_cout) const [inline, virtual, inherited]

Definition at line 125 of file vsol_spatial_object_2d.h.

void vsol_conic_2d::print_summary ( vcl_ostream &  os) const

Print an ascii summary to the stream.

Definition at line 620 of file vsol_conic_2d.cxx.

vcl_string vsol_conic_2d::real_conic_type ( ) const [inline]

Definition at line 189 of file vsol_conic_2d.h.

vsol_conic_2d::vsol_conic_type vsol_conic_2d::real_type ( ) const

Return the real type of the conic from its coefficients.

Find the real type of the conic from its coefficients.

Reimplemented from vgl_conic< double >.

Definition at line 131 of file vsol_conic_2d.cxx.

void vgl_conic< double >::set ( double  a,
double  b,
double  c,
double  d,
double  e,
double  f 
) [inherited]
void vsol_spatial_object_2d::set_bounding_box ( vsol_box_2d_sptr const &  box) const [protected, inherited]

set the bounding box; to be used in bounding box calculation.

Definition at line 74 of file vsol_spatial_object_2d.cxx.

void vsol_spatial_object_2d::set_bounding_box ( double  x,
double  y 
) const [protected, inherited]

set the bounding box to a single point, discarding the old bounding box.

This is a "const" method since the bounding box is a "mutable" data member: calculating the bounding box does not change the object.

Definition at line 69 of file vsol_spatial_object_2d.cxx.

void vsol_conic_2d::set_central_parameters ( vsol_point_2d const &  c,
double  rx,
double  ry,
double  theta 
)

Set ellipse/hyperbola from centre, size and orientation.

Can only be used for non-degenerate, real ellipses and hyperbolas: if rx and ry have the same sign, an ellipse is defined (and any ellipse can uniquely be specified this way); rx is the length of one main axis, ry of the other axis. Hyperbolas are obtained if rx and ry have opposite sign; the positive one determines the distance from bots tops to the centre, and the other one specified the 'minor' axis length.

Definition at line 61 of file vsol_conic_2d.cxx.

void vsol_flags_id::set_id ( int  i) [inline, inherited]

set id of object.

Definition at line 54 of file vsol_flags_id.h.

void vsol_conic_2d::set_p0 ( vsol_point_2d_sptr const &  new_p0) [virtual]

Set the first point of the curve.

REQUIRE: in(new_p0)

Require: in(new_p0)

Implements vsol_curve_2d.

Definition at line 428 of file vsol_conic_2d.cxx.

void vsol_conic_2d::set_p1 ( vsol_point_2d_sptr const &  new_p1) [virtual]

Set the last point of the curve.

REQUIRE: in(new_p1)

Require: in(new_p1)

Implements vsol_curve_2d.

Definition at line 439 of file vsol_conic_2d.cxx.

void vsol_conic_2d::set_parabola_parameters ( vgl_vector_2d< double > const &  dir,
vsol_point_2d const &  top,
double  theta 
)

Set parabola from direction, top and eccentricity parameter.

This can only be used for non-degenerate parabolas: specify the direction of the symmetry axis, the top, and an eccentricity parameter theta.

Definition at line 83 of file vsol_conic_2d.cxx.

void vsol_flags_id::set_tag_id ( int  id) [inline, inherited]

Definition at line 111 of file vsol_flags_id.h.

void vsol_flags_id::set_tagged_union_flag ( ) [inline, inherited]

set the flag used by TAGGED_UNION.

Definition at line 89 of file vsol_flags_id.h.

void vsol_flags_id::set_user_flag ( unsigned int  flag) [inline, inherited]

set a flag for a spatial object; flag can be VSOL_FLAG[1-6].

Definition at line 71 of file vsol_flags_id.h.

vsol_spatial_object_2d_type vsol_curve_2d::spatial_type ( void  ) const [inline, virtual, inherited]

return the spatial type.

Implements vsol_spatial_object_2d.

Definition at line 62 of file vsol_curve_2d.h.

vgl_homg_line_2d< double > vgl_conic< double >::tangent_at ( vgl_homg_point_2d< double > const &  p) const [inherited]
vgl_homg_line_2d< double > * vsol_conic_2d::tangent_at_point ( vsol_point_2d_sptr const &  p) const [virtual]

Returns the tangent to the conic in the point p, if p is on the conic.

Return the tangent to the conic in the point p, if p is on the conic.

In general, returns the polar line of the point w.r.t. the conic.

Definition at line 472 of file vsol_conic_2d.cxx.

vgl_conic vgl_conic< double >::tangential_form ( ) const [inherited]
void vgl_conic< double >::translate_by ( double  x,
double  y 
) [inherited]
vgl_conic_type vgl_conic< double >::type ( ) const [inherited]
static vgl_conic_type vgl_conic< double >::type_by_name ( vcl_string const &  name) [static, inherited]
static vcl_string vgl_conic< double >::type_by_number ( vgl_conic_type  type) [static, inherited]
void vsol_spatial_object_2d::un_protect ( ) [inline, inherited]

unprotect the object.

Definition at line 104 of file vsol_spatial_object_2d.h.

void vsol_flags_id::unset_tagged_union_flag ( ) [inline, inherited]

un-set the flag used by TAGGED_UNION.

Definition at line 101 of file vsol_flags_id.h.

void vsol_flags_id::unset_user_flag ( unsigned int  flag) [inline, inherited]

un-set a flag for a spatial object; flag can be VSOL_FLAG[1-6].

Definition at line 83 of file vsol_flags_id.h.

short vsol_conic_2d::version ( ) const

Return IO version number;.

Reimplemented from vsol_spatial_object_2d.

Definition at line 614 of file vsol_conic_2d.cxx.


Friends And Related Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  strm,
vsol_spatial_object_2d const &  so 
) [friend, inherited]

Definition at line 190 of file vsol_spatial_object_2d.h.

vcl_ostream& operator<< ( vcl_ostream &  strm,
vsol_spatial_object_2d const *  so 
) [friend, inherited]

Definition at line 196 of file vsol_spatial_object_2d.h.


Member Data Documentation

const float vsol_spatial_object_2d::eps = 1.0e-3f [static, inherited]

Definition at line 79 of file vsol_spatial_object_2d.h.

int vsol_flags_id::id_ [protected, inherited]

Definition at line 39 of file vsol_flags_id.h.

vgl_conic< double >::imaginary_circle [inherited]
vgl_conic< double >::imaginary_ellipse [inherited]
vgl_conic< double >::no_type [inherited]
vgl_conic< double >::num_conic_types [inherited]

First point of the curve.

Definition at line 57 of file vsol_conic_2d.h.

Last point of the curve.

Definition at line 61 of file vsol_conic_2d.h.

const char * vsol_spatial_object_2d::SpatialTypes [static, inherited]
Initial value:
{
  "NO_TYPE             ",
  "TOPOLOGYOBJECT      ",
  "POINT               ",
  "CURVE               ",
  "REGION              ",
  "SPATIALGROUP        ",
  "NUM_SPATIALOBJECT_TYPES"
}

Definition at line 78 of file vsol_spatial_object_2d.h.

unsigned int vsol_flags_id::tag_ [protected, inherited]

Definition at line 38 of file vsol_flags_id.h.

int vsol_flags_id::tagcount_ = 0 [static, protected, inherited]

Definition at line 40 of file vsol_flags_id.h.


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