Ran script to remove trailing spaces and tabs

This commit is contained in:
Robert Osfield
2012-03-21 17:36:20 +00:00
parent 1e35f8975d
commit 14a563dc9f
1495 changed files with 21873 additions and 21873 deletions

View File

@@ -1,13 +1,13 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 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 WARRANTY; 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.
*/
@@ -46,12 +46,12 @@ FixedFunctionTechnique::~FixedFunctionTechnique()
void FixedFunctionTechnique::setNumSlices(unsigned int numSlices)
{
if (_numSlices==numSlices) return;
_numSlices = numSlices;
if (_volumeTile) _volumeTile->setDirty(true);
}
osg::Node* createCube(const osg::Vec3& center, float size, unsigned int numSlices)
{
@@ -74,7 +74,7 @@ osg::Node* createCube(const osg::Vec3& center, float size, unsigned int numSlice
(*coords)[i*4+2].set(halfSize,y,-halfSize);
(*coords)[i*4+3].set(halfSize,y,halfSize);
}
osg::Vec3Array* normals = new osg::Vec3Array(1);
(*normals)[0].set(0.0f,-1.0f,0.0f);
geom->setNormalArray(normals);
@@ -91,7 +91,7 @@ osg::Node* createCube(const osg::Vec3& center, float size, unsigned int numSlice
billboard->setMode(osg::Billboard::POINT_ROT_WORLD);
billboard->addDrawable(geom);
billboard->setPosition(0,center);
return billboard;
}
@@ -119,13 +119,13 @@ void FixedFunctionTechnique::init()
}
float alphaFuncValue = 0.1;
osg::Image* image_3d = 0;
osgVolume::Locator* masterLocator = _volumeTile->getLocator();
osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;
osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;
image_3d = _volumeTile->getLayer()->getImage();
CollectPropertiesVisitor cpv;
if (_volumeTile->getLayer()->getProperty())
{
@@ -154,7 +154,7 @@ void FixedFunctionTechnique::init()
{
matrix = masterLocator->getTransform();
}
OSG_NOTICE<<"Matrix = "<<matrix<<std::endl;
osg::Texture::FilterMode minFilter = osg::Texture::NEAREST;
@@ -164,12 +164,12 @@ void FixedFunctionTechnique::init()
osg::Vec3d v100 = osg::Vec3d(1.0,0.0,0.0) * matrix;
osg::Vec3d v010 = osg::Vec3d(0.0,1.0,0.0) * matrix;
osg::Vec3d v110 = osg::Vec3d(1.0,1.0,0.0) * matrix;
osg::Vec3d v001 = osg::Vec3d(0.0,0.0,1.0) * matrix;
osg::Vec3d v101 = osg::Vec3d(1.0,0.0,1.0) * matrix;
osg::Vec3d v011 = osg::Vec3d(0.0,1.0,1.0) * matrix;
osg::Vec3d v111 = osg::Vec3d(1.0,1.0,1.0) * matrix;
double cubeSize = (v111-v000).length();
osg::Vec3d center = (v000+v111)*0.5;
@@ -185,15 +185,15 @@ void FixedFunctionTechnique::init()
osg::TexGenNode* texgenNode_0 = new osg::TexGenNode;
texgenNode_0->addChild(clipnode);
texgenNode_0->setTextureUnit(0);
texgenNode_0->getTexGen()->setMode(osg::TexGen::EYE_LINEAR);
texgenNode_0->getTexGen()->setPlanesFromMatrix(osg::Matrix::inverse(matrix));
texgenNode_0->setTextureUnit(0);
texgenNode_0->getTexGen()->setMode(osg::TexGen::EYE_LINEAR);
texgenNode_0->getTexGen()->setPlanesFromMatrix(osg::Matrix::inverse(matrix));
osg::StateSet* stateset = texgenNode_0->getOrCreateStateSet();
stateset->setMode(GL_LIGHTING,osg::StateAttribute::ON);
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
if (cpv._afProperty.valid())
{
stateset->setAttributeAndModes(cpv._afProperty->getAlphaFunc(), osg::StateAttribute::ON);
@@ -202,11 +202,11 @@ void FixedFunctionTechnique::init()
{
stateset->setAttributeAndModes(new osg::AlphaFunc(osg::AlphaFunc::GREATER,alphaFuncValue), osg::StateAttribute::ON);
}
osg::Material* material = new osg::Material;
material->setDiffuse(osg::Material::FRONT_AND_BACK,osg::Vec4(1.0f,1.0f,1.0f,1.0f));
stateset->setAttributeAndModes(material);
if (cpv._mipProperty.valid())
{
stateset->setAttribute(new osg::BlendFunc(osg::BlendFunc::ONE, osg::BlendFunc::ONE));
@@ -225,7 +225,7 @@ void FixedFunctionTechnique::init()
texture3D->setWrap(osg::Texture3D::WRAP_R,osg::Texture3D::CLAMP_TO_EDGE);
texture3D->setWrap(osg::Texture3D::WRAP_S,osg::Texture3D::CLAMP_TO_EDGE);
texture3D->setWrap(osg::Texture3D::WRAP_T,osg::Texture3D::CLAMP_TO_EDGE);
if (image_3d->getPixelFormat()==GL_ALPHA ||
if (image_3d->getPixelFormat()==GL_ALPHA ||
image_3d->getPixelFormat()==GL_LUMINANCE)
{
texture3D->setInternalFormatMode(osg::Texture3D::USE_USER_DEFINED_FORMAT);
@@ -245,7 +245,7 @@ void FixedFunctionTechnique::init()
stateset->setTextureMode(0,GL_TEXTURE_GEN_R,osg::StateAttribute::ON);
stateset->setTextureAttributeAndModes(0,new osg::TexEnv(),osg::StateAttribute::ON);
_node = texgenNode_0;
}
@@ -256,7 +256,7 @@ void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* uv)
void FixedFunctionTechnique::cull(osgUtil::CullVisitor* cv)
{
//OSG_NOTICE<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
//OSG_NOTICE<<"FixedFunctionTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
if (_node.valid())
{
_node->accept(*cv);
@@ -283,8 +283,8 @@ void FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)
{
update(uv);
return;
}
}
}
else if (nv.getVisitorType()==osg::NodeVisitor::CULL_VISITOR)
{
@@ -297,10 +297,10 @@ void FixedFunctionTechnique::traverse(osg::NodeVisitor& nv)
}
if (_volumeTile->getDirty())
if (_volumeTile->getDirty())
{
OSG_INFO<<"******* Doing init ***********"<<std::endl;
_volumeTile->init();
}
}