Ran script to remove trailing spaces and tabs
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRA;NTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#include <osg/View>
|
||||
@@ -35,7 +35,7 @@ View::View():
|
||||
_camera->setProjectionMatrixAsPerspective( vfov, width/height, 1.0f,10000.0f);
|
||||
|
||||
_camera->setClearColor(osg::Vec4f(0.2f, 0.2f, 0.4f, 1.0f));
|
||||
|
||||
|
||||
osg::StateSet* stateset = _camera->getOrCreateStateSet();
|
||||
stateset->setGlobalDefaults();
|
||||
}
|
||||
@@ -59,7 +59,7 @@ View::~View()
|
||||
_camera->setView(0);
|
||||
_camera->setCullCallback(0);
|
||||
}
|
||||
|
||||
|
||||
// detach the cameras from this View to prevent dangling pointers
|
||||
for(Slaves::iterator itr = _slaves.begin();
|
||||
itr != _slaves.end();
|
||||
@@ -69,10 +69,10 @@ View::~View()
|
||||
cd._camera->setView(0);
|
||||
cd._camera->setCullCallback(0);
|
||||
}
|
||||
|
||||
|
||||
_camera = 0;
|
||||
_slaves.clear();
|
||||
_light = 0;
|
||||
_light = 0;
|
||||
|
||||
#if 0
|
||||
if (osg::Referenced::getDeleteHandler())
|
||||
@@ -81,7 +81,7 @@ View::~View()
|
||||
osg::Referenced::getDeleteHandler()->flushAll();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
OSG_INFO<<"Done destructing osg::View"<<std::endl;
|
||||
}
|
||||
|
||||
@@ -93,9 +93,9 @@ void View::take(osg::View& rhs)
|
||||
_camera = rhs._camera;
|
||||
_slaves = rhs._slaves;
|
||||
|
||||
// update the cameras so they all now see this View as their parent View
|
||||
// update the cameras so they all now see this View as their parent View
|
||||
if (_camera.valid()) _camera->setView(this);
|
||||
|
||||
|
||||
for(unsigned int i=0; i<_slaves.size(); ++i)
|
||||
{
|
||||
if (_slaves[i]._camera.valid()) _slaves[i]._camera->setView(this);
|
||||
@@ -111,7 +111,7 @@ void View::take(osg::View& rhs)
|
||||
void View::setLightingMode(LightingMode lightingMode)
|
||||
{
|
||||
_lightingMode = lightingMode;
|
||||
if (_lightingMode != NO_LIGHT && !_light)
|
||||
if (_lightingMode != NO_LIGHT && !_light)
|
||||
{
|
||||
_light = new osg::Light;
|
||||
_light->setThreadSafeRefUnref(true);
|
||||
@@ -126,7 +126,7 @@ void View::setLightingMode(LightingMode lightingMode)
|
||||
void View::setCamera(osg::Camera* camera)
|
||||
{
|
||||
if (_camera.valid()) _camera->setView(0);
|
||||
|
||||
|
||||
_camera = camera;
|
||||
|
||||
if (_camera.valid())
|
||||
@@ -169,7 +169,7 @@ bool View::addSlave(osg::Camera* camera, const osg::Matrix& projectionOffset, co
|
||||
if (useMastersSceneData)
|
||||
{
|
||||
camera->removeChildren(0,camera->getNumChildren());
|
||||
|
||||
|
||||
if (_camera.valid())
|
||||
{
|
||||
for(unsigned int i=0; i<_camera->getNumChildren(); ++i)
|
||||
@@ -182,8 +182,8 @@ bool View::addSlave(osg::Camera* camera, const osg::Matrix& projectionOffset, co
|
||||
_slaves.push_back(Slave(camera, projectionOffset, viewOffset, useMastersSceneData));
|
||||
|
||||
_slaves[i].updateSlave(*this);
|
||||
|
||||
camera->setRenderer(createRenderer(camera));
|
||||
|
||||
camera->setRenderer(createRenderer(camera));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ bool View::removeSlave(unsigned int pos)
|
||||
|
||||
_slaves[pos]._camera->setView(0);
|
||||
_slaves[pos]._camera->setCullCallback(0);
|
||||
|
||||
|
||||
_slaves.erase(_slaves.begin()+pos);
|
||||
|
||||
return true;
|
||||
@@ -218,7 +218,7 @@ unsigned int View::findSlaveIndexForCamera(osg::Camera* camera) const
|
||||
{
|
||||
if (_slaves[i]._camera == camera) return (i);
|
||||
}
|
||||
|
||||
|
||||
return _slaves.size();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user