Replaced tabs with spaces in examples.

This commit is contained in:
Robert Osfield
2005-11-17 20:22:55 +00:00
parent 39db6b28b3
commit 91855e7c50
36 changed files with 1471 additions and 1482 deletions

View File

@@ -236,9 +236,9 @@ void build_world(osg::Group *root, unsigned int testCase)
osg::Image* image = osgDB::readImageFile("Images/lz.rgb");
if (image)
{
osg::Texture2D* texture = new osg::Texture2D;
texture->setImage(image);
stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON);
osg::Texture2D* texture = new osg::Texture2D;
texture->setImage(image);
stateset->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON);
}
terrainGeode->setStateSet( stateset );
@@ -271,11 +271,11 @@ void build_world(osg::Group *root, unsigned int testCase)
float max_z = -FLT_MAX;
for(r=0;r<numRows;++r)
{
for(c=0;c<numColumns;++c)
{
min_z = osg::minimum(min_z,vertex[r+c*numRows][2]);
max_z = osg::maximum(max_z,vertex[r+c*numRows][2]);
}
for(c=0;c<numColumns;++c)
{
min_z = osg::minimum(min_z,vertex[r+c*numRows][2]);
max_z = osg::maximum(max_z,vertex[r+c*numRows][2]);
}
}
float scale_z = size.z()/(max_z-min_z);
@@ -287,14 +287,14 @@ void build_world(osg::Group *root, unsigned int testCase)
{
pos.x() = origin.x();
tex.x() = 0.0f;
for(c=0;c<numColumns;++c)
{
v[vi].set(pos.x(),pos.y(),pos.z()+(vertex[r+c*numRows][2]-min_z)*scale_z);
tc[vi] = tex;
for(c=0;c<numColumns;++c)
{
v[vi].set(pos.x(),pos.y(),pos.z()+(vertex[r+c*numRows][2]-min_z)*scale_z);
tc[vi] = tex;
pos.x()+=columnCoordDelta;
tex.x()+=columnTexDelta;
++vi;
}
}
pos.y() += rowCoordDelta;
tex.y() += rowTexDelta;
}
@@ -309,11 +309,11 @@ void build_world(osg::Group *root, unsigned int testCase)
osg::DrawElementsUShort& drawElements = *(new osg::DrawElementsUShort(GL_QUAD_STRIP,2*numColumns));
geometry->addPrimitiveSet(&drawElements);
int ei=0;
for(c=0;c<numColumns;++c)
{
drawElements[ei++] = (r+1)*numColumns+c;
drawElements[ei++] = (r)*numColumns+c;
}
for(c=0;c<numColumns;++c)
{
drawElements[ei++] = (r+1)*numColumns+c;
drawElements[ei++] = (r)*numColumns+c;
}
}
osgUtil::SmoothingVisitor smoother;