~ubuntu-branches/debian/sid/ember/sid

« back to all changes in this revision

Viewing changes to src/components/ogre/ShadowDetailManager.h

  • Committer: Package Import Robot
  • Author(s): Olek Wojnar, Stephen M. Webb, Olek Wojnar
  • Date: 2016-08-06 18:39:19 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20160806183919-4g72j3flj7xe2stj
Tags: 0.7.2+dfsg-1
[ Stephen M. Webb ]
* debian/control: updated build-depends to newer minimum versions
  (closes: #704786)
* debian/control: updated Standards-Version to 3.9.4 (updated VCS-* fields)
* debian/patches/0001-ember.in-test-expr.patch: removed (fixed upstream)
* debian/patches/0002-add-update_lua_bindings.patch: removed (fixed upstream)
* debian/patches/0003-add-atlas-pkg.patch: removed (fixed upstream)
* debian/patches/0004-domain-bindings-lua-makefile.patch: refreshed
* debian/patches/0005-ember.in-prefix.patch: removed (fixed upstream)
* debian/patches/0006-spellcheck-similiar.patch: removed (fixed upstream)
* debian/patches/0007-revert-libwfut-version.patch: refreshed
* debian/patches/0008-replace-fastdeletegate-with-sigc++.patch: removed
 (fixed upstream)
* debian/patches/0009-spelling-bach.patch: removed (fixed upstream)
* debian/patches/0010-fix-ember-script-args.patch: removed (fixed upstream)
* debian/patches/0011-qualify-template-functions.patch: removed (fixed
  upstream)
* debian/patches/0012-fix-osdir-headers.patch: removed (fixed upstream)
* debian/patches/0013-remove-invalid-linker-flags.patch: removed (fixed
  upstream)
* debian/patches/0014-add-missing-ogrelodstrategy.patch: new
* debian/control: fixed Vcs-Browser URL
* debian/patches/0015-verbose-configure-errors.patch: new
* debian/patches/0016-boost-1.53.patch: new
* debian/control: bump boost build dependeny to 1.53

[ Olek Wojnar ]
* New upstream release (Closes: #799748)
* Add myself as new uploader
  - Remove Stephen Webb per his request
  - Thanks for all the contributions, Stephen!
* d/patches/0007-revert-libwfut-version.patch: removed (unnecessary)
* d/control
  - Remove pre-dependency on dpkg
  - Update standards to 3.9.8 (no changes)
  - Update Vcs lines for secure URIs
* Import patch from the wfmath package to replace MersenneTwister.h
  -- Avoids problems from ambiguous copyright of the original file
* Update dependencies for version 0.7.2
* Enable all hardening options
* Add three lintian overrides
  -- Ignore install into usr/bin (binary)
  -- Ignore .rc files needed for WIN32 build (source)
  -- Ignore false positive of spelling error (binary)
* d/copyright: Update contributors and dates
* d/rules
  -- Do not remove "sounddefinitions" directory
  -- Enable parallel build
  -- Do not install into games directories
  -- Remove dh_builddeb override since xz is now the default
* d/watch: update file extensions
* Remove three patches, add eight patches, update remaining patches
  -- 0004-domain-bindings-lua-makefile.patch (implemented upstream)
  -- 0014-add-missing-ogrelodstrategy.patch (implemented upstream)
  -- 0016-boost-1.53.patch (patch target file removed upstream)
  -- 0018-enable-subdir-objects.patch (Fix automake 1.14 warnings)
  -- 0019-update-boost-m4.patch (Fix invalid boost_major_version)
  -- 0020-remove-obsolete-includes.patch (Fix obsolete includes)
  -- 0021-GraphicalChangeAdapter-fix-for-newer-compilers.patch (Added)
  -- 0022-fix-typos.patch (Fix typos identified by lintian)
  -- 0023-add-keywords-to-desktop-file.patch (Add Keywords to .desktop file)
  -- 0024-fix-icon-location (Make icon location Icon Theme Spec-compliant)
  -- 0025-fix-duplicate-script-install.patch (Was causing build failures)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2012 Arjun Kumar <arjun1991@gmail.com>
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
 */
 
18
 
 
19
#include "OgreIncludes.h"
 
20
 
 
21
#include "sigc++/connection.h"
 
22
#include "string"
 
23
 
 
24
namespace varconf
 
25
{
 
26
class Variable;
 
27
}
 
28
 
 
29
namespace Ember
 
30
{
 
31
 
 
32
class ConfigListenerContainer;
 
33
namespace OgreView
 
34
{
 
35
 
 
36
class GraphicalChangeAdapter;
 
37
 
 
38
/**
 
39
 * @brief Handles changes in shadow detail automatically.
 
40
 * Acts as a sub-component of the automatic handling of graphics system.
 
41
 */
 
42
class ShadowDetailManager
 
43
{
 
44
public:
 
45
        /**
 
46
         * @brief Constructor.
 
47
         */
 
48
        ShadowDetailManager(GraphicalChangeAdapter& graphicalChangeAdapter, Ogre::SceneManager& sceneManager);
 
49
 
 
50
        /**
 
51
         * @brief Destructor.
 
52
         */
 
53
        ~ShadowDetailManager();
 
54
 
 
55
        /**
 
56
         * @brief Sets the maximum distance the shadows are rendered at in float.
 
57
         * @param distance The maximum distance in float.
 
58
         */
 
59
        bool setShadowFarDistance(float distance);
 
60
 
 
61
        /**
 
62
         * @brief Sets the lod bias for the shadow camera.
 
63
         * 
 
64
         * This can be used to affect the overall quality of the shadow by affecting the level of detail of the mesh for which the shadow is rendered.
 
65
         * 
 
66
         * @param factor The bias factor applied to the shadow camera.
 
67
         * 
 
68
         * @note factor cannot be negative or zero. It is still safe to attempt to set these values as the function will default to a factor of 0.1
 
69
         */
 
70
        bool setShadowCameraLodBias(float factor);
 
71
 
 
72
        /**
 
73
         * @brief Initializes the shadow detail manager.
 
74
         * The manager starts listening for graphics detail change requests.
 
75
         */
 
76
        void initialize();
 
77
 
 
78
        /**
 
79
         * @brief This can be used to stop this component responding to change requests.
 
80
         */
 
81
        void pause();
 
82
 
 
83
        /**
 
84
         * @brief This can be used to restart this component responding to change requests.
 
85
         */
 
86
        void unpause();
 
87
 
 
88
protected:
 
89
        /**
 
90
         * @brief Checks level against this component's threshold value to determine change in shadow detail.
 
91
         * This function is used to listen to the changes required by the automatic graphics detail system.
 
92
         */
 
93
        bool changeLevel(float level);
 
94
 
 
95
        /**
 
96
         * @brief Steps down the maximum shadow distance by provided step.
 
97
         * @param step The value to step the distance down by in float.
 
98
         */
 
99
        bool stepUpShadowDistance(float step);
 
100
 
 
101
        /**
 
102
         * @brief Steps up the maximum shadow distance by provided step.
 
103
         * @param step The value to step the distance down by in float.
 
104
         */
 
105
        bool stepDownShadowDistance(float step);
 
106
 
 
107
        /**
 
108
         * @brief Steps down the maximum shadow distance by provided step.
 
109
         * @param step The value to step the distance down by in float.
 
110
         */
 
111
        bool stepUpShadowCameraLodBias(float step);
 
112
 
 
113
        /**
 
114
         * @brief Steps up the maximum shadow distance by provided step.
 
115
         * @param step The value to step the distance down by in float.
 
116
         */
 
117
        bool stepDownShadowCameraLodBias(float step);
 
118
 
 
119
        /**
 
120
         * @brief Connected to the config service to listen for shadow lod bias settings.
 
121
         */
 
122
        void Config_ShadowLodBias(const std::string& section, const std::string& key, varconf::Variable& variable);
 
123
 
 
124
        /**
 
125
         * Holds the distance the rendered shadows are culled. i.e. shadows beyond this distance are not rendered.
 
126
         * @see setShadowFarDistance
 
127
         */
 
128
        float mShadowFarDistance;
 
129
 
 
130
        /**
 
131
         * The threshold fps change after which the shadow camera lod level is changed to respond to performance change requested.
 
132
         */
 
133
        float mShadowCameraLodThreshold;
 
134
 
 
135
        /**
 
136
         * The threshold fps change after which the shadow distance is changed to respond to performance change requested.
 
137
         */
 
138
        float mShadowDistanceThreshold;
 
139
 
 
140
        /**
 
141
         * The maximum distance the shadow far distance can be increased to.
 
142
         */
 
143
        float mMaxShadowFarDistance;
 
144
 
 
145
        /**
 
146
         * The minimum distance the shadow far distance can be decreased to.
 
147
         */
 
148
        float mMinShadowFarDistance;
 
149
 
 
150
        /**
 
151
         * The step taken up or down while changing shadow far distance.
 
152
         */
 
153
        float mDefaultShadowDistanceStep;
 
154
 
 
155
        /**
 
156
         * Holds the level of detail bias for the shadow camera.
 
157
         * @see setShadowCameraLodBias
 
158
         */
 
159
        float mShadowCameraLodBias;
 
160
 
 
161
        /**
 
162
         * The maximum lod bias factor that the shadow camera can have.
 
163
         */
 
164
        float mMaxShadowCameraLodBias;
 
165
 
 
166
        /**
 
167
         * The minimum lod bias factor that the shadow camera can have.
 
168
         */
 
169
        float mMinShadowCameraLodBias;
 
170
 
 
171
        /**
 
172
         * The step taken up or down while changing the lod bias for generating shadows.
 
173
         */
 
174
        float mDefaultShadowLodStep;
 
175
 
 
176
        /**
 
177
         * Holds the reference to the connection to the changeRequired signal. Used to disconnect the signal on destruction of this class or to pause the functioning of this component.
 
178
         */
 
179
        sigc::connection mChangeRequiredConnection;
 
180
 
 
181
        /**
 
182
         * Reference to the scenemanager used to edit the shadows.
 
183
         */
 
184
        Ogre::SceneManager& mSceneManager;
 
185
 
 
186
        /**
 
187
         * @brief Used to listen for configuration changes.
 
188
         */
 
189
        ConfigListenerContainer* mConfigListenerContainer;
 
190
 
 
191
};
 
192
}
 
193
}