00001 // $Id: Surface.cxx,v 1.1.1.1 1999/12/20 22:28:06 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 :referencePoint(old.referencePoint) 00024 ,referenceDirection(old.referenceDirection) 00025 { 00026 } 00027 00028 // this to not force all surfaces to copy, but crash if can't 00029 Surface& Surface::copy()const 00030 { 00031 std::cerr << "The Surface subclass " << nameOf() 00032 << " did not implement a copy() method\0"; 00033 return *(Surface*)this; //(just to make compiler happy) 00034 } 00035
1.2.3 written by Dimitri van Heesch,
© 1997-2000