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
moSceneEffect.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  moSceneEffect.cpp
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 #include "moSceneEffect.h"
33 #include <moArray.h>
35 
36 
37 
41 #include <tinyxml.h>
42 int
43 moKeyEffect::Set( const moText& p_XmlText ) {
44  TiXmlDocument m_XMLDoc;
45  //TiXmlHandle xmlHandle( &m_XMLDoc );
46  TiXmlEncoding xencoding = TIXML_ENCODING_LEGACY;
47 
48  m_XMLDoc.Parse((const char*) p_XmlText, 0, xencoding );
50  TiXmlElement* rootKey = m_XMLDoc.FirstChildElement( "D" );
51 
52  if (rootKey) {
53  TiXmlElement* keyNode = rootKey->FirstChildElement("moKey");
54  if (keyNode) {
55  m_label_name = moText( keyNode->Attribute("label_name") );
56  m_preconfig_index = atoi( moText( keyNode->Attribute("preconfig") ) );
57  m_active = atoi( moText( keyNode->Attribute("active") ) );
58  m_action = moText( keyNode->Attribute("action") );
59  return 0;
60  }
61  }
62  return -1;
63 }
64 
65 
71 int
72 moSceneState::Set( const moText& p_XmlText ) {
73 
74  TiXmlDocument m_XMLDoc;
75  //TiXmlHandle xmlHandle( &m_XMLDoc );
76  TiXmlEncoding xencoding = TIXML_ENCODING_LEGACY;
77 
78  m_XMLDoc.Parse((const char*) p_XmlText, 0, xencoding );
80  //TiXmlElement* rootKey = m_XMLDoc.FirstChildElement( "D" );
81  TiXmlElement* sceneStateNode = m_XMLDoc.FirstChildElement("moSceneState");
82 
83  //if (rootKey) {
84 
85  //TiXmlElement* sceneStateNode = rootKey->FirstChildElement("moSceneState");
86  if (sceneStateNode) {
87  m_mode = moText( sceneStateNode->Attribute("mode") );
88  m_in = atoi( sceneStateNode->Attribute("in") );
89  m_out = atoi( sceneStateNode->Attribute("out") );
90  m_action = moText( sceneStateNode->Attribute("action") );
91  TiXmlElement* keyNode = sceneStateNode->FirstChildElement("moKey");
92  while(keyNode) {
93  moKeyEffect Key;
94  Key.m_label_name = moText( keyNode->Attribute("label_name") );
95  Key.m_preconfig_index = atoi( moText( keyNode->Attribute("preconfig") ) );
96  Key.m_active = atoi( moText( keyNode->Attribute("active") ) );
97  Key.m_action = moText( keyNode->Attribute("action") );
98  m_SceneKeys.Add(Key);
99 
100  keyNode = keyNode->NextSiblingElement("moKey");
101  }
102  return 0;
103  } else moDebugManager::Log( "No XML moSceneState in: " + p_XmlText );
104 
105  //} else moDebugManager::Error();
106  return -1;
107 }
108 
109 
110 
115  SetName("scene");
117 }
118 
120  Finish();
121 }
122 
123 //#include "moConsole.h"
124 
126 {
127  if (!PreInit()) return false;
128 
129  moDefineParamIndex( SCENE_INLET, "inlet" );
130  moDefineParamIndex( SCENE_OUTLET, "outlet" );
131  moDefineParamIndex( SCENE_SCRIPT, "script" );
132  moDefineParamIndex( SCENE_ALPHA, "alpha" );
133  moDefineParamIndex( SCENE_COLOR, "color" );
134  moDefineParamIndex( SCENE_SYNC, "syncro" );
135  moDefineParamIndex( SCENE_PHASE, "phase" );
136  moDefineParamIndex( SCENE_PREEFFECTS, "preeffect" );
137  moDefineParamIndex( SCENE_EFFECTS, "effect" );
138  moDefineParamIndex( SCENE_POSTEFFECTS, "posteffect" );
139  moDefineParamIndex( SCENE_STATES, "scene_states" );
140  moDefineParamIndex( SCENE_SEQUENCE_MODE, "sequence_mode" );
141  moDefineParamIndex( SCENE_SEQUENCE_DURATION, "sequence_duration" );
142  moDefineParamIndex( SCENE_SEQUENCE_LOOP, "sequence_loop" );
143  moDefineParamIndex( SCENE_CREATE_LAYER, "create_layer" );
144 
145  m_i_scene_states = -1;
146  m_EffectManager.Init();
147  m_EffectManager.m_pEffectManager = &m_EffectManager;
148  m_EffectManager.m_pResourceManager = GetResourceManager();
149 
150  moEffect* newEffect = NULL;
151  bool res = false;
152  int pre=-1,on=-1;
154  //RenderMan->CreateNewLayer( this );
155 
156  m_Config.SetCurrentParam( "preeffect" );
157  if (m_Config.FirstValue()) {
158  do {
160  moMobDefinition MoldeoObjectDef( mVal.GetSubValue( MO_CFG_EFFECT).Text(), mVal.GetSubValue( MO_CFG_EFFECT_CONFIG).Text(),
161  MO_OBJECT_PREEFFECT, mVal.GetSubValue( MO_CFG_EFFECT_LABEL).Text() );
162 
163  newEffect = m_EffectManager.New( MoldeoObjectDef );
164  if (newEffect) {
165  res = newEffect->Init();
166  pre = mVal.GetSubValue(MO_CFG_EFFECT_PRE).Int();
167  on = mVal.GetSubValue(MO_CFG_EFFECT_ON).Int();
168  if (pre>=0) newEffect->GetConfig()->SetCurrentPreConf(pre);
169  if (on>0) newEffect->Activate();
170  else newEffect->Deactivate();
171  }
172  } while (m_Config.NextValue());
173  }
174 
175 
176  m_Config.SetCurrentParam( "effect" );
177  if (m_Config.FirstValue()) {
178  do {
180  moMobDefinition MoldeoObjectDef( mVal.GetSubValue( MO_CFG_EFFECT).Text(), mVal.GetSubValue( MO_CFG_EFFECT_CONFIG).Text(),
181  MO_OBJECT_EFFECT, mVal.GetSubValue( MO_CFG_EFFECT_LABEL).Text() );
182  newEffect = m_EffectManager.New( MoldeoObjectDef );
183  if (newEffect) {
184  res = newEffect->Init();
185  pre = mVal.GetSubValue(MO_CFG_EFFECT_PRE).Int();
186  on = mVal.GetSubValue(MO_CFG_EFFECT_ON).Int();
187  if (pre>=0) newEffect->GetConfig()->SetCurrentPreConf(pre);
188  if (on>0) newEffect->Activate();
189  else newEffect->Deactivate();
190  }
191 
192  } while (m_Config.NextValue());
193  }
194 
195  m_Config.SetCurrentParam( "posteffect" );
196  if (m_Config.FirstValue()) {
197  do {
199  moMobDefinition MoldeoObjectDef( mVal.GetSubValue( MO_CFG_EFFECT).Text(), mVal.GetSubValue( MO_CFG_EFFECT_CONFIG).Text(),
200  MO_OBJECT_POSTEFFECT, mVal.GetSubValue( MO_CFG_EFFECT_LABEL).Text() );
201  newEffect = m_EffectManager.New( MoldeoObjectDef );
202  if (newEffect) {
203  res = newEffect->Init();
204  pre = mVal.GetSubValue(MO_CFG_EFFECT_PRE).Int();
205  on = mVal.GetSubValue(MO_CFG_EFFECT_ON).Int();
206  if (pre>=0) newEffect->GetConfig()->SetCurrentPreConf(pre);
207  if (on>0) newEffect->Activate();
208  else newEffect->Deactivate();
209  }
210 
211  } while (m_Config.NextValue());
212  }
213 
214 
215  m_Config.SetCurrentParam( "scene_states" );
216  m_n_scene_states = m_Config.GetCurrentParam().GetValuesCount();
217 
218  int i_scene_states = 0;
219  if (m_Config.FirstValue()) {
220  do {
222  moSceneState SceneState;
223 
224  if (mVal.GetSubValueCount()>1) {
225  SceneState.m_state_name = mVal.GetSubValue( 0 ).Text();
226  SceneState.Set( mVal.GetSubValue( 1 ).Text());
227  }
228 
229  m_SceneStates[i_scene_states] = SceneState;
230 
231  MODebug2->Message("scene_states: " + mVal.GetSubValue( 0 ).Text() );
232  i_scene_states+= 1;
233  } while (m_Config.NextValue());
234  }
235  m_Config[ moR(SCENE_STATES)].SetIndexValue(0);
236 
238 
239  return true;
240 }
241 
242 int
244 
245  moEffect* pEffect = m_EffectManager.GetEffectByLabel( p_label_name );
246 
247  if (pEffect) {
248 
249  return pEffect->GetId();
250 
251  }
252 
253  return -1;
254 
255 }
256 
257 
258 int
259 moSceneEffect::UpdateMoldeoIds( moMoldeoObjects &p_MoldeoSceneObjects ) {
260 
261  for( int i=0; i<(int)m_EffectManager.AllEffects().Count(); i++ ) {
262 
263  moEffect* childFx = m_EffectManager.AllEffects().Get(i);
264 
265  moMobDefinition pChildDef = childFx->GetMobDefinition();
266  pChildDef.SetMoldeoFatherId(this->GetId());
267  pChildDef.SetFatherLabelName(this->GetLabelName());
268  pChildDef.SetMoldeoId(MO_MOLDEOSCENEOBJECTS_OFFSET_ID + p_MoldeoSceneObjects.Count() );
269 
271  childFx->SetMobDefinition(pChildDef);
272 
273  p_MoldeoSceneObjects.Add( (moMoldeoObject*) childFx );
274 
276  if ( childFx->GetName()=="scene" ) {
277  moSceneEffect* pScene = (moSceneEffect*) childFx;
278  pScene->UpdateMoldeoIds( p_MoldeoSceneObjects );
279  }
280 
281  }
282  return 0;
283 }
284 
285 int
287 /*
288  if (0<=i_state && i_state<m_n_scene_states) {
289  moSceneState& SceneState( m_SceneStates[i_state] );
290 */
293 
295 
296 
297 /*
298  if ( SceneState.m_Timer.Duration() ) {
299 
300  }
301 */
302  //}
303  if (i_state>0) return i_state;
304 
305  return 0;
306 }
307 
308 int
310 
311  int i_next_state = i_state + 1;
312 
313  if (0<=i_next_state && i_next_state<m_n_scene_states) {
314  MODebug2->Message("Next Scene State: " + IntToStr(i_next_state));
315  } else {
316  if (m_Config.Int( moR(SCENE_SEQUENCE_LOOP)) > 0) {
317  i_next_state = 0;
318  MODebug2->Message("Looping States.");
319  } else {
320  i_next_state = m_n_scene_states-1;
321  MODebug2->Message("End of States reached.");
322  return -1;
323  }
324  }
325 
326  return SetSceneState( i_next_state );
327 }
328 
329 int moSceneEffect::SetSceneState( int i_state ) {
330 
331  int key = 0;
332  moEffect* pEffect=NULL;
333 
334  if (i_state >= m_n_scene_states) return -1;
335 
336  moSceneState& SceneState( m_SceneStates[i_state] );
337 
339  SceneState.m_Timer.Start();
340 
342 
343  for( key=0; key<(int)m_EffectManager.AllEffects().Count(); key++) {
344 
345  pEffect = m_EffectManager.AllEffects().Get(key);
346 
347  if (pEffect) {
348  if (SceneState.m_action=="hideall"
349  || SceneState.m_SceneKeys.Count()>0 ) {
350  pEffect->Deactivate();
351  }
352 
353  if (SceneState.m_action=="showall") {
354  pEffect->Activate();
355  }
356  }
357 
358  }
359 
360  for( key=0; key<(int)SceneState.m_SceneKeys.Count(); key++) {
361  moKeyEffect& Key(SceneState.m_SceneKeys[key]);
362 
363  pEffect = m_EffectManager.GetEffectByLabel( Key.m_label_name );
364 
365  if (pEffect) {
366  if ( Key.m_active>0 ) pEffect->Activate();
367  if ( Key.m_preconfig_index>=0 && pEffect->GetConfig()) pEffect->GetConfig()->SetCurrentPreConf( Key.m_preconfig_index );
368  if ( Key.m_action=="stop") pEffect->Stop();
369  if ( Key.m_action=="play") pEffect->Play();
370  if ( Key.m_action=="pause") pEffect->Pause();
371  }
372  }
373 
374  return 0;
375 }
376 
377 
379 
380  //int key = 0;
381 
383 
384  if (m_i_scene_states!=m_Config[ moR(SCENE_STATES)].GetIndexValue()) {
385  m_i_scene_states = m_Config[ moR(SCENE_STATES)].GetIndexValue();
386  SetSceneState(m_i_scene_states);
387  } else {
388  //i_sequence_states = m_Config[ moR(SEQUENCE_STATES)].GetIndexValue()
389  UpdateSceneState(m_i_scene_states);
390  }
391 
392 }
393 
394 
395 void
397 
399 
400  moMoldeoObject::Update(p_EventList);
401 
402 }
403 
404 void moSceneEffect::Draw( moTempo* tempogral, moEffectState* parentstate)
405 {
406  MOuint i;
407  MOswitch borrar = MO_ACTIVATED;
408  moEffect* pEffect = NULL;
409  bool pre_effect_on = false;
411 
412 
413  BeginDraw( tempogral, parentstate );
414 #ifndef OPENGLESV2
415  glMatrixMode( GL_MODELVIEW );
416  glPushMatrix(); // Store The Modelview Matrix
417  glLoadIdentity();
418 #endif
419 
420  for(i=1 /*starting from index 0+1 (first is expected to be ERASE*/; i<m_EffectManager.PreEffects().Count(); i++ ) {
421  pEffect = m_EffectManager.PreEffects().GetRef(i);
422  if( pEffect ) {
423  if( pEffect->Activated() ) {
424  pre_effect_on = true;
425  RenderMan->BeginDrawEffect();
426 
427  moEffectState fstate = pEffect->GetEffectState();
428  fstate.alpha = m_EffectState.alpha;
429  pEffect->SetEffectState( fstate );
430 
431  pEffect->Draw(&m_EffectState.tempo);
432  RenderMan->EndDrawEffect();
433  borrar = MO_DEACTIVATED;
434  }
435  }
436  }
437 
438  if (borrar==MO_ACTIVATED) {
439 
440  if( m_EffectManager.PreEffects().Count()>0 ) {
441  pEffect = m_EffectManager.PreEffects().GetRef(0);
442  if( pEffect ) {
443  if( pEffect->Activated() )
444  {
445  if (RenderMan) RenderMan->BeginDrawEffect();
446 
447  moEffectState fstate = pEffect->GetEffectState();
448  fstate.alpha = m_EffectState.alpha;
449  pEffect->SetEffectState( fstate );
450 
451  pEffect->Draw(&m_EffectState.tempo);
452  if (RenderMan) RenderMan->EndDrawEffect();
453  }
454  else
455  if (!pre_effect_on && !RenderMan->IsRenderToFBOEnabled() && !RenderMan->RenderResEqualScreenRes())
456  // All the preeffects are disabled, including erase. And the screen resolution is different from
457  // the render resolution. So the last screen image has to be redrawn at render resolution.
459 
460  }
461  }
462  }
463 
466  //Se dibujan los Effects
467  for( i=0; i<m_EffectManager.Effects().Count(); i++ ) {
468 
469  pEffect = m_EffectManager.Effects().GetRef(i);
470  if(pEffect) {
471  if(pEffect->Activated()) {
472  RenderMan->BeginDrawEffect();
473 
474  moEffectState fstate = pEffect->GetEffectState();
475  fstate.alpha = m_EffectState.alpha;
476  pEffect->SetEffectState( fstate );
477 
478  pEffect->Draw(&m_EffectState.tempo);
479  RenderMan->EndDrawEffect();
480  }
481  }
482  }
483 
484  //RenderMan->CopyRenderToTexture(MO_EFFECTS_TEX);
485 
488  for(i=0;i<m_EffectManager.PostEffects().Count();i++) {
489 
490  pEffect = m_EffectManager.PostEffects().GetRef(i);
491 
492  if(pEffect) {
493  if(pEffect->Activated()) {
494  RenderMan->BeginDrawEffect();
495 
496  moEffectState fstate = pEffect->GetEffectState();
497  fstate.alpha = m_EffectState.alpha;
498  pEffect->SetEffectState( fstate );
499 
500  pEffect->Draw(&m_EffectState.tempo);
501 
502  RenderMan->EndDrawEffect();
503  }
504  }
505  }
506 
509 
512 #ifndef OPENGLESV2
513  glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
514  glPopMatrix(); // Restore The Old Projection Matrix
515 
516  glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
517  glPopMatrix(); // Restore The Old Projection Matrix
518 #endif
519  EndDraw();
520 }
521 
523 {
524 
525  m_EffectManager.Finish();
526 
527  return PreFinish();
528 }
529 
532  consolaes = NULL;
533 }
534 
537 
538  //default: alpha, color, syncro
539  p_configdefinition = moEffect::GetDefinition( p_configdefinition );
540  p_configdefinition->Add( moText("preeffect"), MO_PARAM_TEXT, SCENE_PREEFFECTS );
541  p_configdefinition->Add( moText("effect"), MO_PARAM_TEXT, SCENE_EFFECTS );
542  p_configdefinition->Add( moText("posteffect"), MO_PARAM_TEXT, SCENE_POSTEFFECTS );
543 
544  moValue StateDefault( "State A", MO_VALUE_TXT );
545  StateDefault.AddSubValue("<moSceneState action=\"showall\"/>","XML");
546 
547  p_configdefinition->Add( moText("scene_states"), MO_PARAM_TEXT, SCENE_STATES, StateDefault );
548  p_configdefinition->Add( moText("sequence_mode"), MO_PARAM_NUMERIC, SCENE_SEQUENCE_MODE, moValue( "0", MO_VALUE_NUM ) );
549  p_configdefinition->Add( moText("sequence_loop"), MO_PARAM_NUMERIC, SCENE_SEQUENCE_LOOP, moValue( "0", MO_VALUE_NUM ) );
550  p_configdefinition->Add( moText("sequence_duration"), MO_PARAM_NUMERIC, SCENE_SEQUENCE_DURATION, moValue( "0", MO_VALUE_NUM ) );
551  p_configdefinition->Add( moText("create_layer"), MO_PARAM_NUMERIC, SCENE_CREATE_LAYER, moValue( "0", MO_VALUE_NUM ) );
552 
553  return p_configdefinition;
554 }
555 
556 
557 void
559 
560  //cargamos el especifico a este luego el de los efectos dentro del array
561  moEffect::LoadCodes(consolaesarray);
562 
563 
564 }
565 
virtual void Deactivate()
int Set(const moText &p_XmlText)
virtual MOboolean PreInit()
Valor de un Parámetro.
Definition: moValue.h:501
moDefineDynamicArray(moKeys) int moKeyEffect
moEffect * New(moMobDefinition &p_MobDefinition)
Genera un nuevo efecto a partir de la definición
#define MO_CFG_EFFECT_PRE
Definition: moConsole.h:65
const moText & GetLabelName() const
moResourceManager * GetResourceManager()
MOint GetId() const
moEffectManager * m_pEffectManager
#define MO_MOLDEOSCENEOBJECTS_OFFSET_ID
scene objects are recursive sub-scene-fx's
Tempo, beat, ritmo.
Definition: moTempo.h:44
moEffectsArray & Effects()
void SetName(const moText &p_name)
#define moDefineParamIndex(X, Y)
Definition: moConfig.h:176
virtual void Start()
Inicia el temporizador.
Definition: moTimer.cpp:196
moParamReference moR
Definition: moParam.h:127
MOint m_active
Definition: moSceneEffect.h:67
virtual bool Activated() const
MOint m_preconfig_index
Definition: moSceneEffect.h:66
MOboolean Finish()
virtual void Play()
Definition: moEffect.cpp:733
value type: NUM or FUNCTION
Definition: moParam.h:47
bool NextValue()
Selecciona el próximo valor del parámetro actual.
Definition: moConfig.cpp:1545
virtual void LoadCodes(moIODeviceManager *)
Definition: moEffect.cpp:323
moKeys m_SceneKeys
moRenderManager * GetRenderMan()
#define MOboolean
Definition: moTypes.h:385
virtual void Activate()
moEffectsArray & AllEffects()
void LoadCodes(moIODeviceManager *)
int SetSceneState(int i_state)
MOint Int(moParamReference p_paramreference)
Acceso rápido a un valor entero.
Definition: moConfig.cpp:1042
virtual void Pause()
Definition: moEffect.cpp:743
MOboolean RenderResEqualScreenRes()
const moText & GetName() const
#define MO_RENDER_RESOLUTION
moConfigDefinition * GetDefinition(moConfigDefinition *p_configdefinition)
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
#define MO_CFG_EFFECT
Definition: moConsole.h:62
Objeto indefinido.
Definition: moTypes.h:527
void AddSubValue(const moText &strvalue, moValueType p_valuetype)
Definition: moValue.cpp:1707
moTimer m_Timer
#define MOswitch
Definition: moTypes.h:386
moKeyEffect
Definition: moSceneEffect.h:62
virtual void BeginDraw(moTempo *, moEffectState *parentstate=NULL)
Definition: moEffect.cpp:218
definición de todos los parámetros a encontrar o a crear dentro del moConfig
Definition: moConfig.h:57
moText m_action
Definition: moSceneEffect.h:68
void DrawTexture(MOint p_resolution, MOint p_tex_num)
MOboolean IsRenderToFBOEnabled()
value type: TXT or LNK
Definition: moParam.h:57
Lista de eventos.
Definition: moEventList.h:139
clase de para manejar textos
Definition: moText.h:75
#define MO_FINAL_TEX
Definition: moTypes.h:423
virtual void Stop()
Definition: moEffect.cpp:738
virtual const moEffectState & GetEffectState()
Definition: moEffect.cpp:59
Clase Base Descriptiva de un Objeto Moldeo.
virtual MOboolean Init()
Inicializa el objeto.
virtual moConfigDefinition * GetDefinition(moConfigDefinition *p_configdefinition=NULL)
Definition: moEffect.cpp:772
void Interaction(moIODeviceManager *)
void SetMoldeoFatherId(MOint p_moldeoid)
Fija el identificador del padre de este objeto.
static void Log(moText p_text)
Escribe un mensaje en el archivo de registro (log)
moText0 moText
Definition: moText.h:291
const moMobDefinition & GetMobDefinition() const
moConfig m_Config
Configuración de parámetros del objeto.
virtual void Update(moEventList *p_EventList)
moEffectState m_EffectState
Definition: moEffect.h:206
moPostEffectsArray & PostEffects()
virtual void EndDraw()
Definition: moEffect.cpp:296
#define MO_CFG_EFFECT_LABEL
Definition: moConsole.h:64
virtual MOboolean Init()=0
#define MO_CFG_EFFECT_ON
Definition: moConsole.h:66
void SetMoldeoId(MOint p_moldeoid)
Fija el identificador de este objeto.
bool SetCurrentParam(const moText &p_param_name)
Definition: moConfig.h:451
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
#define MO_DEACTIVATED
Definition: moTypes.h:368
Objeto dibujable, pre-efecto ( primeros efectos en el orden de dibujado )
Definition: moTypes.h:529
virtual MOboolean PreFinish()
Definition: moEffect.cpp:314
moText m_state_name
virtual void Update(moEventList *p_EventList)
moResourceManager * m_pResourceManager
Objeto dibujable, efecto ( efectos en el orden de dibujado )
Definition: moTypes.h:528
virtual bool SetEffectState(const moEffectState &p_state)
Definition: moEffect.cpp:63
moConfig * GetConfig()
static moDebug * MODebug2
Clase de impresión de errores para depuración
Definition: moAbstract.h:225
void SetCurrentPreConf(MOint p_actual)
Posiciona la preconfiguración actual en el índice indicado.
Definition: moConfig.cpp:1591
int NextSceneState(int i_state)
void UpdateParameters()
moText m_label_name
Definition: moSceneEffect.h:65
void SetFatherLabelName(const moText &p_labelname)
Fija la etiqueta del padre de este objeto.
#define RenderMan()
virtual ~moSceneEffect()
void Add(const moText &p_name, moParamType p_type, int p_index=-1, const moValue &p_defaultvalue=moValue("INVALID", MO_VALUE_UNDEFINED), const moText &p_OptionsStr=moText(""))
Agrega la definición de un parámetro con un valor predeterminado a tomar.
Definition: moConfig.cpp:139
moPreEffectsArray & PreEffects()
int UpdateMoldeoIds(moMoldeoObjects &p_MoldeoSceneObjects)
#define MOuint
Definition: moTypes.h:387
LIBMOLDEO_API moText0 IntToStr(int a)
Definition: moText.cpp:1070
void SetMobDefinition(const moMobDefinition &p_MobDef)
moParam & GetCurrentParam()
Devuelve el parámetro actualmente seleccionado.
Definition: moConfig.cpp:1486
clase base para objetos dibujables
Definition: moEffect.h:82
MOboolean Init()
virtual void Draw(moTempo *, moEffectState *parentstate=NULL)=0
void Draw(moTempo *, moEffectState *parentstate=NULL)
#define MO_ACTIVATED
Definition: moTypes.h:367
MOuint GetValuesCount() const
Definition: moParam.cpp:1065
int Set(const moText &p_XmlText)
moValue & GetCurrentValue()
Devuelve el valor actual del parámetro actual.
Definition: moConfig.cpp:1481
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
Definition: moAbstract.cpp:114
bool FirstValue()
Selecciona el primer valor del parámetro actual.
Definition: moConfig.cpp:1532
void SetType(moMoldeoObjectType p_type)
moEffect * GetEffectByLabel(const moText &p_label_name, moMoldeoObjectType p_mob_type=MO_OBJECT_UNDEFINED)
#define MO_CFG_EFFECT_CONFIG
Definition: moConsole.h:63
int UpdateSceneState(int i_state)
int GetObjectId(moText p_label_name)