diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:12:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:21:34 +0300 |
commit | 55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch) | |
tree | 563ed5b1b27e9613de8384da90197ce2c3e1924b /intern | |
parent | c279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff) | |
parent | d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r-- | intern/elbeem/extern/LBM_fluidsim.h | 5 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_DropTargetWin32.h | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_EventTrackpad.h | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.h | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.h | 20 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_Window.h | 16 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.h | 8 | ||||
-rw-r--r-- | intern/smoke/intern/FLUID_3D.cpp | 56 |
8 files changed, 55 insertions, 60 deletions
diff --git a/intern/elbeem/extern/LBM_fluidsim.h b/intern/elbeem/extern/LBM_fluidsim.h index 374e11d1c06..05ac143c7a1 100644 --- a/intern/elbeem/extern/LBM_fluidsim.h +++ b/intern/elbeem/extern/LBM_fluidsim.h @@ -1,7 +1,4 @@ /* - * BKE_fluidsim.h - * - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -44,5 +41,3 @@ int performElbeemSimulation(char *cfgfilename); #endif - - diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h index 3d7be45799f..5dcefcaf25e 100644 --- a/intern/ghost/intern/GHOST_DropTargetWin32.h +++ b/intern/ghost/intern/GHOST_DropTargetWin32.h @@ -60,7 +60,7 @@ public: * - Determining the effect of the drop on the target application. * - Incorporating any valid dropped data when the drop occurs. * - Communicating target feedback to the source so the source application - * can provide appropriate visual feedback such as setting the cursor. + * can provide appropriate visual feedback such as setting the cursor. * - Implementing drag scrolling. * - Registering and revoking its application windows as drop targets. * diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h index faf0f1697d0..25988090c01 100644 --- a/intern/ghost/intern/GHOST_EventTrackpad.h +++ b/intern/ghost/intern/GHOST_EventTrackpad.h @@ -20,8 +20,8 @@ * * The Original Code is: all of this file. * - * Contributor(s): James Deery 11/2009 - * Damien Plisson 12/2009 + * Contributor(s): James Deery 11/2009 + * Damien Plisson 12/2009 * * ***** END GPL LICENSE BLOCK ***** */ diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h index 57b6a683c71..af903ebc9c6 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.h +++ b/intern/ghost/intern/GHOST_SystemCocoa.h @@ -20,8 +20,8 @@ * * The Original Code is: all of this file. * - * Contributor(s): Maarten Gribnau 05/2001 - * Damien Plisson 09/2009 + * Contributor(s): Maarten Gribnau 05/2001 + * Damien Plisson 09/2009 * * ***** END GPL LICENSE BLOCK ***** */ diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index ec6da53631d..aaed0c3d837 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -149,16 +149,16 @@ public: * Create a new window. * The new window is added to the list of windows managed. * Never explicitly delete the window, use disposeWindow() instead. - * \param title The name of the window (displayed in the title bar of the window if the OS supports it). - * \param left The coordinate of the left edge of the window. - * \param top The coordinate of the top edge of the window. - * \param width The width the window. - * \param height The height the window. - * \param state The state of the window when opened. - * \param type The type of drawing context installed in this window. - * \param stereoVisual Create a stereo visual for quad buffered stereo. - * \param exclusive Use to show the window ontop and ignore others - * (used fullscreen). + * \param title The name of the window (displayed in the title bar of the window if the OS supports it). + * \param left The coordinate of the left edge of the window. + * \param top The coordinate of the top edge of the window. + * \param width The width the window. + * \param height The height the window. + * \param state The state of the window when opened. + * \param type The type of drawing context installed in this window. + * \param stereoVisual Create a stereo visual for quad buffered stereo. + * \param exclusive Use to show the window ontop and ignore others + * (used fullscreen). * \param parentWindow Parent (embedder) window * \return The new window (or 0 if creation failed). */ diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 59d3123b9de..2fa30049eca 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -55,14 +55,14 @@ public: * Constructor. * Creates a new window and opens it. * To check if the window was created properly, use the getValid() method. - * \param width The width the window. - * \param heigh The height the window. - * \param state The state the window is initially opened with. - * \param type The type of drawing context installed in this window. - * \param stereoVisual Stereo visual for quad buffered stereo. - * \param exclusive Use to show the window ontop and ignore others - * (used fullscreen). - * \param numOfAASamples Number of samples used for AA (zero if no AA) + * \param width The width the window. + * \param heigh The height the window. + * \param state The state the window is initially opened with. + * \param type The type of drawing context installed in this window. + * \param stereoVisual Stereo visual for quad buffered stereo. + * \param exclusive Use to show the window ontop and ignore others + * (used fullscreen). + * \param numOfAASamples Number of samples used for AA (zero if no AA) */ GHOST_Window( GHOST_TUns32 width, diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h index 9907385154a..8b0ba2f1934 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.h +++ b/intern/ghost/intern/GHOST_WindowWin32.h @@ -225,10 +225,10 @@ public: * capturing). * * \param press - * 0 - mouse pressed - * 1 - mouse released - * 2 - operator grab - * 3 - operator ungrab + * 0 - mouse pressed + * 1 - mouse released + * 2 - operator grab + * 3 - operator ungrab */ void registerMouseClickEvent(int press); diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp index 8a27818ff36..fd0a7e2005f 100644 --- a/intern/smoke/intern/FLUID_3D.cpp +++ b/intern/smoke/intern/FLUID_3D.cpp @@ -38,7 +38,7 @@ #if PARALLEL==1 #include <omp.h> -#endif // PARALLEL +#endif // PARALLEL ////////////////////////////////////////////////////////////////////// // Construction/Destruction @@ -51,13 +51,13 @@ FLUID_3D::FLUID_3D(int *res, float dx, float dtdef, int init_heat, int init_fire _dt = dtdef; // just in case. set in step from a RNA factor _iterations = 100; - _tempAmb = 0; + _tempAmb = 0; _heatDiffusion = 1e-3; _totalTime = 0.0f; _totalSteps = 0; _res = Vec3Int(_xRes,_yRes,_zRes); _maxRes = MAX3(_xRes, _yRes, _zRes); - + // initialize wavelet turbulence /* if(amplify) @@ -65,7 +65,7 @@ FLUID_3D::FLUID_3D(int *res, float dx, float dtdef, int init_heat, int init_fire else _wTurbulence = NULL; */ - + // scale the constants according to the refinement of the grid if (!dx) _dx = 1.0f / (float)_maxRes; @@ -218,7 +218,7 @@ void FLUID_3D::initColors(float init_r, float init_g, float init_b) void FLUID_3D::setBorderObstacles() { - + // set side obstacles unsigned int index; for (int y = 0; y < _yRes; y++) @@ -331,7 +331,7 @@ void FLUID_3D::step(float dt, float gravity[3]) // If border rules have been changed if (_colloPrev != *_borderColli) { printf("Border collisions changed\n"); - + // DG TODO: Need to check that no animated obstacle flags are overwritten setBorderCollisions(); } @@ -490,7 +490,7 @@ void FLUID_3D::step(float dt, float gravity[3]) for (int i=1; i<stepParts; i++) { int zPos=(int)((float)i*partSize + 0.5f); - + artificialDampingExactSL(zPos); } @@ -620,7 +620,7 @@ void FLUID_3D::artificialDampingSL(int zBegin, int zEnd) { void FLUID_3D::artificialDampingExactSL(int pos) { const float w = 0.9; int index, x,y,z; - + size_t posslab; @@ -650,7 +650,7 @@ void FLUID_3D::artificialDampingExactSL(int pos) { _zVelocityTemp[index+1] + _zVelocityTemp[index-1] + _zVelocityTemp[index+_res[0]] + _zVelocityTemp[index-_res[0]] + _zVelocityTemp[index+_slabSize] + _zVelocityTemp[index-_slabSize] ); - + } } @@ -677,7 +677,7 @@ void FLUID_3D::artificialDampingExactSL(int pos) { _zVelocityTemp[index+1] + _zVelocityTemp[index-1] + _zVelocityTemp[index+_res[0]] + _zVelocityTemp[index-_res[0]] + _zVelocityTemp[index+_slabSize] + _zVelocityTemp[index-_slabSize] ); - + } } @@ -759,7 +759,7 @@ void FLUID_3D::wipeBoundaries(int zBegin, int zEnd) void FLUID_3D::wipeBoundariesSL(int zBegin, int zEnd) { - + ///////////////////////////////////// // setZeroBorder to all: ///////////////////////////////////// @@ -933,16 +933,16 @@ void FLUID_3D::project() memset(_pressure, 0, sizeof(float)*_totalCells); memset(_divergence, 0, sizeof(float)*_totalCells); - + // set velocity and pressure inside of obstacles to zero setObstacleBoundaries(_pressure, 0, _zRes); - + // copy out the boundaries if(!_domainBcLeft) setNeumannX(_xVelocity, _res, 0, _zRes); - else setZeroX(_xVelocity, _res, 0, _zRes); + else setZeroX(_xVelocity, _res, 0, _zRes); if(!_domainBcFront) setNeumannY(_yVelocity, _res, 0, _zRes); - else setZeroY(_yVelocity, _res, 0, _zRes); + else setZeroY(_yVelocity, _res, 0, _zRes); if(!_domainBcTop) setNeumannZ(_zVelocity, _res, 0, _zRes); else setZeroZ(_zVelocity, _res, 0, _zRes); @@ -953,13 +953,13 @@ void FLUID_3D::project() for (y = 1; y < _yRes - 1; y++, index += 2) for (x = 1; x < _xRes - 1; x++, index++) { - + if(_obstacles[index]) { _divergence[index] = 0.0f; continue; } - + float xright = _xVelocity[index + 1]; float xleft = _xVelocity[index - 1]; @@ -1058,7 +1058,7 @@ void FLUID_3D::project() ////////////////////////////////////////////////////////////////////// void FLUID_3D::setObstacleVelocity(int zBegin, int zEnd) { - + // completely TODO <-- who wrote this and what is here TODO? DG const size_t index_ = _slabSize + _xRes + 1; @@ -1082,7 +1082,7 @@ void FLUID_3D::setObstacleVelocity(int zBegin, int zEnd) { if (!_obstacles[index]) { - // if(_obstacles[index+1]) xright = - _xVelocityOb[index]; + // if(_obstacles[index+1]) xright = - _xVelocityOb[index]; if((_obstacles[index - 1] & 8) && abs(_xVelocityOb[index - 1]) > FLT_EPSILON ) { // printf("velocity x!\n"); @@ -1221,7 +1221,7 @@ void FLUID_3D::setObstaclePressure(float *_pressure, int zBegin, int zEnd) _pressure[index] += _pressure[index + _slabSize]; pcnt += 1.0f; } - + if(pcnt > 0.000001f) _pressure[index] /= pcnt; @@ -1254,7 +1254,7 @@ void FLUID_3D::setObstacleBoundaries(float *_pressure, int zBegin, int zEnd) for (int z = zBegin + bb; z < zEnd - bt; z++) { size_t index = index_ +(z-1)*_slabSize; - + for (int y = 1; y < _yRes - 1; y++, index += 2) { for (int x = 1; x < _xRes - 1; x++, index++) @@ -1563,7 +1563,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd) // calculate normalized vorticity vectors float eps = _vorticityEps; - + //index = _slabSize + _xRes + 1; vIndex=_slabSize + _xRes + 1; @@ -1618,7 +1618,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd) } // y loop //vIndex+=2*_xRes; } // z loop - + if (_xVorticity) delete[] _xVorticity; if (_yVorticity) delete[] _yVorticity; if (_zVorticity) delete[] _zVorticity; @@ -1704,10 +1704,10 @@ void FLUID_3D::advectMacCormackEnd2(int zBegin, int zEnd) /* set boundary conditions for velocity */ if(!_domainBcLeft) copyBorderX(_xVelocityTemp, res, zBegin, zEnd); - else setZeroX(_xVelocityTemp, res, zBegin, zEnd); + else setZeroX(_xVelocityTemp, res, zBegin, zEnd); if(!_domainBcFront) copyBorderY(_yVelocityTemp, res, zBegin, zEnd); - else setZeroY(_yVelocityTemp, res, zBegin, zEnd); + else setZeroY(_yVelocityTemp, res, zBegin, zEnd); if(!_domainBcTop) copyBorderZ(_zVelocityTemp, res, zBegin, zEnd); else setZeroZ(_zVelocityTemp, res, zBegin, zEnd); @@ -1778,9 +1778,9 @@ void FLUID_3D::updateFlame(float *react, float *flame, int total_cells) for (int index = 0; index < total_cells; index++) { /* model flame temperature curve from the reaction coordinate (fuel) - * TODO: Would probably be best to get rid of whole "flame" data field. - * Currently it's just sqrt mirror of reaction coordinate, and therefore - * basically just waste of memory and disk space... + * TODO: Would probably be best to get rid of whole "flame" data field. + * Currently it's just sqrt mirror of reaction coordinate, and therefore + * basically just waste of memory and disk space... */ if (react[index]>0.0f) { /* do a smooth falloff for rest of the values */ |