165 #ifndef __MO_EFFECT_PARTICLES_H__
166 #define __MO_EFFECT_PARTICLES_H__
171 #include "moPlugin.h"
172 #include "moTimeManager.h"
173 #include "moFilterManager.h"
175 #define MO_PARTICLES_TRANSLATE_X 0
176 #define MO_PARTICLES_TRANSLATE_Y 1
177 #define MO_PARTICLES_SCALE_X 2
178 #define MO_PARTICLES_SCALE_Y 3
294 static moTextArray TextureModeOptions;
449 Pos3d = moVector3f(0.0,0.0,0.0);
452 Force = moVector3f(0.0,0.0,0.0);
453 U = moVector3f(0.0,0.0,0.0);
454 V = moVector3f(0.0,0.0,0.0);
455 W = moVector3f(0.0,0.0,0.0);
456 dpdt = moVector3f(0.0,0.0,0.0);
457 dvdt = moVector3f(0.0,0.0,0.0);
461 Pos = moVector2f(0.0,0.0);
462 TCoord = moVector2f(0.0,0.0);
464 Size = moVector2f(0.0,0.0);
465 TSize = moVector2f(0.0,0.0);
466 TSize2 = moVector2f(0.0,0.0);
467 Color = moVector3f(1.0,1.0,1.0);
601 m_Plane = moVector3f(0.0,0.0,0.0);
757 void Draw(moTempo*, moEffectState* parentstate = NULL);
766 void Shot( moText source = moText(
""),
int shot_type = 0,
int shot_file=0 );
772 void Update( moEventList * p_eventlist);
775 moConfigDefinition *
GetDefinition( moConfigDefinition *p_configdefinition );
778 int ScriptCalling(moLuaVirtualMachine& vm,
int iFunctionNumber);
790 void UpdateParameters();
800 void InitParticlesSimple(
int p_cols,
int p_rows ,
bool p_forced =
true );
803 void CalculateForces(
bool tmparray =
false );
806 void CalculateDerivatives(
bool tmparray =
false,
double dt = 0.0 );
819 void UpdateParticles(
double dt,
int method );
837 double Solver1D(
double h,
double y0,
int method,
double (*fcn)(
double) );
843 void ParticlesSimpleInfluence(
float posx,
float posy,
float velx,
float vely,
float veln );
844 void ParticlesSimpleAnimation( moTempo* tempogral, moEffectState* parentstate );
847 void DrawParticlesSimple( moTempo* tempogral, moEffectState* parentstate );
851 void RegisterFunctions();
853 int luaGetDelta(moLuaVirtualMachine& vm);
854 int luaGetParticleCount(moLuaVirtualMachine& vm);
855 int luaGetParticle(moLuaVirtualMachine& vm);
856 int luaGetParticlePosition(moLuaVirtualMachine& vm);
857 int luaGetParticleSize(moLuaVirtualMachine& vm);
858 int luaGetParticleScale(moLuaVirtualMachine& vm);
859 int luaGetParticleVelocity(moLuaVirtualMachine& vm);
860 int luaGetParticleRotation(moLuaVirtualMachine& vm);
861 int luaGetParticleGraphics(moLuaVirtualMachine& vm);
863 int luaUpdateParticle( moLuaVirtualMachine& vm );
864 int luaUpdateParticlePosition( moLuaVirtualMachine& vm );
865 int luaUpdateParticleSize( moLuaVirtualMachine& vm );
866 int luaUpdateParticleScale( moLuaVirtualMachine& vm );
867 int luaUpdateParticleVelocity( moLuaVirtualMachine& vm );
868 int luaUpdateParticleRotation( moLuaVirtualMachine& vm );
869 int luaUpdateParticleGraphics( moLuaVirtualMachine& vm );
871 int luaUpdateForce( moLuaVirtualMachine& vm );
873 int luaShot(moLuaVirtualMachine& vm);
874 int luaReInit(moLuaVirtualMachine& vm);
876 int luaDrawPoint(moLuaVirtualMachine& vm);
877 int luaGetParticleIntersection(moLuaVirtualMachine& vm);
881 moInlet* m_pParticleTime;
882 moInlet* m_pParticleIndex;
884 moParticlesSimpleArray m_ParticlesSimpleArray;
885 moParticlesSimpleArray m_ParticlesSimpleArrayTmp;
890 moTrackerSystemData* m_pTrackerData;
891 MOint m_InletTrackerSystemIndex;
894 moTUIOSystemData* m_pTUIOData;
895 MOint m_InletTuioSystemIndex;
900 moVector2f m_TrackerBarycenter;
903 void setUpLighting();
908 long time_tofull_revelation;
909 long time_tofull_restoration;
910 long time_of_revelation;
911 long time_of_restoration;
912 long drawing_features;
922 moTimer TimerFullRevelation;
923 moTimer TimerFullRestoration;
924 moTimer TimerOfRevelation;
925 moTimer TimerOfRestoration;
927 moTimer FeatureActivity;
928 moTimer MotionActivity;
929 moTimer NoMotionActivity;
938 moTexture* pTextureDest;
939 moTexture* pSubSample;
940 MObyte* samplebuffer;
948 float original_proportion;
953 float midi_red, midi_green, midi_blue;
955 float midi_emitionperiod;
956 float midi_emitionrate;
957 float midi_randomvelocity;
958 float midi_randommotion;
2: Volumétrico. Los lugares de nacimientos están diseminados dentro del volumen del emisor aleatoriam...
moVector3f U
particle orientation
moParticlesCreationMethod
Creation Method.
2: Many Different Textures Image for each Particle ( taken from texturefolder )
1: accelerate, reach and stop instantly
double Alpha
Transparency of the particle.
moParticlesSimplePhysics()
void Interaction(moIODeviceManager *)
Interacción.
moParticlesCreationMethod m_CreationMethod
5: each particle attract each one to a dot of the tracker
virtual ~moEffectParticlesSimpleFactory()
MO_PLG_API void DestroyEffectFactory()
moParticlesSimpleFolderShotType
Folder Shot Type.
1: Esfera (una esfera de "width" longitudes y "height" latitudes) 3D
0: filename screenshot is date based
double Mass
Mass in g of the particle.
virtual ~moEffectParticlesSimple()
Destructor.
MOboolean Init()
Inicialización.
void TrackParticle(int partid)
3: complete view dependent ordering >
moVector3f m_EmitterVector
void Destroy(moEffect *fx)
0: One Same Texture Image for each Particle (taken from texture)
2: 2: Tubo ( un tubo de "width" facetas y "height" segmentos) 3D
moVector3f Pos3d
Position absolute.
1: Superficial. Los lugares de nacimientos están diseminados sobre la superficie del emisor aleatoria...
3: Line shape emitter (3d) vector line (x,y,z)
moParticlesSimpleTextureMode
Texture Mode.
moTimer Age
Age of the particle.
6: each particle attract each one to a dot of the tracker
0: Alineado. Los lugares de nacimientos están alineados con el orden de los vertices del emisor...
4: each particle attract perpendicular to jet vector
moVector3f m_GravityVector
0: Grilla (un rectángulo de "width" x "height") 2D
moParticlesSimpleAttractorMode
Attractor Mode.
moVector2f TSize
particle texture size
2: accelerate and bounce....(inverse direction)
moParticlesSimpleEmitterType m_EmitterType
moVector3f m_PositionVector
1: each particle attract perp to a face of the grid
0: accelerate with no stop
0: las partículas son atraídas entre ellas
moVector2f Size
particle size
4: accelerate then brake and slowdown slowly
moParticlesSimpleBehaviourMode
Behaviour Mode.
0: filename screenshot has a random id
0: filename screenshot is name based
moParticlesSimpleAttractorType m_AttractorType
MOboolean Finish()
Finalizacion.
3: accelerate and breaks (generate debris on place)
5: constant speed to attractortype
0: each particle attract diretly to the same point
moVector3f Velocity
Speed or Velocity vector.
moVector2f Pos
Particles Vectors.
moConfigDefinition * GetDefinition(moConfigDefinition *p_configdefinition)
Definicion de campos.
moTextureMemory * pTextureMemory
moDeclareDynamicArray(moParticlesSimple *, moParticlesSimpleArray)
8: Círculo ( una ronda de "width"X"height" partículas )
moVector3f m_GravityCenter
moParticlesSimple * m_pLastBordParticle
moVector3f m_VelocityVector
moParticlesRandomMethod
Random Method.
moParticlesSimpleEmitterType
Emitter Type.
moParticlesSimpleAttractorMode m_AttractorMode
1: Same Texture Image Divided In Different Fragments for each Particle (taken from texture...
float ImageProportion
Texture image proportion Width / Height ....
MOint GLId2
para asociar la textura al momento de la creación
1: las partículas son libres y mantienen una distancia mínima de separación
2: each particle attract perp to a face of the grid
void Shot(moText source=moText(""), int shot_type=0, int shot_file=0)
Foto de la cámara.
void Update(moEventList *p_eventlist)
Actualización del ciclo de eventos.
moVector3f Rotation
Angle of the particle.
3: las partículas se alinean y acomodan cristalmente
3: each particle attract perp to a face of the grid
2: las partículas son repelidas entre ellas
moVector3f Destination
Destination.
moParticlesRandomMethod m_RandomMethod
moParticlesSimpleParamIndex
void ReInit()
Reiniciar el analisis de la imagen.
moVector3f dpdt
Differentials of position (speed) and velocity (acceleration)
moParticlesOrientationMode m_OrientationMode
5: Trackeador ( reservado para información de sensado )
MOint GLId
Unique ID of OpenGL Texture.
6: Trackeador2 ( reservado para información de sensado )
moEffectParticlesSimpleFactory()
0: 0: no reordering for drawing
virtual ~moParticlesSimple()
2: zposition -> simple order relative to particle Z calculated position
4: Punto ( colapsados en un punto )
int ScriptCalling(moLuaVirtualMachine &vm, int iFunctionNumber)
Llamada de scripts.
3: Many textures/particle to construct a patched texture one ( taken from texturefolder, build the one defined on texture parameter, or from a folder, call to Shot(source) then ReInit to build... )
double Scale
Scale of the particle.
std::map< double, moParticlesSimple * > TMapDepthToParticleSimple
virtual ~moParticlesSimplePhysics()
bool Visible
Exists but is invisible.
moVector2f TCoord
texture coordinate
moParticlesSimpleAttractorType
Attractor Type.
MO_PLG_API moEffectFactory * CreateEffectFactory()
moParticlesOrderingMode m_OrderingMode
moVector3f Force
Self force (propulsion) of the particle.
moVector3f m_MotionVector
7: Espiral ( forma de espiral, "width" ángulos que forman "height" ciclos )
3: Central. Los lugares de nacimiento están colapsados en el centro del emisor.
moVector3f m_AttractorVector
void Draw(moTempo *, moEffectState *parentstate=NULL)
Dibujado.
moEffectParticlesSimple()
Constructor.
moParticlesOrientationMode
Orientation Method.