static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { vo_directrendering = 1; smp.bufferlen = height * width * 3; stride = width * 3; int ipcinit; if (first && (ipcinit = initIPCSetting(&smp)) != 0) return ipcinit; ((int*) smp.sharedsetting)[0] = (int) width; ((int*) smp.sharedsetting)[1] = (int) height; ((int*) smp.sharedsetting)[2] = (int) d_width; ((int*) smp.sharedsetting)[3] = (int) d_height; triggerNewSetting(&smp); waitUntilSettingFinished(&smp); if ((ipcinit = initIPCDataShm(&smp)) != 0) return ipcinit; if (first && (ipcinit = initIPCDataSems(&smp)) != 0) return ipcinit; setPointers(&smp); if (first && smp.buffercount == 2) { smp.pos = *smp.sharedpos; } if (first) first = 0; return ipcinit; }
ntlWorld::ntlWorld(string filename, bool commandlineMode) { #ifndef ELBEEM_PLUGIN initDefaults(); # ifdef NOGUI commandlineMode = true; // remove warning... # endif // NOGUI // load config setPointers( getRenderGlobals() ); parseFile( filename.c_str() ); # ifndef NOGUI // setup opengl display, save first animation step for start time // init after parsing file... if(!commandlineMode) { mpOpenGLRenderer = new ntlOpenGLRenderer( mpGlob ); } # endif // NOGUI finishWorldInit(); #else // ELBEEM_PLUGIN errFatal("ntlWorld::init","Cfg file parsing not supported for API version! "<<filename<<" "<<commandlineMode, SIMWORLD_INITERROR); #endif // ELBEEM_PLUGIN }
ViFourierInterpolator::ViFourierInterpolator(const ViFourierInterpolator &other) : ViInterpolator(other) { setPointers(other.mMode, other.mEstimation); setDegree(other.mDegree); setDerivatives(other.mDerivatives); }
void CircleBuilder::build(shared_ptr<Graph> g) { //Debugging initVertices(g); radialFactor = radius/precision; radius = 0; float longitude = 0; setNextVertex(longitude, 0); int triangles = 6; radius = radialFactor; setNextVertex(longitude, triangles); innerStartIndex = firstUniqueVertex; int longFactor = 60; for (longitude = 60; longitude < 360; longitude += longFactor) { setNextVertex(longitude, triangles); } //Begin Row 3 for (int i = 1; i <= precision; i++) { innerStartIndex = outterStartIndex; outterStartIndex = graph->uniqueVertexPointer; radius = radialFactor * (float) i; if (i >= clip) return setPointers(); triangles += 6; longitude = 0; longFactor = 360/triangles; theta = ( 360 / triangles ) / ( 360 * pi ); longitude = setNextVertex(longitude, triangles); for(int steps = 1; steps < triangles - 1; steps++) longitude = setNextVertex(longitude, triangles); longitude = setNextVertex(longitude, triangles); } return setPointers(); }
ViFourierInterpolator::ViFourierInterpolator(const Mode &mode, const Estimation &estimation) : ViInterpolator() { setPointers(mode, estimation); setDegree(DEFAULT_DEGREE); setDerivatives(DEFAULT_DERIVATIVE); addParameterName("Window Size"); addParameterName("Degree"); if(mMode == Osculating || mMode == Splines) addParameterName("Derivatives"); }
GRID::GRID (TIME* p_Time, GRIDPARAMETERS* p_GridP, RESULTS* p_Results, SOILPARAMETERS* pSoilP, SEED_PARAMETERS* pSeedP, PLANT_PARAMETERS* pPlantP, CLIMATE* p_CLIMATE):pi(3.1415926), theGridLengthC(gridLengthC), theGridLengthR(gridLengthR) { pTIME = p_Time; pRESULTS = p_Results; pP = p_GridP; setPointers(pSoilP, pSeedP, pPlantP); setNeighbourhood(); setVegetation(pP->shrubCover, pP->shrubRadius, p_CLIMATE->relLight); }