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

#include <vsol_line_2d.h>

Inheritance diagram for vsol_line_2d:
Inheritance graph
[legend]

List of all members.

Public Types

enum  vsol_spatial_object_2d_type {
  SPATIAL_NO_TYPE = 0, TOPOLOGYOBJECT, POINT, CURVE,
  REGION, SPATIALGROUP, VOLUME, NUM_SPATIALOBJECT_TYPES
}

Public Member Functions

 vsol_line_2d ()
 Default Constructor.
 vsol_line_2d (vgl_vector_2d< double > const &new_direction, const vsol_point_2d_sptr &new_middle)
 Constructor from the direction and the middle point.
 vsol_line_2d (vgl_vector_2d< double > const &new_direction, const vgl_point_2d< double > &new_middle)
 Constructor from the direction and the middle point.
 vsol_line_2d (vsol_point_2d_sptr const &new_p0, vsol_point_2d_sptr const &new_p1)
 Constructor from the first and the last point of the straight line.
 vsol_line_2d (vgl_point_2d< double > const &p0, vgl_point_2d< double > const &p1)
 Constructor from two vgl_point_2d (end points).
 vsol_line_2d (vgl_line_segment_2d< double > const &l)
 Constructor from a vgl_line_segment_2d.
 vsol_line_2d (vsol_line_2d const &other)
 Copy constructor.
virtual ~vsol_line_2d ()
 Destructor.
virtual vsol_line_2d const * cast_to_line () const
 Return `this' if `this' is a line_2d, 0 otherwise.
virtual vsol_line_2dcast_to_line ()
virtual vsol_spatial_object_2dclone () const
 Clone `this': creation of a new object and initialization.
vsol_point_2d_sptr middle () const
 Middle point of the straight line segment.
vgl_vector_2d< double > direction () const
 direction of the straight line segment.
virtual vsol_point_2d_sptr p0 () const
 First point of the straight line segment.
virtual vsol_point_2d_sptr p1 () const
 Last point of the straight line segment.
vgl_homg_line_2d< double > vgl_hline_2d () const
 Get an unbounded vgl_homg_line_2d.
vgl_line_segment_2d< double > vgl_seg_2d () const
 Get a vgl_line_segment_2d.
virtual bool operator== (vsol_line_2d const &other) const
 Has `this' the same points than `other' ?.
virtual bool operator== (vsol_spatial_object_2d const &obj) const
 spatial object equality.
bool operator!= (vsol_line_2d const &o) const
 Has `this' not the same points than `other' ?.
virtual void compute_bounding_box () const
 Compute the bounding box of `this'.
virtual double length () const
 Return the length of `this'.
double tangent_angle () const
 Return the tangent angle (in degrees) of `this'. 0<angle<360.
virtual void set_p0 (vsol_point_2d_sptr const &new_p0)
 Set the first point of the straight line segment.
virtual void set_p1 (vsol_point_2d_sptr const &new_p1)
 Set the last point of the straight line segment.
void set_length (const double new_length)
 Set the length of `this'. Doesn't change middle point and orientation.
virtual bool in (vsol_point_2d_sptr const &p) const
 Is `p' in `this' ?.
virtual vgl_homg_line_2d
< double > * 
tangent_at_point (vsol_point_2d_sptr const &p) const
 Return the tangent to `this' at `p'. Has to be deleted manually.
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.
void describe (vcl_ostream &strm, int blanking=0) const
 output description to stream.
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 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_conic_2d const * cast_to_conic () const
 Return `this' if `this' is a conic, 0 otherwise.
virtual vsol_conic_2dcast_to_conic ()
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)

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.
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_
vsol_point_2d_sptr p1_

Friends

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

Detailed Description

Definition at line 32 of file vsol_line_2d.h.


Member Enumeration Documentation

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_line_2d::vsol_line_2d ( )

Default Constructor.

Definition at line 23 of file vsol_line_2d.cxx.

vsol_line_2d::vsol_line_2d ( vgl_vector_2d< double > const &  new_direction,
const vsol_point_2d_sptr new_middle 
)

Constructor from the direction and the middle point.

Definition at line 32 of file vsol_line_2d.cxx.

vsol_line_2d::vsol_line_2d ( vgl_vector_2d< double > const &  new_direction,
const vgl_point_2d< double > &  new_middle 
)

Constructor from the direction and the middle point.

Definition at line 42 of file vsol_line_2d.cxx.

vsol_line_2d::vsol_line_2d ( vsol_point_2d_sptr const &  new_p0,
vsol_point_2d_sptr const &  new_p1 
) [inline]

Constructor from the first and the last point of the straight line.

Definition at line 69 of file vsol_line_2d.h.

vsol_line_2d::vsol_line_2d ( vgl_point_2d< double > const &  p0,
vgl_point_2d< double > const &  p1 
)

Constructor from two vgl_point_2d (end points).

Definition at line 52 of file vsol_line_2d.cxx.

vsol_line_2d::vsol_line_2d ( vgl_line_segment_2d< double > const &  l)

Constructor from a vgl_line_segment_2d.

Constructor.

Definition at line 62 of file vsol_line_2d.cxx.

vsol_line_2d::vsol_line_2d ( vsol_line_2d const &  other) [inline]

Copy constructor.

no duplication of the points

Definition at line 84 of file vsol_line_2d.h.

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

Destructor.

Definition at line 89 of file vsol_line_2d.h.


Member Function Documentation

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.

void vsol_line_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 265 of file vsol_line_2d.cxx.

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

Binary save self to stream.

Reimplemented from vsol_spatial_object_2d.

Definition at line 256 of file vsol_line_2d.cxx.

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_curve_2d::cast_to_conic ( ) const [inline, virtual, inherited]

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

Reimplemented in vsol_conic_2d.

Definition at line 95 of file vsol_curve_2d.h.

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

Reimplemented in vsol_conic_2d.

Definition at line 96 of file vsol_curve_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_line_2d::cast_to_line ( ) const [inline, virtual]

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

Reimplemented from vsol_curve_2d.

Definition at line 93 of file vsol_line_2d.h.

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

Reimplemented from vsol_curve_2d.

Definition at line 94 of file vsol_line_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.

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_line_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 72 of file vsol_line_2d.cxx.

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

Compute the bounding box of `this'.

Reimplemented from vsol_spatial_object_2d.

Definition at line 123 of file vsol_line_2d.cxx.

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

Return the curve type.

Reimplemented from vsol_curve_2d.

Definition at line 98 of file vsol_line_2d.h.

void vsol_line_2d::describe ( vcl_ostream &  strm,
int  blanking = 0 
) const [virtual]

output description to stream.

Reimplemented from vsol_spatial_object_2d.

Definition at line 323 of file vsol_line_2d.cxx.

vgl_vector_2d< double > vsol_line_2d::direction ( ) const

direction of the straight line segment.

Definition at line 90 of file vsol_line_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.

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.

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

Is `p' in `this' ?.

Definition at line 200 of file vsol_line_2d.cxx.

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

Return a platform independent string identifying the class.

Implements vsol_spatial_object_2d.

Definition at line 209 of file vsol_line_2d.h.

virtual bool vsol_line_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 212 of file vsol_line_2d.h.

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

Return the length of `this'.

Implements vsol_curve_2d.

Definition at line 131 of file vsol_line_2d.cxx.

vsol_point_2d_sptr vsol_line_2d::middle ( ) const

Middle point of the straight line segment.

Definition at line 83 of file vsol_line_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_line_2d::operator!= ( vsol_line_2d const &  o) const [inline]

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

Definition at line 145 of file vsol_line_2d.h.

bool vsol_line_2d::operator== ( vsol_line_2d const &  other) const [virtual]

Has `this' the same points than `other' ?.

Definition at line 101 of file vsol_line_2d.cxx.

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

spatial object equality.

Reimplemented from vsol_spatial_object_2d.

Definition at line 110 of file vsol_line_2d.cxx.

virtual vsol_point_2d_sptr vsol_line_2d::p0 ( void  ) const [inline, virtual]

First point of the straight line segment.

Implements vsol_curve_2d.

Definition at line 120 of file vsol_line_2d.h.

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

Last point of the straight line segment.

Implements vsol_curve_2d.

Definition at line 124 of file vsol_line_2d.h.

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_line_2d::print_summary ( vcl_ostream &  os) const

Print an ascii summary to the stream.

Definition at line 289 of file vsol_line_2d.cxx.

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_flags_id::set_id ( int  i) [inline, inherited]

set id of object.

Definition at line 54 of file vsol_flags_id.h.

void vsol_line_2d::set_length ( const double  new_length)

Set the length of `this'. Doesn't change middle point and orientation.

If p0 and p1 are equal then the direction is set to (1,0) REQUIRE: new_length>=0

If p0 and p1 are equal then the direction is set to (1,0) Require: new_length>=0

Definition at line 179 of file vsol_line_2d.cxx.

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

Set the first point of the straight line segment.

Implements vsol_curve_2d.

Definition at line 163 of file vsol_line_2d.cxx.

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

Set the last point of the straight line segment.

Implements vsol_curve_2d.

Definition at line 170 of file vsol_line_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.

double vsol_line_2d::tangent_angle ( ) const

Return the tangent angle (in degrees) of `this'. 0<angle<360.

Return the tangent angle in degrees of `this'.

By convention, the angle is in degrees and lies in the interval [0, 360].

Definition at line 139 of file vsol_line_2d.cxx.

vgl_homg_line_2d< double > * vsol_line_2d::tangent_at_point ( vsol_point_2d_sptr const &  p) const [virtual]

Return the tangent to `this' at `p'. Has to be deleted manually.

REQUIRE: in(p)

Require: in(p)

Definition at line 221 of file vsol_line_2d.cxx.

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_line_2d::version ( ) const

Return IO version number;.

Reimplemented from vsol_spatial_object_2d.

Definition at line 283 of file vsol_line_2d.cxx.

vgl_homg_line_2d< double > vsol_line_2d::vgl_hline_2d ( ) const

Get an unbounded vgl_homg_line_2d.

compute an infinite homogeneous line corresponding to *this.

Definition at line 232 of file vsol_line_2d.cxx.

vgl_line_segment_2d< double > vsol_line_2d::vgl_seg_2d ( ) const

Get a vgl_line_segment_2d.

compute a vgl line segment corresponding to *this.

Definition at line 242 of file vsol_line_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.

Definition at line 41 of file vsol_line_2d.h.

Definition at line 46 of file vsol_line_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: