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

#include <vdgl_digital_curve.h>

Inheritance diagram for vdgl_digital_curve:
Inheritance graph
[legend]

List of all members.

Public Types

enum  vsol_spatial_object_2d_type
enum  vsol_curve_2d_type

Public Member Functions

 vdgl_digital_curve ()
 vdgl_digital_curve (vdgl_interpolator_sptr interpolator)
 vdgl_digital_curve (vsol_point_2d_sptr const &p0, vsol_point_2d_sptr const &p1)
short order () const
vsol_point_2d_sptr p0 () const
vsol_point_2d_sptr p1 () const
double length () const
vsol_spatial_object_2dclone () const
void set_p0 (const vsol_point_2d_sptr &)
void set_p1 (const vsol_point_2d_sptr &)
bool split (vsol_point_2d_sptr const &v, vdgl_digital_curve_sptr &dc1, vdgl_digital_curve_sptr &dc2)
 Split a digital curve into two pieces at the given point.
double get_x (const double s) const
double get_y (const double s) const
double get_grad (const double s) const
double get_theta (const double s) const
double get_tangent_angle (const double s) const
int n_pts () const
vdgl_interpolator_sptr get_interpolator () const
virtual vdgl_digital_curve const * cast_to_vdgl_digital_curve () const
 Return `this' if `this' is a digital_curve, 0 otherwise.
virtual vdgl_digital_curvecast_to_vdgl_digital_curve ()
virtual void compute_bounding_box () const
 bounding box.
virtual bool operator== (const vdgl_digital_curve &other) const
 Has `this' the same order interpolation and edgel values as other.
virtual bool operator== (const vsol_spatial_object_2d &obj) const
bool operator!= (const vdgl_digital_curve &o) const
 Has `this' not the same coordinates than `other' ?.
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 (const vcl_string &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
virtual vsol_curve_2dcast_to_curve ()
virtual const vsol_curve_2dcast_to_curve () const
virtual vsol_line_2d const * cast_to_line () const
virtual vsol_line_2dcast_to_line ()
virtual dbsol_circ_arc_2d const * cast_to_circ_arc () const
virtual dbsol_circ_arc_2d * cast_to_circ_arc ()
virtual vsol_conic_2d const * cast_to_conic () const
virtual vsol_conic_2dcast_to_conic ()
virtual vsol_polyline_2d const * cast_to_polyline () const
virtual vsol_polyline_2dcast_to_polyline ()
virtual vsol_digital_curve_2d
const * 
cast_to_digital_curve () const
virtual vsol_digital_curve_2dcast_to_digital_curve ()
const char * get_name () const
void un_protect ()
virtual void print (vcl_ostream &strm=vcl_cout) const
virtual void describe (vcl_ostream &=vcl_cout, int=0) 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 ()
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
int get_id () const
void set_id (int i)
void set_user_flag (unsigned int flag)
bool get_user_flag (unsigned int flag)
void unset_user_flag (unsigned int flag)
void set_tagged_union_flag ()
bool get_tagged_union_flag ()
void unset_tagged_union_flag ()
int get_tag_id ()
void set_tag_id (int id)
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

Public Attributes

 SPATIAL_NO_TYPE
 TOPOLOGYOBJECT
 POINT
 CURVE
 REGION
 SPATIALGROUP
 VOLUME
 NUM_SPATIALOBJECT_TYPES
 CURVE_NO_TYPE
 LINE
 CIRCULAR_ARC
 CONIC
 POLYLINE
 DIGITAL_CURVE
 NUM_CURVE_TYPES

Static Public Attributes

static const char * SpatialTypes []
static const float eps

Protected Member Functions

bool endpoints_equal (const vsol_curve_2d &other) const
void not_applicable (vcl_string const &message) const
void empty_bounding_box () const
void set_bounding_box (vsol_box_2d_sptr const &box) const
void set_bounding_box (double x, double y) const
void add_to_bounding_box (double x, double y) const
void add_to_bounding_box (vsol_box_2d_sptr const &box) const
void grow_minmax_bounds (vsol_box_2d_sptr const &b) const
void check_update_bounding_box () const

Protected Attributes

vdgl_interpolator_sptr interpolator_
unsigned int tag_
int id_
unsigned long timestamp_

Static Protected Attributes

static int tagcount_

Private Member Functions

virtual vsol_curve_2d_type curve_type () const
 Return the curve type.

Friends

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

Detailed Description

Definition at line 27 of file vdgl_digital_curve.h.


Constructor & Destructor Documentation

vdgl_digital_curve::vdgl_digital_curve ( )

Definition at line 16 of file vdgl_digital_curve.cxx.

vdgl_digital_curve::vdgl_digital_curve ( vdgl_interpolator_sptr  interpolator)

Definition at line 23 of file vdgl_digital_curve.cxx.

vdgl_digital_curve::vdgl_digital_curve ( vsol_point_2d_sptr const &  p0,
vsol_point_2d_sptr const &  p1 
)

Definition at line 29 of file vdgl_digital_curve.cxx.


Member Function Documentation

void vdgl_digital_curve::b_read ( vsl_b_istream is) [virtual]

Binary load self from stream.

Binary load self from stream (not typically used).

Reimplemented from vsol_curve_2d.

Definition at line 190 of file vdgl_digital_curve.cxx.

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

Binary save self to stream.

Reimplemented from vsol_curve_2d.

Definition at line 181 of file vdgl_digital_curve.cxx.

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

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

Reimplemented from vsol_curve_2d.

Definition at line 76 of file vdgl_digital_curve.h.

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

Reimplemented from vsol_curve_2d.

Definition at line 77 of file vdgl_digital_curve.h.

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

Implements vsol_curve_2d.

Definition at line 43 of file vdgl_digital_curve.cxx.

void vdgl_digital_curve::compute_bounding_box ( void  ) const [virtual]

bounding box.

scan all the points on the curve and compute the bounds.

Reimplemented from vsol_curve_2d.

Definition at line 147 of file vdgl_digital_curve.cxx.

virtual vsol_curve_2d_type vdgl_digital_curve::curve_type ( ) const [inline, private, virtual]

Return the curve type.

Reimplemented from vsol_curve_2d.

Definition at line 81 of file vdgl_digital_curve.h.

double vdgl_digital_curve::get_grad ( const double  s) const

Definition at line 69 of file vdgl_digital_curve.cxx.

vdgl_interpolator_sptr vdgl_digital_curve::get_interpolator ( ) const [inline]

Definition at line 68 of file vdgl_digital_curve.h.

double vdgl_digital_curve::get_tangent_angle ( const double  s) const

Definition at line 85 of file vdgl_digital_curve.cxx.

double vdgl_digital_curve::get_theta ( const double  s) const

Definition at line 77 of file vdgl_digital_curve.cxx.

double vdgl_digital_curve::get_x ( const double  s) const

Definition at line 53 of file vdgl_digital_curve.cxx.

double vdgl_digital_curve::get_y ( const double  s) const

Definition at line 61 of file vdgl_digital_curve.cxx.

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

Return a platform independent string identifying the class.

Implements vsol_curve_2d.

Definition at line 111 of file vdgl_digital_curve.h.

virtual bool vdgl_digital_curve::is_class ( const vcl_string &  cls) const [inline, virtual]

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

Definition at line 114 of file vdgl_digital_curve.h.

double vdgl_digital_curve::length ( ) const [virtual]

Implements vsol_curve_2d.

Definition at line 115 of file vdgl_digital_curve.cxx.

int vdgl_digital_curve::n_pts ( ) const

Definition at line 92 of file vdgl_digital_curve.cxx.

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

Has `this' not the same coordinates than `other' ?.

Definition at line 94 of file vdgl_digital_curve.h.

bool vdgl_digital_curve::operator== ( const vdgl_digital_curve other) const [virtual]

Has `this' the same order interpolation and edgel values as other.

Definition at line 153 of file vdgl_digital_curve.cxx.

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

Reimplemented from vsol_curve_2d.

Definition at line 169 of file vdgl_digital_curve.cxx.

short vdgl_digital_curve::order ( ) const

Definition at line 48 of file vdgl_digital_curve.cxx.

vsol_point_2d_sptr vdgl_digital_curve::p0 ( void  ) const [virtual]

Implements vsol_curve_2d.

Definition at line 97 of file vdgl_digital_curve.cxx.

vsol_point_2d_sptr vdgl_digital_curve::p1 ( void  ) const [virtual]

Implements vsol_curve_2d.

Definition at line 106 of file vdgl_digital_curve.cxx.

void vdgl_digital_curve::print_summary ( vcl_ostream &  os) const

Print an ascii summary to the stream.

Definition at line 232 of file vdgl_digital_curve.cxx.

void vdgl_digital_curve::set_p0 ( const vsol_point_2d_sptr p) [virtual]

Implements vsol_curve_2d.

Definition at line 120 of file vdgl_digital_curve.cxx.

void vdgl_digital_curve::set_p1 ( const vsol_point_2d_sptr p) [virtual]

Implements vsol_curve_2d.

Definition at line 127 of file vdgl_digital_curve.cxx.

bool vdgl_digital_curve::split ( vsol_point_2d_sptr const &  v,
vdgl_digital_curve_sptr dc1,
vdgl_digital_curve_sptr dc2 
)

Split a digital curve into two pieces at the given point.

If the location is not on the curve, the nearest point which does lie on the curve is selected. If the point is outside the curve bounds, then only dc1 is returned, as the entire curve. dc2 is NULL.

Definition at line 134 of file vdgl_digital_curve.cxx.

short vdgl_digital_curve::version ( ) const

Return IO version number;.

Reimplemented from vsol_curve_2d.

Definition at line 226 of file vdgl_digital_curve.cxx.


Member Data Documentation

Definition at line 31 of file vdgl_digital_curve.h.


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