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_COLOR_AROUND_PATH_H 00021 #define GEE_COLOR_AROUND_PATH_H 00022 00023 #include <gee_path_to_x.h> 00024 #include <gee_recolor.h> 00025 #include <gee_sphere_group.h> 00026 00027 #include <vector> 00028 00029 class GEE_ColorAroundPath : public GEE_PathToX, 00030 public GEE_ReColor, 00031 public GEE_SphereGroup 00032 { 00033 public: 00034 GEE_ColorAroundPath(GEE_id_t pathId = -1, 00035 bool vertexColors = true, 00036 float radiusNorm = 1.0f, 00037 float exaggerateRadius = 0.0f, 00038 bool useNapra = false); 00039 virtual ~GEE_ColorAroundPath(); 00040 00041 virtual void getBoundingBox(VEE_BoundingBox *); 00042 virtual bool recolor(const VEE_Vector3 &location, 00043 VEE_Vector4 * color); 00044 virtual bool recolor(const VEE_Vector3 &location, 00045 VEE_Rgba * color); 00046 virtual void recolored(GEE_Geometry *); 00047 00048 virtual VEE_Rgba basicColor(); 00049 00050 virtual bool act(GEE_World *, const GEE_TimeStamp &); 00051 00052 virtual bool read(GEE_Io *); 00053 virtual bool write(GEE_Io *); 00054 virtual const char * type(); 00055 static GEE_Operator * create(); 00056 00057 void setColor(const VEE_Rgba c) { m_color = c; } 00058 void setRadius(float r) { m_radius = r; } 00059 void setPressure(float p) { m_pressure = p; } 00060 00061 protected: 00062 00063 virtual bool handleNewVertex(GEE_Path3D::iterator &); 00064 00065 void doColor(GEE_World *); 00066 00067 VEE_Rgba m_color; 00068 std::set<GEE_id_t> m_hits; 00069 float m_pressure; 00070 bool m_vertexColors; 00071 00072 float m_exaggerateRadius; 00073 float m_radiusNorm; 00074 00075 bool m_useNapra; 00076 }; 00077 00078 #endif