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
moEffect Class Referenceabstract

clase base para objetos dibujables More...

#include <moEffect.h>

Inheritance diagram for moEffect:
moMoldeoObject moAbstract moScript moEffectTemplate moMasterEffect moPostEffect moPreEffect moSceneEffect

Public Member Functions

 moEffect ()
 
virtual ~moEffect ()
 
virtual MOboolean Init ()=0
 
virtual void Draw (moTempo *, moEffectState *parentstate=NULL)=0
 
virtual MOboolean Finish ()=0
 
virtual MOboolean PreInit ()
 
virtual void PreDraw (moTempo *, moEffectState *parentstate=NULL)
 
virtual void BeginDraw (moTempo *, moEffectState *parentstate=NULL)
 
virtual void EndDraw ()
 
virtual MOboolean PreFinish ()
 
virtual void Interaction (moIODeviceManager *)
 
virtual void LoadCodes (moIODeviceManager *)
 
virtual moConfigDefinitionGetDefinition (moConfigDefinition *p_configdefinition=NULL)
 
virtual const moEffectStateGetEffectState ()
 
virtual bool SetEffectState (const moEffectState &p_state)
 
virtual const moMobStateGetState ()
 
virtual bool SetState (const moMobState &p_MobState)
 
void SetColor (const moColorRGBA &color_rgba, double alpha, moEffectState &pstate)
 
void SetColor (moValue &color, moValue &alpha, moEffectState &pstate)
 
void SetColor (moParam &color, moParam &alpha, moEffectState &pstate)
 
void SetBlending (moBlendingModes blending)
 
void SetPolygonMode (moPolygonModes polygonmode)
 
virtual void TurnOn ()
 
virtual void TurnOff ()
 
virtual void Enable ()
 
virtual void Disable ()
 
virtual void SwitchOn ()
 
virtual void SwitchEnabled ()
 
virtual void Synchronize ()
 
virtual void Unsynchronize ()
 
virtual bool Synchronized ()
 
virtual void BeatPulse ()
 
virtual double TempoDelta (double p_delta)
 
virtual double GetTempoDelta () const
 
double SetTempoDelta (double p_delta)
 
virtual double TempoFactor (double p_factor)
 
virtual double GetTempoFactor () const
 
virtual double Alpha (double alpha)
 
virtual double GetAlpha () const
 
virtual double Amplitude (double amplitude)
 
virtual double GetAmplitude () const
 
virtual double Magnitude (double magnitude)
 
virtual double GetMagnitude () const
 
virtual void TintCSV (double tintc, double tints, double tint)
 
virtual moVector3f GetTintCSV () const
 
virtual moVector3f GetTintRGB () const
 
virtual void Play ()
 
virtual void Stop ()
 
virtual void Pause ()
 
virtual void Continue ()
 
virtual moTimerState State ()
 
virtual const moTextToJSON ()
 
- Public Member Functions inherited from moMoldeoObject
 moMoldeoObject ()
 
 moMoldeoObject (moMoldeoObjectType p_type)
 
virtual ~moMoldeoObject ()
 
virtual MOboolean Init (moResourceManager *p_pResources)
 
virtual MOboolean CreateConnectors ()
 
virtual MOboolean UpdateConnectors ()
 
virtual MOboolean RefreshValue (moParam &param, int value_index)
 
virtual MOboolean ResolveValue (moParam &param, int value_index, bool p_refresh=false)
 
virtual void Update (moEventList *p_EventList)
 
void SetResourceManager (moResourceManager *p_pResourceManager)
 
moResourceManagerGetResourceManager ()
 
MOint GetId () const
 
void SetId (MOint p_id)
 
moMoldeoObjectType GetType () const
 
void SetType (moMoldeoObjectType p_type)
 
void SetName (const moText &p_name)
 
void SetLabelName (const moText &p_labelname)
 
void SetKeyName (const moText &p_keyname)
 
const moTextGetKeyName () const
 
const moTextGetName () const
 
const moTextGetLabelName () const
 
moConfigGetConfig ()
 
void SyncConnections ()
 
virtual int Save (const moText &p_save_filename=moText(""))
 
void SetConfigName (const moText &p_configname)
 
const moTextGetConfigName () const
 
const moTextGetDescription () const
 Devuelve al descripción del objeto. More...
 
void SetDescription (const moText &p_Description)
 Fija la descripción de este objeto. More...
 
const moMobDefinitionGetMobDefinition () const
 
void SetMobDefinition (const moMobDefinition &p_MobDef)
 
moOutlets * GetOutlets ()
 
moInlets * GetInlets ()
 
MOint GetInletIndex (moText p_connector_name) const
 
MOint GetOutletIndex (moText p_connector_name) const
 
virtual void HandleReturns (moLuaVirtualMachine &vm, const char *strFunc)
 
virtual const moMobStateGetState () const
 
virtual void Activate ()
 
virtual void Deactivate ()
 
virtual bool Activated () const
 
virtual void Select ()
 
virtual void Unselect ()
 
virtual bool Selected () const
 
virtual void SetConsoleParamIndex (MOint p_paramindex)
 
virtual void SetConsoleValueIndex (MOint p_valueindex)
 
- Public Member Functions inherited from moAbstract
 moAbstract ()
 
virtual ~moAbstract ()
 
MOboolean Initialized ()
 Pregunta si está inicializado. More...
 
- Public Member Functions inherited from moScript
 moScript ()
 
virtual ~moScript (void)
 
void InitScript ()
 
void FinishScript ()
 
bool IsInitialized ()
 
bool CompileFile (const char *strFilename)
 
bool CompileBuffer (unsigned char *pbBuffer, size_t szLen)
 
int RegisterFunction (const char *strFuncName, moScript::Function &fun)
 
int RegisterFunction (const char *strFuncName)
 
int RegisterBaseFunction (const char *strFuncName)
 
bool SelectScriptFunction (const char *strFuncName)
 
void AddFunctionParam (int iInt)
 
void AddFunctionParam (float fFloat)
 
void AddFunctionParam (char *string)
 
bool RunSelectedFunction (int nReturns=0)
 
bool ScriptHasFunction (const char *strScriptName)
 
int methods (void)
 
virtual int ResetScriptCalling ()
 
virtual int NextScriptCalling ()
 
moLuaVirtualMachinemvm (void)
 

Public Attributes

moPresets presets
 
moMotion mov
 
moDeviceCodeListdevicecode
 
MOint ncodes
 
MOint isyncro
 
MOint iphase
 
MOint keyidx
 
- Public Attributes inherited from moAbstract
MOboolean m_bInitialized
 Valor de inicialización More...
 
- Public Attributes inherited from moScript
Function Functions [255]
 

Protected Member Functions

virtual int ScriptCalling (moLuaVirtualMachine &vm, int iFunctionNumber)
 
void RegisterFunctions ()
 beware ! call only once or die!!! More...
 
int luaPlay (moLuaVirtualMachine &vm)
 
int luaPause (moLuaVirtualMachine &vm)
 
int luaStop (moLuaVirtualMachine &vm)
 
int luaState (moLuaVirtualMachine &vm)
 
int luaGetTicks (moLuaVirtualMachine &vm)
 
int luaSetTicks (moLuaVirtualMachine &vm)
 
int luaDisable (moLuaVirtualMachine &vm)
 habilita deshabilita More...
 
int luaEnable (moLuaVirtualMachine &vm)
 
int luaSetEffectState (moLuaVirtualMachine &vm)
 
int luaGetEffectState (moLuaVirtualMachine &vm)
 
virtual void ScriptExeDraw ()
 
virtual void ScriptExeInteraction ()
 
- Protected Member Functions inherited from moMoldeoObject
virtual void LoadDefinition ()
 
virtual void ScriptExeInit ()
 Corre la funcion de script Run o Compila el nuevo script. More...
 
virtual void ScriptExeRun ()
 
virtual void ScriptExeUpdate ()
 
virtual void ScriptExeFinish ()
 
void SetScript (const moText &p_script)
 
int luaPushDebugString (moLuaVirtualMachine &vm)
 Función de impresión de cadena de carácteres cómoda para la depuración More...
 
int luaGetResourceManager (moLuaVirtualMachine &vm)
 Devuelve el objeto de moResourceManager para el manejo de recursos: texturas, videos, archivos, etc.. More...
 
int luaSetPreconf (moLuaVirtualMachine &vm)
 functions to access moConfig data More...
 
int luaGetPreconf (moLuaVirtualMachine &vm)
 
int luaGetParamIndex (moLuaVirtualMachine &vm)
 
int luaGetCurrentValue (moLuaVirtualMachine &vm)
 
int luaSetCurrentValue (moLuaVirtualMachine &vm)
 
int luaGetValuesCount (moLuaVirtualMachine &vm)
 
int luaGetInletIndex (moLuaVirtualMachine &vm)
 
int luaGetInletData (moLuaVirtualMachine &vm)
 
int luaSetInletData (moLuaVirtualMachine &vm)
 
int luaGetTrackerSystemData (moLuaVirtualMachine &vm)
 
int luaGetTrackerFeaturesCount (moLuaVirtualMachine &vm)
 
int luaGetTrackerValidFeatures (moLuaVirtualMachine &vm)
 
int luaGetTrackerFeature (moLuaVirtualMachine &vm)
 
int luaGetTrackerVariance (moLuaVirtualMachine &vm)
 
int luaGetTrackerBarycenter (moLuaVirtualMachine &vm)
 
int luaGetTrackerAcceleration (moLuaVirtualMachine &vm)
 
int luaGetTrackerVelocity (moLuaVirtualMachine &vm)
 
int luaGetTrackerZone (moLuaVirtualMachine &vm)
 
int luaGetTrackerHistory (moLuaVirtualMachine &vm)
 
int luaStartTrackerHistory (moLuaVirtualMachine &vm)
 devuelve la cantidad de records registrados?! More...
 
int luaPauseTrackerHistory (moLuaVirtualMachine &vm)
 arranca la grabacion More...
 
int luaContinueTrackerHistory (moLuaVirtualMachine &vm)
 
int luaStopTrackerHistory (moLuaVirtualMachine &vm)
 
int luaGetHistoryRecord (moLuaVirtualMachine &vm)
 Devuelve...el baricentro. More...
 
int luaGetHistoryBarycenter (moLuaVirtualMachine &vm)
 va de parametro el id del tracker, el id de la instancia More...
 
int luaGetHistoryVariance (moLuaVirtualMachine &vm)
 Devuelve las varianzas. More...
 
int luaGetHistoryBounding (moLuaVirtualMachine &vm)
 Devuelve los rectangulos. More...
 
int luaGetHistoryAverage (moLuaVirtualMachine &vm)
 Devuelve los promedios. More...
 
int luaGetHistoryMinMax (moLuaVirtualMachine &vm)
 Devuelve el rectangulo max, min. More...
 

Protected Attributes

moEffectState m_EffectState
 
moObject3D m_Effect3D
 
moInletInletTime
 
moInletInletTimems
 
moInletInletMilliseconds
 
moInletInletTimes
 
moInletInletSeconds
 
moInletInletT
 
moInletInletTempo
 
- Protected Attributes inherited from moMoldeoObject
moText m_FullJSON
 
moText m_Script
 
moMobDefinition m_MobDefinition
 
moMobState m_MobState
 Moldeo Object State. More...
 
moConfig m_Config
 Configuración de parámetros del objeto. More...
 
moResourceManagerm_pResourceManager
 Puntero al administrador de recursos. More...
 
moOutlets m_Outlets
 Conectores de salida, Arreglo de moOutlet's. More...
 
moInlets m_Inlets
 Conectores de entrada, Arreglo de moInlet's. More...
 
moInletInletScreenWidth
 
moInletInletScreenHeight
 
moInletInletTimeabs
 
moInletInletPreconfig
 
MOboolean m_bConnectorsLoaded
 
int __iscript
 
- Protected Attributes inherited from moScript
bool m_initialized
 
int m_nMethods
 
int m_iThisRef
 
int m_nArgs
 
const char * m_strFunctionName
 
int m_iMethodBase
 
int m_iMethodBaseIterator
 actual class index method base More...
 
int m_iMethodBaseAncestors
 actual class iterator index method base More...
 
int m_MethodBases [256]
 increment on each call to RegisterFunctions More...
 

Additional Inherited Members

- Public Types inherited from moScript
typedef int(* Function )(moLuaVirtualMachine &vm)
 
- Static Public Attributes inherited from moAbstract
static moDebugMODebug2 = new moDebug()
 Clase de impresión de errores para depuración More...
 
static moTextHeapMODebug = new moTextHeap()
 Lista de textos. More...
 
- Static Protected Attributes inherited from moScript
static moLuaVirtualMachine m_vm
 
static moLuaDebugger m_dbg
 

Detailed Description

clase base para objetos dibujables

See also
moMoldeoObject
moPreEffect
moPostEffect
moMasterEffect
moIODevice
moResource
moMoldeoObjectType

Definition at line 82 of file moEffect.h.

Constructor & Destructor Documentation

moEffect::moEffect ( )

constructor genérico de la clase.

moEffect::~moEffect ( )
virtual

destructor genérico de la clase.

Definition at line 53 of file moEffect.cpp.

Member Function Documentation

double moEffect::Alpha ( double  alpha)
virtual

Definition at line 653 of file moEffect.cpp.

double moEffect::Amplitude ( double  amplitude)
virtual

Definition at line 668 of file moEffect.cpp.

void moEffect::BeatPulse ( )
virtual

Definition at line 594 of file moEffect.cpp.

void moEffect::BeginDraw ( moTempo tempogral,
moEffectState parentstate = NULL 
)
virtual

código alternativo

Clock independiente

Definition at line 218 of file moEffect.cpp.

void moEffect::Continue ( )
virtual

Definition at line 748 of file moEffect.cpp.

void moEffect::Disable ( )
virtual

Definition at line 568 of file moEffect.cpp.

virtual void moEffect::Draw ( moTempo ,
moEffectState parentstate = NULL 
)
pure virtual

Función de dibujado del efecto

Implemented in moSceneEffect, moMasterEffect, moPreEffect, moPostEffect, and moEffectTemplate.

void moEffect::Enable ( )
virtual

Definition at line 564 of file moEffect.cpp.

void moEffect::EndDraw ( )
virtual

Definition at line 296 of file moEffect.cpp.

virtual MOboolean moEffect::Finish ( )
pure virtual

Finalizador genérico derivado de moAbstract. Es importante que esta función libere los recursos que han sido creados en la función Init().

See also
moAbstract

Reimplemented from moMoldeoObject.

Implemented in moSceneEffect, moMasterEffect, moPreEffect, moPostEffect, and moEffectTemplate.

double moEffect::GetAlpha ( ) const
virtual

Definition at line 663 of file moEffect.cpp.

double moEffect::GetAmplitude ( ) const
virtual

Definition at line 674 of file moEffect.cpp.

moConfigDefinition * moEffect::GetDefinition ( moConfigDefinition p_configdefinition = NULL)
virtual

función que devuelve la definición del archivo de configuración del objeto.

Parameters
p_configdefinition(opcional) puntero a la clase de definición de la configuración dónde se registran las definiciones. Si este parámetro no está definido la función toma el puntero a la definición dentro del objeto de configuración (moConfig).

Reimplemented from moMoldeoObject.

Reimplemented in moSceneEffect.

Definition at line 772 of file moEffect.cpp.

const moEffectState & moEffect::GetEffectState ( )
virtual

Devuelve el estado del objeto

Definition at line 59 of file moEffect.cpp.

double moEffect::GetMagnitude ( ) const
virtual

Definition at line 685 of file moEffect.cpp.

const moMobState & moEffect::GetState ( )
virtual

Definition at line 73 of file moEffect.cpp.

double moEffect::GetTempoDelta ( ) const
virtual

Definition at line 631 of file moEffect.cpp.

double moEffect::GetTempoFactor ( ) const
virtual

Definition at line 648 of file moEffect.cpp.

moVector3f moEffect::GetTintCSV ( ) const
virtual

Definition at line 722 of file moEffect.cpp.

moVector3f moEffect::GetTintRGB ( ) const
virtual

Definition at line 727 of file moEffect.cpp.

virtual MOboolean moEffect::Init ( )
pure virtual

Inicializador genérico derivado de moAbstract.

See also
moAbstract

Reimplemented from moMoldeoObject.

Implemented in moSceneEffect, moMasterEffect, moPreEffect, moPostEffect, and moEffectTemplate.

void moEffect::Interaction ( moIODeviceManager consolaes)
virtual

Reimplemented in moSceneEffect, and moMasterEffect.

Definition at line 405 of file moEffect.cpp.

void moEffect::LoadCodes ( moIODeviceManager consolaesarray)
virtual

Reimplemented in moSceneEffect.

Definition at line 323 of file moEffect.cpp.

int moEffect::luaDisable ( moLuaVirtualMachine vm)
protected

habilita deshabilita

Definition at line 930 of file moEffect.cpp.

int moEffect::luaEnable ( moLuaVirtualMachine vm)
protected

Definition at line 919 of file moEffect.cpp.

int moEffect::luaGetEffectState ( moLuaVirtualMachine vm)
protected

Definition at line 957 of file moEffect.cpp.

int moEffect::luaGetTicks ( moLuaVirtualMachine vm)
protected

Definition at line 910 of file moEffect.cpp.

int moEffect::luaPause ( moLuaVirtualMachine vm)
protected

Definition at line 870 of file moEffect.cpp.

int moEffect::luaPlay ( moLuaVirtualMachine vm)
protected

Definition at line 861 of file moEffect.cpp.

int moEffect::luaSetEffectState ( moLuaVirtualMachine vm)
protected

cambia el estado de un efecto (sus valores) tinta, velocidad, alpha, etc...

Definition at line 941 of file moEffect.cpp.

int moEffect::luaSetTicks ( moLuaVirtualMachine vm)
protected

Definition at line 899 of file moEffect.cpp.

int moEffect::luaState ( moLuaVirtualMachine vm)
protected

Definition at line 888 of file moEffect.cpp.

int moEffect::luaStop ( moLuaVirtualMachine vm)
protected

Definition at line 879 of file moEffect.cpp.

double moEffect::Magnitude ( double  magnitude)
virtual

Definition at line 679 of file moEffect.cpp.

void moEffect::Pause ( )
virtual

Definition at line 743 of file moEffect.cpp.

void moEffect::Play ( )
virtual

Definition at line 733 of file moEffect.cpp.

void moEffect::PreDraw ( moTempo tempogral,
moEffectState parentstate = NULL 
)
virtual

PreDraw debe ejecutarse en la función Draw, antes de cualquier operación de dibujo. a) toma el nuevo Syncro establecido del config o b) Sincroniza el beat

Definition at line 212 of file moEffect.cpp.

MOboolean moEffect::PreFinish ( )
virtual

Definition at line 314 of file moEffect.cpp.

MOboolean moEffect::PreInit ( )
virtual

Este inicializador se ejecuta en primer lugar dentro de la función Init, y efectua las inicializaciones espécíficas de cualquier derivado de moEffect´. a) carga del archivo de configuración b) verifica que existan parámetros necesarios específicos de los efectos como ser SYNCRO y PHASE c) llamar a MoldeoObject::Init() para la inclusión y parseo de todos los parámetros...

Crea INLETS INTERNOS, es decir que no tienen un parametro asociado... (especificamente para su uso generico

Carga el config (definicion y archivo, corrige, etc) Asigna al config y resuelve variables como texturas, sonidos, etc...

Al fin luego de levantar todas las configuraciones, creamos los conectores (Inlets <NO internos>=""> y Outlets)

Reimplemented in moMasterEffect.

Definition at line 93 of file moEffect.cpp.

void moEffect::RegisterFunctions ( )
protectedvirtual

beware ! call only once or die!!!

función que registra las funciones para lua en particular para esta clase y las derivadas

first inherit methods from MoldeoObjects

register our own methods starting with RegisterBaseFunction

functions to access moConfig data

for TUIO tracking

for features tracking

all values nvalids, nfeatures, barycenter, acceleration, velocity

Reimplemented from moMoldeoObject.

Definition at line 786 of file moEffect.cpp.

int moEffect::ScriptCalling ( moLuaVirtualMachine vm,
int  iFunctionNumber 
)
protectedvirtual

función que define las funciones accesibles por scripting de esta clase particular.

for this Effect

functions to access moConfig data

Reimplemented from moMoldeoObject.

Definition at line 809 of file moEffect.cpp.

void moEffect::ScriptExeDraw ( )
protectedvirtual

Definition at line 189 of file moEffect.cpp.

void moEffect::ScriptExeInteraction ( )
protectedvirtual

Definition at line 198 of file moEffect.cpp.

void moEffect::SetBlending ( moBlendingModes  blending)

DOESNT WORK NICELY BECAUSE DST_ALPHA DOESNT AFFECT FINAL FRAMEBUFFER

THIS WORKS LIKE A CHARM

Definition at line 483 of file moEffect.cpp.

void moEffect::SetColor ( const moColorRGBA color_rgba,
double  alpha,
moEffectState pstate 
)

Definition at line 411 of file moEffect.cpp.

void moEffect::SetColor ( moValue color,
moValue alpha,
moEffectState pstate 
)

Definition at line 429 of file moEffect.cpp.

void moEffect::SetColor ( moParam color,
moParam alpha,
moEffectState pstate 
)

Definition at line 442 of file moEffect.cpp.

bool moEffect::SetEffectState ( const moEffectState p_state)
virtual

Definition at line 63 of file moEffect.cpp.

void moEffect::SetPolygonMode ( moPolygonModes  polygonmode)

Definition at line 457 of file moEffect.cpp.

bool moEffect::SetState ( const moMobState p_MobState)
virtual

Fija el estado del objeto

Reimplemented from moMoldeoObject.

Definition at line 78 of file moEffect.cpp.

double moEffect::SetTempoDelta ( double  p_delta)

Definition at line 616 of file moEffect.cpp.

moTimerState moEffect::State ( )
virtual

Definition at line 753 of file moEffect.cpp.

void moEffect::Stop ( )
virtual

Definition at line 738 of file moEffect.cpp.

void moEffect::SwitchEnabled ( )
virtual

Definition at line 576 of file moEffect.cpp.

void moEffect::SwitchOn ( )
virtual

Definition at line 572 of file moEffect.cpp.

void moEffect::Synchronize ( )
virtual

Definition at line 581 of file moEffect.cpp.

bool moEffect::Synchronized ( )
virtual

Definition at line 590 of file moEffect.cpp.

double moEffect::TempoDelta ( double  p_delta)
virtual

Definition at line 601 of file moEffect.cpp.

double moEffect::TempoFactor ( double  p_factor)
virtual

Definition at line 637 of file moEffect.cpp.

void moEffect::TintCSV ( double  tintc,
double  tints,
double  tint 
)
virtual

Definition at line 690 of file moEffect.cpp.

const moText & moEffect::ToJSON ( )
virtual

Reimplemented from moMoldeoObject.

Definition at line 972 of file moEffect.cpp.

void moEffect::TurnOff ( )
virtual

Definition at line 559 of file moEffect.cpp.

void moEffect::TurnOn ( )
virtual

Definition at line 554 of file moEffect.cpp.

void moEffect::Unsynchronize ( )
virtual

Definition at line 586 of file moEffect.cpp.

Member Data Documentation

moDeviceCodeList* moEffect::devicecode

Definition at line 194 of file moEffect.h.

moInlet* moEffect::InletMilliseconds
protected

Definition at line 231 of file moEffect.h.

moInlet* moEffect::InletSeconds
protected

Definition at line 233 of file moEffect.h.

moInlet* moEffect::InletT
protected

Definition at line 234 of file moEffect.h.

moInlet* moEffect::InletTempo
protected

Definition at line 235 of file moEffect.h.

moInlet* moEffect::InletTime
protected

Definition at line 229 of file moEffect.h.

moInlet* moEffect::InletTimems
protected

Definition at line 230 of file moEffect.h.

moInlet* moEffect::InletTimes
protected

Definition at line 232 of file moEffect.h.

MOint moEffect::iphase

Definition at line 198 of file moEffect.h.

MOint moEffect::isyncro

Definition at line 197 of file moEffect.h.

MOint moEffect::keyidx

Definition at line 202 of file moEffect.h.

moObject3D moEffect::m_Effect3D
protected

Definition at line 207 of file moEffect.h.

moEffectState moEffect::m_EffectState
protected

Definition at line 206 of file moEffect.h.

moMotion moEffect::mov

Definition at line 193 of file moEffect.h.

MOint moEffect::ncodes

Definition at line 195 of file moEffect.h.

moPresets moEffect::presets

Definition at line 192 of file moEffect.h.


The documentation for this class was generated from the following files: