1 /*
2 * Pipeline.cpp
3 *
4 * Created on: Jun 17, 2008
5 * Author: pete
6 */
7 #include "Pipeline.hpp"
8 #include "wipemalloc.h"
9
Pipeline()10 Pipeline::Pipeline() : staticPerPixel(false),gx(0),gy(0),blur1n(1), blur2n(1), blur3n(1),
11 blur1x(1), blur2x(1), blur3x(1),
12 blur1ed(1){}
13
setStaticPerPixel(int gx,int gy)14 void Pipeline::setStaticPerPixel(int gx, int gy)
15 {
16 staticPerPixel = true;
17 this->gx = gx;
18 this->gy = gy;
19
20 this->x_mesh= ( float ** ) wipemalloc ( gx * sizeof ( float * ) );
21 for ( int x = 0; x < gx; x++ )
22 {
23 this->x_mesh[x] = ( float * ) wipemalloc ( gy * sizeof ( float ) );
24 }
25 this->y_mesh= ( float ** ) wipemalloc ( gx * sizeof ( float * ) );
26 for ( int x = 0; x < gx; x++ )
27 {
28 this->y_mesh[x] = ( float * ) wipemalloc ( gy * sizeof ( float ) );
29 }
30
31 }
32
~Pipeline()33 Pipeline::~Pipeline()
34 {
35 if (staticPerPixel)
36 {
37 for ( int x = 0; x < this->gx; x++ )
38 {
39 free(this->x_mesh[x]);
40 free(this->y_mesh[x]);
41 }
42 free(x_mesh);
43 free(y_mesh);
44 }
45 }
46
47 //void Pipeline::Render(const BeatDetect &music, const PipelineContext &context){}
PerPixel(PixelPoint p,const PerPixelContext context)48 PixelPoint Pipeline::PerPixel(PixelPoint p, const PerPixelContext context)
49 {return p;}
50