1 /**
2  * projectM -- Milkdrop-esque visualisation SDK
3  * Copyright (C)2003-2007 projectM Team
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  * See 'LICENSE.txt' included within this release
19  *
20  */
21 /**
22  * $Id$
23  *
24  * Per-pixel equation
25  *
26  * $Log$
27  */
28 
29 #ifndef _PER_PIXEL_EQN_H
30 #define _PER_PIXEL_EQN_H
31 
32 #define PER_PIXEL_EQN_DEBUG 0
33 
34 #define ZOOM_OP 0
35 #define ZOOMEXP_OP 1
36 #define ROT_OP 2
37 #define CX_OP 3
38 #define CY_OP 4
39 #define SX_OP 5
40 #define SY_OP  6
41 #define DX_OP 7
42 #define DY_OP 8
43 #define WARP_OP 9
44 #define NUM_OPS 10 /* obviously, this number is dependent on the number of existing per pixel operations */
45 
46 class GenExpr;
47 class Param;
48 class PerPixelEqn;
49 class Preset;
50 
51 class PerPixelEqn {
52 public:
53     int index; /* used for splay tree ordering. */
54     int flags; /* primarily to specify if this variable is user-defined */
55     Param *param;
56     GenExpr *gen_expr;
57 
58     void evalPerPixelEqns( Preset *preset );
59     void evaluate(int mesh_i, int mesh_j);
60 
61     PerPixelEqn(int index, Param * param, GenExpr * gen_expr);
62 
63   };
64 
65 
66 #endif /** !_PER_PIXEL_EQN_H */
67