topological edge. More...
#include <vtol_edge_2d.h>
Public Types | |
enum | vsol_spatial_object_2d_type |
Public Member Functions | |
vtol_edge_2d () | |
Default constructor. Empty edge. Not a valid edge. | |
vtol_edge_2d (vtol_vertex_2d_sptr const &new_v1, vtol_vertex_2d_sptr const &new_v2, const vsol_curve_2d_sptr &new_curve=0) | |
Constructor from the two endpoints `new_v1', `new_v2' and from a curve `new_curve'. | |
vtol_edge_2d (vtol_vertex_sptr const &new_v1, vtol_vertex_sptr const &new_v2, const vsol_curve_2d_sptr &new_curve=0) | |
vtol_edge_2d (vtol_edge_2d_sptr const &other) | |
Pseudo copy constructor. Deep copy. | |
vtol_edge_2d (vtol_zero_chain_sptr const &new_zero_chain) | |
Constructor from a zero-chain. | |
vtol_edge_2d (zero_chain_list const &new_zero_chains) | |
Constructor from an array of zero-chains. | |
vtol_edge_2d (vsol_curve_2d &) | |
Constructor for a vtol_edge_2d from a vsol_curve_2d. | |
vtol_edge_2d (double, double, double, double, vsol_curve_2d_sptr c=0) | |
Constructor from two vertices (alternate interface). | |
virtual | ~vtol_edge_2d () |
Destructor. | |
virtual vsol_spatial_object_2d * | clone () const |
Clone `this': creation of a new object and initialization. | |
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_curve_2d_sptr | curve () const |
Return the curve associated to `this'. | |
virtual void | set_curve (vsol_curve_2d &new_curve) |
Set the curve with `new_curve'. | |
virtual bool | operator== (const vtol_edge_2d &other) const |
Equality operators. | |
bool | operator!= (const vtol_edge_2d &other) const |
bool | operator== (const vtol_edge &other) const |
edge equality. | |
bool | operator== (const vsol_spatial_object_2d &obj) const |
spatial object equality. | |
virtual const vtol_edge_2d * | cast_to_edge_2d () const |
Return `this' if `this' is an edge, 0 otherwise. | |
virtual vtol_edge_2d * | cast_to_edge_2d () |
Return `this' if `this' is an edge, 0 otherwise. | |
virtual void | compute_bounding_box () const |
compute the bounding box from the set of vertices. | |
virtual void | print (vcl_ostream &strm=vcl_cout) const |
This method outputs a brief vtol_edge_2d info with vtol_edge_2d object address. | |
virtual void | describe (vcl_ostream &strm=vcl_cout, int blanking=0) const |
This method outputs all edge information to the vcl_ostream, strm. | |
virtual void | copy_geometry (const vtol_edge &other) |
copy the geometry. | |
virtual bool | compare_geometry (const vtol_edge &other) const |
comparison of geometry. | |
vtol_vertex_sptr | v1 () const |
Return the first endpoint. | |
vtol_vertex_sptr | v2 () const |
Return the second endpoint. | |
virtual vtol_zero_chain_sptr | zero_chain () const |
Return the first non-empty zero-chain of `this'. | |
virtual void | set_v1 (vtol_vertex_sptr new_v1) |
Set the first endpoint. | |
virtual void | set_v2 (vtol_vertex_sptr new_v2) |
Set the last endpoint. | |
virtual void | set_vertices_from_zero_chains () |
Determine the endpoints of an edge from its inferiors. | |
virtual void | replace_end_point (vtol_vertex ¤t_end_point, vtol_vertex &new_end_point) |
replace the current end point. | |
bool | operator!= (const vtol_edge &other) const |
bool | operator!= (vsol_spatial_object_2d const &obj) |
virtual void | add_edge_loop (vtol_one_chain_sptr const &) |
This is a utility method that adds new_edge_loop to the vtol_edge's superior list. | |
virtual void | remove_edge_loop (vtol_one_chain_sptr const &) |
This is a utility method that removes doomed_edge_loop from the vtol_edge's superior list. | |
virtual const vtol_edge * | cast_to_edge () const |
Return `this' if `this' is an edge, 0 otherwise. | |
virtual vtol_edge * | cast_to_edge () |
Return `this' if `this' is an edge, 0 otherwise. | |
void | link_inferior (vtol_zero_chain_sptr inf) |
Link `this' with an inferior `inferior'. | |
void | unlink_inferior (vtol_zero_chain_sptr inf) |
Unlink `this' from the inferior `inferior'. | |
virtual bool | valid_inferior_type (vtol_topology_object const *inferior) const |
Is `inferior' type valid for `this' ?. | |
bool | valid_inferior_type (vtol_zero_chain_sptr const &) const |
bool | valid_superior_type (vtol_one_chain_sptr const &) const |
bool | valid_superior_type (vtol_topology_object const *sup) const |
Is `superior' type valid for `this' ?. | |
virtual vertex_list * | endpoints () |
get a list of endpoints. | |
virtual bool | share_vertex_with (vtol_edge_sptr const &other) |
Returns true if the invoking edge has a vertex in common with vtol_edge `other'. | |
virtual bool | add_vertex (vtol_vertex_sptr const &) |
This method adds newvert to the vtol_edge by linking it to one of the zero_chains of the vtol_edge Inferiors. | |
virtual bool | remove_vertex (vtol_vertex_sptr const &) |
This method removes uglyvert from the vtol_edge by removing it from the inferior zero_chains. | |
virtual bool | is_endpoint (vtol_vertex_sptr const &) const |
virtual bool | is_endpoint1 (vtol_vertex_sptr const &) const |
Returns True if v is equal to the first vtol_edge endpoint,v1_. | |
virtual bool | is_endpoint2 (vtol_vertex_sptr const &) const |
Returns True if v is equal to the second vtol_edge endpoint, v2_. | |
virtual vtol_vertex_sptr | other_endpoint (const vtol_vertex &) const |
This method works only for ImplicitLine edges. | |
virtual vtol_topology_object * | cast_to_topology_object () |
virtual const vtol_topology_object * | cast_to_topology_object () const |
virtual const vtol_vertex * | cast_to_vertex () const |
Return `this' if `this' is a vertex, 0 otherwise. | |
virtual vtol_vertex * | cast_to_vertex () |
Return `this' if `this' is a vertex, 0 otherwise. | |
virtual const vtol_zero_chain * | cast_to_zero_chain () const |
Return `this' if `this' is a zero_chain, 0 otherwise. | |
virtual vtol_zero_chain * | cast_to_zero_chain () |
Return `this' if `this' is a zero_chain, 0 otherwise. | |
virtual const vtol_chain * | cast_to_chain () const |
Return `this' if `this' is a chain, 0 otherwise. | |
virtual vtol_chain * | cast_to_chain () |
Return `this' if `this' is a chain, 0 otherwise. | |
virtual const vtol_one_chain * | cast_to_one_chain () const |
Return `this' if `this' is a one_chain, 0 otherwise. | |
virtual vtol_one_chain * | cast_to_one_chain () |
Return `this' if `this' is a one_chain, 0 otherwise. | |
virtual const vtol_face * | cast_to_face () const |
Return `this' if `this' is a face, 0 otherwise. | |
virtual vtol_face * | cast_to_face () |
Return `this' if `this' is a face, 0 otherwise. | |
virtual const vtol_two_chain * | cast_to_two_chain () const |
Return `this' if `this' is a two_chain, 0 otherwise. | |
virtual vtol_two_chain * | cast_to_two_chain () |
Return `this' if `this' is a two_chain, 0 otherwise. | |
virtual const vtol_block * | cast_to_block () const |
Return `this' if `this' is a block, 0 otherwise. | |
virtual vtol_block * | cast_to_block () |
Return `this' if `this' is a block, 0 otherwise. | |
bool | is_inferior (vtol_topology_object_sptr inferior) const |
Is `inferior' already an inferior of `this' ?. | |
bool | is_superior (vtol_topology_object *const &superior) const |
Is `superior' already a superior of `this' ?. | |
int | numinf () const |
Number of inferiors. | |
int | numsup () const |
Number of superiors. | |
const vcl_list < vtol_topology_object * > * | superiors_list () const |
topology_list * | inferiors () |
Return the inferiors list. | |
const topology_list * | inferiors () const |
virtual vsol_spatial_object_2d_type | spatial_type () const |
Return the spatial type. | |
void | unlink_all_inferiors () |
Unlink `this' from all its inferiors. | |
void | unlink () |
Unlink `this' of the network. | |
void | vertices (vertex_list &list) const |
Get list of vertices. | |
void | zero_chains (zero_chain_list &list) const |
Get list of zero chains. | |
void | edges (edge_list &list) const |
Get list of edges. | |
void | one_chains (one_chain_list &list) const |
Get list of one chains. | |
void | faces (face_list &list) const |
Get list of faces. | |
void | two_chains (two_chain_list &list) const |
Get list of two chains. | |
void | blocks (block_list &list) const |
Get list of blocks. | |
void | describe_inferiors (vcl_ostream &strm=vcl_cout, int blanking=0) const |
void | describe_superiors (vcl_ostream &strm=vcl_cout, int blanking=0) const |
const char * | get_name () const |
void | un_protect () |
short | version () const |
virtual void | b_write (vsl_b_ostream &os) const |
virtual void | b_read (vsl_b_istream &is) |
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_2d * | cast_to_spatial_object () |
virtual vsol_spatial_object_2d const * | cast_to_spatial_object () const |
virtual vsol_spatial_object_2d * | cast_to_vsol_spatial_object () |
virtual vsol_spatial_object_2d const * | cast_to_vsol_spatial_object () const |
virtual vsol_point_2d * | cast_to_point () |
virtual vsol_point_2d const * | cast_to_point () const |
virtual vsol_curve_2d * | cast_to_curve () |
virtual vsol_curve_2d const * | cast_to_curve () const |
virtual vsol_region_2d * | cast_to_region () |
virtual vsol_region_2d const * | cast_to_region () const |
virtual vsol_group_2d * | cast_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 | |
Static Public Attributes | |
static const char * | SpatialTypes [] |
static const float | eps |
Protected Types | |
enum | vtol_topology_object_type { TOPOLOGY_NO_TYPE = 0, VERTEX, ZEROCHAIN, EDGE, ONECHAIN, FACE, TRIFACE, INTENSITYFACE, INTENSITYFACE3D, DDBINTENSITYFACE, TWOCHAIN, TRIMESHTWOCHAIN, BLOCK, NUM_TOPOLOGYOBJECT_TYPES } |
Protected Member Functions | |
virtual vcl_vector < vtol_vertex * > * | compute_vertices () |
Inferior/Superior Accessor Methods. | |
virtual vcl_vector< vtol_edge * > * | compute_edges () |
Returns a list with itself as the only element. This utility is used in Inferior/Superior accessing methods. | |
virtual vcl_vector < vtol_zero_chain * > * | compute_zero_chains () |
Returns the vtol_zero_chain list of the vtol_edge. This list is the Inferiors of the edge. | |
virtual vcl_vector < vtol_one_chain * > * | compute_one_chains () |
Returns a list of one_chains which contain the vtol_edge. This list is the Superiors of the edge. | |
virtual vcl_vector< vtol_face * > * | compute_faces () |
Returns a list of the faces which contain the vtol_edge. | |
virtual vcl_vector < vtol_two_chain * > * | compute_two_chains () |
Returns the list of two_chains which contain the vtol_edge. | |
virtual vcl_vector< vtol_block * > * | compute_blocks () |
Returns the list of blocks which contain the vtol_edge. | |
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 | |
vtol_vertex_sptr | v1_ |
vtol_vertex_sptr | v2_ |
vcl_list< vtol_topology_object * > | superiors_ |
topology_list | inferiors_ |
unsigned int | tag_ |
int | id_ |
unsigned long | timestamp_ |
Static Protected Attributes | |
static int | tagcount_ |
Private Member Functions | |
vtol_edge_2d (vtol_vertex_2d &new_v1, vtol_vertex_2d &new_v2, const vsol_curve_2d_sptr &new_curve=0) | |
vtol_edge_2d (const vtol_edge_2d &other) | |
Copy constructor. Deep copy. Deprecated. | |
vtol_edge_2d (vtol_zero_chain &new_zero_chain) | |
Private Attributes | |
vsol_curve_2d_sptr | curve_ |
Friends | |
friend vcl_ostream & | operator<< (vcl_ostream &, vsol_spatial_object_2d const &) |
friend vcl_ostream & | operator<< (vcl_ostream &, vsol_spatial_object_2d const *) |
topological edge.
Definition at line 55 of file vtol_edge_2d.h.
enum vtol_topology_object::vtol_topology_object_type [protected, inherited] |
TOPOLOGY_NO_TYPE | |
VERTEX | |
ZEROCHAIN | |
EDGE | |
ONECHAIN | |
FACE | |
TRIFACE | |
INTENSITYFACE | |
INTENSITYFACE3D | |
DDBINTENSITYFACE | |
TWOCHAIN | |
TRIMESHTWOCHAIN | |
BLOCK | |
NUM_TOPOLOGYOBJECT_TYPES |
Definition at line 132 of file vtol_topology_object.h.
vtol_edge_2d::vtol_edge_2d | ( | ) | [inline] |
Default constructor. Empty edge. Not a valid edge.
Definition at line 70 of file vtol_edge_2d.h.
vtol_edge_2d::vtol_edge_2d | ( | vtol_vertex_2d_sptr const & | new_v1, |
vtol_vertex_2d_sptr const & | new_v2, | ||
const vsol_curve_2d_sptr & | new_curve = 0 |
||
) |
Constructor from the two endpoints `new_v1', `new_v2' and from a curve `new_curve'.
If `new_curve' is 0, a line is created from `new_v1' and `new_v2'.
Definition at line 19 of file vtol_edge_2d.cxx.
vtol_edge_2d::vtol_edge_2d | ( | vtol_vertex_sptr const & | new_v1, |
vtol_vertex_sptr const & | new_v2, | ||
const vsol_curve_2d_sptr & | new_curve = 0 |
||
) |
Definition at line 33 of file vtol_edge_2d.cxx.
vtol_edge_2d::vtol_edge_2d | ( | vtol_vertex_2d & | new_v1, |
vtol_vertex_2d & | new_v2, | ||
const vsol_curve_2d_sptr & | new_curve = 0 |
||
) | [private] |
vtol_edge_2d::vtol_edge_2d | ( | const vtol_edge_2d & | other | ) | [private] |
Copy constructor. Deep copy. Deprecated.
vtol_edge_2d::vtol_edge_2d | ( | vtol_edge_2d_sptr const & | other | ) |
Pseudo copy constructor. Deep copy.
Definition at line 50 of file vtol_edge_2d.cxx.
vtol_edge_2d::vtol_edge_2d | ( | vtol_zero_chain_sptr const & | new_zero_chain | ) | [explicit] |
Constructor from a zero-chain.
Constructor for a vtol_edge_2d. If the vtol_zero_chain has two vertices , then the first and last vertices of the vtol_zero_chain are used for endpoints and an ImplicitLine is assumed to be the curve. Otherwise, the all data (v1_, v2_, curve_) are set to NULL. The vtol_zero_chain, newchain, becomes the Inferior of the vtol_edge_2d.
Definition at line 93 of file vtol_edge_2d.cxx.
vtol_edge_2d::vtol_edge_2d | ( | vtol_zero_chain & | new_zero_chain | ) | [explicit, private] |
vtol_edge_2d::vtol_edge_2d | ( | zero_chain_list const & | newchains | ) | [explicit] |
Constructor from an array of zero-chains.
Constructor for a vtol_edge_2d from a list of zero-chains.
The list of zero-chains, newchains, is assumed to be ordered along an edge. This method assigns the first vertex in the chain list to v1_, and assigns the last vertex in the chain list to v2_. No assumptions are made as to the curve type. The data member, curve_ is left to be NULL.
Definition at line 116 of file vtol_edge_2d.cxx.
vtol_edge_2d::vtol_edge_2d | ( | vsol_curve_2d & | edgecurve | ) | [explicit] |
Constructor for a vtol_edge_2d from a vsol_curve_2d.
If edgecurve is of vsol_line_2d type, vertex locations for endpoints, v1_ and v2_, are computed from the vsol_line_2d parameters. If edgecurve is of any other type, v1_ and v2_ are retrieved from the end points of the curve.
Definition at line 157 of file vtol_edge_2d.cxx.
vtol_edge_2d::vtol_edge_2d | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
vsol_curve_2d_sptr | curve = 0 |
||
) |
Constructor from two vertices (alternate interface).
Constructor for a linear vtol_edge_2d.
The coordinates, (x1, y1, z1), determine vtol_vertex_2d, v1_. The coordinates, (x2, y2, z2), determine v2_. If curve is NULL, a vsol_line_2d is generated for the vtol_edge_2d.
Definition at line 134 of file vtol_edge_2d.cxx.
virtual vtol_edge_2d::~vtol_edge_2d | ( | ) | [inline, virtual] |
Destructor.
Definition at line 114 of file vtol_edge_2d.h.
void vtol_edge::add_edge_loop | ( | vtol_one_chain_sptr const & | new_edge_loop | ) | [virtual, inherited] |
This is a utility method that adds new_edge_loop to the vtol_edge's superior list.
It returns a boolean value reflecting the success of linking.
Definition at line 145 of file vtol_edge.cxx.
bool vtol_edge::add_vertex | ( | vtol_vertex_sptr const & | newvert | ) | [virtual, inherited] |
This method adds newvert to the vtol_edge by linking it to one of the zero_chains of the vtol_edge Inferiors.
(Method needs work.)
Definition at line 294 of file vtol_edge.cxx.
void vtol_topology_object::blocks | ( | block_list & | list | ) | const [inherited] |
virtual const vtol_block* vtol_topology_object::cast_to_block | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a block, 0 otherwise.
Reimplemented in vtol_block.
Definition at line 236 of file vtol_topology_object.h.
virtual vtol_block* vtol_topology_object::cast_to_block | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a block, 0 otherwise.
Reimplemented in vtol_block.
Definition at line 240 of file vtol_topology_object.h.
virtual const vtol_chain* vtol_topology_object::cast_to_chain | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a chain, 0 otherwise.
Reimplemented in vtol_chain.
Definition at line 204 of file vtol_topology_object.h.
virtual vtol_chain* vtol_topology_object::cast_to_chain | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a chain, 0 otherwise.
Reimplemented in vtol_chain.
Definition at line 208 of file vtol_topology_object.h.
virtual const vtol_edge* vtol_edge::cast_to_edge | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is an edge, 0 otherwise.
Reimplemented from vtol_topology_object.
Definition at line 130 of file vtol_edge.h.
virtual vtol_edge* vtol_edge::cast_to_edge | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is an edge, 0 otherwise.
Reimplemented from vtol_topology_object.
Definition at line 134 of file vtol_edge.h.
virtual const vtol_edge_2d* vtol_edge_2d::cast_to_edge_2d | ( | ) | const [inline, virtual] |
Return `this' if `this' is an edge, 0 otherwise.
Reimplemented from vtol_edge.
Definition at line 149 of file vtol_edge_2d.h.
virtual vtol_edge_2d* vtol_edge_2d::cast_to_edge_2d | ( | ) | [inline, virtual] |
Return `this' if `this' is an edge, 0 otherwise.
Reimplemented from vtol_edge.
Definition at line 153 of file vtol_edge_2d.h.
virtual const vtol_face* vtol_topology_object::cast_to_face | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a face, 0 otherwise.
Reimplemented in vtol_face.
Definition at line 220 of file vtol_topology_object.h.
virtual vtol_face* vtol_topology_object::cast_to_face | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a face, 0 otherwise.
Reimplemented in vtol_face.
Definition at line 224 of file vtol_topology_object.h.
virtual const vtol_one_chain* vtol_topology_object::cast_to_one_chain | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a one_chain, 0 otherwise.
Reimplemented in vtol_one_chain.
Definition at line 212 of file vtol_topology_object.h.
virtual vtol_one_chain* vtol_topology_object::cast_to_one_chain | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a one_chain, 0 otherwise.
Reimplemented in vtol_one_chain.
Definition at line 216 of file vtol_topology_object.h.
virtual vtol_topology_object* vtol_topology_object::cast_to_topology_object | ( | ) | [inline, virtual, inherited] |
Reimplemented from vsol_spatial_object_2d.
Definition at line 175 of file vtol_topology_object.h.
virtual const vtol_topology_object* vtol_topology_object::cast_to_topology_object | ( | ) | const [inline, virtual, inherited] |
Reimplemented from vsol_spatial_object_2d.
Definition at line 176 of file vtol_topology_object.h.
virtual const vtol_two_chain* vtol_topology_object::cast_to_two_chain | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a two_chain, 0 otherwise.
Reimplemented in vtol_two_chain.
Definition at line 228 of file vtol_topology_object.h.
virtual vtol_two_chain* vtol_topology_object::cast_to_two_chain | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a two_chain, 0 otherwise.
Reimplemented in vtol_two_chain.
Definition at line 232 of file vtol_topology_object.h.
virtual const vtol_vertex* vtol_topology_object::cast_to_vertex | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a vertex, 0 otherwise.
Reimplemented in vtol_vertex.
Definition at line 180 of file vtol_topology_object.h.
virtual vtol_vertex* vtol_topology_object::cast_to_vertex | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a vertex, 0 otherwise.
Reimplemented in vtol_vertex.
Definition at line 184 of file vtol_topology_object.h.
virtual const vtol_zero_chain* vtol_topology_object::cast_to_zero_chain | ( | ) | const [inline, virtual, inherited] |
Return `this' if `this' is a zero_chain, 0 otherwise.
Reimplemented in vtol_zero_chain.
Definition at line 188 of file vtol_topology_object.h.
virtual vtol_zero_chain* vtol_topology_object::cast_to_zero_chain | ( | ) | [inline, virtual, inherited] |
Return `this' if `this' is a zero_chain, 0 otherwise.
Reimplemented in vtol_zero_chain.
Definition at line 192 of file vtol_topology_object.h.
vsol_spatial_object_2d * vtol_edge_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 167 of file vtol_edge_2d.cxx.
bool vtol_edge_2d::compare_geometry | ( | const vtol_edge & | other | ) | const [virtual] |
vcl_vector< vtol_block * > * vtol_edge::compute_blocks | ( | void | ) | [protected, virtual, inherited] |
Returns the list of blocks which contain the vtol_edge.
Reimplemented from vtol_topology_object.
Definition at line 257 of file vtol_edge.cxx.
void vtol_edge_2d::compute_bounding_box | ( | void | ) | const [virtual] |
compute the bounding box from the set of vertices.
A generic method that applies to all topology_object(s)
Reimplemented from vtol_topology_object.
Definition at line 279 of file vtol_edge_2d.cxx.
vcl_vector< vtol_edge * > * vtol_edge::compute_edges | ( | void | ) | [protected, virtual, inherited] |
Returns a list with itself as the only element. This utility is used in Inferior/Superior accessing methods.
Reimplemented from vtol_topology_object.
Definition at line 232 of file vtol_edge.cxx.
vcl_vector< vtol_face * > * vtol_edge::compute_faces | ( | void | ) | [protected, virtual, inherited] |
Returns a list of the faces which contain the vtol_edge.
Reimplemented from vtol_topology_object.
Definition at line 245 of file vtol_edge.cxx.
vcl_vector< vtol_one_chain * > * vtol_edge::compute_one_chains | ( | void | ) | [protected, virtual, inherited] |
Returns a list of one_chains which contain the vtol_edge. This list is the Superiors of the edge.
Reimplemented from vtol_topology_object.
Definition at line 238 of file vtol_edge.cxx.
vcl_vector< vtol_two_chain * > * vtol_edge::compute_two_chains | ( | void | ) | [protected, virtual, inherited] |
Returns the list of two_chains which contain the vtol_edge.
Reimplemented from vtol_topology_object.
Definition at line 251 of file vtol_edge.cxx.
vcl_vector< vtol_vertex * > * vtol_edge::compute_vertices | ( | void | ) | [protected, virtual, inherited] |
Inferior/Superior Accessor Methods.
Returns a list of vertices on the vtol_edge.
Reimplemented from vtol_topology_object.
Definition at line 220 of file vtol_edge.cxx.
vcl_vector< vtol_zero_chain * > * vtol_edge::compute_zero_chains | ( | void | ) | [protected, virtual, inherited] |
Returns the vtol_zero_chain list of the vtol_edge. This list is the Inferiors of the edge.
Reimplemented from vtol_topology_object.
Definition at line 226 of file vtol_edge.cxx.
void vtol_edge_2d::copy_geometry | ( | const vtol_edge & | other | ) | [virtual] |
vsol_curve_2d_sptr vtol_edge_2d::curve | ( | ) | const [inline] |
Return the curve associated to `this'.
Definition at line 130 of file vtol_edge_2d.h.
void vtol_edge_2d::describe | ( | vcl_ostream & | strm = vcl_cout , |
int | blanking = 0 |
||
) | const [virtual] |
This method outputs all edge information to the vcl_ostream, strm.
It indents various levels of output by the number given in blanking.
Reimplemented from vtol_edge.
Definition at line 233 of file vtol_edge_2d.cxx.
void vtol_topology_object::describe_inferiors | ( | vcl_ostream & | strm = vcl_cout , |
int | blanking = 0 |
||
) | const [inherited] |
Definition at line 277 of file vtol_topology_object.cxx.
void vtol_topology_object::describe_superiors | ( | vcl_ostream & | strm = vcl_cout , |
int | blanking = 0 |
||
) | const [inherited] |
Definition at line 294 of file vtol_topology_object.cxx.
void vtol_topology_object::edges | ( | edge_list & | list | ) | const [inherited] |
vertex_list * vtol_edge::endpoints | ( | void | ) | [virtual, inherited] |
get a list of endpoints.
Returns a list of vertices containing the endpoints of the edge.
These vertices are v1_ and v2_ in that order.
Definition at line 264 of file vtol_edge.cxx.
void vtol_topology_object::faces | ( | face_list & | list | ) | const [inherited] |
topology_list* vtol_topology_object::inferiors | ( | ) | [inline, inherited] |
Return the inferiors list.
Definition at line 280 of file vtol_topology_object.h.
const topology_list* vtol_topology_object::inferiors | ( | ) | const [inline, inherited] |
Definition at line 281 of file vtol_topology_object.h.
virtual vcl_string vtol_edge_2d::is_a | ( | ) | const [inline, virtual] |
Return a platform independent string identifying the class.
Reimplemented from vtol_edge.
Definition at line 122 of file vtol_edge_2d.h.
virtual bool vtol_edge_2d::is_class | ( | const vcl_string & | cls | ) | const [inline, virtual] |
Return true if the argument matches the string identifying the class or any parent class.
Reimplemented from vtol_edge.
Definition at line 125 of file vtol_edge_2d.h.
bool vtol_edge::is_endpoint | ( | vtol_vertex_sptr const & | v | ) | const [virtual, inherited] |
Definition at line 322 of file vtol_edge.cxx.
bool vtol_edge::is_endpoint1 | ( | vtol_vertex_sptr const & | v | ) | const [virtual, inherited] |
Returns True if v is equal to the first vtol_edge endpoint,v1_.
Definition at line 329 of file vtol_edge.cxx.
bool vtol_edge::is_endpoint2 | ( | vtol_vertex_sptr const & | v | ) | const [virtual, inherited] |
Returns True if v is equal to the second vtol_edge endpoint, v2_.
Definition at line 335 of file vtol_edge.cxx.
bool vtol_topology_object::is_inferior | ( | vtol_topology_object_sptr | inferior | ) | const [inherited] |
Is `inferior' already an inferior of `this' ?.
Definition at line 51 of file vtol_topology_object.cxx.
bool vtol_topology_object::is_superior | ( | vtol_topology_object *const & | superior | ) | const [inherited] |
Is `superior' already a superior of `this' ?.
Definition at line 64 of file vtol_topology_object.cxx.
void vtol_edge::link_inferior | ( | vtol_zero_chain_sptr | inferior | ) | [inherited] |
Link `this' with an inferior `inferior'.
REQUIRE: valid_inferior_type(inferior) and !is_inferior(inferior)
Require: valid_inferior_type(inferior) and !is_inferior(inferior)
Reimplemented from vtol_topology_object.
Definition at line 15 of file vtol_edge.cxx.
int vtol_topology_object::numinf | ( | ) | const [inline, inherited] |
Number of inferiors.
Definition at line 265 of file vtol_topology_object.h.
int vtol_topology_object::numsup | ( | ) | const [inline, inherited] |
Number of superiors.
Definition at line 269 of file vtol_topology_object.h.
void vtol_topology_object::one_chains | ( | one_chain_list & | list | ) | const [inherited] |
Get list of one chains.
get list of one chains.
Definition at line 216 of file vtol_topology_object.cxx.
bool vtol_edge::operator!= | ( | const vtol_edge & | other | ) | const [inline, inherited] |
Definition at line 114 of file vtol_edge.h.
bool vtol_edge_2d::operator!= | ( | const vtol_edge_2d & | other | ) | const [inline] |
Definition at line 139 of file vtol_edge_2d.h.
bool vtol_edge_2d::operator== | ( | const vtol_edge_2d & | other | ) | const [virtual] |
Equality operators.
Definition at line 185 of file vtol_edge_2d.cxx.
bool vtol_edge_2d::operator== | ( | const vtol_edge & | other | ) | const [virtual] |
bool vtol_edge_2d::operator== | ( | const vsol_spatial_object_2d & | obj | ) | const [virtual] |
spatial object equality.
Reimplemented from vtol_edge.
Definition at line 213 of file vtol_edge_2d.cxx.
vtol_vertex_sptr vtol_edge::other_endpoint | ( | const vtol_vertex & | overt | ) | const [virtual, inherited] |
This method works only for ImplicitLine edges.
Definition at line 342 of file vtol_edge.cxx.
void vtol_edge_2d::print | ( | vcl_ostream & | strm = vcl_cout | ) | const [virtual] |
This method outputs a brief vtol_edge_2d info with vtol_edge_2d object address.
Reimplemented from vtol_edge.
Definition at line 256 of file vtol_edge_2d.cxx.
void vtol_edge::remove_edge_loop | ( | vtol_one_chain_sptr const & | doomed_edge_loop | ) | [virtual, inherited] |
This is a utility method that removes doomed_edge_loop from the vtol_edge's superior list.
It returns a boolean value reflecting the success of removing.
Definition at line 163 of file vtol_edge.cxx.
bool vtol_edge::remove_vertex | ( | vtol_vertex_sptr const & | uglyvert | ) | [virtual, inherited] |
This method removes uglyvert from the vtol_edge by removing it from the inferior zero_chains.
(Method needs work.)
Definition at line 310 of file vtol_edge.cxx.
void vtol_edge::replace_end_point | ( | vtol_vertex & | curendpt, |
vtol_vertex & | newendpt | ||
) | [virtual, inherited] |
replace the current end point.
Set the first and last endpoints.
Require: vertex_of_edge(new_v1) and vertex_of_edge(new_v2).
This function removes curendpt from the edge and replaces it with newendpt. Both curendpt and newendpt must be non-NULL pointers, curendpt must point to an endpoint of the edge (either v1_ or v2_), and newendpt must be collinear with the edge. Neither vertex is destroyed in the process; only links are manipulated. (RYF 7-14-98)
Definition at line 80 of file vtol_edge.cxx.
void vtol_edge_2d::set_curve | ( | vsol_curve_2d & | new_curve | ) | [virtual] |
Set the curve with `new_curve'.
Definition at line 174 of file vtol_edge_2d.cxx.
void vtol_edge::set_v1 | ( | vtol_vertex_sptr | new_v1 | ) | [virtual, inherited] |
Set the first endpoint.
Definition at line 49 of file vtol_edge.cxx.
void vtol_edge::set_v2 | ( | vtol_vertex_sptr | new_v2 | ) | [virtual, inherited] |
Set the last endpoint.
Definition at line 60 of file vtol_edge.cxx.
void vtol_edge::set_vertices_from_zero_chains | ( | void | ) | [virtual, inherited] |
Determine the endpoints of an edge from its inferiors.
Definition at line 95 of file vtol_edge.cxx.
bool vtol_edge::share_vertex_with | ( | vtol_edge_sptr const & | other | ) | [virtual, inherited] |
Returns true if the invoking edge has a vertex in common with vtol_edge `other'.
The method determines if the two edges share a vertex by comparing pointer values, not the vertex geometry.
Definition at line 279 of file vtol_edge.cxx.
virtual vsol_spatial_object_2d_type vtol_topology_object::spatial_type | ( | void | ) | const [inline, virtual, inherited] |
Return the spatial type.
Implements vsol_spatial_object_2d.
Definition at line 285 of file vtol_topology_object.h.
const vcl_list<vtol_topology_object*>* vtol_topology_object::superiors_list | ( | ) | const [inline, inherited] |
Definition at line 276 of file vtol_topology_object.h.
void vtol_topology_object::two_chains | ( | two_chain_list & | list | ) | const [inherited] |
Get list of two chains.
get list of two chains.
Definition at line 248 of file vtol_topology_object.cxx.
void vtol_topology_object::unlink | ( | void | ) | [inherited] |
Unlink `this' of the network.
Reimplemented in vtol_chain.
Definition at line 152 of file vtol_topology_object.cxx.
void vtol_topology_object::unlink_all_inferiors | ( | void | ) | [inherited] |
Unlink `this' from all its inferiors.
Definition at line 143 of file vtol_topology_object.cxx.
void vtol_edge::unlink_inferior | ( | vtol_zero_chain_sptr | inferior | ) | [inherited] |
Unlink `this' from the inferior `inferior'.
Unlink `this' with the inferior `inferior'.
REQUIRE: valid_inferior_type(inferior) and is_inferior(inferior)
Require: valid_inferior_type(inferior) and is_inferior(inferior)
Reimplemented from vtol_topology_object.
Definition at line 20 of file vtol_edge.cxx.
vtol_vertex_sptr vtol_edge::v1 | ( | ) | const [inline, inherited] |
Return the first endpoint.
Definition at line 86 of file vtol_edge.h.
vtol_vertex_sptr vtol_edge::v2 | ( | ) | const [inline, inherited] |
Return the second endpoint.
Definition at line 90 of file vtol_edge.h.
virtual bool vtol_edge::valid_inferior_type | ( | vtol_topology_object const * | inferior | ) | const [inline, virtual, inherited] |
Is `inferior' type valid for `this' ?.
Implements vtol_topology_object.
Definition at line 153 of file vtol_edge.h.
bool vtol_edge::valid_inferior_type | ( | vtol_zero_chain_sptr const & | ) | const [inline, inherited] |
Definition at line 155 of file vtol_edge.h.
bool vtol_edge::valid_superior_type | ( | vtol_one_chain_sptr const & | ) | const [inline, inherited] |
Definition at line 156 of file vtol_edge.h.
bool vtol_topology_object::valid_superior_type | ( | vtol_topology_object const * | sup | ) | const [inline, inherited] |
Is `superior' type valid for `this' ?.
Definition at line 252 of file vtol_topology_object.h.
void vtol_topology_object::vertices | ( | vertex_list & | list | ) | const [inherited] |
Get list of vertices.
get list of vertices.
Definition at line 170 of file vtol_topology_object.cxx.
vtol_zero_chain_sptr vtol_edge::zero_chain | ( | void | ) | const [virtual, inherited] |
Return the first non-empty zero-chain of `this'.
Definition at line 27 of file vtol_edge.cxx.
void vtol_topology_object::zero_chains | ( | zero_chain_list & | list | ) | const [inherited] |
Get list of zero chains.
get list of zero chains.
Definition at line 184 of file vtol_topology_object.cxx.
vsol_curve_2d_sptr vtol_edge_2d::curve_ [private] |
Definition at line 61 of file vtol_edge_2d.h.
topology_list vtol_topology_object::inferiors_ [protected, inherited] |
Definition at line 130 of file vtol_topology_object.h.
vcl_list<vtol_topology_object*> vtol_topology_object::superiors_ [protected, inherited] |
Definition at line 125 of file vtol_topology_object.h.
vtol_vertex_sptr vtol_edge::v1_ [protected, inherited] |
Definition at line 63 of file vtol_edge.h.
vtol_vertex_sptr vtol_edge::v2_ [protected, inherited] |
Definition at line 64 of file vtol_edge.h.