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.
moLunaClasses.h
Ir a la documentación de este archivo.
1
/*******************************************************************************
2
3
moLunaClasses.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
Andrés Colubri
29
30
Description:
31
En este archivo se deben crear las clases de interface de LUA que encapsulan
32
las clases de Moldeo para que sean accesibles desde los scripts.
33
34
*******************************************************************************/
35
36
#include "
moLuna.h
"
37
#include "
moMath.h
"
38
#include "
moMathFunction.h
"
39
#include "
moP5.h
"
40
#include "
moSoundManager.h
"
41
#include "
moVideoManager.h
"
42
#include "
moResourceManager.h
"
43
44
#ifndef __MO_LUNA_CLASSES_H__
45
#define __MO_LUNA_CLASSES_H__
46
47
class
LIBMOLDEO_API
moLuaSoundManager
:
public
moAbstract
48
{
49
DECLARE_SCRIPT_CLASS
(
moLuaSoundManager
)
50
51
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaSoundManager
)
58
SCRIPT_FUNCTION_DECLARATION
(GetSoundCount);
59
SCRIPT_FUNCTION_DECLARATION
(GetSound);
64
65
void
Set(
moSoundManager
* p_pSoundMan);
66
private
:
67
moSoundManager
*
m_pSoundMan
;
68
69
};
70
71
class
LIBMOLDEO_API
moLuaTextureManager
:
public
moAbstract
72
{
73
DECLARE_SCRIPT_CLASS
(
moLuaTextureManager
)
74
75
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaTextureManager
)
76
77
SCRIPT_FUNCTION_DECLARATION
(GetTextureCount);
78
SCRIPT_FUNCTION_DECLARATION
(GetTextureMOId);
79
SCRIPT_FUNCTION_DECLARATION
(GetTextureBuffer);
80
SCRIPT_FUNCTION_DECLARATION
(AddTexture);
81
SCRIPT_FUNCTION_DECLARATION
(DeleteTexture);
82
SCRIPT_FUNCTION_DECLARATION
(AddTextureBuffer);
83
SCRIPT_FUNCTION_DECLARATION
(DeleteTextureBuffer);
84
SCRIPT_FUNCTION_DECLARATION
(GetGLId);
85
SCRIPT_FUNCTION_DECLARATION
(ValidTexture);
86
87
void
Set(
moTextureManager
* p_pTextureMan);
88
private
:
89
moTextureManager
*
m_pTextureMan
;
90
91
};
92
97
class
moLuaCircularVideoBuffer
:
public
moCircularVideoBuffer
98
{
99
DECLARE_SCRIPT_CLASS
(
moLuaCircularVideoBuffer
)
100
101
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaCircularVideoBuffer
)
102
SCRIPT_FUNCTION_DECLARATION
(StartRecording);
103
SCRIPT_FUNCTION_DECLARATION
(PauseRecording);
104
SCRIPT_FUNCTION_DECLARATION
(ContinueRecording);
105
SCRIPT_FUNCTION_DECLARATION
(StopRecording);
106
SCRIPT_FUNCTION_DECLARATION
(GetRecordPosition);
107
SCRIPT_FUNCTION_DECLARATION
(GetFrameCount);
108
SCRIPT_FUNCTION_DECLARATION
(IsRecording);
109
110
void
Set(
moCircularVideoBuffer
* p_pCircularVideoBuffer );
111
112
private
:
113
moCircularVideoBuffer
*
m_pCircularVideoBuffer
;
114
};
115
120
class
moLuaVideoBuffer
:
public
moVideoBuffer
121
{
122
DECLARE_SCRIPT_CLASS
(
moLuaVideoBuffer
)
123
124
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaVideoBuffer
)
125
SCRIPT_FUNCTION_DECLARATION
(GetFrameCount);
126
127
void
Set(
moVideoBuffer
* p_pVideoBuffer );
128
129
private
:
130
moVideoBuffer
*
m_pVideoBuffer
;
131
};
132
136
class
moLuaVideoBufferPath
:
public
moVideoBufferPath
137
{
138
DECLARE_SCRIPT_CLASS
(
moLuaVideoBufferPath
)
139
140
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaVideoBufferPath
)
141
SCRIPT_FUNCTION_DECLARATION
(GetPath);
142
SCRIPT_FUNCTION_DECLARATION
(GetCompletePath);
143
SCRIPT_FUNCTION_DECLARATION
(GetTotalFiles);
144
SCRIPT_FUNCTION_DECLARATION
(GetImagesProcessed);
145
SCRIPT_FUNCTION_DECLARATION
(LoadCompleted);
146
147
void
Set(
moVideoBufferPath
* p_pVideoBufferPath );
148
149
private
:
150
moVideoBufferPath
*
m_pVideoBufferPath
;
151
};
152
153
class
LIBMOLDEO_API
moLuaVideoManager
:
public
moAbstract
154
{
155
DECLARE_SCRIPT_CLASS
(
moLuaVideoManager
)
156
157
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaVideoManager
)
161
//SCRIPT_FUNCTION_DECLARATION(GetVideoFramework);
162
//SCRIPT_FUNCTION_DECLARATION(GetCameraCount);
163
//SCRIPT_FUNCTION_DECLARATION(GetCamera);
164
SCRIPT_FUNCTION_DECLARATION
(GetVideoBufferCount);
165
SCRIPT_FUNCTION_DECLARATION
(GetVideoBuffer);
166
SCRIPT_FUNCTION_DECLARATION
(GetCircularVideoBufferCount);
167
SCRIPT_FUNCTION_DECLARATION
(GetCircularVideoBuffer);
168
SCRIPT_FUNCTION_DECLARATION
(GetVideoBufferPathCount);
169
SCRIPT_FUNCTION_DECLARATION
(GetVideoBufferPath);
170
171
void
Set(
moVideoManager
* p_pVideoMan);
172
private
:
173
moVideoManager
*
m_pVideoMan
;
174
175
};
176
177
178
179
class
LIBMOLDEO_API
moLuaResourceManager
:
public
moAbstract
180
{
181
DECLARE_SCRIPT_CLASS
(
moLuaResourceManager
)
182
183
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaResourceManager
)
184
185
SCRIPT_FUNCTION_DECLARATION
(GetResourceCount);
186
SCRIPT_FUNCTION_DECLARATION
(GetResource);
187
SCRIPT_FUNCTION_DECLARATION
(GetResourceIndex);
188
SCRIPT_FUNCTION_DECLARATION
(GetResourceByType);
189
SCRIPT_FUNCTION_DECLARATION
(GetResourceName);
190
SCRIPT_FUNCTION_DECLARATION
(GetResourceLabelName);
191
SCRIPT_FUNCTION_DECLARATION
(GetResourceType);
192
193
SCRIPT_FUNCTION_DECLARATION
(GetTextureMan);
194
SCRIPT_FUNCTION_DECLARATION
(GetVideoMan);
195
SCRIPT_FUNCTION_DECLARATION
(GetSoundMan);
196
197
void
Set(
moResourceManager
* p_pResourceManager);
198
private
:
199
moResourceManager
*
m_pResourceManager
;
200
201
};
202
203
209
class
LIBMOLDEO_API
moLuaMath
:
public
moAbstract
,
public
moMathd
210
{
211
DECLARE_SCRIPT_CLASS
(
moLuaMath
)
212
213
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaMath
)
214
215
SCRIPT_FUNCTION_DECLARATION
(ACos);
216
SCRIPT_FUNCTION_DECLARATION
(ASin);
217
SCRIPT_FUNCTION_DECLARATION
(ATan);
218
SCRIPT_FUNCTION_DECLARATION
(ATan2);
219
SCRIPT_FUNCTION_DECLARATION
(Ceil);
220
SCRIPT_FUNCTION_DECLARATION
(Cos);
221
SCRIPT_FUNCTION_DECLARATION
(Exp);
222
SCRIPT_FUNCTION_DECLARATION
(FAbs);
223
SCRIPT_FUNCTION_DECLARATION
(Floor);
224
SCRIPT_FUNCTION_DECLARATION
(FMod);
225
SCRIPT_FUNCTION_DECLARATION
(InvSqrt);
226
SCRIPT_FUNCTION_DECLARATION
(Log);
227
SCRIPT_FUNCTION_DECLARATION
(Log2);
228
SCRIPT_FUNCTION_DECLARATION
(Log10);
229
SCRIPT_FUNCTION_DECLARATION
(Pow);
230
SCRIPT_FUNCTION_DECLARATION
(Sin);
231
SCRIPT_FUNCTION_DECLARATION
(Sqr);
232
SCRIPT_FUNCTION_DECLARATION
(Sqrt);
233
SCRIPT_FUNCTION_DECLARATION
(Tan);
234
235
SCRIPT_FUNCTION_DECLARATION
(UnitRandom)
236
SCRIPT_FUNCTION_DECLARATION
(SymmetricRandom)
237
SCRIPT_FUNCTION_DECLARATION
(IntervalRandom)
238
239
moMathd
Mathd;
240
};
241
242
247
/*
248
class LIBMOLDEO_API moLuaParserFunction : public moParserFunction
249
{
250
DECLARE_SCRIPT_CLASS(moLuaParserFunction)
251
252
SCRIPT_CONSTRUCTOR_DECLARATION(moLuaParserFunction)
253
254
SCRIPT_FUNCTION_DECLARATION(SetExpression)
255
256
SCRIPT_FUNCTION_DECLARATION(SetParameters1)
257
SCRIPT_FUNCTION_DECLARATION(SetParameters2)
258
SCRIPT_FUNCTION_DECLARATION(SetParameters3)
259
260
SCRIPT_FUNCTION_DECLARATION(Eval1)
261
SCRIPT_FUNCTION_DECLARATION(Eval2)
262
SCRIPT_FUNCTION_DECLARATION(Eval3)
263
264
SCRIPT_FUNCTION_DECLARATION(GetParameterCount)
265
SCRIPT_FUNCTION_DECLARATION(GetVariableCount)
266
};
267
*/
268
273
class
LIBMOLDEO_API
moLuaP5
: public
moP5
274
{
275
DECLARE_SCRIPT_CLASS
(
moLuaP5
)
276
277
SCRIPT_CONSTRUCTOR_DECLARATION
(
moLuaP5
)
278
279
SCRIPT_FUNCTION_DECLARATION
(triangle)
280
SCRIPT_FUNCTION_DECLARATION
(line)
281
SCRIPT_FUNCTION_DECLARATION
(arc)
282
SCRIPT_FUNCTION_DECLARATION
(point)
283
SCRIPT_FUNCTION_DECLARATION
(quad)
284
SCRIPT_FUNCTION_DECLARATION
(ellipse)
285
SCRIPT_FUNCTION_DECLARATION
(rect)
286
287
SCRIPT_FUNCTION_DECLARATION
(strokeWeight)
288
SCRIPT_FUNCTION_DECLARATION
(background)
289
SCRIPT_FUNCTION_DECLARATION
(colorMode)
290
291
SCRIPT_FUNCTION_DECLARATION
(stroke)
292
SCRIPT_FUNCTION_DECLARATION
(noFill)
293
SCRIPT_FUNCTION_DECLARATION
(noStroke)
294
SCRIPT_FUNCTION_DECLARATION
(fill)
295
296
SCRIPT_FUNCTION_DECLARATION
(pushMatrix)
297
SCRIPT_FUNCTION_DECLARATION
(popMatrix)
298
SCRIPT_FUNCTION_DECLARATION
(resetMatrix)
299
300
SCRIPT_FUNCTION_DECLARATION
(scale)
301
SCRIPT_FUNCTION_DECLARATION
(translate)
302
SCRIPT_FUNCTION_DECLARATION
(rotate)
303
304
SCRIPT_FUNCTION_DECLARATION
(PRGB)
305
SCRIPT_FUNCTION_DECLARATION
(PHSB)
306
307
SCRIPT_FUNCTION_DECLARATION
(PHALF_PI)
308
SCRIPT_FUNCTION_DECLARATION
(PTWO_PI)
309
SCRIPT_FUNCTION_DECLARATION
(PPI)
310
};
311
312
#endif
313
moLuaSoundManager::m_pSoundMan
moSoundManager * m_pSoundMan
Definition:
moLunaClasses.h:67
moLuaVideoBufferPath
Definition:
moLunaClasses.h:136
moMath.h
moP5.h
moVideoBufferPath
Definition:
moVideoManager.h:382
moLuaSoundManager
Definition:
moLunaClasses.h:47
moSoundManager
Administrador de sonidos.
Definition:
moSoundManager.h:300
moLuaVideoManager
Definition:
moLunaClasses.h:153
moSoundManager.h
moLuna.h
SCRIPT_FUNCTION_DECLARATION
#define SCRIPT_FUNCTION_DECLARATION(FunctionName)
Definition:
moLuna.h:637
moVideoManager.h
moAbstract
Clase base abstracta de donde deben derivar los objetos [virtual pura].
Definition:
moAbstract.h:191
moLuaVideoBuffer
Definition:
moLunaClasses.h:120
moLuaResourceManager::m_pResourceManager
moResourceManager * m_pResourceManager
Definition:
moLunaClasses.h:199
LIBMOLDEO_API
#define LIBMOLDEO_API
Definition:
moTypes.h:180
moVideoManager
Definition:
moVideoManager.h:450
moVideoBuffer
Buffer de imágenes para video.
Definition:
moVideoManager.h:266
moResourceManager.h
SCRIPT_CONSTRUCTOR_DECLARATION
#define SCRIPT_CONSTRUCTOR_DECLARATION(ClassName)
Definition:
moLuna.h:634
moLuaCircularVideoBuffer
Definition:
moLunaClasses.h:97
moLuaP5
Definition:
moLunaClasses.h:273
DECLARE_SCRIPT_CLASS
#define DECLARE_SCRIPT_CLASS(ClassName)
Definition:
moLuna.h:603
moResourceManager
Administrador de recursos.
Definition:
moResourceManager.h:224
moLuaResourceManager
Definition:
moLunaClasses.h:179
moLuaCircularVideoBuffer::m_pCircularVideoBuffer
moCircularVideoBuffer * m_pCircularVideoBuffer
Definition:
moLunaClasses.h:113
moLuaTextureManager
Definition:
moLunaClasses.h:71
moLuaTextureManager::m_pTextureMan
moTextureManager * m_pTextureMan
Definition:
moLunaClasses.h:89
moLuaVideoManager::m_pVideoMan
moVideoManager * m_pVideoMan
Definition:
moLunaClasses.h:173
moMath
Definition:
moMath.h:64
moLuaMath
Definition:
moLunaClasses.h:209
moLuaVideoBufferPath::m_pVideoBufferPath
moVideoBufferPath * m_pVideoBufferPath
Definition:
moLunaClasses.h:150
moP5
Definition:
moP5.h:41
moCircularVideoBuffer
Buffer Circular de imágenes para video.
Definition:
moVideoManager.h:324
moMathFunction.h
moTextureManager
Definition:
moTextureManager.h:139
moLuaVideoBuffer::m_pVideoBuffer
moVideoBuffer * m_pVideoBuffer
Definition:
moLunaClasses.h:130
libmoldeo
moLunaClasses.h
Generado el Martes, 10 de Septiembre de 2019 21:27:07 para libmoldeo (Moldeo 1.0 Core) por
1.8.13