00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef PAPYRUSKOCHSNOWFLAKE_H
00020 #define PAPYRUSKOCHSNOWFLAKE_H
00021
00022 #include <papyrus/polyline.h>
00023
00024 namespace Papyrus
00025 {
00026
00030 class KochSnowflake : public Polyline
00031 {
00032 public:
00033 typedef PapyrusSmartPointer<KochSnowflake> pointer;
00034
00035 KochSnowflake(unsigned level=0, double size=0.0);
00036
00037 static KochSnowflake::pointer create(unsigned level=0, double size=0.0);
00038
00039 ~KochSnowflake();
00040
00041 unsigned level();
00042
00043 void set_level(unsigned level);
00044
00045 double size();
00046
00047 void set_size(double size);
00048
00049 PAPYRUS_CLASS_NAME("Koch Snowflake");
00050
00051 PAPYRUS_CLONE_METHOD( KochSnowflake );
00052
00053 protected:
00054 unsigned m_level;
00055 double m_size;
00056 double m_lsize;
00057 double m_angle;
00058
00059 void create_vertices();
00060
00061 void kochsnowflake(unsigned level);
00062
00063 };
00064
00065 }
00066
00067 #endif