00001 // $Id: GeomObject.h,v 1.2 2000/01/18 00:42:06 burnett Exp $ 00002 // 00003 // 00004 00005 #ifndef GEOMETRY_GEOMOBJECT_H 00006 #define GEOMETRY_GEOMOBJECT_H 00007 00008 00009 #include <iostream> 00010 00011 extern void WARNING(const char *); 00012 extern void FATAL(const char *); 00013 // handle error messages: should make it create exceptions? 00014 00015 class CoordTransform; 00016 class Vector; 00017 class Command; 00018 00020 class GeomObject 00021 { 00022 public: 00023 virtual ~GeomObject(){} 00024 00025 // Implicit copy constructor 00026 // Implicit assignment operator 00027 00029 virtual GeomObject& transform(const CoordTransform&)=0; 00030 00032 GeomObject& move(const Vector&); 00033 GeomObject& moveX(double); 00034 GeomObject& moveY(double); 00035 GeomObject& moveZ(double); 00036 00038 GeomObject & rotateX(double); 00039 GeomObject & rotateY(double); 00040 GeomObject & rotateZ(double); 00041 00043 GeomObject & rotate(double angle, const Vector & axis); 00044 00046 virtual const char* nameOf()const; 00047 00049 virtual void printOn(std::ostream& out=std::cout)const; 00050 00051 00052 00053 protected: 00054 GeomObject(){} 00055 00056 }; 00057 00058 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~inlines~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00059 00060 inline std::ostream& operator<<(std::ostream& os, const GeomObject& g){ 00061 g.printOn(os); return os;} 00062 00063 #endif 00064
1.2.3 written by Dimitri van Heesch,
© 1997-2000