Commit: f91fe78af5145a2f5706acd17d0e793ab7b311f8
Author: Mike Erwin
Date:   Thu Jan 28 01:35:50 2016 -0500
Branches: master
https://developer.blender.org/rBf91fe78af5145a2f5706acd17d0e793ab7b311f8

cleanup: spelling, comments, alignment

fixed pet peeve “frustrum” and other non-functional changes.

===================================================================

M       source/blender/makesdna/DNA_scene_types.h
M       source/blender/makesdna/DNA_world_types.h
M       source/gameengine/Ketsji/KX_Camera.cpp
M       source/gameengine/Ketsji/KX_Dome.cpp
M       source/gameengine/Ketsji/KX_KetsjiEngine.cpp
M       source/gameengine/Rasterizer/RAS_BucketManager.cpp
M       source/gameengine/Rasterizer/RAS_FramingManager.h
M       
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
M       source/gameengine/VideoTexture/ImageRender.cpp

===================================================================

diff --git a/source/blender/makesdna/DNA_scene_types.h 
b/source/blender/makesdna/DNA_scene_types.h
index 190ece6..ef6d4ac 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -800,7 +800,7 @@ typedef struct RecastData {
 
 typedef struct GameData {
 
-       /*  standalone player */
+       /* standalone player */
        struct GameFraming framing;
        short playerflag, xplay, yplay, freqplay;
        short depth, attrib, rt1, rt2;
@@ -823,7 +823,7 @@ typedef struct GameData {
 
        /*
         * bit 3: (gameengine): Activity culling is enabled.
-        * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum 
culling
+        * bit 5: (gameengine) : enable Bullet DBVT tree for view frustum 
culling
         */
        int flag;
        short mode, matmode;
diff --git a/source/blender/makesdna/DNA_world_types.h 
b/source/blender/makesdna/DNA_world_types.h
index 73bfa7a..5fd4c9f 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -86,7 +86,7 @@ typedef struct World {
         * bit 2: (reserved) depth of field
         * bit 3: (gameengine): Activity culling is enabled.
         * bit 4: ambient occlusion
-        * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum 
culling 
+        * bit 5: (gameengine) : enable Bullet DBVT tree for view frustum 
culling 
         */
        short mode;                                                             
                                // partially moved to scene->gamedata in 2.5
        short occlusionRes;             /* resolution of occlusion Z buffer in 
pixel */ // XXX moved to scene->gamedata in 2.5
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp 
b/source/gameengine/Ketsji/KX_Camera.cpp
index 6988d56..361cd65 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -320,7 +320,7 @@ void KX_Camera::ExtractFrustumSphere()
 
        if (m_projection_matrix[3][3] == MT_Scalar(0.0f))
        {
-               // frustrum projection
+               // frustum projection
                // detect which of the corner of the far clipping plane is the 
farthest to the origin
                MT_Vector4 nfar;    // far point in device normalized coordinate
                MT_Point3 farpoint; // most extreme far point in camera 
coordinate
@@ -359,7 +359,7 @@ void KX_Camera::ExtractFrustumSphere()
                nfar.setValue(-nfar[0], -nfar[1], -1.0f, 1.0f);
                nfar = clip_camcs_matrix*nfar;
                nearpoint.setValue(nfar[0]/nfar[3], nfar[1]/nfar[3], 
nfar[2]/nfar[3]);
-               // this is a frustrum projection
+               // this is a frustum projection
                N = nearpoint.dot(nearpoint);
                e = farpoint[2];
                s = nearpoint[2];
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp 
b/source/gameengine/Ketsji/KX_Dome.cpp
index 818a465..6585b9d 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -1450,22 +1450,21 @@ void KX_Dome::CalculateFrustum(KX_Camera *cam)
        gluPerspective(90.0f,1.0f,cam->GetCameraNear(),cam->GetCameraFar());
 #endif
 
-       RAS_FrameFrustum m_frustrum; //90 deg. Frustum
+       RAS_FrameFrustum m_frustum; //90 deg. Frustum
 
-       m_frustrum.camnear = cam->GetCameraNear();
-       m_frustrum.camfar = cam->GetCameraFar();
+       m_frustum.camnear = cam->GetCameraNear();
+       m_frustum.camfar = cam->GetCameraFar();
 
-//     float top = tan(90.0f*MT_PI/360.0f) * m_frustrum.camnear;
-       float top = m_frustrum.camnear; // for deg = 90deg, tan = 1
+//     float top = tan(90.0f*MT_PI/360.0f) * m_frustum.camnear;
+       float top = m_frustum.camnear; // for deg = 90deg, tan = 1
 
-       m_frustrum.x1 = -top;
-       m_frustrum.x2 = top;
-       m_frustrum.y1 = -top;
-       m_frustrum.y2 = top;
+       m_frustum.x1 = -top;
+       m_frustum.x2 = top;
+       m_frustum.y1 = -top;
+       m_frustum.y2 = top;
        
        m_projmat = m_rasterizer->GetFrustumMatrix(
-       m_frustrum.x1, m_frustrum.x2, m_frustrum.y1, m_frustrum.y2, 
m_frustrum.camnear, m_frustrum.camfar);
-
+       m_frustum.x1, m_frustum.x2, m_frustum.y1, m_frustum.y2, 
m_frustum.camnear, m_frustum.camfar);
 }
 
 void KX_Dome::CalculateCameraOrientation()
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp 
b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index cb44758..c8bfab0 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -107,7 +107,7 @@ double KX_KetsjiEngine::m_suspendedtime = 0.0;
 double KX_KetsjiEngine::m_suspendeddelta = 0.0;
 double KX_KetsjiEngine::m_average_framerate = 0.0;
 bool   KX_KetsjiEngine::m_restrict_anim_fps = false;
-short  KX_KetsjiEngine::m_exitkey = 130; //ESC Key
+short  KX_KetsjiEngine::m_exitkey = 130; // ESC Key
 
 
 /**
@@ -310,7 +310,7 @@ void KX_KetsjiEngine::RenderDome()
        KX_SceneList::iterator sceneit;
        KX_Scene* scene = NULL;
 
-       int n_renders=m_dome->GetNumberRenders();// usually 4 or 6
+       int n_renders=m_dome->GetNumberRenders(); // usually 4 or 6
        for (int i=0;i<n_renders;i++) {
                
m_canvas->ClearBuffer(RAS_ICanvas::COLOR_BUFFER|RAS_ICanvas::DEPTH_BUFFER);
                for (sceneit = m_scenes.begin();sceneit != m_scenes.end(); 
sceneit++)
@@ -327,7 +327,7 @@ void KX_KetsjiEngine::RenderDome()
                        if (i == 0) {
                                RenderShadowBuffers(scene);
                        }
-                       // Avoid drawing the scene with the active camera twice 
when it's viewport is enabled
+                       // Avoid drawing the scene with the active camera twice 
when its viewport is enabled
                        if (cam && !cam->GetViewport())
                        {
                                if (scene->IsClearingZBuffer())
@@ -337,7 +337,7 @@ void KX_KetsjiEngine::RenderDome()
                
                                // do the rendering
                                m_dome->RenderDomeFrame(scene,cam, i);
-                               //render all the font objects for this scene
+                               // render all the font objects for this scene
                                scene->RenderFonts();
                        }
                        
@@ -355,7 +355,7 @@ void KX_KetsjiEngine::RenderDome()
                        
                                        // do the rendering
                                        m_dome->RenderDomeFrame(scene, (*it),i);
-                                       //render all the font objects for this 
scene
+                                       // render all the font objects for this 
scene
                                        scene->RenderFonts();
                                }
                                
@@ -438,7 +438,6 @@ void KX_KetsjiEngine::StartEngine(bool clearIpo)
                m_sceneconverter->ResetPhysicsObjectsAnimationIpo(clearIpo);
                
m_sceneconverter->WritePhysicsObjectToAnimationIpo(m_currentFrame);
        }
-
 }
 
 void KX_KetsjiEngine::ClearFrame()
@@ -539,7 +538,7 @@ void KX_KetsjiEngine::EndFrame()
 
        m_average_framerate = 1.0/tottime;
 
-       // Go to next profiling measurement, time spend after this call is 
shown in the next frame.
+       // Go to next profiling measurement, time spent after this call is 
shown in the next frame.
        m_logger->NextMeasurement(m_kxsystem->GetTimeInSeconds());
 
        m_logger->StartLog(tc_rasterizer, m_kxsystem->GetTimeInSeconds(), true);
@@ -609,7 +608,7 @@ bool KX_KetsjiEngine::NextFrame()
        double deltatime = m_clockTime - m_frameTime;
        if (deltatime<0.0)
        {
-               // We got here too quickly, which means there is nothing todo, 
just return and don't render.
+               // We got here too quickly, which means there is nothing to do, 
just return and don't render.
                // Not sure if this is the best fix, but it seems to stop the 
jumping framerate issue (#33088)
                return false;
        }
@@ -660,13 +659,13 @@ bool KX_KetsjiEngine::NextFrame()
                         * update. */
                        m_logger->StartLog(tc_logic, 
m_kxsystem->GetTimeInSeconds(), true);
 
-                       m_sceneconverter->resetNoneDynamicObjectToIpo();//this 
is for none dynamic objects with ipo
+                       m_sceneconverter->resetNoneDynamicObjectToIpo(); // 
this is for none dynamic objects with ipo
 
                        scene->UpdateObjectActivity();
        
                        if (!scene->IsSuspended())
                        {
-                               // if the scene was suspended recalcutlate the 
delta tu "curtime"
+                               // if the scene was suspended recalculate the 
delta tu "curtime"
                                m_suspendedtime = scene->getSuspendedTime();
                                if (scene->getSuspendedTime()!=0.0)
                                        
scene->setSuspendedDelta(scene->getSuspendedDelta()+m_clockTime-scene->getSuspendedTime());
@@ -769,7 +768,7 @@ bool KX_KetsjiEngine::NextFrame()
                frames--;
        }
 
-       // Start logging time spend outside main loop
+       // Start logging time spent outside main loop
        m_logger->StartLog(tc_outside, m_kxsystem->GetTimeInSeconds(), true);
        
        return doRender;
@@ -838,13 +837,13 @@ void KX_KetsjiEngine::Render()
                // pass the scene's worldsettings to the rasterizer
                scene->GetWorldInfo()->UpdateWorldSettings();
 
-               // this is now done incrementatlly in 
KX_Scene::CalculateVisibleMeshes
+               // this is now done incrementally in 
KX_Scene::CalculateVisibleMeshes
                //scene->UpdateMeshTransformations();
 
                // shadow buffers
                RenderShadowBuffers(scene);
 
-               // Avoid drawing the scene with the active camera twice when 
it's viewport is enabled
+               // Avoid drawing the scene with the active camera twice when 
its viewport is enabled
                if (cam && !cam->GetViewport())
                {
                        if (scene->IsClearingZBuffer())
@@ -898,7 +897,7 @@ void KX_KetsjiEngine::Render()
                        if (scene->IsClearingZBuffer())
                                m_rasterizer->ClearDepthBuffer();
 
-                       //pass the scene, for picking and raycasting (shadows)
+                       // pass the scene, for picking and raycasting (shadows)
                        m_rasterizer->SetAuxilaryClientInfo(scene);
 
                        // do the rendering
@@ -948,10 +947,10 @@ void KX_KetsjiEngine::SetNameNextGame(const STR_String& 
nextgame)
 
 int KX_KetsjiEngine::GetExitCode()
 {
-       // if a gameactuator has set an exitcode or if there are no scenes left
+       // if a game actuator has set an exit code or if there are no scenes 
left
        if (!m_exitcode)
        {
-               if (m_scenes.begin()==m_scenes.end())
+               if (m_scenes.begin() == m_scenes.end())
                        m_exitcode = KX_EXIT_REQUEST_NO_SCENES_LEFT;
        }
        
@@ -1017,9 +1016,8 @@ void KX_KetsjiEngine::SetCameraOverrideZoom(float camzoom)
 
 void KX_KetsjiEngine::GetSceneViewport(KX_Scene *scene, KX_Camera* cam, 
RAS_Rect& area, RAS_Rect& viewport)
 {
-       // In this function we make sure the rasterizer settings are upto
-       // date. We compute the viewport so that logic
-       // using this information is upto date.
+       // In this function we make sure the rasterizer settings are up-to-date.
+       // We compute the viewport so that logic using this information is 
up-to-date.
 
        // Note we postpone computation of the projection matrix
        // so that we are using the latest camera position.
@@ -1171,7 +1169,7 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, 
KX_Camera* cam)
        if (override_camera && m_overrideCamUseOrtho) {
                m_rasterizer->SetProjectionMatrix(m_overrideCamProjMat);
                if (!cam->hasValidProjectionMatrix()) {
-                       // needed to get frustrum planes for culling
+                       // needed to get frustum planes for c

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to