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

Revision 13108, 2.4 kB (checked in by robert, 12 days ago)

Moved widgets from VolumeEditorWidget? to TransferFunctionWidget?, and widget utilities into WidgetUtils?.

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
16using namespace osgShadow;
17
18ShadowSettings::ShadowSettings():
19    _receivesShadowTraversalMask(0xffffffff),
20    _castsShadowTraversalMask(0xffffffff),
21    _computeNearFearModeOverride(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR),
22    _lightNum(-1),
23    _baseShadowTextureUnit(1),
24    _useShadowMapTextureOverride(true),
25    _textureSize(2048,2048),
26    _minimumShadowMapNearFarRatio(0.05),
27    _shadowMapProjectionHint(PERSPECTIVE_SHADOW_MAP),
28    _perspectiveShadowMapCutOffAngle(2.0),
29    _numShadowMapsPerLight(1),
30    _multipleShadowMapHint(PARALLEL_SPLIT),
31    _shaderHint(NO_SHADERS),
32//    _shaderHint(PROVIDE_FRAGMENT_SHADER),
33    _debugDraw(false)
34{
35    //_computeNearFearModeOverride = osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES;
36    //_computeNearFearModeOverride = osg::CullSettings::COMPUTE_NEAR_USING_PRIMITIVES);
37}
38
39ShadowSettings::ShadowSettings(const ShadowSettings& ss, const osg::CopyOp& copyop):
40    Object(ss,copyop),
41    _receivesShadowTraversalMask(ss._receivesShadowTraversalMask),
42    _castsShadowTraversalMask(ss._castsShadowTraversalMask),
43    _computeNearFearModeOverride(ss._computeNearFearModeOverride),
44    _lightNum(ss._lightNum),
45    _baseShadowTextureUnit(ss._baseShadowTextureUnit),
46    _useShadowMapTextureOverride(ss._useShadowMapTextureOverride),
47    _textureSize(ss._textureSize),
48    _minimumShadowMapNearFarRatio(ss._minimumShadowMapNearFarRatio),
49    _shadowMapProjectionHint(ss._shadowMapProjectionHint),
50    _perspectiveShadowMapCutOffAngle(ss._perspectiveShadowMapCutOffAngle),
51    _numShadowMapsPerLight(ss._numShadowMapsPerLight),
52    _multipleShadowMapHint(ss._multipleShadowMapHint),
53    _shaderHint(ss._shaderHint),
54    _debugDraw(ss._debugDraw)
55{
56}
57
58ShadowSettings::~ShadowSettings()
59{
60}
Note: See TracBrowser for help on using the browser.