User manual:   Main Page   Overview   Installation   User Interface   Tutorial   Example   FAQ   Version Updates
Reference manual:   Class List   Class Members   Globals, enums and defines

edge.h

Go to the documentation of this file.
00001 // edge.h
00002 
00003 #ifndef EDGE_H
00004 #define EDGE_H
00005 
00009 class Edge {
00010 
00011 private:
00012         VertexID v1, v2;
00013 
00014 public:
00019         Edge(VertexID v1 = -1, VertexID v2 = -1) { 
00020                 this->v1 = v1;
00021                 this->v2 = v2; 
00022         }
00027         void set(VertexID v1, VertexID v2) { 
00028                 this->v1 = v1;
00029                 this->v2 = v2; 
00030         }
00034         VertexID getV1() {
00035                 return v1;
00036         }
00040         VertexID getV2() {
00041                 return v2;
00042         }
00048         bool operator==(const Edge &edge) {
00049                 if (edge.v1==v1 && edge.v2==v2) return true;
00050                 if (edge.v1==v2 && edge.v2==v1) return true;
00051                 return false;
00052         }
00056         void operator=(const Edge &edge) {
00057                 v1=edge.v1;
00058                 v2=edge.v2;
00059         }
00060 };
00061 
00062 #endif

MeshMaker 5.2 Manual
This software library was written by Roni Raab, ronir@cs.technion.ac.il.
Last updated on May 2003.
This software is for academic and research use only.