libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moTextureFilterIndex.h
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  moTextureFilterIndex.h
4 
5  ****************************************************************************
6  * *
7  * This source is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This code is distributed in the hope that it will be useful, but *
13  * WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * General Public License for more details. *
16  * *
17  * A copy of the GNU General Public License is available on the World *
18  * Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19  * obtain it by writing to the Free Software Foundation, *
20  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  * *
22  ****************************************************************************
23 
24  Copyright(C) 2006 Fabricio Costa
25 
26  Authors:
27  Fabricio Costa
28 
29 
30 *******************************************************************************/
31 
32 #ifndef __MO_TEXTURE_FILTER_INDEX_H
33 #define __MO_TEXTURE_FILTER_INDEX_H
34 
35 #include "moTypes.h"
36 #include "moAbstract.h"
37 #include "moConfig.h"
38 
39 #include "moTextureFilter.h"
40 
46 {
47 public:
55  virtual ~moTextureFilterIndex();
56 
67  virtual MOboolean Init( moParam* p_param, moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman);
68 
78  virtual MOboolean Init(moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman);
79 
92  virtual MOboolean Init(moConfig* p_cfg, MOuint p_param_idx, moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman);
103  virtual MOboolean Init(moTextArray* p_filters_str, moGLManager* p_glman, moFBManager* p_fbman, moShaderManager* p_shaman, moTextureManager* p_texman, moRenderManager* p_renderman);
108  virtual MOboolean Finish();
109 
114  MOint Add(moTextureFilter* p_filter);
115 
123  void Apply(MOuint p_idx, MOuint p_i, MOfloat p_fade, const moTextFilterParam& p_params);
131  void Apply(MOuint p_idx, MOfloat p_cycle, MOfloat p_fade, const moTextFilterParam& p_params);
139  void Apply(MOuint p_idx, moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam& p_params);
140 
147  void Apply(moTempo *p_tempo, MOfloat p_fade, const moTextFilterParam& p_params);
148 
154  MOboolean ValidIndex(MOuint p_idx);
155 
160  MOint Count() { return m_filters_array.Count(); }
166  moTextureFilter* operator [](MOuint p_idx) { return m_filters_array[p_idx]; }
167  moTextureFilter* Get(MOuint p_idx) { return m_filters_array[p_idx]; }
168 
169  MOuint LoadFilter(moValue* p_value);
170  MOuint LoadFilters(moParam* p_param);
171  MOuint LoadFilters(moConfig* p_cfg, MOuint p_param_idx);
172  MOuint LoadFilters(moTextArray* p_filters_str);
173 
174  MOint TextureFilterExists( moValue* p_value );
175 
176 
177  moText MakeTextureFilterLabelName( moValue* p_value );
178 
179 protected:
185 
186  moTextureFilterArray m_filters_array;
187 
188  MOint LoadShader(moText& name, moShader **pshader);
189  MOint LoadSourceTexture(moText& name, moTextureArray& src_tex, MOboolean first_tex, MOuint& dest_width, MOuint& dest_height);
190  MOint LoadDestTexResolution(const moText& name, MOuint& dest_width, MOuint& dest_height);
191  MOint LoadDestTexture(const moText& name, moTextureArray& dest_tex, MOuint dest_width, MOuint dest_height);
192  void SetupDestTexFBO();
193 };
194 
195 
196 #endif
197 
Valor de un Parámetro.
Definition: moValue.h:501
moTextureFilterArray m_filters_array
Tempo, beat, ritmo.
Definition: moTempo.h:44
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
Definition: moAbstract.cpp:147
moTextureFilter * Get(MOuint p_idx)
#define MOboolean
Definition: moTypes.h:385
Clase base abstracta de donde deben derivar los objetos [virtual pura].
Definition: moAbstract.h:191
virtual MOboolean Init()
Inicializa el objeto.
Definition: moAbstract.cpp:141
#define LIBMOLDEO_API
Definition: moTypes.h:180
#define MOfloat
Definition: moTypes.h:403
clase de para manejar textos
Definition: moText.h:75
moShaderManager * m_shaman
#define MOint
Definition: moTypes.h:388
Clase que implementa un administrador de shaders.
manejador de operaciones comunes de Open GL
Definition: moGLManager.h:154
moRenderManager * m_renderman
moTextureManager * m_texman
#define MOuint
Definition: moTypes.h:387
almacena la configuración de los parámetros de un objeto en un archivo XML
Definition: moConfig.h:193
const Real * operator[](int iRow) const