diff --git a/demos/src/DX9/BasicDemoDX9.cpp b/demos/src/DX9/BasicDemoDX9.cpp index 174e3eb..bdbfb9c 100644 --- a/demos/src/DX9/BasicDemoDX9.cpp +++ b/demos/src/DX9/BasicDemoDX9.cpp @@ -445,13 +445,13 @@ int Run() void InitializeConsoleStdIO() { - // si une console est rattachée au processus, alors il existe des fichiers + // si une console est rattachee au processus, alors il existe des fichiers // virtuel CONIN$ et CONOUT$ qui permettent respectivement de lire - // et d'écrire depuis / dans cette console (voir la doc de CreateFile). + // et d'ecrire depuis / dans cette console (voir la doc de CreateFile). #if _MSC_VER >= 1400 // VC++ 8 { - // éviter le warning C4996: 'freopen' was declared deprecated + // eviter le warning C4996: 'freopen' was declared deprecated // This function or variable may be unsafe. Consider using freopen_s instead. FILE *stream; freopen_s( &stream, "CONIN$", "r", stdin ); @@ -513,7 +513,7 @@ LRESULT CALLBACK MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_MOUSEMOVE: { - // déplacement relatif + // deplacement relatif int px = GET_X_LPARAM(lParam); int py = GET_Y_LPARAM(lParam); @@ -551,4 +551,4 @@ LRESULT CALLBACK MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DefWindowProc( hWnd, uMsg, wParam, lParam ); } return 0; -} \ No newline at end of file +} diff --git a/demos/src/DX9/BasicDemoDXUT9.cpp b/demos/src/DX9/BasicDemoDXUT9.cpp index 9d04eb7..55d3911 100644 --- a/demos/src/DX9/BasicDemoDXUT9.cpp +++ b/demos/src/DX9/BasicDemoDXUT9.cpp @@ -143,13 +143,13 @@ D3DLIGHT9 g_light; #ifdef CONSOLE void InitializeConsoleStdIO() { - // si une console est rattachée au processus, alors il existe des fichiers + // si une console est rattachee au processus, alors il existe des fichiers // virtuel CONIN$ et CONOUT$ qui permettent respectivement de lire - // et d'écrire depuis / dans cette console (voir la doc de CreateFile). + // et d'ecrire depuis / dans cette console (voir la doc de CreateFile). #if _MSC_VER >= 1400 // VC++ 8 { - // éviter le warning C4996: 'freopen' was declared deprecated + // eviter le warning C4996: 'freopen' was declared deprecated // This function or variable may be unsafe. Consider using freopen_s instead. FILE *stream; freopen_s( &stream, "CONIN$", "r", stdin ); @@ -836,4 +836,4 @@ void CALLBACK MouseProc( bool bLeftButtonDown, bool bRightButtonDown, bool bMidd } } //*/ -} \ No newline at end of file +} diff --git a/demos/src/DX9/CCamera.h b/demos/src/DX9/CCamera.h index 3efcb71..22a61c3 100644 --- a/demos/src/DX9/CCamera.h +++ b/demos/src/DX9/CCamera.h @@ -25,7 +25,7 @@ #include //////////////////////////////////////////////////////////////////////////////////////////////////// -/// Camera. classe de base pour la gestion des caméras +/// Camera. classe de base pour la gestion des cameras /// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -40,7 +40,7 @@ class CCamera }; //////////////////////////////////////////////////////////////////////////////////////////////////// -/// Global camera. caméra regardant à l'origine du monde, sa position se trouvant sur une sphère +/// Global camera. camera regardant a l'origine du monde, sa position se trouvant sur une sphere /// //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/demos/src/DX9/GravitationDemoDXUT9.cpp b/demos/src/DX9/GravitationDemoDXUT9.cpp index 728c3de..9765897 100644 --- a/demos/src/DX9/GravitationDemoDXUT9.cpp +++ b/demos/src/DX9/GravitationDemoDXUT9.cpp @@ -185,13 +185,13 @@ bool bounceOnFloor(Particle& particle, float deltaTime) #ifdef CONSOLE void InitializeConsoleStdIO() { - // si une console est rattachée au processus, alors il existe des fichiers + // si une console est rattachee au processus, alors il existe des fichiers // virtuel CONIN$ et CONOUT$ qui permettent respectivement de lire - // et d'écrire depuis / dans cette console (voir la doc de CreateFile). + // et d'ecrire depuis / dans cette console (voir la doc de CreateFile). #if _MSC_VER >= 1400 // VC++ 8 { - // éviter le warning C4996: 'freopen' was declared deprecated + // eviter le warning C4996: 'freopen' was declared deprecated // This function or variable may be unsafe. Consider using freopen_s instead. FILE *stream; freopen_s( &stream, "CONIN$", "r", stdin ); @@ -898,4 +898,4 @@ void CALLBACK MouseProc( bool bLeftButtonDown, bool bRightButtonDown, bool bMidd } } //*/ -} \ No newline at end of file +} diff --git a/demos/src/DX9/RainDemoDXUT9.cpp b/demos/src/DX9/RainDemoDXUT9.cpp index c071103..74560fb 100644 --- a/demos/src/DX9/RainDemoDXUT9.cpp +++ b/demos/src/DX9/RainDemoDXUT9.cpp @@ -212,13 +212,13 @@ bool killRain(Particle& particle, float deltaTime) #ifdef CONSOLE void InitializeConsoleStdIO() { - // si une console est rattachée au processus, alors il existe des fichiers + // si une console est rattachee au processus, alors il existe des fichiers // virtuel CONIN$ et CONOUT$ qui permettent respectivement de lire - // et d'écrire depuis / dans cette console (voir la doc de CreateFile). + // et d'ecrire depuis / dans cette console (voir la doc de CreateFile). #if _MSC_VER >= 1400 // VC++ 8 { - // éviter le warning C4996: 'freopen' was declared deprecated + // eviter le warning C4996: 'freopen' was declared deprecated // This function or variable may be unsafe. Consider using freopen_s instead. FILE *stream; freopen_s( &stream, "CONIN$", "r", stdin ); @@ -1097,4 +1097,4 @@ void CALLBACK MouseProc( bool bLeftButtonDown, bool bRightButtonDown, bool bMidd } } //*/ -} \ No newline at end of file +} diff --git a/include/Core/SPK_Octree.h b/include/Core/SPK_Octree.h index 5d41a58..ebea0a0 100644 --- a/include/Core/SPK_Octree.h +++ b/include/Core/SPK_Octree.h @@ -33,7 +33,7 @@ namespace SPK * When a octree is attached to a group, at each update, every individual particle is processed and put into cells.
* Particles become therefore aware of their neighbors.
*
- * Octrees allows optimization of algorithms that run in O(n²) by reducing their complexity to O(nlog(n)).
+ * Octrees allows optimization of algorithms that run in O(n^2) by reducing their complexity to O(nlog(n)).
* Typically algorithms where each particle is affected by every other particles in the group (particle vs particle collision, flocking, nbody simulations...).
*
* A Octree is automatically generated within a group if at least one of its modifiers needs it (by setting its NEEDS_OCTREE constant to true at init).
diff --git a/include/Extensions/Modifiers/SPK_LinearForce.h b/include/Extensions/Modifiers/SPK_LinearForce.h index d55759d..7780c60 100644 --- a/include/Extensions/Modifiers/SPK_LinearForce.h +++ b/include/Extensions/Modifiers/SPK_LinearForce.h @@ -239,12 +239,12 @@ namespace SPK *
  • FACTOR_QUADRATIC : the surface of the particle is used and the squared speed is used (the best discrete approximation of the reality)
  • *
  • FACTOR_CUBIC : the volume of the particle is used but it has no physical sense
  • * - * The correct formula is : f = 0.5 * volumetric density of the fluid * surface * speed²
    + * The correct formula is : f = 0.5 * volumetric density of the fluid * surface * speed^2
    * The coefficient can then be set to give realistic winds depending of the shape of the particle and on the fluid.
    * For instance for a sphere in the air we have : * * Therefore, the coefficient will be 0.5 * 1.293 * 3.14159 = 2.03 * diff --git a/src/Rendering/DX9/SPK_DX9_Buffer.cpp b/src/Rendering/DX9/SPK_DX9_Buffer.cpp index 1b9db5f..6ea9872 100644 --- a/src/Rendering/DX9/SPK_DX9_Buffer.cpp +++ b/src/Rendering/DX9/SPK_DX9_Buffer.cpp @@ -45,7 +45,7 @@ namespace DX9 DX9Info::getDevice()->CreateVertexBuffer(nbVertices*sizeof(D3DXVECTOR3), D3DUSAGE_DYNAMIC, D3DFVF_XYZ, D3DPOOL_DEFAULT, &vertexBuffer, NULL); DX9Info::getDevice()->CreateVertexBuffer(nbVertices*sizeof(D3DCOLOR), D3DUSAGE_DYNAMIC, D3DFVF_DIFFUSE, D3DPOOL_DEFAULT, &colorBuffer, NULL); - // TODO : gérer les indices 32bit + // TODO : gerer les indices 32bit if( nbIndices > 0 ) { DX9Info::getDevice()->CreateIndexBuffer(nbIndices*sizeof(short), 0, D3DFMT_INDEX16, D3DPOOL_DEFAULT, &indexBuffer, 0); @@ -77,7 +77,7 @@ namespace DX9 unlock(); } - // TODO : gérer autre chose que les textures 2D + // TODO : gerer autre chose que les textures 2D if(nbTexCoords > 0) DX9Info::getDevice()->CreateVertexBuffer(nbVertices*sizeof(D3DXVECTOR2), D3DUSAGE_DYNAMIC, D3DFVF_TEX1|D3DFVF_TEXCOORDSIZE1(nbTexCoords), D3DPOOL_DEFAULT, &texCoordBuffer, NULL); } diff --git a/src/Rendering/DX9/SPK_DX9_PointRenderer.cpp b/src/Rendering/DX9/SPK_DX9_PointRenderer.cpp index 9dad00d..9c9a8e5 100644 --- a/src/Rendering/DX9/SPK_DX9_PointRenderer.cpp +++ b/src/Rendering/DX9/SPK_DX9_PointRenderer.cpp @@ -125,11 +125,11 @@ namespace DX9 void DX9PointRenderer::enablePointParameter(float size,bool distance) { - // derived size = size * sqrt(1 / (A + B * distance + C * distance²)) + // derived size = size * sqrt(1 / (A + B * distance + C * distance^2)) if (distance) { const float sqrtC = POINT_SIZE_CURRENT / (size * pixelPerUnit); - const float QUADRATIC_WORLD[3] = {0.0f,0.0f,sqrtC * sqrtC}; // A = 0; B = 0; C = (POINT_SIZE_CURRENT / (size * pixelPerUnit))² + const float QUADRATIC_WORLD[3] = {0.0f,0.0f,sqrtC * sqrtC}; // A = 0; B = 0; C = (POINT_SIZE_CURRENT / (size * pixelPerUnit))^2 DX9Info::getDevice()->SetRenderState(D3DRS_POINTSCALE_A, FtoDW(QUADRATIC_WORLD[0])); DX9Info::getDevice()->SetRenderState(D3DRS_POINTSCALE_B, FtoDW(QUADRATIC_WORLD[1])); DX9Info::getDevice()->SetRenderState(D3DRS_POINTSCALE_C, FtoDW(QUADRATIC_WORLD[2])); @@ -137,7 +137,7 @@ namespace DX9 else { const float sqrtA = POINT_SIZE_CURRENT / size; - const float QUADRATIC_WORLD[3] = {sqrtA * sqrtA,0.0f,0.0f}; // A = (POINT_SIZE_CURRENT / size)²; B = 0; C = 0 + const float QUADRATIC_WORLD[3] = {sqrtA * sqrtA,0.0f,0.0f}; // A = (POINT_SIZE_CURRENT / size)^2; B = 0; C = 0 DX9Info::getDevice()->SetRenderState(D3DRS_POINTSCALE_A, FtoDW(QUADRATIC_WORLD[0])); DX9Info::getDevice()->SetRenderState(D3DRS_POINTSCALE_B, FtoDW(QUADRATIC_WORLD[1])); DX9Info::getDevice()->SetRenderState(D3DRS_POINTSCALE_C, FtoDW(QUADRATIC_WORLD[2])); diff --git a/src/Rendering/OpenGL/SPK_GL_PointRenderer.cpp b/src/Rendering/OpenGL/SPK_GL_PointRenderer.cpp index 5476c18..2698437 100644 --- a/src/Rendering/OpenGL/SPK_GL_PointRenderer.cpp +++ b/src/Rendering/OpenGL/SPK_GL_PointRenderer.cpp @@ -97,12 +97,12 @@ namespace GL if (worldSize) { #ifndef SPK_GL_NO_EXT - // derived size = size * sqrt(1 / (A + B * distance + C * distance²)) + // derived size = size * sqrt(1 / (A + B * distance + C * distance^2)) const float POINT_SIZE_CURRENT = 32.0f; const float POINT_SIZE_MIN = 1.0f; const float POINT_SIZE_MAX = 1024.0f; const float sqrtC = POINT_SIZE_CURRENT / (group.getGraphicalRadius() * worldScale * 2.0f * pixelPerUnit); - const float QUADRATIC_WORLD[3] = {0.0f,0.0f,sqrtC * sqrtC}; // A = 0; B = 0; C = (POINT_SIZE_CURRENT / (size * pixelPerUnit))² + const float QUADRATIC_WORLD[3] = {0.0f,0.0f,sqrtC * sqrtC}; // A = 0; B = 0; C = (POINT_SIZE_CURRENT / (size * pixelPerUnit))^2 glPointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT,QUADRATIC_WORLD); glPointSize(POINT_SIZE_CURRENT); glPointParameterfEXT(GL_POINT_SIZE_MIN_EXT,POINT_SIZE_MIN);