Blender V2.61 - r43446

ntl_geometryshader.h

Go to the documentation of this file.
00001 
00004 /******************************************************************************
00005  *
00006  * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method
00007  * Copyright 2003-2006 Nils Thuerey
00008  *
00009  * Interface for a geometry shader
00010  *
00011  *****************************************************************************/
00012 #ifndef NTL_GEOMETRYSHADER_H
00013 #define NTL_GEOMETRYSHADER_H
00014 
00015 #include "ntl_geometryclass.h"
00016 class ntlGeometryObject;
00017 class ntlRenderGlobals;
00018 
00019 class ntlGeometryShader : 
00020     public ntlGeometryClass
00021 {
00022 
00023     public:
00024 
00026         inline ntlGeometryShader() :
00027             ntlGeometryClass(), mOutFilename("")
00028             {};
00030         virtual ~ntlGeometryShader() {};
00031 
00033         virtual int getTypeId() { return GEOCLASSTID_SHADER; }
00034 
00036         virtual int initializeShader() = 0;
00037 
00039         virtual int postGeoConstrInit(ntlRenderGlobals *glob) { glob=NULL; /*unused*/ return 0; };
00040 
00042         virtual vector<ntlGeometryObject *>::iterator getObjectsBegin() { return mObjects.begin(); }
00044         virtual vector<ntlGeometryObject *>::iterator getObjectsEnd() { return mObjects.end(); }
00045         
00047         virtual void notifyShaderOfDump(int dumptype, int frameNr,char *frameNrStr,string outfilename) = 0;
00048 
00050         string getOutFilename( void ) { return mOutFilename; }
00051 
00052     protected:
00053 
00055         vector<ntlGeometryObject *> mObjects;
00056 
00057 
00059         string mOutFilename; 
00060 };
00061 
00062 #endif
00063