Revision: 2595
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2595&view=rev
Author:   ulteq
Date:     2012-05-19 02:05:24 +0000 (Sat, 19 May 2012)
Log Message:
-----------
-Codechange: CameraSystem WIP (nearly done)
uncommented depth of field construction
fixed a bug where one could not get into static cam while being inside a truck
changed the default camera angle for vehicle chase cam
added depth of field code for free and fixed mode (for testing purposes)

Modified Paths:
--------------
    trunk/source/main/gameplay/RoRFrameListener.cpp
    trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp
    trunk/source/main/gfx/camera/CameraBehaviorFixed.cpp
    trunk/source/main/gfx/camera/CameraBehaviorFree.cpp
    trunk/source/main/gfx/camera/CameraBehaviorVehicle.cpp

Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp     2012-05-19 00:40:10 UTC 
(rev 2594)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp     2012-05-19 02:05:24 UTC 
(rev 2595)
@@ -939,8 +939,8 @@
        // depth of field effect
        if (BSETTING("DOF", false))
        {
-               //dof = new DOFManager(mSceneMgr, mCamera->getViewport(), 
mRoot, mCamera);
-               //dof->setEnabled(true);
+               dof = new DOFManager(mSceneMgr, mCamera->getViewport(), mRoot, 
mCamera);
+               dof->setEnabled(true);
        }
 
        // force feedback

Modified: trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp    2012-05-19 
00:40:10 UTC (rev 2594)
+++ trunk/source/main/gfx/camera/CameraBehaviorCharacter.cpp    2012-05-19 
02:05:24 UTC (rev 2595)
@@ -66,8 +66,11 @@
 
 void CameraBehaviorCharacter::activate(const CameraManager::cameraContext_t 
&ctx, bool reset /* = true */)
 {
-       if ( reset )
+       if ( ctx.mCurrTruck )
        {
+               CameraManager::getSingleton().switchToNextBehavior();
+       } else if ( reset )
+       {
                camMode = CHARACTER_THIRD_PERSON;
                this->reset(ctx);
        }

Modified: trunk/source/main/gfx/camera/CameraBehaviorFixed.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorFixed.cpp        2012-05-19 
00:40:10 UTC (rev 2594)
+++ trunk/source/main/gfx/camera/CameraBehaviorFixed.cpp        2012-05-19 
02:05:24 UTC (rev 2595)
@@ -20,12 +20,17 @@
 #include "CameraBehaviorFixed.h"
 
 #include "Console.h"
+#include "DepthOfFieldEffect.h"
 #include "language.h"
 
 using namespace Ogre;
 
 void CameraBehaviorFixed::activate(const CameraManager::cameraContext_t &ctx, 
bool reset /* = true */)
 {
+       if ( ctx.mDof )
+       {
+               ctx.mDof->setFocusMode(DOFManager::Auto);
+       }
 #ifdef USE_MYGUI
        Console::getSingleton().putMessage(Console::CONSOLE_MSGTYPE_INFO, 
Console::CONSOLE_SYSTEM_NOTICE, _L("fixed free camera"), "camera_link.png", 
3000);
 #endif // USE_MYGUI

Modified: trunk/source/main/gfx/camera/CameraBehaviorFree.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorFree.cpp 2012-05-19 00:40:10 UTC 
(rev 2594)
+++ trunk/source/main/gfx/camera/CameraBehaviorFree.cpp 2012-05-19 02:05:24 UTC 
(rev 2595)
@@ -20,6 +20,7 @@
 #include "CameraBehaviorFree.h"
 
 #include "Console.h"
+#include "DepthOfFieldEffect.h"
 #include "heightfinder.h"
 #include "InputEngine.h"
 #include "language.h"
@@ -125,6 +126,10 @@
 
 void CameraBehaviorFree::activate(const CameraManager::cameraContext_t &ctx, 
bool reset /* = true */)
 {
+       if ( ctx.mDof )
+       {
+               ctx.mDof->setFocusMode(DOFManager::Auto);
+       }
 #ifdef USE_MYGUI
        Console::getSingleton().putMessage(Console::CONSOLE_MSGTYPE_INFO, 
Console::CONSOLE_SYSTEM_NOTICE, _L("free camera"), "camera_go.png", 3000);
 #endif // USE_MYGUI

Modified: trunk/source/main/gfx/camera/CameraBehaviorVehicle.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraBehaviorVehicle.cpp      2012-05-19 
00:40:10 UTC (rev 2594)
+++ trunk/source/main/gfx/camera/CameraBehaviorVehicle.cpp      2012-05-19 
02:05:24 UTC (rev 2595)
@@ -70,7 +70,7 @@
 void CameraBehaviorVehicle::reset(const CameraManager::cameraContext_t &ctx)
 {
        camRotX = 0.0f;
-       camRotY = 0.5f;
+       camRotY = 0.35f;
        camDist = ctx.mCurrTruck->getMinimalCameraRadius() * 3.0f + 2.0f;
        camDistMin = ctx.mCurrTruck->getMinimalCameraRadius() * 2.0f;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to