00001 /* 00002 File: Taper.h 00003 00004 Copyright(C) C. Kotterink, Computed Graphics 00005 */ 00006 #ifndef TAPER_H 00007 #define TAPER_H 00008 00009 #include<Transformation.h> 00010 00011 #include<Vertex3.h> 00012 #include<real.h> 00013 00016 class Taper : public Transformation 00017 { 00018 DYNAMIC_OBJECT; 00019 public: 00020 Taper() : f(1.0) {} 00021 00022 // Inherited from ImplicitShape 00023 real distance(const Vertex3 &v); 00024 00025 // Inherited from Shape 00026 Color4 calculateShade( 00027 const SurfaceInfo &s, Vertex3 &transformed, Scene &scene); 00028 00029 // Inherited from DynamicObject 00030 void parseSymbol(Token &t, ObjectFile &file); 00031 void writeParams(ostream &stream); 00032 00033 protected: 00034 // Inherited from DynamicObject 00035 void createSymbols(); 00036 00037 real f; 00038 00039 private: 00040 typedef Transformation super; 00041 }; 00042 #endif