00001 /* 00002 File: Disk.h 00003 00004 Copyright(C) C. Kotterink, Computed Graphics 00005 */ 00006 #ifndef DISK_H 00007 #define DISK_H 00008 00009 #include<ImplicitShape.h> 00010 #include<Vertex3.h> 00011 00012 #include<real.h> 00013 00016 class Disk : public ImplicitShape 00017 { 00018 DYNAMIC_OBJECT; 00019 public: 00020 Disk( 00021 Vertex3 position = Vertex3(0.0, 0.0, 0.0), 00022 Vertex3 normal = Vertex3(0.0, 1.0, 0.0), 00023 real major = 1.0, 00024 real minor = 0.1 00025 ); 00026 00027 // Inherited from ImplicitShape 00028 real distance(const Vertex3 &v); 00029 00030 // Inherited from Shape 00031 Vertex3 normal(const Vertex3 &v); 00032 00033 // Inherited from DynamicObject 00034 void parseSymbol(Token &t, ObjectFile &file); 00035 void writeParams(ostream &stream); 00036 00037 protected: 00038 // Inherited from DynamicObject 00039 void createSymbols(); 00040 00041 real r; 00042 real R; 00043 Vertex3 p; 00044 Vertex3 n; 00045 00046 private: 00047 typedef ImplicitShape super; 00048 }; 00049 #endif