00001 /* -*- C++ -*- */ 00002 00003 /* COPYRIGHT 00004 * 00005 * This file is part of the Visual Effects Engine - VEE 00006 * 00007 * Read the "VEE-LICENSE" file for the license. 00008 * 00009 * Authors & Copyright: 00010 * 00011 * Tommi Ilmonen, Tuukka Heikura, Marko Myllymaa and 00012 * Janne Kontkanen 2001-2004 00013 * 00014 * Additional copyrights: Tekes 2003-2004 00015 * 00016 * firstname.lastname@hut.fi 00017 * 00018 */ 00019 00020 #ifndef GEE_PARTICLE_ROTATE_H 00021 #define GEE_PARTICLE_ROTATE_H 00022 00023 #include <gee_param_writer.h> 00024 #include <gee_path_to_x.h> 00025 00026 #include <vector> 00027 00034 class GEE_ParticleRotate : public GEE_PathToX 00035 { 00036 public: 00037 GEE_ParticleRotate(GEE_id_t pathId = -1); 00038 virtual ~GEE_ParticleRotate(); 00039 00040 virtual bool act(GEE_World *, const GEE_TimeStamp &); 00041 00042 virtual bool read(GEE_Io *); 00043 virtual bool write(GEE_Io *); 00044 virtual const char * type(); 00045 00046 static GEE_Operator * create(); 00047 00048 void setPressure(float pressure) { m_pressure = pressure; } 00049 void setOmega(float omega) { m_omega = omega; } 00050 00051 void setRadius(float r) { m_radius = r; } 00052 void setRadiusBoost(float r) { m_radiusBoost = r; } 00053 void setRadiusNorm(float r) { m_radiusNorm = r; } 00054 void setUseNapra(bool use) { m_useNapra = use; } 00055 00056 protected: 00057 00058 void doTurn(GEE_World *); 00059 00060 virtual bool handleNewVertex(GEE_Path3D::iterator &); 00061 00062 GEE_ParamWriter m_writer; 00063 00064 float m_pressure; 00065 float m_omega; 00066 float m_radius; 00067 float m_radiusBoost; 00068 float m_radiusNorm; 00069 bool m_useNapra; 00070 00071 GEE_PathVertex3D m_last; 00072 00073 class Item 00074 { 00075 public: 00076 Item() {} 00077 ~Item() {} 00078 00079 VEE_Vector3 m_location; 00080 float m_radius; 00081 float m_turn; 00082 }; 00083 00084 std::vector<Item> m_turns; 00085 }; 00086 00087 #endif 00088