Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 27, 2011, 12:48:50 PM (13 years ago)
Author:
landauf
Message:
  • FOV and pixel aspect ratio are now configurable
  • aspect ratio and FOV of the camera are automatically adjusted if the window is resized (note: hud and gui still scale with the window which is fine I guess)
  • the config value for FOV defines FOVx which is more convenient than FOVy
  • default FOVx is now 80 degree (it was ~57.5 degree before, so the field of view is now much larger and the ship seems more distant).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/src/orxonox/graphics/Camera.h

    r6417 r7988  
    3333
    3434#include "util/OgreForwardRefs.h"
     35#include "core/WindowEventListener.h"
    3536#include "tools/interfaces/Tickable.h"
    3637#include "tools/interfaces/TimeFactorListener.h"
     
    3940namespace orxonox
    4041{
    41     class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener
     42    class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener
    4243    {
    4344        friend class CameraManager;
     
    6667            void removeFocus();
    6768            void setFocus();
     69
     70            void configvaluecallback_changedFovAndAspectRatio();
    6871            void configvaluecallback_changedNearClipDistance();
     72
     73            void windowResized(unsigned int newWidth, unsigned int newHeight);
    6974
    7075            Ogre::Camera*    camera_;
     
    7479            bool             bDrag_;
    7580            bool             lastDtLagged_;
     81            float            fov_;
     82            float            aspectRatio_;
    7683    };
    7784}
Note: See TracChangeset for help on using the changeset viewer.