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

line.h

Go to the documentation of this file.
00001 // line.h
00002 
00003 #ifndef LINE_H
00004 #define LINE_H
00005 
00006 #include "coord.h"
00007 
00010 class Line {
00011 
00012 private:
00013         Coord coords[2];
00014 
00015 public:
00016         
00018         Line() {} 
00019 
00024         Line(Coord coord1, Coord coord2) {
00025                 for (int i=0; i<3; i++) {
00026                         coords[0][i] = coord1[i];
00027                         coords[1][i] = coord2[i];
00028                 }
00029         }
00030 
00034         void setCoords(const Coord* coords) { 
00035                 if (coords==NULL) return;
00036                 for (int i=0; i<3; i++) {
00037                         this->coords[0][i] = coords[0][i];
00038                         this->coords[1][i] = coords[1][i];
00039                 }
00040         }
00041 
00046         void getCoords(Coord* coords)  { 
00047                 if (coords==NULL) return;
00048                 for (int i=0; i<3; i++) {
00049                         coords[0][i] = this->coords[0][i];
00050                         coords[1][i] = this->coords[1][i];
00051                 }
00052         }
00053 };
00054 
00055 #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.