root/OpenSceneGraph/trunk/src/osgShadow/ShadowSettings.cpp @ 13110

Revision 13110, 2.5 kB (checked in by robert, 19 minutes ago)

Added support for scaling widgets via the scoll wheel.

Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2011 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#include <osgShadow/ShadowSettings>
15#include <float.h>
16
17using namespace osgShadow;
18
19ShadowSettings::ShadowSettings():
20    _receivesShadowTraversalMask(0xffffffff),
21    _castsShadowTraversalMask(0xffffffff),
22    _computeNearFearModeOverride(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR),
23    _lightNum(-1),
24    _baseShadowTextureUnit(1),
25    _useShadowMapTextureOverride(true),
26    _textureSize(2048,2048),
27    _minimumShadowMapNearFarRatio(0.05),
28    _maximumShadowMapDistance(DBL_MAX),
29    _shadowMapProjectionHint(PERSPECTIVE_SHADOW_MAP),
30    _perspectiveShadowMapCutOffAngle(2.0),
31    _numShadowMapsPerLight(1),
32    _multipleShadowMapHint(PARALLEL_SPLIT),
33    _shaderHint(NO_SHADERS),
34//    _shaderHint(PROVIDE_FRAGMENT_SHADER),
35    _debugDraw(false)
36{
37    //_computeNearFearModeOverride = osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES;
38    //_computeNearFearModeOverride = osg::CullSettings::COMPUTE_NEAR_USING_PRIMITIVES);
39}
40
41ShadowSettings::ShadowSettings(const ShadowSettings& ss, const osg::CopyOp& copyop):
42    Object(ss,copyop),
43    _receivesShadowTraversalMask(ss._receivesShadowTraversalMask),
44    _castsShadowTraversalMask(ss._castsShadowTraversalMask),
45    _computeNearFearModeOverride(ss._computeNearFearModeOverride),
46    _lightNum(ss._lightNum),
47    _baseShadowTextureUnit(ss._baseShadowTextureUnit),
48    _useShadowMapTextureOverride(ss._useShadowMapTextureOverride),
49    _textureSize(ss._textureSize),
50    _minimumShadowMapNearFarRatio(ss._minimumShadowMapNearFarRatio),
51    _maximumShadowMapDistance(ss._maximumShadowMapDistance),
52    _shadowMapProjectionHint(ss._shadowMapProjectionHint),
53    _perspectiveShadowMapCutOffAngle(ss._perspectiveShadowMapCutOffAngle),
54    _numShadowMapsPerLight(ss._numShadowMapsPerLight),
55    _multipleShadowMapHint(ss._multipleShadowMapHint),
56    _shaderHint(ss._shaderHint),
57    _debugDraw(ss._debugDraw)
58{
59}
60
61ShadowSettings::~ShadowSettings()
62{
63}
Note: See TracBrowser for help on using the browser.