libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo es el conjunto de objetos y funciones, que permiten ejecutar las operaciones básicas de la plataforma Moldeo, y que compone su núcleo.
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Amigas 'defines' Grupos Páginas
moEffect.h
Ir a la documentación de este archivo.
1 /*******************************************************************************
2 
3  moEffect.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 #ifndef __MO_EFFECT_H__
32 #define __MO_EFFECT_H__
33 
34 class moEffect;
35 
36 #include "moAbstract.h"
37 #include "moTempo.h"
38 #include "moArray.h"
39 #include "moMathFunctionIndex.h"
40 #include "moIODeviceManager.h"
41 #include "moConfig.h"
42 #include "moEffectState.h"
43 #include "moPreConfig.h"
44 #include "moPresets.h"
45 #include "moMotion.h"
46 #include "moText.h"
47 #include "moMoldeoObject.h"
48 #include "moResourceManager.h"
49 //resources
50 #include "moRenderManager.h"
51 #include "moMathManager.h"
52 #include "moTextureManager.h"
53 #include "moFontManager.h"
54 #include "moSoundManager.h"
55 #include "moScriptManager.h"
56 #include "mo3dModelManager.h"
57 #include "moRenderManager.h"
58 #include "moGUIManager.h"
59 
61 
83 {
84 public:
85 
89  moEffect();
90 
94  virtual ~moEffect();
95 
100  virtual MOboolean Init() = 0;
101 
105  virtual void Draw( moTempo*,moEffectState* parentstate=NULL) = 0;
106 
111  virtual MOboolean Finish() = 0;
112 
119  virtual MOboolean PreInit();
120 
126  virtual void PreDraw( moTempo*,moEffectState* parentstate=NULL);
127  virtual void BeginDraw( moTempo*,moEffectState* parentstate=NULL);
128  virtual void EndDraw();
129 
130  virtual MOboolean PreFinish();
131 
132  virtual void Interaction( moIODeviceManager* );
133  virtual void LoadCodes( moIODeviceManager* );
134  virtual moConfigDefinition * GetDefinition( moConfigDefinition *p_configdefinition = NULL );//retreive the parameters definition of the Moldeo Object
135 
139  virtual const moEffectState& GetEffectState();
140  virtual bool SetEffectState( const moEffectState& p_state );
141  virtual const moMobState& GetState();
142  virtual bool SetState( const moMobState& p_MobState );
143 
144 
145  //virtual void SetNombreConfig(moText texto);
146 
147  void SetColor( const moColorRGBA& color_rgba, double alpha, moEffectState& pstate );
148  void SetColor( moValue& color, moValue& alpha, moEffectState& pstate );
149  void SetColor( moParam& color, moParam& alpha, moEffectState& pstate );
150  void SetBlending( moBlendingModes blending );
151  void SetPolygonMode( moPolygonModes polygonmode );
152 
153  virtual void TurnOn();
154  virtual void TurnOff();
155  virtual void Enable();
156  virtual void Disable();
157  virtual void SwitchOn();
158  virtual void SwitchEnabled();
159  virtual void Synchronize();
160  virtual void Unsynchronize();
161  virtual bool Synchronized();
162  virtual void BeatPulse();
163  virtual double TempoDelta( double p_delta );
164  virtual double GetTempoDelta() const;
165  double SetTempoDelta( double p_delta );
166  virtual double TempoFactor( double p_factor );
167  virtual double GetTempoFactor() const;
168 
169  virtual double Alpha( double alpha );
170  virtual double GetAlpha() const;
171  virtual double Amplitude( double amplitude );
172  virtual double GetAmplitude() const;
173  virtual double Magnitude( double magnitude );
174  virtual double GetMagnitude() const;
175 
176  virtual void TintCSV( double tintc, double tints, double tint );
177  virtual moVector3f GetTintCSV() const;
178  virtual moVector3f GetTintRGB() const;
179 
180 
181  virtual void Play();
182  virtual void Stop();
183  virtual void Pause();
184  virtual void Continue();
185 
186  virtual moTimerState State();
187 
188  virtual const moText& ToJSON();
189 
190  public:
191 
194  moDeviceCodeList* devicecode; //accion vs moDeviceCode, personalizable
196 
199 
200  // Agregado para poder asignar efectos a teclas arbitrarias de las 4 filas del teclado.
201  // Luego hay que discutirlo/implementarlo mejor...
203 
204  protected:
205 
208 
209  virtual int ScriptCalling(moLuaVirtualMachine& vm, int iFunctionNumber);
210  void RegisterFunctions();
211 
212 
213  int luaPlay( moLuaVirtualMachine& vm );
214  int luaPause( moLuaVirtualMachine& vm );
215  int luaStop( moLuaVirtualMachine& vm );
216  int luaState( moLuaVirtualMachine& vm );
217 
218  int luaGetTicks(moLuaVirtualMachine& vm);
219  int luaSetTicks(moLuaVirtualMachine& vm);
220 
222  int luaDisable(moLuaVirtualMachine& vm);
223  int luaEnable(moLuaVirtualMachine& vm);
226  int luaSetEffectState(moLuaVirtualMachine& vm);
227  int luaGetEffectState(moLuaVirtualMachine& vm);
228 
236 
237  virtual void ScriptExeDraw();
238  virtual void ScriptExeInteraction();
239 
240 };
241 
242 moDeclareExportedDynamicArray( moEffect*, moEffectsArray);
243 
244 #endif
moMotion mov
Definition: moEffect.h:193
Valor de un Parámetro.
Definition: moValue.h:501
virtual bool SetState(const moMobState &p_MobState)
Tempo, beat, ritmo.
Definition: moTempo.h:44
MOint isyncro
Definition: moEffect.h:197
Conector Inlet, conector que recibe datos.
Definition: moConnectors.h:374
#define MOboolean
Definition: moTypes.h:385
MOint keyidx
Definition: moEffect.h:202
virtual int ScriptCalling(moLuaVirtualMachine &vm, int iFunctionNumber)
moInlet * InletTime
Definition: moEffect.h:229
moInlet * InletTempo
Definition: moEffect.h:235
virtual const moMobState & GetState() const
#define LIBMOLDEO_API
Definition: moTypes.h:180
definición de todos los parámetros a encontrar o a crear dentro del moConfig
Definition: moConfig.h:57
clase de para manejar textos
Definition: moText.h:75
moInlet * InletTimems
Definition: moEffect.h:230
virtual moConfigDefinition * GetDefinition(moConfigDefinition *p_configdefinition=NULL)
moInlet * InletTimes
Definition: moEffect.h:232
moEffectState m_EffectState
Definition: moEffect.h:206
moPresets presets
Definition: moEffect.h:192
moInlet * InletT
Definition: moEffect.h:234
#define MOint
Definition: moTypes.h:388
moTimerState
Estado del temporizador.
Definition: moTimer.h:75
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
moObject3D m_Effect3D
Definition: moEffect.h:207
virtual void RegisterFunctions()
beware ! call only once or die!!!
moDeviceCodeList * devicecode
Definition: moEffect.h:194
moInlet * InletMilliseconds
Definition: moEffect.h:231
clase base para objetos dibujables
Definition: moEffect.h:82
virtual const moText & ToJSON()
MOint iphase
Definition: moEffect.h:198
virtual MOboolean Finish()
MOint ncodes
Definition: moEffect.h:195
moPolygonModes
Modos de dibujado de polígonos.
Definition: moTypes.h:472
moDeclareExportedDynamicArray(moEffect *, moEffectsArray)
moBlendingModes
Modos de combinación.
Definition: moTypes.h:453
moInlet * InletSeconds
Definition: moEffect.h:233
virtual MOboolean Init()