00001 // $Id: Surface.cxx,v 1.2 2001/10/06 03:39:59 burnett Exp $ 00002 // 00003 00004 00005 #include "geometry/Surface.h" 00006 #include <strstream> 00007 00008 GeomObject& 00009 Surface::transform(const CoordTransform& T ) 00010 { 00011 referenceDirection.transform(T); 00012 return *this; 00013 } 00014 void 00015 Surface::reverse() 00016 { 00017 referenceDirection *= -1; 00018 } 00019 00020 // copy constructor uses same reference point, makes a copy of 00021 // direction, then has the subclass do the rest (if it can) 00022 Surface::Surface(const Surface& old) 00023 :GeomObject(), 00024 referencePoint(old.referencePoint) 00025 ,referenceDirection(old.referenceDirection) 00026 { 00027 } 00028 00029 // this to not force all surfaces to copy, but crash if can't 00030 Surface& Surface::copy()const 00031 { 00032 std::cerr << "The Surface subclass " << nameOf() 00033 << " did not implement a copy() method\0"; 00034 return *(Surface*)this; //(just to make compiler happy) 00035 } 00036
1.2.3 written by Dimitri van Heesch,
© 1997-2000