From d7b441473a0e00c49c7986ea98bb87b4537247f8 Mon Sep 17 00:00:00 2001 From: Nils Thuerey Date: Wed, 28 Sep 2005 16:20:57 +0000 Subject: - removed some unecessary files & code - debug output now controlled globally by elbeem debug level (BLENDER_ELBEEMDEBUG environment var), also for fluidsimBake and read/writeBobj - debug output is written to file for WIN32 - added "for" and "vector" etc. defines for MSVC6 (I couldnt get hold of the compiler itself, so not tested yet) --- intern/elbeem/SConscript | 5 +- intern/elbeem/extern/LBM_fluidsim.h | 7 + intern/elbeem/intern/arrays.h | 290 ------ intern/elbeem/intern/blendercall.cpp | 8 +- intern/elbeem/intern/cfglexer.cpp | 815 +++++++-------- intern/elbeem/intern/cfgparser.cpp | 1463 ++++++++++++++------------- intern/elbeem/intern/cfgparser.h | 382 +++---- intern/elbeem/intern/elbeem.cpp | 4 - intern/elbeem/intern/isosurface.cpp | 300 +----- intern/elbeem/intern/isosurface.h | 119 --- intern/elbeem/intern/lbmdimensions.h | 2 +- intern/elbeem/intern/lbmfsgrsolver.h | 65 +- intern/elbeem/intern/lbminterface.cpp | 4 +- intern/elbeem/intern/lbminterface.h | 8 +- intern/elbeem/intern/ntl_geometrybox.cpp | 302 ------ intern/elbeem/intern/ntl_geometrybox.h | 63 -- intern/elbeem/intern/ntl_geometryshader.h | 6 +- intern/elbeem/intern/ntl_geometrysphere.cpp | 229 ----- intern/elbeem/intern/ntl_geometrysphere.h | 65 -- intern/elbeem/intern/ntl_image.cpp | 13 - intern/elbeem/intern/ntl_image.h | 167 --- intern/elbeem/intern/ntl_lightobject.h | 29 - intern/elbeem/intern/ntl_ray.cpp | 19 +- intern/elbeem/intern/ntl_raytracer.cpp | 24 +- intern/elbeem/intern/ntl_scene.cpp | 4 - intern/elbeem/intern/ntl_vector3dim.h | 16 +- intern/elbeem/intern/utilities.cpp | 102 +- intern/elbeem/intern/utilities.h | 16 +- 28 files changed, 1484 insertions(+), 3043 deletions(-) delete mode 100644 intern/elbeem/intern/arrays.h delete mode 100644 intern/elbeem/intern/ntl_geometrybox.cpp delete mode 100644 intern/elbeem/intern/ntl_geometrybox.h delete mode 100644 intern/elbeem/intern/ntl_geometrysphere.cpp delete mode 100644 intern/elbeem/intern/ntl_geometrysphere.h delete mode 100644 intern/elbeem/intern/ntl_image.cpp delete mode 100644 intern/elbeem/intern/ntl_image.h (limited to 'intern/elbeem') diff --git a/intern/elbeem/SConscript b/intern/elbeem/SConscript index c155bb79fab..3f859752b26 100644 --- a/intern/elbeem/SConscript +++ b/intern/elbeem/SConscript @@ -5,7 +5,7 @@ Import('user_options_dict'); print "Including El'Beem Fluid Simulation..." elbeem_env = library_env.Copy(); elbeem_env.Append(CPPDEFINES= 'NOGUI'); -elbeem_env.Append(CPPDEFINES= 'ELBEEM_BLENDER=1'); +elbeem_env.Append(CPPDEFINES= [('ELBEEM_BLENDER',1)] ); elbeem_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE']) elbeem_env.Append (CPPPATH = user_options_dict['Z_INCLUDE']) @@ -26,11 +26,8 @@ Sources = [ "intern/lbminterface.cpp", "intern/ntl_blenderdumper.cpp", "intern/ntl_bsptree.cpp", - "intern/ntl_geometrybox.cpp", "intern/ntl_geometrymodel.cpp", "intern/ntl_geometryobject.cpp", - "intern/ntl_geometrysphere.cpp", - "intern/ntl_image.cpp", "intern/ntl_lightobject.cpp", "intern/ntl_ray.cpp", "intern/ntl_raytracer.cpp", diff --git a/intern/elbeem/extern/LBM_fluidsim.h b/intern/elbeem/extern/LBM_fluidsim.h index 27fcc101440..884a243e6a6 100644 --- a/intern/elbeem/extern/LBM_fluidsim.h +++ b/intern/elbeem/extern/LBM_fluidsim.h @@ -63,6 +63,13 @@ struct DerivedMesh *getFluidsimDerivedMesh(struct Object *srcob, int useRenderPa // WARNING - implemented in intern/elbeem/blendercall.cpp int performElbeemSimulation(char *cfgfilename); +// implemented in intern/elbeem/utilities.cpp +/* set elbeem debug output level (0=off to 10=full on) */ +void elbeemSetDebugLevel(int level); +/* elbeem debug output function */ +void elbeemDebugOut(char *msg); + + #endif diff --git a/intern/elbeem/intern/arrays.h b/intern/elbeem/intern/arrays.h deleted file mode 100644 index 9eea34e579f..00000000000 --- a/intern/elbeem/intern/arrays.h +++ /dev/null @@ -1,290 +0,0 @@ -/****************************************************************************** - * - * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method - * Copyright 2003,2004 Nils Thuerey - * - * Array class definitions - * - *****************************************************************************/ -#ifndef ARRAYS_H -#include -#include -#include - - -/*****************************************************************************/ -/* array handling "cutting off" access along the border */ -template -class ArrayCutoffBc { - public: - //! constructor - ArrayCutoffBc() : - mpVal( NULL ), mElemSize( sizeof(T) ), - mAllocSize(0), - mSizex(0), mSizey(0), mSizez(0) - { }; - //! destructor - virtual ~ArrayCutoffBc() { - if((mpVal)&&(mAllocSize>0)) delete[] mpVal; - mpVal = NULL; - } - - //! init sizes - void initializeArray(int setx, int sety, int setz) { - mSizex = setx; - mSizey = sety; - mSizez = setz; - } - - //! allocate a new array - inline void allocate() { - int size = mSizex*mSizey*mSizez; - if(size == mAllocSize) return; // dont reallocate - T* newval = new T[size]; - for(int i=0;imSizex-1) x=mSizex-1; - if(y>mSizey-1) y=mSizey-1; - if(z>mSizez-1) z=mSizez-1; - return z*mSizex*mSizey + y*mSizex + x; - } - //! phi access function - inline T& getValue(int x, int y, int z) { - unsigned char *bpnt = &mpVal[ arrayIndex(x,y,z)*mElemSize ]; - return *((T*)bpnt); - //return mpPhi[ z*mSizex*mSizey + y*mSizex + x]; - } - //! return relative offset in direction dir (x=0,y=1,z=2) - inline T& getOffset(T *base,int off, int dir) { - unsigned char *basep = (unsigned char *)base; - int multiplier = 1; - if(dir==1) multiplier=mSizex; - if(dir==2) multiplier=mSizex*mSizey; - // check boundary - unsigned char *bpnt = (basep+ ((off*multiplier)*mElemSize) ); - if(bpnt= (unsigned char *)&getValue(mSizex-1,mSizey-1,mSizez-1) ) bpnt = basep; - return *((T*)bpnt); - } - - //! perform trilinear interpolation of array values - inline T interpolateValueAt(LbmFloat x, LbmFloat y, LbmFloat z) { - const LbmFloat gsx=1.0, gsy=1.0, gsz=1.0; - int i= (int)x; - int j= (int)y; - int k= (int)z; - - int in = i+1; - int jn = j+1; - int kn = k+1; - if(in>=mSizex) in = mSizex-1; - if(jn>=mSizey) jn = mSizey-1; - if(kn>=mSizez) kn = mSizez-1; - - LbmVec mStart(0.0); // TODO remove? - LbmFloat x1 = mStart[0]+ (LbmFloat)(i)*gsx; - LbmFloat x2 = mStart[0]+ (LbmFloat)(in)*gsx; - LbmFloat y1 = mStart[1]+ (LbmFloat)(j)*gsy; - LbmFloat y2 = mStart[1]+ (LbmFloat)(jn)*gsy; - LbmFloat z1 = mStart[2]+ (LbmFloat)(k)*gsz; - LbmFloat z2 = mStart[2]+ (LbmFloat)(kn)*gsz; - - if(mSizez==1) { - z1=0.0; z2=1.0; - k = kn = 0; - } - - T v1, v2, v3, v4, v5, v6, v7, v8; - v1 = getValue(i ,j ,k ); - v2 = getValue(in ,j ,k ); - v3 = getValue(i ,jn ,k ); - v4 = getValue(in ,jn ,k ); - v5 = getValue(i ,j ,kn ); - v6 = getValue(in ,j ,kn ); - v7 = getValue(i ,jn ,kn ); - v8 = getValue(in ,jn ,kn ); - - T val = - ( v1 *(x2-x)* (y2-y)* (z2-z) + - v2 *(x-x1)* (y2-y)* (z2-z) + - v3 *(x2-x)* (y-y1)* (z2-z) + - v4 *(x-x1)* (y-y1)* (z2-z) + - v5 *(x2-x)* (y2-y)* (z-z1) + - v6 *(x-x1)* (y2-y)* (z-z1) + - v7 *(x2-x)* (y-y1)* (z-z1) + - v8 *(x-x1)* (y-y1)* (z-z1) - ) * (1.0/(gsx*gsy*gsz)) ; - return val; - } - - //! get size of an element - inline int getElementSize(){ return mElemSize; } - //! get array sizes - inline int getSizeX(){ return mSizex; } - inline int getSizeY(){ return mSizey; } - inline int getSizeZ(){ return mSizez; } - //! get array pointer - inline T* getPointer(){ return (T*)mpVal; } - - //! testing, gnuplot dump (XY plane for k=Z/2) - void dumpToFile(std::string filebase, int id, int nr) { - std::ostringstream filename; - filename << filebase << "_"<< id <<"_"<< nr <<".dump"; - std::ofstream outfile( filename.str().c_str() ); - for(int k=mSizez/2; k<=mSizez/2; k++) { - for(int j=0; j -class ArrayPlain { - public: - //! constructor - ArrayPlain() : - mpVal( NULL ), mElemSize( sizeof(T) ), - mAllocSize(0), - mSizex(0), mSizey(0), mSizez(0) - { }; - //! destructor - virtual ~ArrayPlain() { - if((mpVal)&&(mAllocSize>0)) delete[] mpVal; - mpVal = NULL; - } - - //! init sizes - void initializeArray(int setx, int sety, int setz) { - mSizex = setx; - mSizey = sety; - mSizez = setz; - } - - //! allocate a new array - inline void allocate() { - int size = mSizex*mSizey*mSizez; - if(size == mAllocSize) return; // dont reallocate - T* newval = new T[size]; - for(int i=0;i= (unsigned char *)&getValue(mSizex-1,mSizey-1,mSizez-1) ) bpnt = basep; - return *((T*)bpnt); - } - - //! get size of an element - inline int getElementSize(){ return mElemSize; } - //! get array sizes - inline int getSizeX(){ return mSizex; } - inline int getSizeY(){ return mSizey; } - inline int getSizeZ(){ return mSizez; } - //! get array pointer - inline T* getPointer(){ return (T*)mpVal; } - - //! testing, gnuplot dump (XY plane for k=Z/2) - void dumpToFile(std::string filebase, int id, int nr) { - std::ostringstream filename; - filename << filebase << "_"<< id <<"_"<< nr <<".dump"; - std::ofstream outfile( filename.str().c_str() ); - for(int k=mSizez/2; k<=mSizez/2; k++) { - for(int j=0; j10) gDebugLevel = 0; // only use valid values - if(gDebugLevel>0) fprintf(stderr, "Using envvar '%s'='%s', debugLevel set to: %d\n",strEnvName, getenv(strEnvName), gDebugLevel); + if(gDebugLevel>0) debMsgStd("performElbeemSimulation",DM_NOTIFY,"Using envvar '"<0) fprintf(GEN_userstream, "Running El'Beem from Blender with file '%s', debugLevel:%d ...\n",cfgfilename,gDebugLevel); + //if(gDebugLevel>0) { + debMsgStd("performElbeemSimulation",DM_NOTIFY,"Running El'Beem from Blender with file '"<< cfgfilename <<"', debugLevel:"<0) fprintf(GEN_userstream, "El'Beem simulation done, time: %f seconds.\n", ((timeend-timestart)/(double)1000.0) ); + debMsgStd("performElbeemSimulation",DM_NOTIFY, "El'Beem simulation done, time: "<<((timeend-timestart)/(double)1000.0) <<" seconds.\n", 2 ); } else { } return 1; diff --git a/intern/elbeem/intern/cfglexer.cpp b/intern/elbeem/intern/cfglexer.cpp index f4574a6c05a..c8492f8105c 100644 --- a/intern/elbeem/intern/cfglexer.cpp +++ b/intern/elbeem/intern/cfglexer.cpp @@ -349,8 +349,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 97 -#define YY_END_OF_BUFFER 98 +#define YY_NUM_RULES 98 +#define YY_END_OF_BUFFER 99 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -358,70 +358,70 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[562] = +static yyconst flex_int16_t yy_accept[567] = { 0, - 0, 0, 0, 0, 6, 6, 98, 96, 96, 94, - 95, 96, 92, 96, 96, 96, 88, 96, 96, 96, - 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 96, 1, 2, 96, 95, 4, + 0, 0, 0, 0, 6, 6, 99, 97, 97, 95, + 96, 97, 93, 97, 97, 97, 89, 97, 97, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 97, 97, 97, 1, 2, 97, 96, 4, 3, 6, 7, 6, 6, 6, 7, 1, 2, 0, - 1, 2, 0, 92, 0, 88, 89, 93, 91, 88, + 1, 2, 0, 93, 0, 89, 90, 94, 92, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 3, - 4, 3, 6, 6, 5, 6, 6, 6, 90, 91, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, - 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, + 4, 3, 6, 6, 5, 6, 6, 6, 91, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, + 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 85, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 63, 0, 0, 0, 75, 0, - 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 86, 43, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, - 0, 0, 78, 0, 0, 0, 0, 0, 0, 0, - 87, 0, 0, 0, 0, 0, 0, 0, 0, 74, - 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, - 0, 0, 0, 16, 0, 0, 76, 0, 0, 0, - - 0, 18, 0, 0, 0, 0, 0, 77, 0, 0, - 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 59, 0, 15, 0, 0, 67, 0, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 0, 0, 0, 76, 0, + 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 87, 44, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, + 88, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, + 0, 0, 0, 17, 0, 0, 77, 0, 0, 0, + + 0, 19, 0, 0, 0, 0, 0, 78, 0, 0, + 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 60, 0, 16, 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 0, 0, 0, 0, 55, 0, 64, 0, 0, + 0, 46, 0, 0, 0, 0, 56, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 65, 0, 0, 0, 0, 0, 72, 0, 0, - 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, + 0, 0, 0, 66, 0, 0, 0, 0, 0, 73, + 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 0, 0, 21, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 0, 0, 0, 14, 58, 25, - 8, 0, 42, 0, 60, 0, 0, 0, 46, 0, - 79, 0, 0, 0, 0, 0, 0, 66, 34, 0, - 0, 0, 0, 0, 0, 22, 0, 13, 38, 0, - 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, - 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 82, 0, 0, 0, 0, 0, 0, 0, - 37, 20, 0, 0, 0, 0, 0, 0, 9, 33, - 0, 73, 57, 0, 0, 0, 35, 11, 0, 0, - 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, - - 36, 47, 0, 0, 83, 0, 40, 30, 56, 54, - 0, 69, 0, 0, 0, 71, 0, 0, 0, 19, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 68, - 31, 0, 0, 0, 0, 0, 0, 0, 0, 29, - 70, 0, 0, 0, 80, 0, 0, 48, 26, 0, - 0, 0, 81, 0, 0, 27, 28, 0, 32, 41, - 0 + 0, 0, 50, 0, 0, 22, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 15, 59, 26, 8, 0, 43, 0, 61, 0, 0, + 0, 47, 0, 80, 0, 0, 0, 0, 0, 0, + 67, 35, 0, 0, 0, 0, 0, 0, 23, 0, + 14, 39, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 25, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, + 0, 0, 0, 0, 38, 21, 0, 0, 0, 0, + 0, 0, 9, 11, 34, 0, 74, 58, 0, 0, + 0, 36, 12, 0, 0, 0, 13, 0, 0, 0, + + 0, 0, 0, 0, 0, 37, 48, 0, 0, 84, + 0, 41, 31, 57, 55, 0, 70, 0, 0, 0, + 72, 0, 0, 0, 20, 24, 0, 0, 0, 0, + 0, 0, 0, 0, 69, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 71, 0, 0, 0, 81, + 0, 0, 49, 27, 0, 0, 0, 82, 0, 0, + 28, 29, 0, 33, 42, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -465,141 +465,141 @@ static yyconst flex_int32_t yy_meta[44] = 6, 1, 1 } ; -static yyconst flex_int16_t yy_base[572] = +static yyconst flex_int16_t yy_base[577] = { 0, - 0, 0, 43, 86, 128, 170, 699, 700, 60, 700, - 63, 0, 0, 43, 687, 53, 50, 47, 53, 78, - 47, 39, 87, 676, 43, 82, 54, 80, 117, 92, - 93, 112, 116, 664, 99, 123, 138, 149, 152, 0, - 141, 0, 700, 690, 156, 101, 700, 157, 160, 163, - 175, 180, 689, 0, 682, 176, 681, 700, 0, 177, - 655, 672, 153, 657, 652, 668, 101, 646, 161, 46, - 175, 178, 665, 663, 655, 654, 644, 642, 186, 648, - 640, 646, 653, 644, 168, 640, 644, 643, 645, 648, - 639, 700, 647, 636, 174, 625, 192, 648, 131, 647, - - 628, 198, 630, 623, 626, 624, 214, 219, 222, 226, - 0, 227, 0, 653, 652, 230, 0, 235, 700, 0, - 631, 630, 146, 629, 632, 618, 624, 620, 619, 700, - 612, 612, 615, 613, 607, 618, 614, 619, 700, 608, - 604, 617, 612, 595, 606, 599, 604, 611, 596, 606, - 602, 607, 593, 592, 604, 206, 595, 700, 598, 592, - 591, 579, 594, 582, 596, 582, 595, 583, 593, 593, - 590, 576, 573, 578, 586, 585, 584, 583, 567, 577, - 238, 563, 579, 565, 562, 580, 577, 570, 571, 573, - 562, 556, 554, 183, 572, 565, 557, 565, 548, 553, - - 562, 216, 562, 700, 560, 550, 558, 544, 540, 540, - 558, 540, 556, 541, 700, 540, 549, 538, 700, 545, - 544, 543, 529, 530, 538, 545, 540, 532, 528, 521, - 523, 520, 526, 519, 524, 700, 700, 533, 530, 532, - 528, 518, 530, 529, 517, 508, 525, 508, 520, 700, - 516, 514, 700, 504, 503, 218, 515, 516, 499, 508, - 700, 501, 514, 502, 494, 507, 491, 490, 491, 700, - 488, 498, 481, 487, 492, 485, 498, 489, 700, 485, - 490, 497, 475, 493, 477, 473, 470, 480, 486, 700, - 475, 193, 488, 700, 464, 475, 700, 466, 472, 466, - - 474, 700, 461, 466, 462, 478, 475, 700, 472, 461, - 466, 474, 453, 467, 457, 466, 456, 466, 456, 454, - 447, 700, 458, 700, 462, 458, 700, 436, 440, 454, - 457, 443, 441, 452, 449, 444, 449, 431, 437, 448, - 700, 444, 213, 446, 422, 700, 440, 432, 438, 422, - 440, 420, 418, 437, 433, 227, 424, 431, 410, 432, - 414, 700, 411, 425, 424, 415, 418, 700, 401, 424, - 412, 418, 415, 412, 408, 399, 700, 404, 408, 397, - 401, 413, 404, 411, 393, 405, 405, 388, 389, 221, - 700, 397, 218, 700, 386, 399, 389, 382, 386, 382, - - 391, 227, 396, 392, 391, 375, 385, 700, 700, 700, - 700, 377, 700, 389, 700, 375, 375, 386, 700, 368, - 700, 373, 378, 381, 363, 368, 366, 700, 700, 372, - 377, 374, 373, 359, 369, 700, 366, 700, 355, 369, - 352, 348, 352, 354, 367, 349, 353, 700, 353, 344, - 360, 700, 357, 341, 346, 354, 340, 350, 355, 350, - 335, 339, 350, 331, 335, 335, 332, 338, 338, 332, - 700, 700, 326, 324, 341, 321, 324, 334, 700, 700, - 320, 700, 700, 329, 317, 316, 700, 700, 330, 309, - 312, 700, 322, 321, 317, 325, 307, 325, 305, 319, - - 700, 700, 319, 307, 700, 307, 311, 700, 700, 700, - 304, 700, 309, 316, 294, 700, 310, 306, 299, 700, - 700, 235, 298, 304, 308, 286, 305, 288, 301, 700, - 700, 298, 295, 295, 280, 273, 266, 263, 262, 700, - 700, 268, 257, 260, 700, 266, 249, 700, 700, 245, - 225, 224, 700, 237, 166, 700, 700, 155, 700, 700, - 700, 267, 273, 276, 282, 113, 288, 294, 300, 306, - 312 + 0, 0, 43, 86, 128, 170, 704, 705, 60, 705, + 63, 0, 0, 43, 692, 53, 50, 47, 53, 78, + 47, 39, 87, 681, 43, 82, 54, 80, 117, 92, + 93, 112, 116, 669, 99, 123, 138, 149, 152, 0, + 141, 0, 705, 695, 156, 101, 705, 157, 160, 163, + 175, 180, 694, 0, 687, 176, 686, 705, 0, 177, + 660, 677, 153, 662, 657, 673, 101, 651, 161, 46, + 175, 178, 670, 668, 660, 659, 649, 647, 186, 653, + 645, 651, 658, 649, 168, 645, 649, 648, 650, 653, + 644, 705, 652, 641, 174, 630, 192, 653, 131, 652, + + 633, 198, 635, 628, 631, 629, 214, 219, 222, 226, + 0, 227, 0, 658, 657, 230, 0, 235, 705, 0, + 636, 635, 146, 634, 637, 623, 629, 625, 624, 705, + 617, 617, 620, 618, 612, 623, 619, 624, 705, 613, + 609, 622, 617, 600, 611, 604, 609, 616, 601, 611, + 607, 612, 598, 597, 609, 206, 600, 705, 603, 597, + 596, 584, 599, 587, 601, 587, 600, 588, 598, 598, + 595, 581, 578, 583, 591, 590, 589, 588, 572, 582, + 238, 568, 584, 570, 567, 585, 582, 575, 576, 578, + 567, 561, 559, 183, 577, 570, 562, 570, 553, 558, + + 567, 216, 567, 705, 565, 555, 563, 549, 545, 545, + 563, 545, 561, 546, 705, 545, 554, 543, 705, 550, + 549, 548, 534, 535, 543, 550, 545, 537, 533, 526, + 528, 525, 531, 524, 529, 705, 705, 538, 535, 537, + 533, 523, 535, 534, 522, 513, 530, 513, 525, 705, + 521, 519, 705, 509, 508, 221, 520, 521, 504, 513, + 705, 506, 519, 507, 499, 512, 496, 495, 496, 705, + 493, 503, 486, 492, 497, 490, 503, 494, 705, 490, + 495, 502, 480, 498, 482, 478, 475, 485, 491, 705, + 480, 193, 493, 705, 469, 480, 705, 471, 477, 471, + + 479, 705, 466, 471, 467, 483, 480, 705, 477, 476, + 465, 470, 478, 457, 471, 461, 470, 460, 470, 460, + 458, 451, 705, 462, 705, 466, 462, 705, 440, 444, + 458, 461, 447, 445, 456, 453, 448, 453, 435, 441, + 452, 705, 448, 221, 450, 426, 705, 444, 436, 442, + 426, 444, 424, 422, 441, 437, 227, 428, 417, 434, + 413, 435, 417, 705, 414, 428, 427, 418, 421, 705, + 404, 427, 415, 421, 418, 415, 411, 402, 705, 407, + 411, 400, 404, 416, 407, 414, 396, 408, 408, 391, + 392, 227, 705, 400, 219, 705, 389, 402, 392, 385, + + 389, 385, 394, 231, 399, 395, 394, 393, 377, 387, + 705, 705, 705, 705, 379, 705, 391, 705, 377, 377, + 388, 705, 370, 705, 375, 380, 383, 365, 370, 368, + 705, 705, 374, 379, 376, 375, 361, 371, 705, 368, + 705, 357, 371, 354, 350, 354, 356, 369, 351, 355, + 355, 705, 354, 345, 361, 705, 358, 342, 347, 355, + 341, 351, 356, 351, 336, 340, 351, 332, 336, 336, + 333, 339, 339, 333, 705, 705, 327, 325, 342, 322, + 325, 335, 705, 705, 705, 321, 705, 705, 330, 318, + 317, 705, 705, 331, 310, 313, 705, 323, 322, 318, + + 326, 308, 326, 306, 320, 705, 705, 320, 308, 705, + 308, 312, 705, 705, 705, 305, 705, 310, 317, 295, + 705, 311, 307, 300, 705, 705, 236, 299, 305, 309, + 287, 306, 289, 302, 705, 705, 299, 296, 296, 281, + 274, 267, 264, 263, 705, 705, 269, 258, 261, 705, + 267, 250, 705, 705, 245, 225, 222, 705, 212, 166, + 705, 705, 155, 705, 705, 705, 268, 274, 277, 283, + 113, 289, 295, 301, 307, 313 } ; -static yyconst flex_int16_t yy_def[572] = +static yyconst flex_int16_t yy_def[577] = { 0, - 561, 1, 562, 562, 563, 563, 561, 561, 561, 561, - 561, 564, 565, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 566, - 561, 567, 561, 568, 569, 567, 561, 567, 567, 561, - 561, 561, 564, 565, 561, 561, 561, 561, 570, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 566, 561, 567, 568, 568, 569, 567, 571, 561, 570, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 571, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561 + 566, 1, 567, 567, 568, 568, 566, 566, 566, 566, + 566, 569, 570, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 571, + 566, 572, 566, 573, 574, 572, 566, 572, 572, 566, + 566, 566, 569, 570, 566, 566, 566, 566, 575, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 571, 566, 572, 573, 573, 574, 572, 576, 566, 575, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 576, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 0, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566 } ; -static yyconst flex_int16_t yy_nxt[744] = +static yyconst flex_int16_t yy_nxt[749] = { 0, 8, 9, 10, 11, 12, 13, 8, 14, 15, 16, 17, 8, 8, 8, 8, 8, 18, 19, 20, 21, @@ -620,72 +620,72 @@ static yyconst flex_int16_t yy_nxt[744] = 109, 170, 109, 109, 171, 109, 103, 54, 107, 54, 107, 108, 110, 108, 50, 110, 50, 184, 54, 48, 49, 9, 43, 11, 44, 45, 107, 123, 107, 46, - 185, 108, 47, 108, 55, 55, 56, 60, 124, 560, + 185, 108, 47, 108, 55, 55, 56, 60, 124, 565, 51, 52, 135, 51, 52, 131, 136, 132, 137, 138, - 559, 162, 145, 152, 51, 52, 146, 153, 163, 343, + 564, 162, 145, 152, 51, 52, 146, 153, 163, 344, 165, 48, 49, 166, 174, 107, 253, 107, 175, 254, - 108, 167, 108, 109, 344, 109, 168, 112, 112, 112, - 112, 54, 387, 54, 176, 110, 120, 216, 120, 120, - 433, 120, 54, 217, 262, 263, 310, 120, 388, 311, - 120, 400, 436, 437, 533, 445, 434, 558, 401, 557, - 556, 402, 446, 51, 52, 555, 534, 40, 40, 40, - 40, 40, 40, 42, 42, 42, 42, 42, 42, 53, - 53, 53, 54, 54, 554, 54, 54, 54, 113, 553, - 552, 551, 113, 113, 114, 550, 549, 548, 114, 114, - - 116, 116, 547, 116, 116, 116, 120, 120, 546, 120, - 120, 120, 181, 181, 545, 181, 181, 181, 544, 543, - 542, 541, 540, 539, 538, 537, 536, 535, 532, 531, - 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, - 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, - 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, - 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, - 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, - 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, - 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, - - 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, - 450, 449, 448, 447, 444, 443, 442, 441, 440, 439, - 438, 435, 432, 431, 430, 429, 428, 427, 426, 425, - 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, - 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, - 404, 403, 399, 398, 397, 396, 395, 394, 393, 392, - 391, 390, 389, 386, 385, 384, 383, 382, 381, 380, - 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, - 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, - 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, - - 349, 348, 347, 346, 345, 342, 341, 340, 339, 338, - 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, - 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, - 317, 316, 315, 314, 313, 312, 309, 308, 307, 306, - 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, - 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, - 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, - 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, - 265, 264, 261, 260, 259, 258, 257, 256, 255, 252, - 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, - - 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, - 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, - 221, 220, 219, 218, 215, 214, 213, 212, 211, 210, - 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, - 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, - 189, 188, 187, 186, 183, 182, 115, 115, 180, 179, - 178, 177, 173, 172, 169, 164, 161, 160, 159, 158, - 157, 156, 155, 154, 151, 150, 149, 148, 147, 144, - 143, 142, 141, 140, 139, 130, 127, 126, 125, 122, - 121, 57, 57, 119, 115, 104, 80, 57, 561, 7, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561 + 108, 167, 108, 109, 345, 109, 168, 112, 112, 112, + 112, 54, 563, 54, 176, 110, 120, 216, 120, 120, + 389, 120, 54, 217, 262, 263, 436, 120, 310, 311, + 120, 402, 312, 439, 440, 538, 390, 562, 403, 448, + 561, 404, 437, 51, 52, 560, 449, 539, 40, 40, + 40, 40, 40, 40, 42, 42, 42, 42, 42, 42, + 53, 53, 53, 54, 54, 559, 54, 54, 54, 113, + 558, 557, 556, 113, 113, 114, 555, 554, 553, 114, + + 114, 116, 116, 552, 116, 116, 116, 120, 120, 551, + 120, 120, 120, 181, 181, 550, 181, 181, 181, 549, + 548, 547, 546, 545, 544, 543, 542, 541, 540, 537, + 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, + 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, + 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, + 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, + 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, + 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, + 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, + + 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, + 456, 455, 454, 453, 452, 451, 450, 447, 446, 445, + 444, 443, 442, 441, 438, 435, 434, 433, 432, 431, + 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, + 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, + 410, 409, 408, 407, 406, 405, 401, 400, 399, 398, + 397, 396, 395, 394, 393, 392, 391, 388, 387, 386, + 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, + 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, + 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, + + 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, + 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, + 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, + 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, + 313, 309, 308, 307, 306, 305, 304, 303, 302, 301, + 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, + 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, + 270, 269, 268, 267, 266, 265, 264, 261, 260, 259, + 258, 257, 256, 255, 252, 251, 250, 249, 248, 247, + + 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, + 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, + 226, 225, 224, 223, 222, 221, 220, 219, 218, 215, + 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, + 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, + 194, 193, 192, 191, 190, 189, 188, 187, 186, 183, + 182, 115, 115, 180, 179, 178, 177, 173, 172, 169, + 164, 161, 160, 159, 158, 157, 156, 155, 154, 151, + 150, 149, 148, 147, 144, 143, 142, 141, 140, 139, + 130, 127, 126, 125, 122, 121, 57, 57, 119, 115, + + 104, 80, 57, 566, 7, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566 } ; -static yyconst flex_int16_t yy_chk[744] = +static yyconst flex_int16_t yy_chk[749] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -699,76 +699,76 @@ static yyconst flex_int16_t yy_chk[744] = 4, 4, 4, 4, 20, 4, 28, 4, 4, 4, 4, 9, 9, 23, 11, 11, 26, 46, 20, 31, - 46, 23, 26, 31, 23, 30, 28, 23, 566, 35, + 46, 23, 26, 31, 23, 30, 28, 23, 571, 35, 23, 67, 30, 35, 36, 67, 36, 4, 4, 5, 5, 5, 5, 5, 29, 32, 33, 5, 29, 37, 5, 37, 41, 32, 41, 29, 29, 32, 29, 33, 38, 99, 38, 39, 99, 39, 33, 45, 48, 45, 48, 49, 38, 49, 50, 39, 50, 123, 45, 5, 5, 6, 6, 6, 6, 6, 51, 63, 51, 6, - 123, 52, 6, 52, 56, 60, 56, 60, 63, 558, + 123, 52, 6, 52, 56, 60, 56, 60, 63, 563, 38, 38, 71, 39, 39, 69, 71, 69, 72, 72, - 555, 95, 79, 85, 50, 50, 79, 85, 95, 292, + 560, 95, 79, 85, 50, 50, 79, 85, 95, 292, 97, 6, 6, 97, 102, 107, 194, 107, 102, 194, 108, 97, 108, 109, 292, 109, 97, 110, 112, 110, - 112, 116, 343, 116, 102, 109, 118, 156, 118, 181, - 390, 181, 116, 156, 202, 202, 256, 118, 343, 256, - 181, 356, 393, 393, 522, 402, 390, 554, 356, 552, - 551, 356, 402, 109, 109, 550, 522, 562, 562, 562, - 562, 562, 562, 563, 563, 563, 563, 563, 563, 564, - 564, 564, 565, 565, 547, 565, 565, 565, 567, 546, - 544, 543, 567, 567, 568, 542, 539, 538, 568, 568, - - 569, 569, 537, 569, 569, 569, 570, 570, 536, 570, - 570, 570, 571, 571, 535, 571, 571, 571, 534, 533, - 532, 529, 528, 527, 526, 525, 524, 523, 519, 518, - 517, 515, 514, 513, 511, 507, 506, 504, 503, 500, - 499, 498, 497, 496, 495, 494, 493, 491, 490, 489, - 486, 485, 484, 481, 478, 477, 476, 475, 474, 473, - 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, - 460, 459, 458, 457, 456, 455, 454, 453, 451, 450, - 449, 447, 446, 445, 444, 443, 442, 441, 440, 439, - 437, 435, 434, 433, 432, 431, 430, 427, 426, 425, - - 424, 423, 422, 420, 418, 417, 416, 414, 412, 407, - 406, 405, 404, 403, 401, 400, 399, 398, 397, 396, - 395, 392, 389, 388, 387, 386, 385, 384, 383, 382, - 381, 380, 379, 378, 376, 375, 374, 373, 372, 371, - 370, 369, 367, 366, 365, 364, 363, 361, 360, 359, - 358, 357, 355, 354, 353, 352, 351, 350, 349, 348, - 347, 345, 344, 342, 340, 339, 338, 337, 336, 335, - 334, 333, 332, 331, 330, 329, 328, 326, 325, 323, - 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, - 311, 310, 309, 307, 306, 305, 304, 303, 301, 300, - - 299, 298, 296, 295, 293, 291, 289, 288, 287, 286, - 285, 284, 283, 282, 281, 280, 278, 277, 276, 275, - 274, 273, 272, 271, 269, 268, 267, 266, 265, 264, - 263, 262, 260, 259, 258, 257, 255, 254, 252, 251, - 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, - 239, 238, 235, 234, 233, 232, 231, 230, 229, 228, - 227, 226, 225, 224, 223, 222, 221, 220, 218, 217, - 216, 214, 213, 212, 211, 210, 209, 208, 207, 206, - 205, 203, 201, 200, 199, 198, 197, 196, 195, 193, - 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, - - 182, 180, 179, 178, 177, 176, 175, 174, 173, 172, - 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, - 161, 160, 159, 157, 155, 154, 153, 152, 151, 150, - 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, - 138, 137, 136, 135, 134, 133, 132, 131, 129, 128, - 127, 126, 125, 124, 122, 121, 115, 114, 106, 105, - 104, 103, 101, 100, 98, 96, 94, 93, 91, 90, - 89, 88, 87, 86, 84, 83, 82, 81, 80, 78, - 77, 76, 75, 74, 73, 68, 66, 65, 64, 62, - 61, 57, 55, 53, 44, 34, 24, 15, 7, 561, - - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561 + 112, 116, 559, 116, 102, 109, 118, 156, 118, 181, + 344, 181, 116, 156, 202, 202, 392, 118, 256, 256, + 181, 357, 256, 395, 395, 527, 344, 557, 357, 404, + 556, 357, 392, 109, 109, 555, 404, 527, 567, 567, + 567, 567, 567, 567, 568, 568, 568, 568, 568, 568, + 569, 569, 569, 570, 570, 552, 570, 570, 570, 572, + 551, 549, 548, 572, 572, 573, 547, 544, 543, 573, + + 573, 574, 574, 542, 574, 574, 574, 575, 575, 541, + 575, 575, 575, 576, 576, 540, 576, 576, 576, 539, + 538, 537, 534, 533, 532, 531, 530, 529, 528, 524, + 523, 522, 520, 519, 518, 516, 512, 511, 509, 508, + 505, 504, 503, 502, 501, 500, 499, 498, 496, 495, + 494, 491, 490, 489, 486, 482, 481, 480, 479, 478, + 477, 474, 473, 472, 471, 470, 469, 468, 467, 466, + 465, 464, 463, 462, 461, 460, 459, 458, 457, 455, + 454, 453, 451, 450, 449, 448, 447, 446, 445, 444, + 443, 442, 440, 438, 437, 436, 435, 434, 433, 430, + + 429, 428, 427, 426, 425, 423, 421, 420, 419, 417, + 415, 410, 409, 408, 407, 406, 405, 403, 402, 401, + 400, 399, 398, 397, 394, 391, 390, 389, 388, 387, + 386, 385, 384, 383, 382, 381, 380, 378, 377, 376, + 375, 374, 373, 372, 371, 369, 368, 367, 366, 365, + 363, 362, 361, 360, 359, 358, 356, 355, 354, 353, + 352, 351, 350, 349, 348, 346, 345, 343, 341, 340, + 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, + 329, 327, 326, 324, 322, 321, 320, 319, 318, 317, + 316, 315, 314, 313, 312, 311, 310, 309, 307, 306, + + 305, 304, 303, 301, 300, 299, 298, 296, 295, 293, + 291, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 278, 277, 276, 275, 274, 273, 272, 271, 269, + 268, 267, 266, 265, 264, 263, 262, 260, 259, 258, + 257, 255, 254, 252, 251, 249, 248, 247, 246, 245, + 244, 243, 242, 241, 240, 239, 238, 235, 234, 233, + 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, + 222, 221, 220, 218, 217, 216, 214, 213, 212, 211, + 210, 209, 208, 207, 206, 205, 203, 201, 200, 199, + 198, 197, 196, 195, 193, 192, 191, 190, 189, 188, + + 187, 186, 185, 184, 183, 182, 180, 179, 178, 177, + 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, + 166, 165, 164, 163, 162, 161, 160, 159, 157, 155, + 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, + 144, 143, 142, 141, 140, 138, 137, 136, 135, 134, + 133, 132, 131, 129, 128, 127, 126, 125, 124, 122, + 121, 115, 114, 106, 105, 104, 103, 101, 100, 98, + 96, 94, 93, 91, 90, 89, 88, 87, 86, 84, + 83, 82, 81, 80, 78, 77, 76, 75, 74, 73, + 68, 66, 65, 64, 62, 61, 57, 55, 53, 44, + + 34, 24, 15, 7, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, + 566, 566, 566, 566, 566, 566, 566, 566 } ; static yy_state_type yy_last_accepting_state; @@ -1035,13 +1035,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 562 ) + if ( yy_current_state >= 567 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 561 ); + while ( yy_current_state != 566 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1132,152 +1132,152 @@ YY_RULE_SETUP case 11: YY_RULE_SETUP #line 87 "src/cfglexer.ll" -{ return KW_RAYTRACING; } +{ return KW_DEBUGLEVEL; } YY_BREAK case 12: YY_RULE_SETUP -#line 90 "src/cfglexer.ll" -{ return KW_RESOLUTION; } +#line 88 "src/cfglexer.ll" +{ return KW_RAYTRACING; } YY_BREAK case 13: YY_RULE_SETUP #line 91 "src/cfglexer.ll" -{ return KW_ANTIALIAS; } +{ return KW_RESOLUTION; } YY_BREAK case 14: YY_RULE_SETUP #line 92 "src/cfglexer.ll" -{ return KW_EYEPOINT; } +{ return KW_ANTIALIAS; } YY_BREAK case 15: YY_RULE_SETUP #line 93 "src/cfglexer.ll" -{ return KW_LOOKAT ; } +{ return KW_EYEPOINT; } YY_BREAK case 16: YY_RULE_SETUP #line 94 "src/cfglexer.ll" -{ return KW_UPVEC ; } +{ return KW_LOOKAT ; } YY_BREAK case 17: YY_RULE_SETUP #line 95 "src/cfglexer.ll" -{ return KW_FOVY; } +{ return KW_UPVEC ; } YY_BREAK case 18: YY_RULE_SETUP #line 96 "src/cfglexer.ll" -{ return KW_ASPECT ; } +{ return KW_FOVY; } YY_BREAK case 19: YY_RULE_SETUP #line 97 "src/cfglexer.ll" -{ return KW_AMBIENCE; } +{ return KW_ASPECT ; } YY_BREAK case 20: YY_RULE_SETUP #line 98 "src/cfglexer.ll" -{ return KW_BACKGROUND; } +{ return KW_AMBIENCE; } YY_BREAK case 21: YY_RULE_SETUP #line 99 "src/cfglexer.ll" -{ return KW_ANISTART; } +{ return KW_BACKGROUND; } YY_BREAK case 22: YY_RULE_SETUP #line 100 "src/cfglexer.ll" -{ return KW_ANIFRAMES; } +{ return KW_ANISTART; } YY_BREAK case 23: YY_RULE_SETUP #line 101 "src/cfglexer.ll" -{ return KW_ANIFRAMETIME; } +{ return KW_ANIFRAMES; } YY_BREAK case 24: YY_RULE_SETUP #line 102 "src/cfglexer.ll" -{ return KW_FRAMESKIP; } +{ return KW_ANIFRAMETIME; } YY_BREAK case 25: YY_RULE_SETUP #line 103 "src/cfglexer.ll" -{ return KW_FILENAME; } +{ return KW_FRAMESKIP; } YY_BREAK case 26: YY_RULE_SETUP #line 104 "src/cfglexer.ll" -{ return KW_PMCAUSTICS; } +{ return KW_FILENAME; } YY_BREAK case 27: YY_RULE_SETUP #line 105 "src/cfglexer.ll" -{ return KW_CAUSTICDIST; } +{ return KW_PMCAUSTICS; } YY_BREAK case 28: YY_RULE_SETUP #line 106 "src/cfglexer.ll" -{ return KW_CAUSTICPHOT; } +{ return KW_CAUSTICDIST; } YY_BREAK case 29: YY_RULE_SETUP #line 107 "src/cfglexer.ll" -{ return KW_SHADOWMAPBIAS; } +{ return KW_CAUSTICPHOT; } YY_BREAK case 30: YY_RULE_SETUP #line 108 "src/cfglexer.ll" -{ return KW_MAXRAYDEPTH; } +{ return KW_SHADOWMAPBIAS; } YY_BREAK case 31: YY_RULE_SETUP #line 109 "src/cfglexer.ll" -{ return KW_TREEMAXDEPTH; } +{ return KW_MAXRAYDEPTH; } YY_BREAK case 32: YY_RULE_SETUP #line 110 "src/cfglexer.ll" -{ return KW_TREEMAXTRIANGLES; } +{ return KW_TREEMAXDEPTH; } YY_BREAK case 33: YY_RULE_SETUP #line 111 "src/cfglexer.ll" -{ return KW_DEBUGPIXEL; } +{ return KW_TREEMAXTRIANGLES; } YY_BREAK case 34: YY_RULE_SETUP #line 112 "src/cfglexer.ll" -{ return KW_TESTMODE; } +{ return KW_DEBUGPIXEL; } YY_BREAK case 35: YY_RULE_SETUP #line 113 "src/cfglexer.ll" -{ return KW_OPENGLATTR; } +{ return KW_TESTMODE; } YY_BREAK case 36: YY_RULE_SETUP #line 114 "src/cfglexer.ll" -{ return KW_BLENDERATTR; } +{ return KW_OPENGLATTR; } YY_BREAK case 37: YY_RULE_SETUP -#line 116 "src/cfglexer.ll" -{ return KW_OBJATTR; /* assign attr to obj */ } +#line 115 "src/cfglexer.ll" +{ return KW_BLENDERATTR; } YY_BREAK case 38: YY_RULE_SETUP #line 117 "src/cfglexer.ll" -{ BEGIN(ATTR); return KW_ATTRIBUTE; /* global attr list */ } +{ return KW_OBJATTR; /* assign attr to obj */ } YY_BREAK case 39: YY_RULE_SETUP #line 118 "src/cfglexer.ll" -{ BEGIN(ATTR); return KW_DEFINEATTR; /* obj defines new attrs */ } +{ BEGIN(ATTR); return KW_ATTRIBUTE; /* global attr list */ } YY_BREAK case 40: YY_RULE_SETUP #line 119 "src/cfglexer.ll" -{ BEGIN(ATTR); return KW_DEFINEATTR; } +{ BEGIN(ATTR); return KW_DEFINEATTR; /* obj defines new attrs */ } YY_BREAK case 41: YY_RULE_SETUP @@ -1286,58 +1286,58 @@ YY_RULE_SETUP YY_BREAK case 42: YY_RULE_SETUP -#line 122 "src/cfglexer.ll" -{ return KW_GEOMETRY; } +#line 121 "src/cfglexer.ll" +{ BEGIN(ATTR); return KW_DEFINEATTR; } YY_BREAK case 43: YY_RULE_SETUP #line 123 "src/cfglexer.ll" -{ return KW_TYPE; } +{ return KW_GEOMETRY; } YY_BREAK case 44: YY_RULE_SETUP #line 124 "src/cfglexer.ll" -{ return KW_GEOTYPE_BOX; } +{ return KW_TYPE; } YY_BREAK case 45: YY_RULE_SETUP #line 125 "src/cfglexer.ll" -{ return KW_GEOTYPE_SPHERE; } +{ return KW_GEOTYPE_BOX; } YY_BREAK case 46: YY_RULE_SETUP #line 126 "src/cfglexer.ll" -{ return KW_GEOTYPE_OBJMODEL; } +{ return KW_GEOTYPE_SPHERE; } YY_BREAK case 47: YY_RULE_SETUP #line 127 "src/cfglexer.ll" -{ return KW_CASTSHADOWS; } +{ return KW_GEOTYPE_OBJMODEL; } YY_BREAK case 48: YY_RULE_SETUP #line 128 "src/cfglexer.ll" -{ return KW_RECEIVESHADOWS ; } +{ return KW_CASTSHADOWS; } YY_BREAK case 49: YY_RULE_SETUP #line 129 "src/cfglexer.ll" -{ return KW_VISIBLE; } +{ return KW_RECEIVESHADOWS ; } YY_BREAK case 50: YY_RULE_SETUP #line 130 "src/cfglexer.ll" -{ return KW_BOX_START; } +{ return KW_VISIBLE; } YY_BREAK case 51: YY_RULE_SETUP #line 131 "src/cfglexer.ll" -{ return KW_BOX_END; } +{ return KW_BOX_START; } YY_BREAK case 52: YY_RULE_SETUP #line 132 "src/cfglexer.ll" -{ return KW_POLY ; } +{ return KW_BOX_END; } YY_BREAK case 53: YY_RULE_SETUP @@ -1347,97 +1347,97 @@ YY_RULE_SETUP case 54: YY_RULE_SETUP #line 134 "src/cfglexer.ll" -{ return KW_NUMVERTICES; } +{ return KW_POLY ; } YY_BREAK case 55: YY_RULE_SETUP #line 135 "src/cfglexer.ll" -{ return KW_VERTEX; } +{ return KW_NUMVERTICES; } YY_BREAK case 56: YY_RULE_SETUP #line 136 "src/cfglexer.ll" -{ return KW_NUMPOLYGONS; } +{ return KW_VERTEX; } YY_BREAK case 57: YY_RULE_SETUP #line 137 "src/cfglexer.ll" -{ return KW_ISOSURF; } +{ return KW_NUMPOLYGONS; } YY_BREAK case 58: YY_RULE_SETUP #line 138 "src/cfglexer.ll" -{ return KW_FILEMODE; } +{ return KW_ISOSURF; } YY_BREAK case 59: YY_RULE_SETUP #line 139 "src/cfglexer.ll" -{ return KW_INVERT; } +{ return KW_FILEMODE; } YY_BREAK case 60: YY_RULE_SETUP -#line 141 "src/cfglexer.ll" -{ return KW_MATERIAL; } +#line 140 "src/cfglexer.ll" +{ return KW_INVERT; } YY_BREAK case 61: YY_RULE_SETUP #line 142 "src/cfglexer.ll" -{ return KW_MATTYPE_PHONG; } +{ return KW_MATERIAL; } YY_BREAK case 62: YY_RULE_SETUP #line 143 "src/cfglexer.ll" -{ return KW_MATTYPE_BLINN; } +{ return KW_MATTYPE_PHONG; } YY_BREAK case 63: YY_RULE_SETUP #line 144 "src/cfglexer.ll" -{ return KW_NAME; } +{ return KW_MATTYPE_BLINN; } YY_BREAK case 64: YY_RULE_SETUP #line 145 "src/cfglexer.ll" -{ return KW_AMBIENT; } +{ return KW_NAME; } YY_BREAK case 65: YY_RULE_SETUP #line 146 "src/cfglexer.ll" -{ return KW_DIFFUSE; } +{ return KW_AMBIENT; } YY_BREAK case 66: YY_RULE_SETUP #line 147 "src/cfglexer.ll" -{ return KW_SPECULAR; } +{ return KW_DIFFUSE; } YY_BREAK case 67: YY_RULE_SETUP #line 148 "src/cfglexer.ll" -{ return KW_MIRROR; } +{ return KW_SPECULAR; } YY_BREAK case 68: YY_RULE_SETUP #line 149 "src/cfglexer.ll" -{ return KW_TRANSPARENCE; } +{ return KW_MIRROR; } YY_BREAK case 69: YY_RULE_SETUP #line 150 "src/cfglexer.ll" -{ return KW_REFRACINDEX; } +{ return KW_TRANSPARENCE; } YY_BREAK case 70: YY_RULE_SETUP #line 151 "src/cfglexer.ll" -{ return KW_TRANSADDITIVE; } +{ return KW_REFRACINDEX; } YY_BREAK case 71: YY_RULE_SETUP #line 152 "src/cfglexer.ll" -{ return KW_TRANSATTCOL; } +{ return KW_TRANSADDITIVE; } YY_BREAK case 72: YY_RULE_SETUP #line 153 "src/cfglexer.ll" -{ return KW_FRESNEL; } +{ return KW_TRANSATTCOL; } YY_BREAK case 73: YY_RULE_SETUP @@ -1446,23 +1446,23 @@ YY_RULE_SETUP YY_BREAK case 74: YY_RULE_SETUP -#line 156 "src/cfglexer.ll" -{ return KW_LIGHT; } +#line 155 "src/cfglexer.ll" +{ return KW_FRESNEL; } YY_BREAK case 75: YY_RULE_SETUP #line 157 "src/cfglexer.ll" -{ return KW_LIGHT_OMNI; } +{ return KW_LIGHT; } YY_BREAK case 76: YY_RULE_SETUP #line 158 "src/cfglexer.ll" -{ return KW_ACTIVE; } +{ return KW_LIGHT_OMNI; } YY_BREAK case 77: YY_RULE_SETUP #line 159 "src/cfglexer.ll" -{ return KW_COLOUR; } +{ return KW_ACTIVE; } YY_BREAK case 78: YY_RULE_SETUP @@ -1472,65 +1472,70 @@ YY_RULE_SETUP case 79: YY_RULE_SETUP #line 161 "src/cfglexer.ll" -{ return KW_POSITION; } +{ return KW_COLOUR; } YY_BREAK case 80: YY_RULE_SETUP #line 162 "src/cfglexer.ll" -{ return KW_CAUSTICPHOTONS; } +{ return KW_POSITION; } YY_BREAK case 81: YY_RULE_SETUP #line 163 "src/cfglexer.ll" -{ return KW_CAUSTICSTRENGTH; } +{ return KW_CAUSTICPHOTONS; } YY_BREAK case 82: YY_RULE_SETUP #line 164 "src/cfglexer.ll" -{ return KW_SHADOWMAP; } +{ return KW_CAUSTICSTRENGTH; } YY_BREAK case 83: YY_RULE_SETUP #line 165 "src/cfglexer.ll" -{ return KW_CAUSTICSMAP; } +{ return KW_SHADOWMAP; } YY_BREAK case 84: YY_RULE_SETUP -#line 167 "src/cfglexer.ll" -{ yy_lval.intValue = 1; return DT_INTEGER; } +#line 166 "src/cfglexer.ll" +{ return KW_CAUSTICSMAP; } YY_BREAK case 85: YY_RULE_SETUP #line 168 "src/cfglexer.ll" -{ yy_lval.intValue = 0; return DT_INTEGER; } +{ yy_lval.intValue = 1; return DT_INTEGER; } YY_BREAK case 86: YY_RULE_SETUP #line 169 "src/cfglexer.ll" -{ yy_lval.intValue = 1; return DT_INTEGER; } +{ yy_lval.intValue = 0; return DT_INTEGER; } YY_BREAK case 87: YY_RULE_SETUP #line 170 "src/cfglexer.ll" -{ yy_lval.intValue = 0; return DT_INTEGER; } +{ yy_lval.intValue = 1; return DT_INTEGER; } YY_BREAK case 88: YY_RULE_SETUP -#line 173 "src/cfglexer.ll" +#line 171 "src/cfglexer.ll" +{ yy_lval.intValue = 0; return DT_INTEGER; } + YY_BREAK +case 89: +YY_RULE_SETUP +#line 174 "src/cfglexer.ll" { // integer number yy_lval.intValue = atoi( yy_text ); return DT_INTEGER; } YY_BREAK -case 89: +case 90: YY_RULE_SETUP -#line 177 "src/cfglexer.ll" +#line 178 "src/cfglexer.ll" { // floating point number yy_lval.floatValue = atof( yy_text ); return DT_FLOAT; } YY_BREAK -case 90: +case 91: YY_RULE_SETUP -#line 181 "src/cfglexer.ll" +#line 182 "src/cfglexer.ll" { /* normal character strings, now also for paths/filenames */ strncpy( charBuffer, yy_text, CHAR_BUFFER_SIZE-2 ); /* get rid of " " */ @@ -1539,11 +1544,6 @@ YY_RULE_SETUP yy_lval.charValue = charBuffer; return DT_STRING; } YY_BREAK -case 91: -YY_RULE_SETUP -#line 189 "src/cfglexer.ll" -{ /* one line comment */ } - YY_BREAK case 92: YY_RULE_SETUP #line 190 "src/cfglexer.ll" @@ -1552,6 +1552,11 @@ YY_RULE_SETUP case 93: YY_RULE_SETUP #line 191 "src/cfglexer.ll" +{ /* one line comment */ } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 192 "src/cfglexer.ll" { /* multiline comment */ register int c; for ( ; ; ) { @@ -1574,29 +1579,29 @@ YY_RULE_SETUP } /* multline comment done */ } YY_BREAK -case 94: -/* rule 94 can match eol */ +case 95: +/* rule 95 can match eol */ YY_RULE_SETUP -#line 215 "src/cfglexer.ll" +#line 216 "src/cfglexer.ll" { // count line numbers lineCount++; } YY_BREAK -case 95: +case 96: YY_RULE_SETUP -#line 218 "src/cfglexer.ll" +#line 219 "src/cfglexer.ll" { /* do nothing by default... */ } YY_BREAK -case 96: +case 97: YY_RULE_SETUP -#line 220 "src/cfglexer.ll" +#line 221 "src/cfglexer.ll" { /*errorOut( "cfgLexer, Line "<" +#line 1605 "" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(ATTR): case YY_STATE_EOF(ATTRVALUE): @@ -1883,7 +1888,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 562 ) + if ( yy_current_state >= 567 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1911,11 +1916,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 562 ) + if ( yy_current_state >= 567 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 561); + yy_is_jam = (yy_current_state == 566); return yy_is_jam ? 0 : yy_current_state; } @@ -2561,4 +2566,4 @@ void yy_free (void * ptr ) #undef YY_DECL_IS_OURS #undef YY_DECL #endif -#line 223 "src/cfglexer.ll" +#line 224 "src/cfglexer.ll" diff --git a/intern/elbeem/intern/cfgparser.cpp b/intern/elbeem/intern/cfgparser.cpp index d5f0be48c12..8984fce107c 100644 --- a/intern/elbeem/intern/cfgparser.cpp +++ b/intern/elbeem/intern/cfgparser.cpp @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 1.875d. */ +/* A Bison parser, made by GNU Bison 2.0. */ /* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @@ -45,8 +45,7 @@ /* Using locations. */ #define YYLSP_NEEDED 0 -/* If NAME_PREFIX is specified substitute the variables and functions - names. */ +/* Substitute the variable and function names. */ #define yyparse yy_parse #define yylex yy_lex #define yyerror yy_error @@ -71,99 +70,100 @@ KW_COMPARELBM = 264, KW_ANIFRAMETIME = 265, KW_DEBUGMODE = 266, - KW_P_RELAXTIME = 267, - KW_P_REYNOLDS = 268, - KW_P_VISCOSITY = 269, - KW_P_SOUNDSPEED = 270, - KW_P_DOMAINSIZE = 271, - KW_P_FORCE = 272, - KW_P_TIMELENGTH = 273, - KW_P_STEPTIME = 274, - KW_P_TIMEFACTOR = 275, - KW_P_ANIFRAMETIME = 276, - KW_P_ANISTART = 277, - KW_P_SURFACETENSION = 278, - KW_P_ACTIVATE = 279, - KW_P_DEACTIVATE = 280, - KW_P_DENSITY = 281, - KW_P_CELLSIZE = 282, - KW_P_GSTAR = 283, - KW_PFSPATH = 284, - KW_PARTLINELENGTH = 285, - KW_PARTICLES = 286, - KW_FRAMESPERSEC = 287, - KW_RAYTRACING = 288, - KW_PAROPEN = 289, - KW_PARCLOSE = 290, - KW_FILENAME = 291, - KW_PMCAUSTICS = 292, - KW_MAXRAYDEPTH = 293, - KW_CAUSTICDIST = 294, - KW_CAUSTICPHOT = 295, - KW_SHADOWMAPBIAS = 296, - KW_TREEMAXDEPTH = 297, - KW_TREEMAXTRIANGLES = 298, - KW_RESOLUTION = 299, - KW_ANTIALIAS = 300, - KW_EYEPOINT = 301, - KW_ANISTART = 302, - KW_ANIFRAMES = 303, - KW_FRAMESKIP = 304, - KW_LOOKAT = 305, - KW_UPVEC = 306, - KW_FOVY = 307, - KW_ASPECT = 308, - KW_AMBIENCE = 309, - KW_BACKGROUND = 310, - KW_DEBUGPIXEL = 311, - KW_TESTMODE = 312, - KW_OPENGLATTR = 313, - KW_BLENDERATTR = 314, - KW_ATTRIBUTE = 315, - KW_OBJATTR = 316, - KW_EQUALS = 317, - KW_DEFINEATTR = 318, - KW_ATTREND = 319, - KW_GEOMETRY = 320, - KW_TYPE = 321, - KW_GEOTYPE_BOX = 322, - KW_GEOTYPE_FLUID = 323, - KW_GEOTYPE_OBJMODEL = 324, - KW_GEOTYPE_SPHERE = 325, - KW_CASTSHADOWS = 326, - KW_RECEIVESHADOWS = 327, - KW_VISIBLE = 328, - KW_BOX_END = 329, - KW_BOX_START = 330, - KW_POLY = 331, - KW_NUMVERTICES = 332, - KW_VERTEX = 333, - KW_NUMPOLYGONS = 334, - KW_ISOSURF = 335, - KW_FILEMODE = 336, - KW_INVERT = 337, - KW_MATERIAL = 338, - KW_MATTYPE_PHONG = 339, - KW_MATTYPE_BLINN = 340, - KW_NAME = 341, - KW_AMBIENT = 342, - KW_DIFFUSE = 343, - KW_SPECULAR = 344, - KW_MIRROR = 345, - KW_TRANSPARENCE = 346, - KW_REFRACINDEX = 347, - KW_TRANSADDITIVE = 348, - KW_TRANSATTCOL = 349, - KW_FRESNEL = 350, - KW_LIGHT = 351, - KW_ACTIVE = 352, - KW_COLOUR = 353, - KW_POSITION = 354, - KW_LIGHT_OMNI = 355, - KW_CAUSTICPHOTONS = 356, - KW_CAUSTICSTRENGTH = 357, - KW_SHADOWMAP = 358, - KW_CAUSTICSMAP = 359 + KW_DEBUGLEVEL = 267, + KW_P_RELAXTIME = 268, + KW_P_REYNOLDS = 269, + KW_P_VISCOSITY = 270, + KW_P_SOUNDSPEED = 271, + KW_P_DOMAINSIZE = 272, + KW_P_FORCE = 273, + KW_P_TIMELENGTH = 274, + KW_P_STEPTIME = 275, + KW_P_TIMEFACTOR = 276, + KW_P_ANIFRAMETIME = 277, + KW_P_ANISTART = 278, + KW_P_SURFACETENSION = 279, + KW_P_ACTIVATE = 280, + KW_P_DEACTIVATE = 281, + KW_P_DENSITY = 282, + KW_P_CELLSIZE = 283, + KW_P_GSTAR = 284, + KW_PFSPATH = 285, + KW_PARTLINELENGTH = 286, + KW_PARTICLES = 287, + KW_FRAMESPERSEC = 288, + KW_RAYTRACING = 289, + KW_PAROPEN = 290, + KW_PARCLOSE = 291, + KW_FILENAME = 292, + KW_PMCAUSTICS = 293, + KW_MAXRAYDEPTH = 294, + KW_CAUSTICDIST = 295, + KW_CAUSTICPHOT = 296, + KW_SHADOWMAPBIAS = 297, + KW_TREEMAXDEPTH = 298, + KW_TREEMAXTRIANGLES = 299, + KW_RESOLUTION = 300, + KW_ANTIALIAS = 301, + KW_EYEPOINT = 302, + KW_ANISTART = 303, + KW_ANIFRAMES = 304, + KW_FRAMESKIP = 305, + KW_LOOKAT = 306, + KW_UPVEC = 307, + KW_FOVY = 308, + KW_ASPECT = 309, + KW_AMBIENCE = 310, + KW_BACKGROUND = 311, + KW_DEBUGPIXEL = 312, + KW_TESTMODE = 313, + KW_OPENGLATTR = 314, + KW_BLENDERATTR = 315, + KW_ATTRIBUTE = 316, + KW_OBJATTR = 317, + KW_EQUALS = 318, + KW_DEFINEATTR = 319, + KW_ATTREND = 320, + KW_GEOMETRY = 321, + KW_TYPE = 322, + KW_GEOTYPE_BOX = 323, + KW_GEOTYPE_FLUID = 324, + KW_GEOTYPE_OBJMODEL = 325, + KW_GEOTYPE_SPHERE = 326, + KW_CASTSHADOWS = 327, + KW_RECEIVESHADOWS = 328, + KW_VISIBLE = 329, + KW_BOX_END = 330, + KW_BOX_START = 331, + KW_POLY = 332, + KW_NUMVERTICES = 333, + KW_VERTEX = 334, + KW_NUMPOLYGONS = 335, + KW_ISOSURF = 336, + KW_FILEMODE = 337, + KW_INVERT = 338, + KW_MATERIAL = 339, + KW_MATTYPE_PHONG = 340, + KW_MATTYPE_BLINN = 341, + KW_NAME = 342, + KW_AMBIENT = 343, + KW_DIFFUSE = 344, + KW_SPECULAR = 345, + KW_MIRROR = 346, + KW_TRANSPARENCE = 347, + KW_REFRACINDEX = 348, + KW_TRANSADDITIVE = 349, + KW_TRANSATTCOL = 350, + KW_FRESNEL = 351, + KW_LIGHT = 352, + KW_ACTIVE = 353, + KW_COLOUR = 354, + KW_POSITION = 355, + KW_LIGHT_OMNI = 356, + KW_CAUSTICPHOTONS = 357, + KW_CAUSTICSTRENGTH = 358, + KW_SHADOWMAP = 359, + KW_CAUSTICSMAP = 360 }; #endif #define DT_INTEGER 258 @@ -175,99 +175,100 @@ #define KW_COMPARELBM 264 #define KW_ANIFRAMETIME 265 #define KW_DEBUGMODE 266 -#define KW_P_RELAXTIME 267 -#define KW_P_REYNOLDS 268 -#define KW_P_VISCOSITY 269 -#define KW_P_SOUNDSPEED 270 -#define KW_P_DOMAINSIZE 271 -#define KW_P_FORCE 272 -#define KW_P_TIMELENGTH 273 -#define KW_P_STEPTIME 274 -#define KW_P_TIMEFACTOR 275 -#define KW_P_ANIFRAMETIME 276 -#define KW_P_ANISTART 277 -#define KW_P_SURFACETENSION 278 -#define KW_P_ACTIVATE 279 -#define KW_P_DEACTIVATE 280 -#define KW_P_DENSITY 281 -#define KW_P_CELLSIZE 282 -#define KW_P_GSTAR 283 -#define KW_PFSPATH 284 -#define KW_PARTLINELENGTH 285 -#define KW_PARTICLES 286 -#define KW_FRAMESPERSEC 287 -#define KW_RAYTRACING 288 -#define KW_PAROPEN 289 -#define KW_PARCLOSE 290 -#define KW_FILENAME 291 -#define KW_PMCAUSTICS 292 -#define KW_MAXRAYDEPTH 293 -#define KW_CAUSTICDIST 294 -#define KW_CAUSTICPHOT 295 -#define KW_SHADOWMAPBIAS 296 -#define KW_TREEMAXDEPTH 297 -#define KW_TREEMAXTRIANGLES 298 -#define KW_RESOLUTION 299 -#define KW_ANTIALIAS 300 -#define KW_EYEPOINT 301 -#define KW_ANISTART 302 -#define KW_ANIFRAMES 303 -#define KW_FRAMESKIP 304 -#define KW_LOOKAT 305 -#define KW_UPVEC 306 -#define KW_FOVY 307 -#define KW_ASPECT 308 -#define KW_AMBIENCE 309 -#define KW_BACKGROUND 310 -#define KW_DEBUGPIXEL 311 -#define KW_TESTMODE 312 -#define KW_OPENGLATTR 313 -#define KW_BLENDERATTR 314 -#define KW_ATTRIBUTE 315 -#define KW_OBJATTR 316 -#define KW_EQUALS 317 -#define KW_DEFINEATTR 318 -#define KW_ATTREND 319 -#define KW_GEOMETRY 320 -#define KW_TYPE 321 -#define KW_GEOTYPE_BOX 322 -#define KW_GEOTYPE_FLUID 323 -#define KW_GEOTYPE_OBJMODEL 324 -#define KW_GEOTYPE_SPHERE 325 -#define KW_CASTSHADOWS 326 -#define KW_RECEIVESHADOWS 327 -#define KW_VISIBLE 328 -#define KW_BOX_END 329 -#define KW_BOX_START 330 -#define KW_POLY 331 -#define KW_NUMVERTICES 332 -#define KW_VERTEX 333 -#define KW_NUMPOLYGONS 334 -#define KW_ISOSURF 335 -#define KW_FILEMODE 336 -#define KW_INVERT 337 -#define KW_MATERIAL 338 -#define KW_MATTYPE_PHONG 339 -#define KW_MATTYPE_BLINN 340 -#define KW_NAME 341 -#define KW_AMBIENT 342 -#define KW_DIFFUSE 343 -#define KW_SPECULAR 344 -#define KW_MIRROR 345 -#define KW_TRANSPARENCE 346 -#define KW_REFRACINDEX 347 -#define KW_TRANSADDITIVE 348 -#define KW_TRANSATTCOL 349 -#define KW_FRESNEL 350 -#define KW_LIGHT 351 -#define KW_ACTIVE 352 -#define KW_COLOUR 353 -#define KW_POSITION 354 -#define KW_LIGHT_OMNI 355 -#define KW_CAUSTICPHOTONS 356 -#define KW_CAUSTICSTRENGTH 357 -#define KW_SHADOWMAP 358 -#define KW_CAUSTICSMAP 359 +#define KW_DEBUGLEVEL 267 +#define KW_P_RELAXTIME 268 +#define KW_P_REYNOLDS 269 +#define KW_P_VISCOSITY 270 +#define KW_P_SOUNDSPEED 271 +#define KW_P_DOMAINSIZE 272 +#define KW_P_FORCE 273 +#define KW_P_TIMELENGTH 274 +#define KW_P_STEPTIME 275 +#define KW_P_TIMEFACTOR 276 +#define KW_P_ANIFRAMETIME 277 +#define KW_P_ANISTART 278 +#define KW_P_SURFACETENSION 279 +#define KW_P_ACTIVATE 280 +#define KW_P_DEACTIVATE 281 +#define KW_P_DENSITY 282 +#define KW_P_CELLSIZE 283 +#define KW_P_GSTAR 284 +#define KW_PFSPATH 285 +#define KW_PARTLINELENGTH 286 +#define KW_PARTICLES 287 +#define KW_FRAMESPERSEC 288 +#define KW_RAYTRACING 289 +#define KW_PAROPEN 290 +#define KW_PARCLOSE 291 +#define KW_FILENAME 292 +#define KW_PMCAUSTICS 293 +#define KW_MAXRAYDEPTH 294 +#define KW_CAUSTICDIST 295 +#define KW_CAUSTICPHOT 296 +#define KW_SHADOWMAPBIAS 297 +#define KW_TREEMAXDEPTH 298 +#define KW_TREEMAXTRIANGLES 299 +#define KW_RESOLUTION 300 +#define KW_ANTIALIAS 301 +#define KW_EYEPOINT 302 +#define KW_ANISTART 303 +#define KW_ANIFRAMES 304 +#define KW_FRAMESKIP 305 +#define KW_LOOKAT 306 +#define KW_UPVEC 307 +#define KW_FOVY 308 +#define KW_ASPECT 309 +#define KW_AMBIENCE 310 +#define KW_BACKGROUND 311 +#define KW_DEBUGPIXEL 312 +#define KW_TESTMODE 313 +#define KW_OPENGLATTR 314 +#define KW_BLENDERATTR 315 +#define KW_ATTRIBUTE 316 +#define KW_OBJATTR 317 +#define KW_EQUALS 318 +#define KW_DEFINEATTR 319 +#define KW_ATTREND 320 +#define KW_GEOMETRY 321 +#define KW_TYPE 322 +#define KW_GEOTYPE_BOX 323 +#define KW_GEOTYPE_FLUID 324 +#define KW_GEOTYPE_OBJMODEL 325 +#define KW_GEOTYPE_SPHERE 326 +#define KW_CASTSHADOWS 327 +#define KW_RECEIVESHADOWS 328 +#define KW_VISIBLE 329 +#define KW_BOX_END 330 +#define KW_BOX_START 331 +#define KW_POLY 332 +#define KW_NUMVERTICES 333 +#define KW_VERTEX 334 +#define KW_NUMPOLYGONS 335 +#define KW_ISOSURF 336 +#define KW_FILEMODE 337 +#define KW_INVERT 338 +#define KW_MATERIAL 339 +#define KW_MATTYPE_PHONG 340 +#define KW_MATTYPE_BLINN 341 +#define KW_NAME 342 +#define KW_AMBIENT 343 +#define KW_DIFFUSE 344 +#define KW_SPECULAR 345 +#define KW_MIRROR 346 +#define KW_TRANSPARENCE 347 +#define KW_REFRACINDEX 348 +#define KW_TRANSADDITIVE 349 +#define KW_TRANSATTCOL 350 +#define KW_FRESNEL 351 +#define KW_LIGHT 352 +#define KW_ACTIVE 353 +#define KW_COLOUR 354 +#define KW_POSITION 355 +#define KW_LIGHT_OMNI 356 +#define KW_CAUSTICPHOTONS 357 +#define KW_CAUSTICSTRENGTH 358 +#define KW_SHADOWMAP 359 +#define KW_CAUSTICSMAP 360 @@ -307,11 +308,9 @@ #include "ntl_lightobject.h" #include "ntl_material.h" -#include "ntl_geometrybox.h" -#include "ntl_geometrysphere.h" #include "ntl_geometrymodel.h" #include "globals.h" - + /* global variables */ static map attrs; /* global attribute storage */ vector currentAttrValue; /* build string vector */ @@ -327,13 +326,17 @@ /* geometry initialization checks */ ntlGeometryClass *currentGeoClass; ntlGeometryObject *currentGeoObj; - ntlGeometryBox *currentGeometryBox; - ntlGeometrySphere *currentGeometrySphere; SimulationObject *currentGeometrySim; ntlGeometryObjModel *currentGeometryModel; AttributeList *currentAttrib; string currentAttrName, currentAttribAddName; +#ifndef ELBEEM_BLENDER +#include "ntl_geometrybox.h" +#include "ntl_geometrysphere.h" + ntlGeometryBox *currentGeometryBox; +#endif //ELBEEM_BLENDER + /* material init checks */ ntlMaterial *currentMaterial; @@ -353,14 +356,14 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 85 "src/cfgparser.yy" +#line 87 "src/cfgparser.yy" typedef union YYSTYPE { int intValue; float floatValue; char *charValue; } YYSTYPE; -/* Line 191 of yacc.c. */ -#line 364 "bld-std-gcc40/src/cfgparser.cpp" +/* Line 190 of yacc.c. */ +#line 367 "bld-std-gcc40/src/cfgparser.cpp" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -371,8 +374,8 @@ typedef union YYSTYPE { /* Copy the second part of user declarations. */ -/* Line 214 of yacc.c. */ -#line 376 "bld-std-gcc40/src/cfgparser.cpp" +/* Line 213 of yacc.c. */ +#line 379 "bld-std-gcc40/src/cfgparser.cpp" #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -387,14 +390,10 @@ typedef union YYSTYPE { # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# endif -# else -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca +# else +# define YYSTACK_ALLOC alloca # endif # endif # endif @@ -476,22 +475,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 12 +#define YYFINAL 15 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 278 +#define YYLAST 277 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 105 +#define YYNTOKENS 106 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 77 +#define YYNNTS 78 /* YYNRULES -- Number of rules. */ -#define YYNRULES 136 +#define YYNRULES 138 /* YYNRULES -- Number of states. */ -#define YYNSTATES 237 +#define YYNSTATES 240 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 359 +#define YYMAXUTOK 360 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -534,7 +533,8 @@ static const unsigned char yytranslate[] = 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105 }; #if YYDEBUG @@ -542,82 +542,83 @@ static const unsigned char yytranslate[] = YYRHS. */ static const unsigned short int yyprhs[] = { - 0, 0, 3, 6, 8, 10, 12, 14, 17, 22, - 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, - 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, - 65, 67, 69, 71, 73, 75, 77, 80, 83, 86, - 89, 93, 96, 101, 106, 111, 114, 117, 122, 127, - 130, 133, 136, 139, 143, 146, 149, 152, 159, 162, - 164, 166, 168, 170, 172, 174, 177, 180, 185, 190, - 191, 199, 202, 204, 206, 208, 210, 212, 214, 216, - 218, 220, 222, 224, 226, 228, 230, 232, 235, 238, - 241, 244, 247, 252, 257, 260, 265, 272, 275, 277, - 279, 281, 283, 285, 287, 289, 291, 293, 295, 297, - 299, 301, 304, 309, 314, 318, 321, 324, 327, 330, - 335, 338, 339, 346, 349, 351, 352, 353, 360, 363, - 365, 367, 369, 371, 373, 375, 377 + 0, 0, 3, 6, 8, 10, 12, 14, 16, 19, + 22, 27, 30, 32, 34, 36, 38, 40, 42, 44, + 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, + 66, 68, 70, 72, 74, 76, 78, 80, 82, 85, + 88, 91, 94, 98, 101, 106, 111, 116, 119, 122, + 127, 132, 135, 138, 141, 144, 148, 151, 154, 157, + 164, 167, 169, 171, 173, 175, 177, 179, 182, 185, + 190, 195, 196, 204, 207, 209, 211, 213, 215, 217, + 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, + 240, 243, 246, 249, 252, 257, 262, 265, 270, 277, + 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, + 300, 302, 304, 306, 309, 314, 319, 323, 326, 329, + 332, 335, 340, 343, 344, 351, 354, 356, 357, 358, + 365, 368, 370, 372, 374, 376, 378, 380, 382 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 106, 0, -1, 106, 107, -1, 107, -1, 109, -1, - 169, -1, 108, -1, 11, 3, -1, 33, 34, 110, - 35, -1, 110, 111, -1, 111, -1, 114, -1, 112, - -1, 113, -1, 115, -1, 116, -1, 117, -1, 118, - -1, 119, -1, 120, -1, 121, -1, 122, -1, 123, - -1, 124, -1, 125, -1, 126, -1, 127, -1, 128, - -1, 129, -1, 130, -1, 131, -1, 132, -1, 133, - -1, 141, -1, 172, -1, 155, -1, 47, 180, -1, - 10, 180, -1, 48, 179, -1, 49, 181, -1, 44, - 179, 179, -1, 45, 3, -1, 46, 178, 178, 178, - -1, 50, 178, 178, 178, -1, 51, 178, 178, 178, - -1, 52, 178, -1, 53, 178, -1, 54, 178, 178, - 178, -1, 55, 178, 178, 178, -1, 36, 5, -1, - 42, 179, -1, 43, 179, -1, 38, 179, -1, 56, - 3, 3, -1, 57, 181, -1, 58, 5, -1, 59, - 5, -1, 96, 34, 66, 135, 134, 35, -1, 134, - 136, -1, 136, -1, 100, -1, 137, -1, 138, -1, - 139, -1, 140, -1, 97, 181, -1, 71, 181, -1, - 98, 178, 178, 178, -1, 99, 178, 178, 178, -1, - -1, 65, 34, 66, 144, 142, 143, 35, -1, 143, - 145, -1, 145, -1, 67, -1, 70, -1, 69, -1, - 8, -1, 9, -1, 146, -1, 147, -1, 148, -1, - 149, -1, 150, -1, 151, -1, 152, -1, 153, -1, - 154, -1, 86, 5, -1, 83, 5, -1, 71, 181, - -1, 72, 181, -1, 73, 181, -1, 75, 178, 178, - 178, -1, 74, 178, 178, 178, -1, 61, 5, -1, - 63, 34, 171, 35, -1, 83, 34, 66, 157, 156, - 35, -1, 156, 158, -1, 158, -1, 84, -1, 85, - -1, 159, -1, 160, -1, 161, -1, 162, -1, 163, - -1, 165, -1, 164, -1, 166, -1, 167, -1, 168, - -1, 86, 5, -1, 87, 176, 176, 176, -1, 88, - 176, 176, 176, -1, 89, 178, 178, -1, 90, 177, - -1, 91, 177, -1, 92, 178, -1, 93, 177, -1, - 94, 178, 178, 178, -1, 95, 180, -1, -1, 60, - 6, 34, 170, 171, 35, -1, 171, 172, -1, 172, - -1, -1, -1, 6, 62, 173, 175, 174, 64, -1, - 175, 7, -1, 7, -1, 177, -1, 178, -1, 4, - -1, 3, -1, 3, -1, 3, -1, 3, -1 + 107, 0, -1, 107, 108, -1, 108, -1, 111, -1, + 171, -1, 109, -1, 110, -1, 11, 3, -1, 12, + 3, -1, 34, 35, 112, 36, -1, 112, 113, -1, + 113, -1, 116, -1, 114, -1, 115, -1, 117, -1, + 118, -1, 119, -1, 120, -1, 121, -1, 122, -1, + 123, -1, 124, -1, 125, -1, 126, -1, 127, -1, + 128, -1, 129, -1, 130, -1, 131, -1, 132, -1, + 133, -1, 134, -1, 135, -1, 143, -1, 174, -1, + 157, -1, 48, 182, -1, 10, 182, -1, 49, 181, + -1, 50, 183, -1, 45, 181, 181, -1, 46, 3, + -1, 47, 180, 180, 180, -1, 51, 180, 180, 180, + -1, 52, 180, 180, 180, -1, 53, 180, -1, 54, + 180, -1, 55, 180, 180, 180, -1, 56, 180, 180, + 180, -1, 37, 5, -1, 43, 181, -1, 44, 181, + -1, 39, 181, -1, 57, 3, 3, -1, 58, 183, + -1, 59, 5, -1, 60, 5, -1, 97, 35, 67, + 137, 136, 36, -1, 136, 138, -1, 138, -1, 101, + -1, 139, -1, 140, -1, 141, -1, 142, -1, 98, + 183, -1, 72, 183, -1, 99, 180, 180, 180, -1, + 100, 180, 180, 180, -1, -1, 66, 35, 67, 146, + 144, 145, 36, -1, 145, 147, -1, 147, -1, 68, + -1, 71, -1, 70, -1, 8, -1, 9, -1, 148, + -1, 149, -1, 150, -1, 151, -1, 152, -1, 153, + -1, 154, -1, 155, -1, 156, -1, 87, 5, -1, + 84, 5, -1, 72, 183, -1, 73, 183, -1, 74, + 183, -1, 76, 180, 180, 180, -1, 75, 180, 180, + 180, -1, 62, 5, -1, 64, 35, 173, 36, -1, + 84, 35, 67, 159, 158, 36, -1, 158, 160, -1, + 160, -1, 85, -1, 86, -1, 161, -1, 162, -1, + 163, -1, 164, -1, 165, -1, 167, -1, 166, -1, + 168, -1, 169, -1, 170, -1, 87, 5, -1, 88, + 178, 178, 178, -1, 89, 178, 178, 178, -1, 90, + 180, 180, -1, 91, 179, -1, 92, 179, -1, 93, + 180, -1, 94, 179, -1, 95, 180, 180, 180, -1, + 96, 182, -1, -1, 61, 6, 35, 172, 173, 36, + -1, 173, 174, -1, 174, -1, -1, -1, 6, 63, + 175, 177, 176, 65, -1, 177, 7, -1, 7, -1, + 179, -1, 180, -1, 4, -1, 3, -1, 3, -1, + 3, -1, 3, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 144, 144, 145, 148, 149, 150, 154, 164, 165, - 165, 168, 169, 170, 171, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 191, 192, 193, 194, 199, 203, 208, 212, - 218, 222, 226, 230, 234, 238, 242, 246, 250, 254, - 258, 262, 266, 270, 274, 278, 283, 292, 303, 304, - 307, 315, 316, 317, 318, 322, 327, 332, 337, 355, - 354, 374, 375, 378, 383, 388, 393, 399, 411, 412, - 413, 414, 415, 416, 417, 418, 419, 424, 429, 435, - 441, 447, 452, 464, 477, 483, 493, 504, 505, 508, - 513, 517, 518, 519, 520, 521, 522, 523, 524, 525, - 526, 531, 536, 541, 546, 552, 557, 562, 567, 572, - 577, 588, 588, 598, 598, 601, 602, 601, 609, 612, - 622, 625, 637, 639, 645, 656, 668 + 0, 146, 146, 147, 150, 151, 152, 153, 157, 160, + 175, 176, 176, 179, 180, 181, 182, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 202, 203, 204, 205, 210, 214, + 219, 223, 229, 233, 237, 241, 245, 249, 253, 257, + 261, 265, 269, 273, 277, 281, 285, 289, 294, 303, + 314, 315, 318, 326, 327, 328, 329, 333, 338, 343, + 348, 366, 365, 386, 387, 390, 399, 407, 412, 418, + 430, 431, 432, 433, 434, 435, 436, 437, 438, 443, + 448, 454, 460, 466, 471, 486, 502, 508, 518, 529, + 530, 533, 538, 542, 543, 544, 545, 546, 547, 548, + 549, 550, 551, 556, 561, 566, 571, 577, 582, 587, + 592, 597, 602, 613, 613, 623, 623, 626, 627, 626, + 634, 637, 647, 650, 662, 664, 670, 681, 693 }; #endif @@ -628,9 +629,9 @@ static const char *const yytname[] = { "$end", "error", "$undefined", "DT_INTEGER", "DT_FLOAT", "DT_STRING", "DT_ATTRNAME", "DT_ATTRVALUE", "KW_LBMSIM", "KW_COMPARELBM", - "KW_ANIFRAMETIME", "KW_DEBUGMODE", "KW_P_RELAXTIME", "KW_P_REYNOLDS", - "KW_P_VISCOSITY", "KW_P_SOUNDSPEED", "KW_P_DOMAINSIZE", "KW_P_FORCE", - "KW_P_TIMELENGTH", "KW_P_STEPTIME", "KW_P_TIMEFACTOR", + "KW_ANIFRAMETIME", "KW_DEBUGMODE", "KW_DEBUGLEVEL", "KW_P_RELAXTIME", + "KW_P_REYNOLDS", "KW_P_VISCOSITY", "KW_P_SOUNDSPEED", "KW_P_DOMAINSIZE", + "KW_P_FORCE", "KW_P_TIMELENGTH", "KW_P_STEPTIME", "KW_P_TIMEFACTOR", "KW_P_ANIFRAMETIME", "KW_P_ANISTART", "KW_P_SURFACETENSION", "KW_P_ACTIVATE", "KW_P_DEACTIVATE", "KW_P_DENSITY", "KW_P_CELLSIZE", "KW_P_GSTAR", "KW_PFSPATH", "KW_PARTLINELENGTH", "KW_PARTICLES", @@ -653,12 +654,12 @@ static const char *const yytname[] = "KW_POSITION", "KW_LIGHT_OMNI", "KW_CAUSTICPHOTONS", "KW_CAUSTICSTRENGTH", "KW_SHADOWMAP", "KW_CAUSTICSMAP", "$accept", "desc_line", "desc_expression", "toggledebug_expression", - "raytrace_section", "raytrace_line", "raytrace_expression", - "anistart_expression", "aniframetime_expression", "aniframes_expression", - "frameskip_expression", "resolution_expression", "antialias_expression", - "eyepoint_expression", "lookat_expression", "upvec_expression", - "fovy_expression", "aspect_expression", "ambience_expression", - "background_expression", "filename_expression", + "setdebuglevel_expression", "raytrace_section", "raytrace_line", + "raytrace_expression", "anistart_expression", "aniframetime_expression", + "aniframes_expression", "frameskip_expression", "resolution_expression", + "antialias_expression", "eyepoint_expression", "lookat_expression", + "upvec_expression", "fovy_expression", "aspect_expression", + "ambience_expression", "background_expression", "filename_expression", "treemaxdepth_expression", "treemaxtriangles_expression", "maxraydepth_expression", "debugpixel_expression", "testmode_expression", "openglattr_expr", "blenderattr_expr", "light_expression", @@ -700,46 +701,46 @@ static const unsigned short int yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359 + 355, 356, 357, 358, 359, 360 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 105, 106, 106, 107, 107, 107, 108, 109, 110, - 110, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 112, 113, 114, 115, + 0, 106, 107, 107, 108, 108, 108, 108, 109, 110, + 111, 112, 112, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 134, - 135, 136, 136, 136, 136, 137, 138, 139, 140, 142, - 141, 143, 143, 144, 144, 144, 144, 144, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 156, 157, - 157, 158, 158, 158, 158, 158, 158, 158, 158, 158, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 170, 169, 171, 171, 173, 174, 172, 175, 175, - 176, 177, 178, 178, 179, 180, 181 + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 136, 137, 138, 138, 138, 138, 139, 140, 141, + 142, 144, 143, 145, 145, 146, 146, 146, 146, 146, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 148, + 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, + 158, 159, 159, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 172, 171, 173, 173, 175, 176, 174, + 177, 177, 178, 179, 180, 180, 181, 182, 183 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const unsigned char yyr2[] = { - 0, 2, 2, 1, 1, 1, 1, 2, 4, 2, + 0, 2, 2, 1, 1, 1, 1, 1, 2, 2, + 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, + 2, 2, 3, 2, 4, 4, 4, 2, 2, 4, + 4, 2, 2, 2, 2, 3, 2, 2, 2, 6, + 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, + 4, 0, 7, 2, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 2, 2, 2, 4, 4, 2, 4, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 3, 2, 4, 4, 4, 2, 2, 4, 4, 2, - 2, 2, 2, 3, 2, 2, 2, 6, 2, 1, - 1, 1, 1, 1, 1, 2, 2, 4, 4, 0, - 7, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 4, 4, 2, 4, 6, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 4, 3, 2, 2, 2, 2, 4, - 2, 0, 6, 2, 1, 0, 0, 6, 2, 1, - 1, 1, 1, 1, 1, 1, 1 + 1, 1, 1, 2, 4, 4, 3, 2, 2, 2, + 2, 4, 2, 0, 6, 2, 1, 0, 0, 6, + 2, 1, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -747,87 +748,87 @@ static const unsigned char yyr2[] = means the default is an error. */ static const unsigned char yydefact[] = { - 0, 0, 0, 0, 0, 3, 6, 4, 5, 7, - 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 6, 7, 4, + 5, 8, 9, 0, 0, 1, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 12, 14, 15, 13, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 37, 36, 123, + 127, 137, 39, 51, 136, 54, 52, 53, 0, 43, + 135, 134, 0, 38, 40, 138, 41, 0, 0, 47, + 48, 0, 0, 0, 56, 57, 58, 0, 0, 0, + 10, 11, 0, 0, 42, 0, 0, 0, 0, 0, + 55, 0, 0, 0, 0, 126, 131, 128, 44, 45, + 46, 49, 50, 78, 79, 75, 77, 76, 71, 101, + 102, 0, 62, 0, 124, 125, 130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 12, 13, 11, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 35, 34, 121, 125, 135, 37, - 49, 134, 52, 50, 51, 0, 41, 133, 132, 0, - 36, 38, 136, 39, 0, 0, 45, 46, 0, 0, - 0, 54, 55, 56, 0, 0, 0, 8, 9, 0, - 0, 40, 0, 0, 0, 0, 0, 53, 0, 0, - 0, 0, 124, 129, 126, 42, 43, 44, 47, 48, - 76, 77, 73, 75, 74, 69, 99, 100, 0, 60, - 0, 122, 123, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 98, 101, 102, - 103, 104, 105, 107, 106, 108, 109, 110, 0, 0, - 0, 0, 0, 59, 61, 62, 63, 64, 127, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 111, - 0, 130, 131, 0, 0, 115, 116, 117, 118, 0, - 120, 96, 97, 66, 65, 0, 0, 57, 58, 94, - 0, 89, 90, 91, 0, 0, 88, 87, 70, 71, - 0, 0, 114, 0, 0, 0, 0, 0, 0, 112, - 113, 119, 67, 68, 95, 93, 92 + 100, 103, 104, 105, 106, 107, 109, 108, 110, 111, + 112, 0, 0, 0, 0, 0, 61, 63, 64, 65, + 66, 129, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 74, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 113, 0, 132, 133, 0, 0, 117, 118, + 119, 120, 0, 122, 98, 99, 68, 67, 0, 0, + 59, 60, 96, 0, 91, 92, 93, 0, 0, 90, + 89, 72, 73, 0, 0, 116, 0, 0, 0, 0, + 0, 0, 114, 115, 121, 69, 70, 97, 95, 94 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 4, 5, 6, 7, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 162, - 130, 163, 164, 165, 166, 167, 63, 135, 178, 125, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 64, 146, 128, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 8, 99, 111, 65, 100, 134, - 114, 190, 191, 192, 72, 69, 83 + -1, 5, 6, 7, 8, 9, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 165, 133, 166, 167, 168, 169, 170, 66, 138, 181, + 128, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 67, 149, 131, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 10, 102, 114, 68, 103, + 137, 117, 193, 194, 195, 75, 72, 86 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -111 +#define YYPACT_NINF -115 static const short int yypact[] = { - 31, 10, -18, 22, 12, -111, -111, -111, -111, -111, - 172, -2, -111, -111, -26, 41, 45, 43, 43, 43, - 43, 48, 21, 41, 43, 51, 21, 21, 21, 21, - 21, 21, 55, 51, 54, 60, 19, 34, 35, 50, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, 43, -111, -111, -111, 21, - -111, -111, -111, -111, 21, 21, -111, -111, 21, 21, - 67, -111, -111, -111, -11, 5, 23, -111, -111, 81, - 83, -111, 21, 21, 21, 21, 21, -111, 9, -50, - 11, 8, -111, -111, 105, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, 183, -111, - 52, -111, -111, -111, 57, 171, 113, 21, 21, 21, - 21, 21, 21, 21, 21, 41, 75, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, 51, 51, - 21, 21, -24, -111, -111, -111, -111, -111, -111, 114, - 90, 51, 51, 51, 21, 21, 120, 121, -34, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - 21, -111, -111, 21, 21, -111, -111, -111, -111, 21, - -111, -111, -111, -111, -111, 21, 21, -111, -111, -111, - 81, -111, -111, -111, 21, 21, -111, -111, -111, -111, - 21, 21, -111, 21, 21, 21, 13, 21, 21, -111, - -111, -111, -111, -111, -111, -111, -111 + 7, 10, 22, -9, 27, 11, -115, -115, -115, -115, + -115, -115, -115, 170, 2, -115, -115, -21, 35, 34, + 40, 40, 40, 40, 43, 17, 35, 40, 44, 17, + 17, 17, 17, 17, 17, 46, 44, 48, 51, 23, + 25, 29, 49, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -115, 40, -115, + -115, -115, 17, -115, -115, -115, -115, 17, 17, -115, + -115, 17, 17, 62, -115, -115, -115, -13, 3, 4, + -115, -115, 63, 66, -115, 17, 17, 17, 17, 17, + -115, 19, -69, -23, -5, -115, -115, 70, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, + -115, 181, -115, -48, -115, -115, -115, 14, 169, 106, + 17, 17, 17, 17, 17, 17, 17, 17, 35, 74, + -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, + -115, 44, 44, 17, 17, -24, -115, -115, -115, -115, + -115, -115, 107, 83, 44, 44, 44, 17, 17, 114, + 116, 124, -115, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -115, 17, -115, -115, 17, 17, -115, -115, + -115, -115, 17, -115, -115, -115, -115, -115, 17, 17, + -115, -115, -115, 63, -115, -115, -115, 17, 17, -115, + -115, -115, -115, 17, 17, -115, 17, 17, 17, 8, + 17, 17, -115, -115, -115, -115, -115, -115, -115, -115 }; /* YYPGOTO[NTERM-NUM]. */ static const yysigned_char yypgoto[] = { - -111, -111, 125, -111, -111, -111, 92, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -28, -111, -111, -111, -111, -111, -111, -111, -111, - -43, -111, -111, -111, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -10, -111, -111, -111, -111, -111, -111, - -111, -111, -111, -111, -111, -111, -73, -96, -111, -111, - -111, -77, -110, -22, 2, -13, -31 + -115, -115, 118, -115, -115, -115, -115, 82, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -40, -115, -115, -115, -115, -115, -115, -115, + -115, -55, -115, -115, -115, -115, -115, -115, -115, -115, + -115, -115, -115, -115, -20, -115, -115, -115, -115, -115, + -115, -115, -115, -115, -115, -115, -115, -82, -99, -115, + -115, -115, -80, -114, -25, 13, -16, -34 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -837,96 +838,96 @@ static const yysigned_char yypgoto[] = #define YYTABLE_NINF -1 static const unsigned char yytable[] = { - 79, 218, 91, 112, 84, 85, 86, 87, 88, 89, - 80, 207, 12, 9, 14, 132, 10, 120, 121, 14, - 73, 74, 75, 1, 77, 78, 81, 169, 11, 170, - 195, 196, 66, 198, 126, 127, 67, 171, 172, 173, - 174, 175, 1, 131, 68, 2, 71, 158, 234, 176, - 70, 76, 177, 94, 82, 108, 14, 102, 90, 92, - 15, 193, 103, 104, 2, 93, 105, 106, 95, 96, - 107, 109, 3, 159, 160, 161, 122, 101, 123, 124, - 115, 116, 117, 118, 119, 97, 16, 14, 17, 110, - 113, 3, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 201, 129, 133, 220, 112, 36, 221, 194, 189, 209, - 197, 168, 199, 158, 210, 216, 217, 203, 204, 13, - 132, 98, 200, 37, 208, 219, 202, 226, 205, 206, - 211, 212, 213, 229, 230, 0, 38, 0, 0, 159, - 160, 161, 214, 215, 0, 0, 0, 0, 0, 0, - 0, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 0, 222, 0, 0, 0, 0, 223, 14, 0, - 0, 0, 15, 224, 225, 0, 0, 0, 0, 0, - 0, 0, 227, 228, 0, 0, 0, 0, 0, 0, - 0, 231, 232, 233, 0, 235, 236, 0, 16, 0, - 17, 0, 0, 0, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 169, 0, 170, 0, 0, 36, 0, 0, - 0, 0, 171, 172, 173, 174, 175, 0, 0, 0, - 0, 0, 0, 0, 176, 37, 0, 177, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 38, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145 + 82, 17, 94, 115, 87, 88, 89, 90, 91, 92, + 83, 15, 210, 11, 17, 135, 129, 130, 1, 2, + 80, 81, 1, 2, 161, 12, 13, 123, 124, 198, + 199, 134, 201, 14, 76, 77, 78, 69, 71, 73, + 84, 3, 70, 74, 237, 3, 79, 85, 161, 93, + 162, 163, 164, 95, 111, 17, 96, 105, 97, 18, + 98, 196, 106, 107, 99, 110, 108, 109, 4, 17, + 112, 113, 4, 116, 162, 163, 164, 136, 132, 171, + 118, 119, 120, 121, 122, 100, 19, 125, 20, 126, + 127, 104, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 204, 192, 212, 223, 115, 39, 224, 197, 213, 219, + 200, 220, 202, 16, 101, 211, 222, 206, 207, 205, + 135, 229, 203, 40, 0, 0, 0, 0, 208, 209, + 214, 215, 216, 232, 233, 0, 41, 0, 0, 0, + 0, 0, 217, 218, 0, 0, 0, 0, 0, 0, + 221, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 0, 225, 0, 0, 0, 17, 226, 0, 0, + 18, 0, 0, 227, 228, 0, 172, 0, 173, 0, + 0, 0, 230, 231, 0, 0, 174, 175, 176, 177, + 178, 234, 235, 236, 0, 238, 239, 19, 179, 20, + 0, 180, 0, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 172, 0, 173, 0, 0, 39, 0, 0, 0, + 0, 174, 175, 176, 177, 178, 0, 0, 0, 0, + 0, 0, 0, 179, 40, 0, 180, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 41, 139, 140, + 141, 142, 143, 144, 145, 146, 147, 148 }; static const short int yycheck[] = { - 22, 35, 33, 99, 26, 27, 28, 29, 30, 31, - 23, 35, 0, 3, 6, 111, 34, 8, 9, 6, - 18, 19, 20, 11, 3, 4, 24, 61, 6, 63, - 140, 141, 34, 143, 84, 85, 62, 71, 72, 73, - 74, 75, 11, 35, 3, 33, 3, 71, 35, 83, - 5, 3, 86, 34, 3, 66, 6, 79, 3, 5, - 10, 138, 84, 85, 33, 5, 88, 89, 34, 34, - 3, 66, 60, 97, 98, 99, 67, 75, 69, 70, - 102, 103, 104, 105, 106, 35, 36, 6, 38, 66, - 7, 60, 42, 43, 44, 45, 46, 47, 48, 49, + 25, 6, 36, 102, 29, 30, 31, 32, 33, 34, + 26, 0, 36, 3, 6, 114, 85, 86, 11, 12, + 3, 4, 11, 12, 72, 3, 35, 8, 9, 143, + 144, 36, 146, 6, 21, 22, 23, 35, 3, 5, + 27, 34, 63, 3, 36, 34, 3, 3, 72, 3, + 98, 99, 100, 5, 67, 6, 5, 82, 35, 10, + 35, 141, 87, 88, 35, 3, 91, 92, 61, 6, + 67, 67, 61, 7, 98, 99, 100, 7, 101, 65, + 105, 106, 107, 108, 109, 36, 37, 68, 39, 70, + 71, 78, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 36, 5, 5, 193, 213, 66, 196, 142, 35, 5, + 145, 5, 147, 5, 42, 165, 181, 161, 162, 149, + 229, 213, 148, 84, -1, -1, -1, -1, 163, 164, + 174, 175, 176, 223, 224, -1, 97, -1, -1, -1, + -1, -1, 177, 178, -1, -1, -1, -1, -1, -1, + 36, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, -1, 197, -1, -1, -1, 6, 202, -1, -1, + 10, -1, -1, 208, 209, -1, 62, -1, 64, -1, + -1, -1, 217, 218, -1, -1, 72, 73, 74, 75, + 76, 226, 227, 228, -1, 230, 231, 37, 84, 39, + -1, 87, -1, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 35, 100, 7, 190, 210, 65, 193, 139, 5, 5, - 142, 64, 144, 71, 34, 5, 5, 158, 159, 4, - 226, 39, 145, 83, 162, 178, 146, 210, 160, 161, - 171, 172, 173, 220, 221, -1, 96, -1, -1, 97, - 98, 99, 174, 175, -1, -1, -1, -1, -1, -1, - -1, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, -1, 194, -1, -1, -1, -1, 199, 6, -1, - -1, -1, 10, 205, 206, -1, -1, -1, -1, -1, - -1, -1, 214, 215, -1, -1, -1, -1, -1, -1, - -1, 223, 224, 225, -1, 227, 228, -1, 36, -1, - 38, -1, -1, -1, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 61, -1, 63, -1, -1, 65, -1, -1, - -1, -1, 71, 72, 73, 74, 75, -1, -1, -1, - -1, -1, -1, -1, 83, 83, -1, 86, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 96, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95 + 60, 62, -1, 64, -1, -1, 66, -1, -1, -1, + -1, 72, 73, 74, 75, 76, -1, -1, -1, -1, + -1, -1, -1, 84, 84, -1, 87, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 97, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 11, 33, 60, 106, 107, 108, 109, 169, 3, - 34, 6, 0, 107, 6, 10, 36, 38, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 65, 83, 96, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 141, 155, 172, 34, 62, 3, 180, - 5, 3, 179, 179, 179, 179, 3, 3, 4, 178, - 180, 179, 3, 181, 178, 178, 178, 178, 178, 178, - 3, 181, 5, 5, 34, 34, 34, 35, 111, 170, - 173, 179, 178, 178, 178, 178, 178, 3, 66, 66, - 66, 171, 172, 7, 175, 178, 178, 178, 178, 178, - 8, 9, 67, 69, 70, 144, 84, 85, 157, 100, - 135, 35, 172, 7, 174, 142, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 156, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 71, 97, - 98, 99, 134, 136, 137, 138, 139, 140, 64, 61, - 63, 71, 72, 73, 74, 75, 83, 86, 143, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 5, - 176, 177, 178, 176, 178, 177, 177, 178, 177, 178, - 180, 35, 158, 181, 181, 178, 178, 35, 136, 5, - 34, 181, 181, 181, 178, 178, 5, 5, 35, 145, - 176, 176, 178, 178, 178, 178, 171, 178, 178, 176, - 176, 178, 178, 178, 35, 178, 178 + 0, 11, 12, 34, 61, 107, 108, 109, 110, 111, + 171, 3, 3, 35, 6, 0, 108, 6, 10, 37, + 39, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 66, + 84, 97, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 143, 157, 174, 35, + 63, 3, 182, 5, 3, 181, 181, 181, 181, 3, + 3, 4, 180, 182, 181, 3, 183, 180, 180, 180, + 180, 180, 180, 3, 183, 5, 5, 35, 35, 35, + 36, 113, 172, 175, 181, 180, 180, 180, 180, 180, + 3, 67, 67, 67, 173, 174, 7, 177, 180, 180, + 180, 180, 180, 8, 9, 68, 70, 71, 146, 85, + 86, 159, 101, 137, 36, 174, 7, 176, 144, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 158, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 72, 98, 99, 100, 136, 138, 139, 140, 141, + 142, 65, 62, 64, 72, 73, 74, 75, 76, 84, + 87, 145, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 5, 178, 179, 180, 178, 180, 179, 179, + 180, 179, 180, 182, 36, 160, 183, 183, 180, 180, + 36, 138, 5, 35, 183, 183, 183, 180, 180, 5, + 5, 36, 147, 178, 178, 180, 180, 180, 180, 173, + 180, 180, 178, 178, 180, 180, 180, 36, 180, 180 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -980,20 +981,53 @@ do \ } \ while (0) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - ((Current).first_line = (Rhs)[1].first_line, \ - (Current).first_column = (Rhs)[1].first_column, \ - (Current).last_line = (Rhs)[N].last_line, \ - (Current).last_column = (Rhs)[N].last_column) +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif #endif + /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM @@ -1016,19 +1050,13 @@ do { \ YYFPRINTF Args; \ } while (0) -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) - -# define YYDSYMPRINTF(Title, Token, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yysymprint (stderr, \ - Token, Value); \ + Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -1095,8 +1123,7 @@ do { \ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1114,10 +1141,6 @@ int yydebug; SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif @@ -1199,15 +1222,15 @@ yysymprint (yyoutput, yytype, yyvaluep) (void) yyvaluep; if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif switch (yytype) { default: @@ -1223,10 +1246,11 @@ yysymprint (yyoutput, yytype, yyvaluep) #if defined (__STDC__) || defined (__cplusplus) static void -yydestruct (int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void -yydestruct (yytype, yyvaluep) +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif @@ -1234,6 +1258,10 @@ yydestruct (yytype, yyvaluep) /* Pacify ``unused variable'' warnings. */ (void) yyvaluep; + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + switch (yytype) { @@ -1261,10 +1289,10 @@ int yyparse (); -/* The lookahead symbol. */ +/* The look-ahead symbol. */ int yychar; -/* The semantic value of the lookahead symbol. */ +/* The semantic value of the look-ahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ @@ -1300,7 +1328,7 @@ yyparse () int yyresult; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ + /* Look-ahead token as an internal (translated) token number. */ int yytoken = 0; /* Three stacks and their tools: @@ -1352,6 +1380,8 @@ yyparse () yyvsp = yyvs; + yyvsp[0] = yylval; + goto yysetstate; /*------------------------------------------------------------. @@ -1441,18 +1471,18 @@ yyparse () yybackup: /* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ +/* Read a look-ahead token if we need one and don't already have one. */ /* yyresume: */ - /* First try to decide what to do without reference to lookahead token. */ + /* First try to decide what to do without reference to look-ahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a lookahead token if don't already have one. */ + /* Not known => get a look-ahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1467,7 +1497,7 @@ yybackup: else { yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to @@ -1487,8 +1517,8 @@ yybackup: if (yyn == YYFINAL) YYACCEPT; - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) @@ -1537,167 +1567,177 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 7: -#line 154 "src/cfgparser.yy" - { yy_debug = yyvsp[0].intValue; } - break; - - case 36: -#line 200 "src/cfgparser.yy" - { reglob->setAniStart( yyvsp[0].intValue ); } + case 8: +#line 157 "src/cfgparser.yy" + { yy_debug = (yyvsp[0].intValue); } break; - case 37: -#line 204 "src/cfgparser.yy" - { /*reglob->setAniFrameTime( $2 );*/ debMsgStd("cfgparser",DM_NOTIFY,"Deprecated setting aniframetime!",1); } + case 9: +#line 160 "src/cfgparser.yy" + { + int sdebug = (yyvsp[0].intValue); + if(sdebug<0) sdebug=0; + if(sdebug>10) sdebug=10; + gDebugLevel = sdebug; + } break; case 38: -#line 209 "src/cfgparser.yy" - { reglob->setAniFrames( (yyvsp[0].intValue)-1 ); } +#line 211 "src/cfgparser.yy" + { reglob->setAniStart( (yyvsp[0].intValue) ); } break; case 39: -#line 213 "src/cfgparser.yy" - { reglob->setFrameSkip( (yyvsp[0].intValue) ); } +#line 215 "src/cfgparser.yy" + { /*reglob->setAniFrameTime( $2 );*/ debMsgStd("cfgparser",DM_NOTIFY,"Deprecated setting aniframetime!",1); } break; case 40: -#line 219 "src/cfgparser.yy" - { reglob->setResX( yyvsp[-1].intValue ); reglob->setResY( yyvsp[0].intValue); } +#line 220 "src/cfgparser.yy" + { reglob->setAniFrames( ((yyvsp[0].intValue))-1 ); } break; case 41: -#line 223 "src/cfgparser.yy" - { reglob->setAADepth( yyvsp[0].intValue ); } +#line 224 "src/cfgparser.yy" + { reglob->setFrameSkip( ((yyvsp[0].intValue)) ); } break; case 42: -#line 227 "src/cfgparser.yy" - { reglob->setEye( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); } +#line 230 "src/cfgparser.yy" + { reglob->setResX( (yyvsp[-1].intValue) ); reglob->setResY( (yyvsp[0].intValue)); } break; case 43: -#line 231 "src/cfgparser.yy" - { reglob->setLookat( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); } +#line 234 "src/cfgparser.yy" + { reglob->setAADepth( (yyvsp[0].intValue) ); } break; case 44: -#line 235 "src/cfgparser.yy" - { reglob->setUpVec( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); } +#line 238 "src/cfgparser.yy" + { reglob->setEye( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; case 45: -#line 239 "src/cfgparser.yy" - { reglob->setFovy( yyvsp[0].floatValue ); } +#line 242 "src/cfgparser.yy" + { reglob->setLookat( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; case 46: -#line 243 "src/cfgparser.yy" - { reglob->setAspect( yyvsp[0].floatValue ); } +#line 246 "src/cfgparser.yy" + { reglob->setUpVec( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; case 47: -#line 247 "src/cfgparser.yy" - { reglob->setAmbientLight( ntlColor(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); } +#line 250 "src/cfgparser.yy" + { reglob->setFovy( (yyvsp[0].floatValue) ); } break; case 48: -#line 251 "src/cfgparser.yy" - { reglob->setBackgroundCol( ntlColor(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); } +#line 254 "src/cfgparser.yy" + { reglob->setAspect( (yyvsp[0].floatValue) ); } break; case 49: -#line 255 "src/cfgparser.yy" - { reglob->setOutFilename( yyvsp[0].charValue ); } +#line 258 "src/cfgparser.yy" + { reglob->setAmbientLight( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; case 50: -#line 259 "src/cfgparser.yy" - { reglob->setTreeMaxDepth( yyvsp[0].intValue ); } +#line 262 "src/cfgparser.yy" + { reglob->setBackgroundCol( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; case 51: -#line 263 "src/cfgparser.yy" - { reglob->setTreeMaxTriangles( yyvsp[0].intValue ); } +#line 266 "src/cfgparser.yy" + { reglob->setOutFilename( (yyvsp[0].charValue) ); } break; case 52: -#line 267 "src/cfgparser.yy" - { reglob->setRayMaxDepth( yyvsp[0].intValue ); } +#line 270 "src/cfgparser.yy" + { reglob->setTreeMaxDepth( (yyvsp[0].intValue) ); } break; case 53: -#line 271 "src/cfgparser.yy" - { reglob->setDebugPixel( yyvsp[-1].intValue, yyvsp[0].intValue ); } +#line 274 "src/cfgparser.yy" + { reglob->setTreeMaxTriangles( (yyvsp[0].intValue) ); } break; case 54: -#line 275 "src/cfgparser.yy" - { reglob->setTestMode( yyvsp[0].intValue ); } +#line 278 "src/cfgparser.yy" + { reglob->setRayMaxDepth( (yyvsp[0].intValue) ); } break; case 55: -#line 279 "src/cfgparser.yy" - { if(attrs[yyvsp[0].charValue] == NULL){ yyerror("OPENGL ATTRIBUTES: The attribute was not found!"); } - reglob->getOpenGlAttributes()->import( attrs[yyvsp[0].charValue] ); } +#line 282 "src/cfgparser.yy" + { reglob->setDebugPixel( (yyvsp[-1].intValue), (yyvsp[0].intValue) ); } break; case 56: -#line 284 "src/cfgparser.yy" - { if(attrs[yyvsp[0].charValue] == NULL){ yyerror("BLENDER ATTRIBUTES: The attribute was not found!"); } - reglob->getBlenderAttributes()->import( attrs[yyvsp[0].charValue] ); } +#line 286 "src/cfgparser.yy" + { reglob->setTestMode( (yyvsp[0].intValue) ); } break; case 57: -#line 296 "src/cfgparser.yy" +#line 290 "src/cfgparser.yy" + { if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("OPENGL ATTRIBUTES: The attribute was not found!"); } + reglob->getOpenGlAttributes()->import( attrs[(yyvsp[0].charValue)] ); } + break; + + case 58: +#line 295 "src/cfgparser.yy" + { if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("BLENDER ATTRIBUTES: The attribute was not found!"); } + reglob->getBlenderAttributes()->import( attrs[(yyvsp[0].charValue)] ); } + break; + + case 59: +#line 307 "src/cfgparser.yy" { /* reset light pointers */ currentLightOmni = NULL; } break; - case 60: -#line 308 "src/cfgparser.yy" + case 62: +#line 319 "src/cfgparser.yy" { currentLightOmni = new ntlLightObject( reglob ); currentLight = currentLightOmni; reglob->getLightList()->push_back(currentLight); } break; - case 65: -#line 322 "src/cfgparser.yy" + case 67: +#line 333 "src/cfgparser.yy" { - currentLight->setActive( yyvsp[0].intValue ); + currentLight->setActive( (yyvsp[0].intValue) ); } break; - case 66: -#line 327 "src/cfgparser.yy" + case 68: +#line 338 "src/cfgparser.yy" { - currentLight->setCastShadows( yyvsp[0].intValue ); + currentLight->setCastShadows( (yyvsp[0].intValue) ); } break; - case 67: -#line 332 "src/cfgparser.yy" + case 69: +#line 343 "src/cfgparser.yy" { - currentLight->setColor( ntlColor(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); + currentLight->setColor( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; - case 68: -#line 337 "src/cfgparser.yy" + case 70: +#line 348 "src/cfgparser.yy" { int init = 0; if(currentLightOmni != NULL) { - currentLightOmni->setPosition( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init = 1; } + currentLightOmni->setPosition( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init = 1; } if(!init) yyerror("This property can only be set for omni-directional and rectangular lights!"); } break; - case 69: -#line 355 "src/cfgparser.yy" + case 71: +#line 366 "src/cfgparser.yy" { // geo classes have attributes... reglob->getScene()->addGeoClass(currentGeoClass); @@ -1705,40 +1745,48 @@ yyreduce: } break; - case 70: -#line 361 "src/cfgparser.yy" + case 72: +#line 372 "src/cfgparser.yy" { /* reset geometry object pointers */ currentGeoObj = NULL; currentGeoClass = NULL; - currentGeometryBox = NULL; currentGeometrySim = NULL; currentGeometryModel = NULL; - currentGeometrySphere = NULL; currentAttrib = NULL; +#ifndef ELBEEM_BLENDER + currentGeometryBox = NULL; +#endif // ELBEEM_BLENDER } break; - case 73: -#line 378 "src/cfgparser.yy" + case 75: +#line 390 "src/cfgparser.yy" { +#ifndef ELBEEM_BLENDER currentGeometryBox = new ntlGeometryBox( ); currentGeoClass = currentGeometryBox; currentGeoObj = (ntlGeometryObject*)( currentGeometryBox ); +#else // ELBEEM_BLENDER + yyerror("GEOTYPE_BOX : This object type is not supported in this version!"); +#endif // ELBEEM_BLENDER } break; - case 74: -#line 383 "src/cfgparser.yy" + case 76: +#line 399 "src/cfgparser.yy" { - currentGeometrySphere = new ntlGeometrySphere( ); - currentGeoClass = currentGeometrySphere; - currentGeoObj = (ntlGeometryObject*)( currentGeometrySphere ); +#ifndef ELBEEM_BLENDER + currentGeoClass = new ntlGeometrySphere( ); + currentGeoObj = (ntlGeometryObject*)( currentGeoClass ); +#else // ELBEEM_BLENDER + yyerror("GEOTYPE_SPHERE : This object type is not supported in this version!"); +#endif // ELBEEM_BLENDER } break; - case 75: -#line 388 "src/cfgparser.yy" + case 77: +#line 407 "src/cfgparser.yy" { currentGeometryModel = new ntlGeometryObjModel( ); currentGeoClass = currentGeometryModel; @@ -1746,8 +1794,8 @@ yyreduce: } break; - case 76: -#line 393 "src/cfgparser.yy" + case 78: +#line 412 "src/cfgparser.yy" { currentGeometrySim = new SimulationObject(); currentGeoClass = currentGeometrySim; @@ -1756,8 +1804,8 @@ yyreduce: } break; - case 77: -#line 399 "src/cfgparser.yy" + case 79: +#line 418 "src/cfgparser.yy" { #ifdef LBM_INCLUDE_TESTSOLVERS currentGeometrySim = new SimulationCompareLbm(); @@ -1769,187 +1817,193 @@ yyreduce: } break; - case 87: -#line 424 "src/cfgparser.yy" + case 89: +#line 443 "src/cfgparser.yy" { - currentGeoClass->setName( yyvsp[0].charValue ); + currentGeoClass->setName( (yyvsp[0].charValue) ); } break; - case 88: -#line 429 "src/cfgparser.yy" + case 90: +#line 448 "src/cfgparser.yy" { if(currentGeoObj == NULL){ yyerror(" MATERIAL : This property can only be set for geometry objects!"); } - currentGeoObj->setMaterialName( yyvsp[0].charValue ); + currentGeoObj->setMaterialName( (yyvsp[0].charValue) ); } break; - case 89: -#line 435 "src/cfgparser.yy" + case 91: +#line 454 "src/cfgparser.yy" { if(currentGeoObj == NULL){ yyerror(" CAST_SHADOW : This property can only be set for geometry objects!"); } - currentGeoObj->setCastShadows( yyvsp[0].intValue ); + currentGeoObj->setCastShadows( (yyvsp[0].intValue) ); } break; - case 90: -#line 441 "src/cfgparser.yy" + case 92: +#line 460 "src/cfgparser.yy" { if(currentGeoObj == NULL){ yyerror(" RECEIVE_SHADOW : This property can only be set for geometry objects!"); } - currentGeoObj->setReceiveShadows( yyvsp[0].intValue ); + currentGeoObj->setReceiveShadows( (yyvsp[0].intValue) ); } break; - case 91: -#line 447 "src/cfgparser.yy" + case 93: +#line 466 "src/cfgparser.yy" { - currentGeoClass->setVisible( yyvsp[0].intValue ); + currentGeoClass->setVisible( (yyvsp[0].intValue) ); } break; - case 92: -#line 452 "src/cfgparser.yy" + case 94: +#line 471 "src/cfgparser.yy" { int init = 0; +#ifndef ELBEEM_BLENDER if(currentGeometryBox != NULL){ - currentGeometryBox->setStart( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init=1; } + currentGeometryBox->setStart( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; } +#else // ELBEEM_BLENDER +#endif // ELBEEM_BLENDER if(currentGeometrySim != NULL){ - currentGeometrySim->setGeoStart( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init=1; } + currentGeometrySim->setGeoStart( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; } if(currentGeometryModel != NULL){ - currentGeometryModel->setStart( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init=1; } + currentGeometryModel->setStart( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; } if(!init ){ yyerror("BOXSTART : This property can only be set for box, objmodel, fluid and isosurface objects!"); } } break; - case 93: -#line 464 "src/cfgparser.yy" + case 95: +#line 486 "src/cfgparser.yy" { int init = 0; +#ifndef ELBEEM_BLENDER if(currentGeometryBox != NULL){ - currentGeometryBox->setEnd( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init=1; } + currentGeometryBox->setEnd( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; } +#else // ELBEEM_BLENDER +#endif // ELBEEM_BLENDER if(currentGeometrySim != NULL){ - currentGeometrySim->setGeoEnd( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init=1; } + currentGeometrySim->setGeoEnd( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; } if(currentGeometryModel != NULL){ - currentGeometryModel->setEnd( ntlVec3Gfx(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); init=1; } + currentGeometryModel->setEnd( ntlVec3Gfx((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); init=1; } if(!init ){ yyerror("BOXEND : This property can only be set for box, objmodel, fluid and isosurface objects!"); } } break; - case 94: -#line 477 "src/cfgparser.yy" + case 96: +#line 502 "src/cfgparser.yy" { - if(attrs[yyvsp[0].charValue] == NULL){ yyerror("GEO ATTRIBUTES: The attribute was not found!"); } - currentGeoClass->getAttributeList()->import( attrs[yyvsp[0].charValue] ); + if(attrs[(yyvsp[0].charValue)] == NULL){ yyerror("GEO ATTRIBUTES: The attribute was not found!"); } + currentGeoClass->getAttributeList()->import( attrs[(yyvsp[0].charValue)] ); } break; - case 95: -#line 485 "src/cfgparser.yy" + case 97: +#line 510 "src/cfgparser.yy" { } break; - case 96: -#line 497 "src/cfgparser.yy" + case 98: +#line 522 "src/cfgparser.yy" { /* reset geometry object pointers */ currentMaterial = NULL; } break; - case 99: -#line 509 "src/cfgparser.yy" + case 101: +#line 534 "src/cfgparser.yy" { currentMaterial = new ntlMaterial( ); currentMaterial = currentMaterial; reglob->getMaterials()->push_back(currentMaterial); } break; - case 100: -#line 513 "src/cfgparser.yy" + case 102: +#line 538 "src/cfgparser.yy" { yyerror("MATTYPE: Blinn NYI!"); } break; - case 111: -#line 531 "src/cfgparser.yy" + case 113: +#line 556 "src/cfgparser.yy" { - currentMaterial->setName( yyvsp[0].charValue ); + currentMaterial->setName( (yyvsp[0].charValue) ); } break; - case 112: -#line 536 "src/cfgparser.yy" + case 114: +#line 561 "src/cfgparser.yy" { - currentMaterial->setAmbientRefl( ntlColor(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); + currentMaterial->setAmbientRefl( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; - case 113: -#line 541 "src/cfgparser.yy" + case 115: +#line 566 "src/cfgparser.yy" { - currentMaterial->setDiffuseRefl( ntlColor(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); + currentMaterial->setDiffuseRefl( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; - case 114: -#line 546 "src/cfgparser.yy" + case 116: +#line 571 "src/cfgparser.yy" { - currentMaterial->setSpecular( yyvsp[-1].floatValue ); - currentMaterial->setSpecExponent( yyvsp[0].floatValue ); + currentMaterial->setSpecular( (yyvsp[-1].floatValue) ); + currentMaterial->setSpecExponent( (yyvsp[0].floatValue) ); } break; - case 115: -#line 552 "src/cfgparser.yy" + case 117: +#line 577 "src/cfgparser.yy" { - currentMaterial->setMirror( yyvsp[0].floatValue ); + currentMaterial->setMirror( (yyvsp[0].floatValue) ); } break; - case 116: -#line 557 "src/cfgparser.yy" + case 118: +#line 582 "src/cfgparser.yy" { - currentMaterial->setTransparence( yyvsp[0].floatValue ); + currentMaterial->setTransparence( (yyvsp[0].floatValue) ); } break; - case 117: -#line 562 "src/cfgparser.yy" + case 119: +#line 587 "src/cfgparser.yy" { - currentMaterial->setRefracIndex( yyvsp[0].floatValue ); + currentMaterial->setRefracIndex( (yyvsp[0].floatValue) ); } break; - case 118: -#line 567 "src/cfgparser.yy" + case 120: +#line 592 "src/cfgparser.yy" { - currentMaterial->setTransAdditive( yyvsp[0].floatValue ); + currentMaterial->setTransAdditive( (yyvsp[0].floatValue) ); } break; - case 119: -#line 572 "src/cfgparser.yy" + case 121: +#line 597 "src/cfgparser.yy" { - currentMaterial->setTransAttCol( ntlColor(yyvsp[-2].floatValue,yyvsp[-1].floatValue,yyvsp[0].floatValue) ); + currentMaterial->setTransAttCol( ntlColor((yyvsp[-2].floatValue),(yyvsp[-1].floatValue),(yyvsp[0].floatValue)) ); } break; - case 120: -#line 577 "src/cfgparser.yy" + case 122: +#line 602 "src/cfgparser.yy" { - currentMaterial->setFresnel( yyvsp[0].intValue ); + currentMaterial->setFresnel( (yyvsp[0].intValue) ); } break; - case 121: -#line 588 "src/cfgparser.yy" + case 123: +#line 613 "src/cfgparser.yy" { - currentAttrib = new AttributeList(yyvsp[-1].charValue); - currentAttrName = yyvsp[-1].charValue; } + currentAttrib = new AttributeList((yyvsp[-1].charValue)); + currentAttrName = (yyvsp[-1].charValue); } break; - case 122: -#line 591 "src/cfgparser.yy" + case 124: +#line 616 "src/cfgparser.yy" { // store attribute //std::cerr << " NEW ATTR " << currentAttrName << std::endl; //currentAttrib->print(); @@ -1957,13 +2011,13 @@ yyreduce: currentAttrib = NULL; } break; - case 125: -#line 601 "src/cfgparser.yy" - { currentAttrValue.clear(); currentAttribAddName = yyvsp[-1].charValue; } + case 127: +#line 626 "src/cfgparser.yy" + { currentAttrValue.clear(); currentAttribAddName = (yyvsp[-1].charValue); } break; - case 126: -#line 602 "src/cfgparser.yy" + case 128: +#line 627 "src/cfgparser.yy" { currentAttrib->addAttr( currentAttribAddName, currentAttrValue, lineCount); //std::cerr << " ADD ATTR " << currentAttribAddName << std::endl; @@ -1971,83 +2025,83 @@ yyreduce: } break; - case 128: -#line 609 "src/cfgparser.yy" + case 130: +#line 634 "src/cfgparser.yy" { //std::cerr << "LLL "<<$2< 1.0) ) { + if ( ((yyvsp[0].floatValue) < 0.0) || ((yyvsp[0].floatValue) > 1.0) ) { yyerror("Value out of range (only 0 to 1 allowed)"); } /* pass that value up the tree */ - yyval.floatValue = yyvsp[0].floatValue; + (yyval.floatValue) = (yyvsp[0].floatValue); } break; - case 132: -#line 638 "src/cfgparser.yy" - { yyval.floatValue = yyvsp[0].floatValue; } + case 134: +#line 663 "src/cfgparser.yy" + { (yyval.floatValue) = (yyvsp[0].floatValue); } break; - case 133: -#line 640 "src/cfgparser.yy" - { yyval.floatValue = (float) yyvsp[0].intValue; /* conversion from integers */ } + case 135: +#line 665 "src/cfgparser.yy" + { (yyval.floatValue) = (float) (yyvsp[0].intValue); /* conversion from integers */ } break; - case 134: -#line 646 "src/cfgparser.yy" + case 136: +#line 671 "src/cfgparser.yy" { - if ( yyvsp[0].intValue <= 0 ) { + if ( (yyvsp[0].intValue) <= 0 ) { yy_error("Value out of range (has to be above zero)"); } /* pass that value up the tree */ - yyval.intValue = yyvsp[0].intValue; + (yyval.intValue) = (yyvsp[0].intValue); } break; - case 135: -#line 657 "src/cfgparser.yy" + case 137: +#line 682 "src/cfgparser.yy" { //cout << " " << $1 << " "; - if ( yyvsp[0].intValue < 0 ) { + if ( (yyvsp[0].intValue) < 0 ) { yy_error("Value out of range (has to be above or equal to zero)"); } /* pass that value up the tree */ - yyval.intValue = yyvsp[0].intValue; + (yyval.intValue) = (yyvsp[0].intValue); } break; - case 136: -#line 669 "src/cfgparser.yy" + case 138: +#line 694 "src/cfgparser.yy" { - if( ( yyvsp[0].intValue != 0 ) && ( yyvsp[0].intValue != 1 ) ) { + if( ( (yyvsp[0].intValue) != 0 ) && ( (yyvsp[0].intValue) != 1 ) ) { yy_error("Boolean value has to be 1|0, 'true'|'false' or 'on'|'off'!"); } /* pass that value up the tree */ - yyval.intValue = yyvsp[0].intValue; + (yyval.intValue) = (yyvsp[0].intValue); } break; } -/* Line 1010 of yacc.c. */ -#line 2051 "bld-std-gcc40/src/cfgparser.cpp" +/* Line 1037 of yacc.c. */ +#line 2105 "bld-std-gcc40/src/cfgparser.cpp" yyvsp -= yylen; yyssp -= yylen; @@ -2147,7 +2201,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse lookahead token after an + /* If just tried and failed to reuse look-ahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -2157,23 +2211,22 @@ yyerrlab: if (yychar == YYEOF) for (;;) { + YYPOPSTACK; if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); + yydestruct ("Error: popping", + yystos[*yyssp], yyvsp); } } else { - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); + yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; - } } - /* Else will try to reuse lookahead token after shifting the error + /* Else will try to reuse look-ahead token after shifting the error token. */ goto yyerrlab1; @@ -2190,7 +2243,7 @@ yyerrorlab: goto yyerrorlab; #endif - yyvsp -= yylen; +yyvsp -= yylen; yyssp -= yylen; yystate = *yyssp; goto yyerrlab1; @@ -2220,8 +2273,8 @@ yyerrlab1: if (yyssp == yyss) YYABORT; - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); + + yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK; yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2230,11 +2283,12 @@ yyerrlab1: if (yyn == YYFINAL) YYACCEPT; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + yystate = yyn; goto yynewstate; @@ -2250,6 +2304,9 @@ yyacceptlab: | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: + yydestruct ("Error: discarding lookahead", + yytoken, &yylval); + yychar = YYEMPTY; yyresult = 1; goto yyreturn; @@ -2272,7 +2329,7 @@ yyreturn: } -#line 677 "src/cfgparser.yy" +#line 702 "src/cfgparser.yy" /*---------------------------------------------------------------------------*/ @@ -2283,7 +2340,7 @@ yyreturn: /* parse warnings */ void yy_warn(char *s) { - printf("Config Parse Warning at Line %d: %s \n", lineCount, s); + debMsgStd("yy_warn",DM_WARNING,"Config Parse Warning at Line :"< #include -#define MCUBES_MAXPOLNUM 10000 -#define MCUBES_MAXVERTNUM 30000 @@ -33,7 +30,7 @@ IsoSurface::IsoSurface(double iso, double blend) : mStart(0.0), mEnd(0.0), mDomainExtent(0.0), mInitDone(false), - mLoopSubdivs(0), mSmoothSurface(0.0), mSmoothNormals(0.0), + mSmoothSurface(0.0), mSmoothNormals(0.0), mAcrossEdge(), mAdjacentFaces() { } @@ -325,14 +322,11 @@ void IsoSurface::triangulate( void ) // if(mSmoothNormals<=0.0) { smoothNormals(mSmoothSurface*0.5); } smoothSurface(mSmoothSurface); } - for(int i=0; i0.0) { smoothNormals(mSmoothNormals); } myTime_t tritimeend = getTime(); - debMsgStd("IsoSurface::triangulate",DM_MSG,"Took "<< ((tritimeend-tritimestart)/(double)1000.0)<<"s) " , 10 ); + debMsgStd("IsoSurface::triangulate",DM_MSG,"took "<< ((tritimeend-tritimestart)/(double)1000.0)<<"s, ss="< &a1 = mAdjacentFaces[v1]; - const vector &a2 = mAdjacentFaces[v2]; - for (int k1 = 0; k1 < (int)a1.size(); k1++) { - int other = a1[k1]; - if (other == i) - continue; - vector::const_iterator it = - std::find(a2.begin(), a2.end(), other); - if (it == a2.end()) - continue; - - //int ind = (faces[other].indexof(v1)+1)%3; - int ind = -1; - if( mIndices[other*3+0] == (unsigned int)v1 ) ind = 0; - else if( mIndices[other*3+1] == (unsigned int)v1 ) ind = 1; - else if( mIndices[other*3+2] == (unsigned int)v1 ) ind = 2; - ind = (ind+1)%3; - - if ( (int)mIndices[other*3 + ((ind+1)%3)] != v2) - continue; - mAcrossEdge[i*3 + j] = other; - mAcrossEdge[other*3 + ind] = i; - break; - } - } - } - - //errMsg("SUBDIV ACREDG", "Done.\n"); - } - - //errMsg("SUBDIV","start"); - // Introduce new vertices - int nf = (int)mIndices.size() / 3; - - //vector newverts(nf, TriMesh::Face(-1,-1,-1)); - vector newverts(nf*3); //, TriMesh::Face(-1,-1,-1)); - for(int j=0; j<(int)newverts.size(); j++) newverts[j] = -1; - - int old_nv = (int)mPoints.size(); - mPoints.reserve(4 * old_nv); - vector newvert_count(old_nv + 3*nf); // wichtig...? - //errMsg("NC", newvert_count.size() ); - - for (int i = 0; i < nf; i++) { - for (int j = 0; j < 3; j++) { - int ae = mAcrossEdge[i*3 + j]; - if (newverts[i*3 + j] == -1 && ae != -1) { - if (mAcrossEdge[ae*3 + 0] == i) - newverts[i*3 + j] = newverts[ae*3 + 0]; - else if (mAcrossEdge[ae*3 + 1] == i) - newverts[i*3 + j] = newverts[ae*3 + 1]; - else if (mAcrossEdge[ae*3 + 2] == i) - newverts[i*3 + j] = newverts[ae*3 + 2]; - } - if (newverts[i*3 + j] == -1) { - IsoLevelVertex ilv; - ilv.v = ntlVec3Gfx(0.0); - ilv.n = ntlVec3Gfx(0.0); - mPoints.push_back(ilv); - newverts[i*3 + j] = (int)mPoints.size() - 1; - if (ae != -1) { - if (mAcrossEdge[ae*3 + 0] == i) - newverts[ae*3 + 0] = newverts[i*3 + j]; - else if (mAcrossEdge[ae*3 + 1] == i) - newverts[ae*3 + 1] = newverts[i*3 + j]; - else if (mAcrossEdge[ae*3 + 2] == i) - newverts[ae*3 + 2] = newverts[i*3 + j]; - } - } - if(ae != -1) { - mPoints[newverts[i*3 + j]].v += - mPoints[ mIndices[i*3 + ( j )] ].v * 0.25f + // j = 0,1,2? - mPoints[ mIndices[i*3 + ((j+1)%3)] ].v * 0.375f + - mPoints[ mIndices[i*3 + ((j+2)%3)] ].v * 0.375f; -#if RECALCNORMALS==0 - mPoints[newverts[i*3 + j]].n += - mPoints[ mIndices[i*3 + ( j )] ].n * 0.25f + // j = 0,1,2? - mPoints[ mIndices[i*3 + ((j+1)%3)] ].n * 0.375f + - mPoints[ mIndices[i*3 + ((j+2)%3)] ].n * 0.375f; -#endif // RECALCNORMALS==0 - } else { - mPoints[newverts[i*3 + j]].v += - mPoints[ mIndices[i*3 + ((j+1)%3)] ].v * 0.5f + - mPoints[ mIndices[i*3 + ((j+2)%3)] ].v * 0.5f ; -#if RECALCNORMALS==0 - mPoints[newverts[i*3 + j]].n += - mPoints[ mIndices[i*3 + ((j+1)%3)] ].n * 0.5f + - mPoints[ mIndices[i*3 + ((j+2)%3)] ].n * 0.5f ; -#endif // RECALCNORMALS==0 - } - - newvert_count[newverts[i*3 + j]]++; - } - } - for (int i = old_nv; i < (int)mPoints.size(); i++) { - if (!newvert_count[i]) - continue; - float scale = 1.0f / newvert_count[i]; - mPoints[i].v *= scale; - -#if RECALCNORMALS==0 - //mPoints[i].n *= scale; - //normalize( mPoints[i].n ); -#endif // RECALCNORMALS==0 - } - - // Update old vertices - for (int i = 0; i < old_nv; i++) { - ntlVec3Gfx bdyavg(0.0), nbdyavg(0.0); - ntlVec3Gfx norm_bdyavg(0.0), norm_nbdyavg(0.0); // N - int nbdy = 0, nnbdy = 0; - int naf = (int)mAdjacentFaces[i].size(); - if (!naf) - continue; - for (int j = 0; j < naf; j++) { - int af = mAdjacentFaces[i][j]; - - int afi = -1; - if( mIndices[af*3+0] == (unsigned int)i ) afi = 0; - else if( mIndices[af*3+1] == (unsigned int)i ) afi = 1; - else if( mIndices[af*3+2] == (unsigned int)i ) afi = 2; - - int n1 = (afi+1) % 3; - int n2 = (afi+2) % 3; - if (mAcrossEdge[af*3 + n1] == -1) { - bdyavg += mPoints[newverts[af*3 + n1]].v; -#if RECALCNORMALS==0 - //norm_bdyavg += mPoints[newverts[af*3 + n1]].n; -#endif // RECALCNORMALS==0 - nbdy++; - } else { - nbdyavg += mPoints[newverts[af*3 + n1]].v; -#if RECALCNORMALS==0 - //norm_nbdyavg += mPoints[newverts[af*3 + n1]].n; -#endif // RECALCNORMALS==0 - nnbdy++; - } - if (mAcrossEdge[af*3 + n2] == -1) { - bdyavg += mPoints[newverts[af*3 + n2]].v; -#if RECALCNORMALS==0 - //norm_bdyavg += mPoints[newverts[af*3 + n2]].n; -#endif // RECALCNORMALS==0 - nbdy++; - } else { - nbdyavg += mPoints[newverts[af*3 + n2]].v; -#if RECALCNORMALS==0 - //norm_nbdyavg += mPoints[newverts[af*3 + n2]].n; -#endif // RECALCNORMALS==0 - nnbdy++; - } - } - - float alpha; - ntlVec3Gfx newpt; - if (nbdy) { - newpt = bdyavg / (float) nbdy; - alpha = 0.5f; - } else if (nnbdy) { - newpt = nbdyavg / (float) nnbdy; - if (nnbdy == 6) - alpha = 1.05; - else if (nnbdy == 8) - alpha = 0.86; - else if (nnbdy == 10) - alpha = 0.7; - else - alpha = 0.6; - } else { - continue; - } - mPoints[i].v *= 1.0f - alpha; - mPoints[i].v += newpt * alpha; - -#if RECALCNORMALS==0 - //mPoints[i].n *= 1.0f - alpha; - //mPoints[i].n += newpt * alpha; -#endif // RECALCNORMALS==0 - } - - // Insert new faces - mIndices.reserve(4*nf); - for (int i = 0; i < nf; i++) { - mIndices.push_back( mIndices[i*3 + 0]); - mIndices.push_back( newverts[i*3 + 2]); - mIndices.push_back( newverts[i*3 + 1]); - - mIndices.push_back( mIndices[i*3 + 1]); - mIndices.push_back( newverts[i*3 + 0]); - mIndices.push_back( newverts[i*3 + 2]); - - mIndices.push_back( mIndices[i*3 + 2]); - mIndices.push_back( newverts[i*3 + 1]); - mIndices.push_back( newverts[i*3 + 0]); - - mIndices[i*3+0] = newverts[i*3+0]; - mIndices[i*3+1] = newverts[i*3+1]; - mIndices[i*3+2] = newverts[i*3+2]; - } - - // recalc normals -#if RECALCNORMALS==1 - { - int nf = (int)mIndices.size()/3, nv = (int)mPoints.size(); - for (int i = 0; i < nv; i++) { - mPoints[i].n = ntlVec3Gfx(0.0); - } - for (int i = 0; i < nf; i++) { - const ntlVec3Gfx &p0 = mPoints[mIndices[i*3+0]].v; - const ntlVec3Gfx &p1 = mPoints[mIndices[i*3+1]].v; - const ntlVec3Gfx &p2 = mPoints[mIndices[i*3+2]].v; - ntlVec3Gfx a = p0-p1, b = p1-p2, c = p2-p0; - float l2a = normNoSqrt(a), l2b = normNoSqrt(b), l2c = normNoSqrt(c); - - ntlVec3Gfx facenormal = cross(a, b); - - mPoints[mIndices[i*3+0]].n += facenormal * (1.0f / (l2a * l2c)); - mPoints[mIndices[i*3+1]].n += facenormal * (1.0f / (l2b * l2a)); - mPoints[mIndices[i*3+2]].n += facenormal * (1.0f / (l2c * l2b)); - } - - for (int i = 0; i < nv; i++) { - normalize(mPoints[i].n); - } - } -#else // RECALCNORMALS==1 - for (int i = 0; i < (int)mPoints.size(); i++) { - normalize(mPoints[i].n); - } -#endif // RECALCNORMALS==1 - - //errMsg("SUBDIV","done nv:"< class IsoSurface : public ntlGeometryObject //, public S { @@ -89,8 +85,6 @@ class IsoSurface : //! initialized? bool mInitDone; - //! no. of refinement steps - int mLoopSubdivs; //! amount of surface smoothing float mSmoothSurface; //! amount of normal smoothing @@ -116,7 +110,6 @@ class IsoSurface : //! set iso level value for surface reconstruction inline void setIsolevel(double set) { mIsoValue = set; }; //! set loop subdiv num - inline void setLoopSubdivs(int set) { mLoopSubdivs = set; }; inline void setSmoothSurface(float set) { mSmoothSurface = set; }; inline void setSmoothNormals(float set) { mSmoothNormals = set; }; @@ -161,118 +154,6 @@ class IsoSurface : -class TriMesh { -public: - // Types - struct Face { - int v[3]; - - Face() {} - Face(const int &v0, const int &v1, const int &v2) - { v[0] = v0; v[1] = v1; v[2] = v2; } - Face(const int *v_) - { v[0] = v_[0]; v[1] = v_[1]; v[2] = v_[2]; } - int &operator[] (int i) { return v[i]; } - const int &operator[] (int i) const { return v[i]; } - operator const int * () const { return &(v[0]); } - operator const int * () { return &(v[0]); } - operator int * () { return &(v[0]); } - int indexof(int v_) const - { - return (v[0] == v_) ? 0 : - (v[1] == v_) ? 1 : - (v[2] == v_) ? 2 : -1; - } - }; - - struct BBox { - public: - BBox() {}; - ntlVec3Gfx min, max; - ntlVec3Gfx center() const { return (min+max)*0.5f; } - ntlVec3Gfx size() const { return max - min; } - }; - - struct BSphere { - ntlVec3Gfx center; - float r; - }; - - // Enums - enum tstrip_rep { TSTRIP_LENGTH, TSTRIP_TERM }; - - // The basics: vertices and faces - vector vertices; - vector faces; - - // Triangle strips - vector tstrips; - - // Other per-vertex properties - //vector colors; - vector confidences; - vector flags; - unsigned flag_curr; - - // Computed per-vertex properties - vector normals; - vector pdir1, pdir2; - vector curv1, curv2; - //vector< Vec<4,float> > dcurv; - vector cornerareas; - vector pointareas; - - // Bounding structures - BBox bbox; - BSphere bsphere; - - // Connectivity structures: - // For each vertex, all neighboring vertices - vector< vector > neighbors; - // For each vertex, all neighboring faces - vector< vector > adjacentfaces; - // For each face, the three faces attached to its edges - // (for example, across_edge[3][2] is the number of the face - // that's touching the edge opposite vertex 2 of face 3) - vector across_edge; - - // Compute all this stuff... - void need_tstrips(); - void convert_strips(tstrip_rep rep); - void need_faces(); - void need_normals(); - void need_pointareas(); - void need_curvatures(); - void need_dcurv(); - void need_bbox(); - void need_bsphere(); - void need_neighbors(); - void need_adjacentfaces(); - void need_across_edge(); - - // Input and output - static TriMesh *read(const char *filename); - void write(const char *filename); - - // Statistics - // XXX - Add stuff here - float feature_size(); - - // Useful queries - // XXX - Add stuff here - bool is_bdy(int v) - { - if (neighbors.empty()) need_neighbors(); - if (adjacentfaces.empty()) need_adjacentfaces(); - return neighbors[v].size() != adjacentfaces[v].size(); - } - - // Debugging printout, controllable by a "verbose"ness parameter - static int verbose; - static void set_verbose(int); - static int dprintf(const char *format, ...); -}; - #define ISOSURFACE_H #endif diff --git a/intern/elbeem/intern/lbmdimensions.h b/intern/elbeem/intern/lbmdimensions.h index cf5077a07a0..ca87e807500 100644 --- a/intern/elbeem/intern/lbmdimensions.h +++ b/intern/elbeem/intern/lbmdimensions.h @@ -249,7 +249,7 @@ class LbmModelLBGK : public DQ , public LbmSolverInterface { // virtual destructor virtual ~LbmModelLBGK() {}; //! id string of solver - std::string getIdString() { return DQ::getIdString() + std::string("lbgk]"); } + string getIdString() { return DQ::getIdString() + string("lbgk]"); } /*! calculate length of velocity vector */ static inline LbmFloat getVelVecLen(int l, LbmFloat ux,LbmFloat uy,LbmFloat uz) { diff --git a/intern/elbeem/intern/lbmfsgrsolver.h b/intern/elbeem/intern/lbmfsgrsolver.h index c94a2e06efe..22f1f361644 100644 --- a/intern/elbeem/intern/lbmfsgrsolver.h +++ b/intern/elbeem/intern/lbmfsgrsolver.h @@ -12,7 +12,6 @@ #ifndef LBMFSGRSOLVER_H #include "utilities.h" -#include "arrays.h" #include "lbmdimensions.h" #include "lbmfunctions.h" #include "ntl_scene.h" @@ -56,10 +55,11 @@ ERROR - define model first! #define USE_LES 1 //! order of interpolation (1/2) -#define INTORDER 1 +#define INTORDER 2 //! order of interpolation (0=always current/1=interpolate/2=always other) -#define TIMEINTORDER 0 +//#define TIMEINTORDER 0 +// TODO remove interpol t param, also interTime //! refinement border method (1 = small border / 2 = larger) #define REFINEMENTBORDER 1 @@ -86,7 +86,6 @@ ERROR - define model first! #define COMPRESSGRIDS 0 #endif - //! threshold for level set fluid generation/isosurface #define LS_FLUIDTHRESHOLD 0.5 @@ -366,7 +365,6 @@ class LbmFsgrSolver : //! Mcubes object for surface reconstruction IsoSurface *mpPreviewSurface; - int mLoopSubdivs; float mSmoothSurface; float mSmoothNormals; @@ -453,8 +451,6 @@ class LbmFsgrSolver : /*! LES C_smago paramter for finest grid */ float mInitialCsmago; - /*! LES C_smago paramter for coarser grids */ - float mInitialCsmagoCoarse; /*! LES stats for non OPT3D */ LbmFloat mDebugOmegaRet; @@ -1194,7 +1190,7 @@ class LbmFsgrSolver : if(RFLAG_NB(lev, i,j,k,SRCS(lev),l)&CFBnd) { errMsg("???", "bnd-err-nobndfl"); D::mPanic=1; \ } else { m[l] = QCELL_NBINV(lev, i, j, k, SRCS(lev), l, l); } \ } \ -f__printf(stderr,"QSDM at %d,%d,%d lcsmqo=%25.15f, lcsmomega=%f \n", i,j,k, lcsmqo,lcsmomega ); \ +errMsg("T","QSDM at %d,%d,%d lcsmqo=%25.15f, lcsmomega=%f \n", i,j,k, lcsmqo,lcsmomega ); \ rho=m[0]; ux = mLevel[lev].gravity[0]; uy = mLevel[lev].gravity[1]; uz = mLevel[lev].gravity[2]; \ ux = mLevel[lev].gravity[0]; uy = mLevel[lev].gravity[1]; uz = mLevel[lev].gravity[2]; \ D::collideArrays( m, rho,ux,uy,uz, OMEGA(lev), mLevel[lev].lcsmago , &mDebugOmegaRet ); \ @@ -1242,7 +1238,7 @@ LbmFsgrSolver::LbmFsgrSolver() : mNumProblems(0), mAvgMLSUPS(0.0), mAvgMLSUPSCnt(0.0), mpPreviewSurface(NULL), - mLoopSubdivs(0), mSmoothSurface(0.0), mSmoothNormals(0.0), + mSmoothSurface(0.0), mSmoothNormals(0.0), mTimeAdap(false), mOutputSurfacePreview(0), mPreviewFactor(0.25), mFVHeight(0.0), mFVArea(1.0), mUpdateFVHeight(false), @@ -1258,7 +1254,7 @@ LbmFsgrSolver::LbmFsgrSolver() : mIsoWeightMethod(2), mMaxRefine(1), mDfScaleUp(-1.0), mDfScaleDown(-1.0), - mInitialCsmago(0.04), mInitialCsmagoCoarse(1.0), mDebugOmegaRet(0.0), + mInitialCsmago(0.04), mDebugOmegaRet(0.0), mNumInvIfTotal(0), mNumFsgrChanges(0), mDisableStandingFluidInit(0), mForceTadapRefine(-1) @@ -1371,12 +1367,18 @@ LbmFsgrSolver::parseAttrList() mIsoWeightMethod= D::mpAttrs->readInt("isoweightmethod", mIsoWeightMethod, "SimulationLbm","mIsoWeightMethod", false ); mInitSurfaceSmoothing = D::mpAttrs->readInt("initsurfsmooth", mInitSurfaceSmoothing, "SimulationLbm","mInitSurfaceSmoothing", false ); - mLoopSubdivs = D::mpAttrs->readInt("loopsubdivs", mLoopSubdivs, "SimulationLbm","mLoopSubdivs", false ); mSmoothSurface = D::mpAttrs->readFloat("smoothsurface", mSmoothSurface, "SimulationLbm","mSmoothSurface", false ); mSmoothNormals = D::mpAttrs->readFloat("smoothnormals", mSmoothNormals, "SimulationLbm","mSmoothNormals", false ); mInitialCsmago = D::mpAttrs->readFloat("csmago", mInitialCsmago, "SimulationLbm","mInitialCsmago", false ); + // deprecated! + float mInitialCsmagoCoarse = 0.0; mInitialCsmagoCoarse = D::mpAttrs->readFloat("csmago_coarse", mInitialCsmagoCoarse, "SimulationLbm","mInitialCsmagoCoarse", false ); +#if USE_LES==1 +#else // USE_LES==1 + debMsgStd("LbmFsgrSolver", DM_WARNING, "LES model switched off!",2); + mInitialCsmago = 0.0; +#endif // USE_LES==1 // refinement mMaxRefine = D::mpAttrs->readInt("maxrefine", mMaxRefine ,"LbmFsgrSolver", "mMaxRefine", true); @@ -1440,7 +1442,7 @@ LbmFsgrSolver::initLevelOmegas() // if(strstr(D::getName().c_str(),"Debug")) mLevel[i].lcsmago = mLevel[mMaxRefine].lcsmago * (LbmFloat)(mMaxRefine-i)*0.5+1.0; //if(strstr(D::getName().c_str(),"Debug")) mLevel[i].lcsmago = mLevel[mMaxRefine].lcsmago * ((LbmFloat)(mMaxRefine-i)*1.0 + 1.0 ); //if(strstr(D::getName().c_str(),"Debug")) mLevel[i].lcsmago = 0.99; - mLevel[i].lcsmago = mInitialCsmagoCoarse; + mLevel[i].lcsmago = mInitialCsmago; mLevel[i].lcsmago_sqr = mLevel[i].lcsmago*mLevel[i].lcsmago; mLevel[i].lcnu = (2.0* (1.0/mLevel[i].omega)-1.0) * (1.0/6.0); } @@ -1529,7 +1531,6 @@ LbmFsgrSolver::initialize( ntlTree* /*tree*/, vector* /*o <<"LBM_EPSILON="<::initialize( ntlTree* /*tree*/, vector* /*o // init isosurf D::mpIso->setIsolevel( D::mIsoValue ); - D::mpIso->setLoopSubdivs( mLoopSubdivs ); // approximate feature size with mesh resolution float featureSize = mLevel[ mMaxRefine ].nodeSize*0.5; D::mpIso->setSmoothSurface( mSmoothSurface * featureSize ); @@ -1856,11 +1856,6 @@ LbmFsgrSolver::initialize( ntlTree* /*tree*/, vector* /*o performRefinement(lev); performCoarsening(lev); coarseRestrictFromFine(lev); - - //while( performRefinement(lev) | performCoarsening(lev)){ - //coarseRestrictFromFine(lev); - //debMsgStd("LbmFsgrSolver::initialize",DM_MSG,"Coarsening level "<::stepMain() if(lev==mMaxRefine) { // always advance fine level... fineAdvance(); - //performRefinement(lev-1); // TEST here? } else { - performRefinement(lev); // TEST here? - performCoarsening(lev); // TEST here? + performRefinement(lev); + performCoarsening(lev); coarseRestrictFromFine(lev); coarseAdvance(lev); - //performRefinement(lev-1); // TEST here? } #if FSGR_OMEGA_DEBUG==1 errMsg("LbmFsgrSolver::step","LES stats l="<::mainLoop(int lev) #if COMPRESSGRIDS==1 #if PARALLEL==1 - //fprintf(stderr," (id=%d k=%d) ",id,k); + //frintf(stderr," (id=%d k=%d) ",id,k); # pragma omp barrier #endif // PARALLEL==1 #else // COMPRESSGRIDS==1 @@ -3795,7 +3777,7 @@ LbmFsgrSolver::coarseRestrictFromFine(int lev) const LbmFloat alpha = 1.0; const LbmFloat gw = sqrt(2.0*D::cDimension); #ifndef ELBEEM_BLENDER -errMsg("coarseRestrictFromFine", "TCRFF_DFDEBUG2 test df/dir num!"); + errMsg("coarseRestrictFromFine", "TCRFF_DFDEBUG2 test df/dir num!"); #endif for(int n=0;(n::performRefinement(int lev) { if((lev<0) || ((lev+1)>mMaxRefine)) return false; bool change = false; //bool nbsok; - // TIMEINTORDER ? + // FIXME remove TIMEINTORDER ? LbmFloat interTime = 0.0; // update curr from other, as streaming afterwards works on curr // thus read only from srcSet, modify other diff --git a/intern/elbeem/intern/lbminterface.cpp b/intern/elbeem/intern/lbminterface.cpp index f64132d755b..db7705de0a8 100644 --- a/intern/elbeem/intern/lbminterface.cpp +++ b/intern/elbeem/intern/lbminterface.cpp @@ -614,7 +614,7 @@ void LbmSolverInterface::markedClearList() { // 32k -std::string convertSingleFlag2String(CellFlagType cflag) { +string convertSingleFlag2String(CellFlagType cflag) { CellFlagType flag = cflag; if(flag == CFUnused ) return string("cCFUnused"); if(flag == CFEmpty ) return string("cCFEmpty"); @@ -649,7 +649,7 @@ std::string convertSingleFlag2String(CellFlagType cflag) { } //! helper function to convert flag to string (for debuggin) -std::string convertCellFlagType2String( CellFlagType cflag ) { +string convertCellFlagType2String( CellFlagType cflag ) { int flag = cflag; const int jmax = sizeof(CellFlagType)*8; diff --git a/intern/elbeem/intern/lbminterface.h b/intern/elbeem/intern/lbminterface.h index 9b7c07ebc02..294d6a76627 100644 --- a/intern/elbeem/intern/lbminterface.h +++ b/intern/elbeem/intern/lbminterface.h @@ -224,7 +224,7 @@ class CellIdentifierInterface { virtual ~CellIdentifierInterface() {}; //! return node as string (with some basic info) - virtual std::string getAsString() = 0; + virtual string getAsString() = 0; //! compare cids virtual bool equal(CellIdentifierInterface* other) = 0; @@ -504,13 +504,13 @@ class LbmSolverInterface ntlRenderGlobals *mpGlob; // list for marked cells - std::vector mMarkedCells; + vector mMarkedCells; int mMarkedCellIndex; }; //! helper function to convert flag to string (for debuggin) -std::string convertCellFlagType2String( CellFlagType flag ); -std::string convertSingleFlag2String(CellFlagType cflag); +string convertCellFlagType2String( CellFlagType flag ); +string convertSingleFlag2String(CellFlagType cflag); #endif // LBMINTERFACE_H diff --git a/intern/elbeem/intern/ntl_geometrybox.cpp b/intern/elbeem/intern/ntl_geometrybox.cpp deleted file mode 100644 index 449e2801cde..00000000000 --- a/intern/elbeem/intern/ntl_geometrybox.cpp +++ /dev/null @@ -1,302 +0,0 @@ -/****************************************************************************** - * - * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method - * Copyright 2003,2004 Nils Thuerey - * - * A simple box object - * - *****************************************************************************/ - -#include "ntl_geometrybox.h" -#include "ntl_ray.h" -#include "ntl_scene.h" - - -/****************************************************************************** - * Default Constructor - *****************************************************************************/ -ntlGeometryBox::ntlGeometryBox( void ) : - ntlGeometryObject(), - mvStart( 0.0 ), - mvEnd( 1.0 ), - mRefinement(0) -{ -} - -/****************************************************************************** - * Init Constructor - *****************************************************************************/ -/*ntlGeometryBox::ntlGeometryBox( ntlVec3Gfx start, ntlVec3Gfx end ) : - ntlGeometryObject(), - mvStart( start ), - mvEnd( end ), - mRefinement(0) -{ -}*/ - -/*****************************************************************************/ -/* Init refinement attribute */ -/*****************************************************************************/ -void ntlGeometryBox::initialize(ntlRenderGlobals *glob) { - ntlGeometryObject::initialize(glob); - //READATTR(ntlGeometryBox, mRefinement, refine, Int, false); - mRefinement = mpAttrs->readInt("refine", mRefinement,"ntlGeometryBox", "mRefinement", false); - - checkBoundingBox(mvStart,mvEnd, "ntlGeometryBox::initialize"); -} - - -/****************************************************************************** - * - *****************************************************************************/ -void -ntlGeometryBox::getTriangles( vector *triangles, - vector *vertices, - vector *normals, int objectId ) -{ - int doBack = 1; - int doFront = 1; - int doTop = 1; - int doBottom = 1; - int doLeft = 1; - int doRight = 1; - - /*int mRefinement = 0; - string refineAttr("refine"); - if(mpAttrs->exists(refineAttr)) { - mRefinement = mpAttrs->find(refineAttr)->getAsInt(); - //debugOut("GeoBox Ref set to '"<< mpAttrs->find(refineAttr)->getCompleteString() <<"' " , 3); - mpAttrs->find(refineAttr)->setUsed(true); - }*/ - - if(mRefinement==0) { - gfxReal s0 = mvStart[0]; - gfxReal s1 = mvStart[1]; - gfxReal s2 = mvStart[2]; - gfxReal e0 = mvEnd[0]; - gfxReal e1 = mvEnd[1]; - gfxReal e2 = mvEnd[2]; - ntlVec3Gfx p1,p2,p3; - ntlVec3Gfx n1,n2,n3; - - /* front plane */ - if(doFront) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, 0.0, -1.0 ); - p1 = ntlVec3Gfx( s0, s1, s2 ); - p3 = ntlVec3Gfx( e0, s1, s2 ); - p2 = ntlVec3Gfx( s0, e1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( e0, e1, s2 ); - p3 = ntlVec3Gfx( s0, e1, s2 ); - p2 = ntlVec3Gfx( e0, s1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - - /* back plane k */ - if(doBack) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, 0.0, 1.0 ); - p1 = ntlVec3Gfx( s0, s1, e2 ); - p3 = ntlVec3Gfx( s0, e1, e2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, e1, e2 ); - p3 = ntlVec3Gfx( e0, e1, e2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - - /* bottom plane k */ - if(doBottom) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, -1.0, 0.0 ); - p1 = ntlVec3Gfx( e0, s1, s2 ); - p3 = ntlVec3Gfx( s0, s1, s2 ); - p2 = ntlVec3Gfx( s0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, s1, e2 ); - p3 = ntlVec3Gfx( e0, s1, e2 ); - p2 = ntlVec3Gfx( e0, s1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - - /* top plane k */ - if(doTop) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, 1.0, 0.0 ); - p1 = ntlVec3Gfx( e0, e1, e2 ); - p2 = ntlVec3Gfx( e0, e1, s2 ); - p3 = ntlVec3Gfx( s0, e1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, e1, s2 ); - p2 = ntlVec3Gfx( s0, e1, e2 ); - p3 = ntlVec3Gfx( e0, e1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - - /* left plane k */ - if(doLeft) { - n1 = n2 = n3 = ntlVec3Gfx( -1.0, 0.0, 0.0 ); - p1 = ntlVec3Gfx( s0, s1, e2 ); - p3 = ntlVec3Gfx( s0, s1, s2 ); - p2 = ntlVec3Gfx( s0, e1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, e1, s2 ); - p3 = ntlVec3Gfx( s0, e1, e2 ); - p2 = ntlVec3Gfx( s0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - - /* right plane k */ - if(doRight) { - n1 = n2 = n3 = ntlVec3Gfx( 1.0, 0.0, 0.0 ); - p1 = ntlVec3Gfx( e0, e1, e2 ); - p3 = ntlVec3Gfx( e0, e1, s2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( e0, e1, s2 ); - p3 = ntlVec3Gfx( e0, s1, s2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - - } else { - // refined box - gfxReal S0 = mvStart[0]; - gfxReal S1 = mvStart[1]; - gfxReal S2 = mvStart[2]; - gfxReal v0 = (mvEnd[0]-mvStart[0])/(gfxReal)(mRefinement+1); - gfxReal v1 = (mvEnd[1]-mvStart[1])/(gfxReal)(mRefinement+1); - gfxReal v2 = (mvEnd[2]-mvStart[2])/(gfxReal)(mRefinement+1); - ntlVec3Gfx p1,p2,p3; - ntlVec3Gfx n1,n2,n3; - - for(int i=0; i<=mRefinement; i++) - for(int j=0; j<=mRefinement; j++) { - gfxReal s0 = S0 + i*v0; - gfxReal s1 = S1 + j*v1; - gfxReal s2 = S2; - gfxReal e0 = S0 + (i+1.0)*v0; - gfxReal e1 = S1 + (j+1.0)*v1; - /* front plane */ - if(doFront) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, 0.0, -1.0 ); - p1 = ntlVec3Gfx( s0, s1, s2 ); - p3 = ntlVec3Gfx( e0, s1, s2 ); - p2 = ntlVec3Gfx( s0, e1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( e0, e1, s2 ); - p3 = ntlVec3Gfx( s0, e1, s2 ); - p2 = ntlVec3Gfx( e0, s1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - } // i,j - for(int i=0; i<=mRefinement; i++) - for(int j=0; j<=mRefinement; j++) { - gfxReal s0 = S0 + i*v0; - gfxReal s1 = S1 + j*v1; - gfxReal e0 = S0 + (i+1.0)*v0; - gfxReal e1 = S1 + (j+1.0)*v1; - gfxReal e2 = S2 + (mRefinement+1.0)*v2; - /* back plane k */ - if(doBack) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, 0.0, 1.0 ); - p1 = ntlVec3Gfx( s0, s1, e2 ); - p3 = ntlVec3Gfx( s0, e1, e2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, e1, e2 ); - p3 = ntlVec3Gfx( e0, e1, e2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - } - - for(int i=0; i<=mRefinement; i++) - for(int j=0; j<=mRefinement; j++) { - - gfxReal s0 = S0 + i*v0; - gfxReal s1 = S1; - gfxReal s2 = S2 + j*v2; - gfxReal e0 = S0 + (i+1.0)*v0; - gfxReal e2 = S2 + (j+1.0)*v2; - /* bottom plane k */ - if(doBottom) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, -1.0, 0.0 ); - p1 = ntlVec3Gfx( e0, s1, s2 ); - p3 = ntlVec3Gfx( s0, s1, s2 ); - p2 = ntlVec3Gfx( s0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, s1, e2 ); - p3 = ntlVec3Gfx( e0, s1, e2 ); - p2 = ntlVec3Gfx( e0, s1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - } - - for(int i=0; i<=mRefinement; i++) - for(int j=0; j<=mRefinement; j++) { - - gfxReal s0 = S0 + i*v0; - gfxReal s2 = S2 + j*v2; - gfxReal e0 = S0 + (i+1.0)*v0; - gfxReal e1 = S1 + (mRefinement+1.0)*v1; - gfxReal e2 = S2 + (j+1.0)*v2; - /* top plane k */ - if(doTop) { - n1 = n2 = n3 = ntlVec3Gfx( 0.0, 1.0, 0.0 ); - p1 = ntlVec3Gfx( e0, e1, e2 ); - p2 = ntlVec3Gfx( e0, e1, s2 ); - p3 = ntlVec3Gfx( s0, e1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, e1, s2 ); - p2 = ntlVec3Gfx( s0, e1, e2 ); - p3 = ntlVec3Gfx( e0, e1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - } - - for(int i=0; i<=mRefinement; i++) - for(int j=0; j<=mRefinement; j++) { - gfxReal s0 = S0; - gfxReal s1 = S1 + i*v1; - gfxReal s2 = S2 + j*v2; - gfxReal e1 = S1 + (i+1.0)*v1; - gfxReal e2 = S2 + (j+1.0)*v2; - /* left plane k */ - if(doLeft) { - n1 = n2 = n3 = ntlVec3Gfx( -1.0, 0.0, 0.0 ); - p1 = ntlVec3Gfx( s0, s1, e2 ); - p3 = ntlVec3Gfx( s0, s1, s2 ); - p2 = ntlVec3Gfx( s0, e1, s2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( s0, e1, s2 ); - p3 = ntlVec3Gfx( s0, e1, e2 ); - p2 = ntlVec3Gfx( s0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - } - - for(int i=0; i<=mRefinement; i++) - for(int j=0; j<=mRefinement; j++) { - gfxReal s1 = S1 + i*v1; - gfxReal s2 = S2 + j*v2; - gfxReal e0 = S0 + (mRefinement+1.0)*v0; - gfxReal e1 = S1 + (i+1.0)*v1; - gfxReal e2 = S2 + (j+1.0)*v2; - /* right plane k */ - if(doRight) { - n1 = n2 = n3 = ntlVec3Gfx( 1.0, 0.0, 0.0 ); - p1 = ntlVec3Gfx( e0, e1, e2 ); - p3 = ntlVec3Gfx( e0, e1, s2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - p1 = ntlVec3Gfx( e0, e1, s2 ); - p3 = ntlVec3Gfx( e0, s1, s2 ); - p2 = ntlVec3Gfx( e0, s1, e2 ); - sceneAddTriangle( p1,p2,p3, n1,n2,n3, ntlVec3Gfx(0.0), 1 ); - } - } - - } // do ref - -} - - diff --git a/intern/elbeem/intern/ntl_geometrybox.h b/intern/elbeem/intern/ntl_geometrybox.h deleted file mode 100644 index 114c253a106..00000000000 --- a/intern/elbeem/intern/ntl_geometrybox.h +++ /dev/null @@ -1,63 +0,0 @@ -/****************************************************************************** - * - * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method - * Copyright 2003,2004 Nils Thuerey - * - * A simple box object - * - *****************************************************************************/ - -#ifndef NTL_GEOBOX_HH -#define NTL_GEOBOX_HH - -#include "ntl_geometryobject.h" - - -/*! A simple box object generatedd by 12 triangles */ -class ntlGeometryBox : public ntlGeometryObject -{ - - public: - /* Init constructor */ - ntlGeometryBox( void ); - /* Init constructor */ - //ntlGeometryBox( ntlVec3Gfx start, ntlVec3Gfx end ); - - //! Return type id - virtual int getTypeId() { return GEOCLASSTID_BOX; } - - virtual void getTriangles( vector *triangles, - vector *vertices, - vector *normals, int objectId ); - - /*! for easy GUI detection get start of axis aligned bounding box, return NULL of no BB */ - virtual inline ntlVec3Gfx *getBBStart() { return &mvStart; } - virtual inline ntlVec3Gfx *getBBEnd() { return &mvEnd; } - - /*! Init refinement attribute */ - virtual void initialize(ntlRenderGlobals *glob); - - private: - - /*! Start and end points of box */ - ntlVec3Gfx mvStart, mvEnd; - - /*! refinement factor */ - int mRefinement; - - - public: - - /* Access methods */ - /*! Access start vector */ - inline ntlVec3Gfx getStart( void ){ return mvStart; } - inline void setStart( const ntlVec3Gfx &set ){ mvStart = set; } - /*! Access end vector */ - inline ntlVec3Gfx getEnd( void ){ return mvEnd; } - inline void setEnd( const ntlVec3Gfx &set ){ mvEnd = set; } - -}; - - - -#endif diff --git a/intern/elbeem/intern/ntl_geometryshader.h b/intern/elbeem/intern/ntl_geometryshader.h index 12cd5e7c0bc..06a11838149 100644 --- a/intern/elbeem/intern/ntl_geometryshader.h +++ b/intern/elbeem/intern/ntl_geometryshader.h @@ -35,14 +35,14 @@ class ntlGeometryShader : virtual int postGeoConstrInit(ntlRenderGlobals *glob) { glob=NULL; /*unused*/ return 0; }; /*! Get start iterator for all objects */ - virtual std::vector::iterator getObjectsBegin() { return mObjects.begin(); } + virtual vector::iterator getObjectsBegin() { return mObjects.begin(); } /*! Get end iterator for all objects */ - virtual std::vector::iterator getObjectsEnd() { return mObjects.end(); } + virtual vector::iterator getObjectsEnd() { return mObjects.end(); } protected: //! vector for the objects - std::vector mObjects; + vector mObjects; }; diff --git a/intern/elbeem/intern/ntl_geometrysphere.cpp b/intern/elbeem/intern/ntl_geometrysphere.cpp deleted file mode 100644 index 66d9625d1f8..00000000000 --- a/intern/elbeem/intern/ntl_geometrysphere.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/****************************************************************************** - * - * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method - * Copyright 2003,2004 Nils Thuerey - * - * A simple sphere object - * - *****************************************************************************/ - -#include "ntl_geometrysphere.h" -#include "ntl_ray.h" -#include "ntl_scene.h" - - -/****************************************************************************** - * Default Constructor - *****************************************************************************/ -ntlGeometrySphere::ntlGeometrySphere() : - ntlGeometryObject(), - mvCenter( 0.0 ), - mRadius( 1.0 ), - mRefPolar(5), mRefAzim(5) -{ -} - - -/*****************************************************************************/ -/* Init attributes */ -/*****************************************************************************/ -void ntlGeometrySphere::initialize(ntlRenderGlobals *glob) { - ntlGeometryObject::initialize(glob); - - mvCenter = vec2G(mpAttrs->readVec3d("center", vec2D(mvCenter) ,"ntlGeometrySphere", "mvCenter", false)); - mRadius = mpAttrs->readFloat("radius", mRadius ,"ntlGeometrySphere", "mRadius", false); - mRefPolar = mpAttrs->readInt ("refpolar", mRefPolar,"ntlGeometrySphere", "mRefPolar", false); - mRefAzim = mpAttrs->readInt ("refazim", mRefAzim ,"ntlGeometrySphere", "mRefAzim", false); - if(mRefPolar<1) mRefPolar = 1; - if(mRefAzim<1) mRefAzim = 1; - mRefAzim *= 4; - - mvBBStart = mvCenter - ntlVec3Gfx(mRadius); - mvBBEnd = mvCenter + ntlVec3Gfx(mRadius); -} - - -/****************************************************************************** - * - *****************************************************************************/ - -ntlVec3Gfx getSphereCoord(gfxReal radius, gfxReal phi, gfxReal theta) { - return ntlVec3Gfx( - radius * cos(theta) * sin(phi), - radius * sin(theta) * sin(phi), - radius * cos(phi) - ); -}; - -void -ntlGeometrySphere::getTriangles( vector *triangles, - vector *vertices, - vector *normals, int objectId ) -{ - - gfxReal phiD = 0.5* M_PI/ (gfxReal)mRefPolar; - gfxReal thetaD = 2.0* M_PI/ (gfxReal)mRefAzim; - gfxReal phi = 0.0; - for(int i=0; i *triangles, - vector *vertices, - vector *normals, int objectId ); - - /*! for easy GUI detection get start of axis aligned bounding box, return NULL of no BB */ - virtual inline ntlVec3Gfx *getBBStart() { return &mvBBStart; } - virtual inline ntlVec3Gfx *getBBEnd() { return &mvBBEnd; } - - /*! Init refinement attribute */ - virtual void initialize(ntlRenderGlobals *glob); - - private: - - /*! Center of the sphere */ - ntlVec3Gfx mvCenter; - - /*! radius */ - gfxReal mRadius; - - /*! refinement factor along polar angle */ - int mRefPolar; - /*! refinement factor per segment (azimuthal angle) */ - int mRefAzim; - - /*! Start and end points of bounding box */ - ntlVec3Gfx mvBBStart, mvBBEnd; - - public: - - /* Access methods */ - /*! Access start vector */ - inline ntlVec3Gfx getCenter( void ){ return mvCenter; } - inline void setCenter( const ntlVec3Gfx &set ){ mvCenter = set; } - -}; - - - -#define NTL_GEOSPHERE_H -#endif diff --git a/intern/elbeem/intern/ntl_image.cpp b/intern/elbeem/intern/ntl_image.cpp deleted file mode 100644 index bf1aa61890a..00000000000 --- a/intern/elbeem/intern/ntl_image.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/****************************************************************************** - * - * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method - * Copyright 2003,2004 Nils Thuerey - * - * a templated image class - * - *****************************************************************************/ - -#include "ntl_image.h" - - - diff --git a/intern/elbeem/intern/ntl_image.h b/intern/elbeem/intern/ntl_image.h deleted file mode 100644 index f6d9093e95c..00000000000 --- a/intern/elbeem/intern/ntl_image.h +++ /dev/null @@ -1,167 +0,0 @@ -/****************************************************************************** - * - * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method - * Copyright 2003,2004 Nils Thuerey - * - * a templated image class - * - *****************************************************************************/ - -#ifndef NTL_IMAGE_HH -#define NTL_IMAGE_HH - -#include "ntl_vector3dim.h" -#include "utilities.h" - - -template -class ntlImage -{ -public: - /*! Default constructor */ - ntlImage(); - /*! Init constructor */ - ntlImage(int x,int y, Value def); - /*! Destructor, delete contents */ - ~ntlImage(); - - /*! Write the image to a ppm file */ - void writePpm(const char* name); - - /*! normalize values into range 0..1 */ - void normalize( void ); - - /*! Get a pixel from the image */ - inline Value get(int x, int y) { return mpC[y*mSizex+x]; } - - /*! Set a pixel in the image */ - inline void set(int x, int y, Value setv) { mpC[y*mSizex+x] = setv; } - -protected: -private: - - /*! size in x dimension */ - int mSizex; - - /*! size in y dimension */ - int mSizey; - - /*! Image contents */ - Value *mpC; - -}; - - -/*! Default constructor */ -template -ntlImage::ntlImage() -{ - mSizex = 0; - mSizey = 0; - mpC = NULL; -} - -/*! Init constructor */ -template -ntlImage::ntlImage(int x,int y,Value def) -{ - mSizex = x; - mSizey = y; - mpC = new Value[x*y]; - - for(int i=0;i<(x*y);i++) mpC[i] = def; -} - -/*! Destructor, delete contents */ -template -ntlImage::~ntlImage() -{ - if(mpC != NULL) { - delete [] mpC; - } -} - - -/*! Write the image to a ppm file */ -template -void ntlImage::writePpm(const char* name) -{ - /* write file */ - /* open output file */ - FILE *outfile; - if ( (outfile = fopen(name,"w")) == NULL ) { - errorOut( "ntlImage::writePpm ERROR: Open out file failed "<max) max = mpC[j]; - } - - /* check colors for overflow */ - for(int j=0;j0) { - grey = 1.0-(mpC[j*mSizex+i]-min)/(max-min); - } else { grey = 1.0; } - //mpC[j*mSizex+i] /= max; - ntlColor col = ntlColor(grey,grey,grey); - unsigned int cCol[3]; - for (unsigned int cc=0; cc<3; cc++) { - if(col[cc] <= 0.0) - cCol[cc] = 0; - else if(col[cc] >= 1.0) - cCol[cc] = maxColVal; - else - cCol[cc] = (unsigned int)(maxColVal * col[cc]); - } - - /* write pixel to ppm file */ - fprintf(outfile,"%4d %4d %4d ",cCol[0],cCol[1],cCol[2]); - - } /* foreach x */ - - fprintf(outfile,"\n"); - } /* foreach y */ - - /* clean up */ - fclose(outfile); -} - - - -/*! Write the image to a ppm file */ -template -void ntlImage::normalize( void ) -{ - /* get min max values */ - Value min = mpC[0]; - Value max = mpC[0]; - for(int j=0;j<(mSizey*mSizex);j++) { - if(mpC[j]max) max = mpC[j]; - } - - /* check colors for overflow */ - for(int j=0;j *mpShadowMap[6]; - - - /*! caustics map active? */ - int mUseCausticsMap; - - /*! caustics map size */ - int mCMSizeX; - int mCMSizeY; - - /*! Images for caustics map */ - ntlImage *mpCausticsMap[6]; - private: }; diff --git a/intern/elbeem/intern/ntl_ray.cpp b/intern/elbeem/intern/ntl_ray.cpp index ef7278248ba..440144a0245 100644 --- a/intern/elbeem/intern/ntl_ray.cpp +++ b/intern/elbeem/intern/ntl_ray.cpp @@ -116,6 +116,7 @@ ntlRay::~ntlRay() #define MIDDLE 2 //! intersect ray with AABB +#ifndef ELBEEM_BLENDER void ntlRay::intersectFrontAABB(ntlVec3Gfx mStart, ntlVec3Gfx mEnd, gfxReal &t, ntlVec3Gfx &retnormal,ntlVec3Gfx &retcoord) const { char inside = true; /* inside box? */ @@ -203,8 +204,6 @@ void ntlRay::intersectFrontAABB(ntlVec3Gfx mStart, ntlVec3Gfx mEnd, gfxReal &t, retcoord = coord; } - - //! intersect ray with AABB void ntlRay::intersectBackAABB(ntlVec3Gfx mStart, ntlVec3Gfx mEnd, gfxReal &t, ntlVec3Gfx &retnormal,ntlVec3Gfx &retcoord) const { @@ -289,10 +288,7 @@ void ntlRay::intersectBackAABB(ntlVec3Gfx mStart, ntlVec3Gfx mEnd, gfxReal &t, n retnormal = normal; retcoord = coord; } - - - - +#endif // ELBEEM_BLENDER //! intersect ray with AABB void ntlRay::intersectCompleteAABB(ntlVec3Gfx mStart, ntlVec3Gfx mEnd, gfxReal &tmin, gfxReal &tmax) const @@ -445,6 +441,7 @@ void ntlRay::intersectCompleteAABB(ntlVec3Gfx mStart, ntlVec3Gfx mEnd, gfxReal & *****************************************************************************/ const ntlColor ntlRay::shade() //const { +#ifndef ELBEEM_BLENDER ntlGeometryObject *closest = NULL; gfxReal minT = GFX_REAL_MAX; vector *lightlist = mpGlob->getLightList(); @@ -456,7 +453,6 @@ const ntlColor ntlRay::shade() //const if(mContribution <= RAY_MINCONTRIB) { //return ntlColor(0.0); } - /* find closes object that intersects */ ntlTriangle *tri = NULL; @@ -468,8 +464,6 @@ const ntlColor ntlRay::shade() //const /* object hit... */ if (closest != NULL) { - //return( ntlColor(1.0) ); - //normal = tri->getNormal(); // no normal smoothing ntlVec3Gfx triangleNormal = tri->getNormal(); if( equal(triangleNormal, ntlVec3Gfx(0.0)) ) errorOut("ntlRaytracer warning: trinagle normal= 0 "); // DEBUG @@ -485,11 +479,11 @@ const ntlColor ntlRay::shade() //const /* ... -> do reflection */ ntlVec3Gfx intersectionPosition(mOrigin + (mDirection * (minT)) ); ntlMaterial *clossurf = closest->getMaterial(); - if(mpGlob->getDebugOut() > 5) { + /*if(mpGlob->getDebugOut() > 5) { errorOut("Ray hit: at "<getScene()->getVertex(tri->getPoints()[0])<<" t2:"<getScene()->getVertex(tri->getPoints()[1])<<" t3:"<getScene()->getVertex(tri->getPoints()[2]) ); errorOut(" trin:"<getNormal() ); - } + } // debug */ /* current transparence and reflectivity */ gfxReal currTrans = clossurf->getTransparence(); @@ -635,12 +629,10 @@ const ntlColor ntlRay::shade() //const } - /* add highlights (should not be affected by transparence as the diffuse reflections */ currentColor += highlightColor; /* attentuate as a last step*/ - //if(currTrans > RAY_THRESHOLD) { /* check if we're on the inside or outside */ if(intersectionInside) { gfxReal kr,kg,kb; /* attentuation */ @@ -657,6 +649,7 @@ const ntlColor ntlRay::shade() //const return ntlColor(currentColor); } +#endif // ELBEEM_BLENDER /* no object hit -> ray goes to infinity */ return mpGlob->getBackgroundCol(); } diff --git a/intern/elbeem/intern/ntl_raytracer.cpp b/intern/elbeem/intern/ntl_raytracer.cpp index 45a15a714fb..ece36b1560a 100644 --- a/intern/elbeem/intern/ntl_raytracer.cpp +++ b/intern/elbeem/intern/ntl_raytracer.cpp @@ -25,11 +25,8 @@ /* external parser functions from cfgparser.cxx */ -//#include "cfgparse_functions.h" - /* parse given file as config file */ void parseFile(string filename); - /* set pointers for parsing */ void setPointers( ntlRenderGlobals *setglob); @@ -237,23 +234,14 @@ int ntlRaytracer::renderVisualization( bool multiThreaded ) warnMsg("ntlRaytracer::advanceSims","World state error... stopping" ); setStopRenderVisualization( true ); } - //? mSimulationTime = (*mpSims)[mFirstSim]->getCurrentTime(); - //debMsgStd("ntlRaytracer::renderVisualization : single step mode ", 10); - //debMsgStd("", 10 ); } -#ifndef NOGUI // save frame if(mpOpenGLRenderer) mpOpenGLRenderer->saveAnimationFrame( mSimulationTime ); -#endif // NOGUI // for non-threaded check events if(!multiThreaded) { - //if(gpElbeemFrame->ElbeemWindow->visible()) { - //if (!Fl::check()) break; // returns immediately - //} Fl::check(); - //gpElbeemFrame->SceneDisplay->doIdleRedraw(); gpElbeemFrame->SceneDisplay->doOnlyForcedRedraw(); } @@ -277,12 +265,11 @@ int ntlRaytracer::singleStepVisualization( void ) if(mpOpenGLRenderer) mpOpenGLRenderer->saveAnimationFrame( mSimulationTime ); Fl::check(); gpElbeemFrame->SceneDisplay->doOnlyForcedRedraw(); -#endif // NOGUI - mThreadRunning = false; -#ifndef NOGUI stopSimulationRestoreGui(); -#endif +#else + mThreadRunning = false; +#endif // NOGUI return 0; } @@ -294,8 +281,6 @@ int ntlRaytracer::singleStepVisualization( void ) *****************************************************************************/ int ntlRaytracer::advanceSims() { - //gfxReal currTime[ mpSims->size() ]; - bool done = false; bool allPanic = true; double targetTime = mSimulationTime + (*mpSims)[mFirstSim]->getFrameTime(); @@ -313,7 +298,6 @@ int ntlRaytracer::advanceSims() if((*mpSims)[i]->getPanic()) allPanic = true; // do any panic now!? //debMsgStd("ntlRaytracer::advanceSims",DM_MSG, " sim "<getCurrentTime()<<" p"<<(*mpSims)[i]->getPanic()<<" t"<getCurrentTime() < targetTime) done = false; if( (targetTime - (*mpSims)[mFirstSim]->getCurrentTime()) > LBM_TIME_EPSILON) done=false; if(allPanic) done = true; } @@ -371,6 +355,7 @@ void ntlRaytracer::singleStepSims(double targetTime) { *****************************************************************************/ int ntlRaytracer::renderScene( void ) { +#ifndef ELBEEM_BLENDER char nrStr[5]; /* nr conversion */ //std::ostringstream outfilename(""); /* ppm file */ std::ostringstream outfn_conv(""); /* converted ppm with other suffix */ @@ -723,6 +708,7 @@ int ntlRaytracer::renderScene( void ) debMsgStd("ntlRaytracer::renderScene",DM_NOTIFY, "Single frame mode done...", 1 ); return 1; } +#endif // ELBEEM_BLENDER return 0; } diff --git a/intern/elbeem/intern/ntl_scene.cpp b/intern/elbeem/intern/ntl_scene.cpp index 7a7e47f5d06..4e980944f22 100644 --- a/intern/elbeem/intern/ntl_scene.cpp +++ b/intern/elbeem/intern/ntl_scene.cpp @@ -11,10 +11,6 @@ #include "ntl_scene.h" #include "ntl_geometryobject.h" #include "ntl_geometryshader.h" -//#include - - - /****************************************************************************** diff --git a/intern/elbeem/intern/ntl_vector3dim.h b/intern/elbeem/intern/ntl_vector3dim.h index 3679b689b1b..ca039883919 100644 --- a/intern/elbeem/intern/ntl_vector3dim.h +++ b/intern/elbeem/intern/ntl_vector3dim.h @@ -19,13 +19,23 @@ #include #include #include -using std::map; -using std::vector; -using std::string; #include #include #include +// hack for crappy MSVC6.0 compiler +#ifdef _MSC_VER +#define for if(false); else for +#define map std::map +#define vector std::vector +#define string std::string +#else // MSVC6 +// for proper compilers... +using std::map; +using std::vector; +using std::string; +#endif // MSVC6 + #ifdef __APPLE_CC__ // apple #else diff --git a/intern/elbeem/intern/utilities.cpp b/intern/elbeem/intern/utilities.cpp index 4cfcef9cf0f..b9e97de47fb 100644 --- a/intern/elbeem/intern/utilities.cpp +++ b/intern/elbeem/intern/utilities.cpp @@ -72,7 +72,7 @@ int convertString2Int(const char *str, int alt) //----------------------------------------------------------------------------- //! helper function that converts a flag field to a readable integer -std::string convertFlags2String(int flags) { +string convertFlags2String(int flags) { std::ostringstream ret; ret <<"("; int max = sizeof(int)*8; @@ -154,33 +154,18 @@ myTime_t getTime() QueryPerformanceCounter(&liLastTime); ret = (INT)( ((double)liLastTime.QuadPart / liTimerFrequency.QuadPart)*1000 ); // - mFirstTime; #else - //fprintf(stderr, " Tp s%lu us%lu \n", tv.tv_sec, tv.tv_usec ); - //clock_t ct = clock(); - //ret = ct*1000/CLOCKS_PER_SEC; - //fprintf(stderr, " Tp s%lu cps%lu us%lu \n", ct,CLOCKS_PER_SEC, ret ); - - /*struct tms tt; - times(&tt); - //ret = tt.tms_utime/(CLOCKS_PER_SEC/1000); - ret = tt.tms_utime*10; - //fprintf(stderr, " Tp s%lu cps%lu us%lu %d %d \n", tt.tms_cutime,CLOCKS_PER_SEC, ret, sizeof(clock_t), tt.tms_cutime ); - //fprintf(stderr, " Tp s%d cps%d us%d %d %d \n", tt.tms_utime,CLOCKS_PER_SEC, ret, sizeof(clock_t), clock() ); - // */ - struct timeval tv; struct timezone tz; tz.tz_minuteswest = 0; tz.tz_dsttime = 0; gettimeofday(&tv,&tz); ret = (tv.tv_sec*1000)+(tv.tv_usec/1000); //-mFirstTime; - //fprintf(stderr, " Tp s%lu us%lu \n", tv.tv_sec, tv.tv_usec ); #endif - //cout << " Tret " << ret <e[0]) || (s[1]>e[1]) || (s[2]>e[2]) ) { @@ -213,22 +198,22 @@ bool checkBoundingBox(ntlVec3Gfx s, ntlVec3Gfx e, std::string checker) { //----------------------------------------------------------------------------- // debug message output -static std::string col_black ( "\033[0;30m"); -static std::string col_dark_gray ( "\033[1;30m"); -static std::string col_bright_gray ( "\033[0;37m"); -static std::string col_red ( "\033[0;31m"); -static std::string col_bright_red ( "\033[1;31m"); -static std::string col_green ( "\033[0;32m"); -static std::string col_bright_green ( "\033[1;32m"); -static std::string col_bright_yellow ( "\033[1;33m"); -static std::string col_yellow ( "\033[0;33m"); -static std::string col_cyan ( "\033[0;36m"); -static std::string col_bright_cyan ( "\033[1;36m"); -static std::string col_purple ( "\033[0;35m"); -static std::string col_bright_purple ( "\033[1;35m"); -static std::string col_neutral ( "\033[0m"); -static std::string col_std = col_bright_gray; -void messageOutputFunc(std::string from, int id, std::string msg, myTime_t interval) { +static string col_black ( "\033[0;30m"); +static string col_dark_gray ( "\033[1;30m"); +static string col_bright_gray ( "\033[0;37m"); +static string col_red ( "\033[0;31m"); +static string col_bright_red ( "\033[1;31m"); +static string col_green ( "\033[0;32m"); +static string col_bright_green ( "\033[1;32m"); +static string col_bright_yellow ( "\033[1;33m"); +static string col_yellow ( "\033[0;33m"); +static string col_cyan ( "\033[0;36m"); +static string col_bright_cyan ( "\033[1;36m"); +static string col_purple ( "\033[0;35m"); +static string col_bright_purple ( "\033[1;35m"); +static string col_neutral ( "\033[0m"); +static string col_std = col_bright_gray; +void messageOutputFunc(string from, int id, string msg, myTime_t interval) { if(interval>0) { myTime_t currTime = getTime(); if((currTime - globalIntervalTime)>interval) { @@ -276,7 +261,6 @@ void messageOutputFunc(std::string from, int id, std::string msg, myTime_t inter default: // this shouldnt happen... sout << col_red << " --- messageOutputFunc error: invalid id ("<0 anyway, so write to file... + // TODO generate some reasonable path? + FILE *logf = fopen("elbeem_debug_log.txt","a+"); + // dont complain anymore here... + if(logf) { + fprintf(logf, "%s",sout.str().c_str() ); + fclose(logf); + } +#else // WIN32 + fprintf(stdout, "%s",sout.str().c_str() ); if(id!=DM_DIRECT) fflush(stdout); -#endif +#endif // WIN32 } -#ifdef DEBUG -bool debugOutInterTest(myTime_t interval) { - myTime_t currTime = getTime(); - if((currTime - globalIntervalTime)>interval) { - globalIntervalTime = getTime(); - return true; - } - return false; +// helper functions from external program using elbeem lib (e.g. Blender) +/* elbeem debug output function */ +extern "C" +void elbeemDebugOut(char *msg) { + // external messages default to debug level 5... + if(gDebugLevel<5) return; + // delegate to messageOutputFunc + messageOutputFunc("[External]",DM_MSG,msg,0); } -#endif - - -//----------------------------------------------------------------------------- -// save exit function - +/* set elbeem debug output level (0=off to 10=full on) */ +extern "C" +void elbeemSetDebugLevel(int level) { + if(level<0) level=0; + if(level>10) level=10; + gDebugLevel=level; +} diff --git a/intern/elbeem/intern/utilities.h b/intern/elbeem/intern/utilities.h index bb6825fab82..2ef6e503cb1 100644 --- a/intern/elbeem/intern/utilities.h +++ b/intern/elbeem/intern/utilities.h @@ -12,24 +12,18 @@ typedef unsigned long myTime_t; //! helper function that converts a string to integer -int convertString2Int(const char *string, int alt); +int convertString2Int(const char *str, int alt); //! helper function that converts a flag field to a readable integer -std::string convertFlags2String(int flags); - -// output streams -#ifdef ELBEEM_BLENDER -extern "C" FILE* GEN_errorstream; -extern "C" FILE* GEN_userstream; -#endif // ELBEEM_BLENDER +string convertFlags2String(int flags); //! get the current system time myTime_t getTime(); //! convert time to readable string -std::string getTimeString(myTime_t usecs); +string getTimeString(myTime_t usecs); //! helper to check if a bounding box was specified in the right way -bool checkBoundingBox(ntlVec3Gfx s, ntlVec3Gfx e, std::string checker); +bool checkBoundingBox(ntlVec3Gfx s, ntlVec3Gfx e, string checker); /* debugging outputs , debug level 0 (off) to 10 (max) */ @@ -66,7 +60,7 @@ extern "C" char gWorldStringState[256]; #define DM_ERROR 5 #define DM_DIRECT 6 #define DM_FATAL 7 -void messageOutputFunc(std::string from, int id, std::string msg, myTime_t interval); +void messageOutputFunc(string from, int id, string msg, myTime_t interval); /* debugging messages defines */ #ifdef DEBUG -- cgit v1.2.3