vee_rand2d.h

Go to the documentation of this file.
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 VEE_RAND2D_H
00021 #define VEE_RAND2D_H
00022 
00023 #include <vee_operator.h>
00024 
00025 #include <mj_array2d.h>
00026 
00027 #include <string>
00028 
00029 class VEE_RandOnMesh2D : public VEE_Operator
00030 {
00031 public:
00032   VEE_RandOnMesh2D();
00033   virtual ~VEE_RandOnMesh2D();
00034 
00035   virtual bool setValue(const char *, VEE_Value *);
00036 
00037   virtual void operate(VEE_Object *, float);
00038   virtual VEE_Operator * clone() const;
00039 
00040   void resize(int rows, int cols) { m_histogram.resize(rows, cols); }
00041   void clear() { m_histogram.setAll(0.0); }
00042   void setDecay(float d) { m_decay = d; }
00043   void setThreshold(float t) { m_threshold = t; }
00044 
00045   void setId(const char *id) { m_id = id; }
00046 
00047   VEE_Vector3 newVector();
00048 
00049 protected:
00050   MJ_Array2D<float> m_histogram;
00051 
00052   VEE_Matrix3 m_align;
00053   VEE_Vector3 m_stretch;
00054 
00055   float m_decay;
00056   float m_threshold;
00057 
00058   std::string m_id;
00059 };
00060 
00061 #endif

Generated on Mon Mar 12 21:09:01 2007 for VEE - The Visual Effects Engine by  doxygen 1.4.6