|
Katana Plug-in APIs 0.1
|
00001 // Copyright (c) 2013 The Foundry Visionmongers Ltd. All Rights Reserved. 00002 00003 #ifndef FNRENDER_CAMERASETTINGS_H 00004 #define FNRENDER_CAMERASETTINGS_H 00005 00006 #include "FnScenegraphIterator/FnScenegraphIterator.h" 00007 #include "FnAttribute/FnAttribute.h" 00008 #include "FnRenderOutputUtils/FnRenderOutputUtils.h" 00009 #include "FnRender/FnRenderAPI.h" 00010 00011 #include <map> 00012 #include <vector> 00013 #include <memory> 00014 00015 namespace Foundry 00016 { 00017 namespace Katana 00018 { 00019 namespace Render 00020 { 00034 class FNRENDER_API CameraSettings 00035 { 00036 public: 00037 00038 // Alias for a shared pointer to CameraSettings 00039 typedef std::shared_ptr<CameraSettings> Ptr; 00040 00045 CameraSettings( 00046 FNSCENEGRAPHITERATOR_NAMESPACE::FnScenegraphIterator iterator, 00047 const std::string & cameraName = "") : 00048 _iterator(iterator), 00049 _cameraName(cameraName), 00050 _projection("perspective"), 00051 _fov(70.0f), 00052 _orthographicWidth(30.0f) 00053 { 00054 } 00055 00056 virtual ~CameraSettings() {} 00057 00066 virtual int initialise(int displayWindow[4], int overscan[4], float shutterClose = 0.0f); 00067 00071 std::string getName() const { return _cameraName; } 00072 00076 std::string getProjection() const { return _projection; } 00077 00081 float getFov() const { return _fov; } 00082 00086 void getClipping(float clipping[2]) const; 00087 00091 void getScreenWindow(float screenWindow[4]) const; 00092 00096 std::vector<FnRenderOutputUtils::RenderOutputUtils::Transform> 00097 getTransforms() const { return _transforms; } 00098 00099 protected: 00100 FNSCENEGRAPHITERATOR_NAMESPACE::FnScenegraphIterator _iterator; 00101 00102 std::string _cameraName; 00103 std::string _projection; 00104 float _fov; 00105 float _orthographicWidth; 00106 float _clipping[2]; 00107 float _screenWindow[4]; 00108 00109 std::vector<FnRenderOutputUtils::RenderOutputUtils::Transform> 00110 _transforms; 00111 }; 00112 00116 } 00117 } 00118 } 00119 00120 namespace FnKat = Foundry::Katana; 00121 00122 #endif
1.7.3