From Chris Hanson, typo and comment clean ups
This commit is contained in:
@@ -142,8 +142,8 @@ class ReaderWriter3DC : public osgDB::ReaderWriter
|
||||
if (vertices->size()>=targetNumVertices)
|
||||
{
|
||||
// finishing setting up the current geometry and add it to the geode.
|
||||
geometry->setUseDisplayList(true);
|
||||
geometry->setUseVertexBufferObjects(true);
|
||||
geometry->setUseDisplayList(true);
|
||||
geometry->setUseVertexBufferObjects(true);
|
||||
geometry->setVertexArray(vertices);
|
||||
geometry->setNormalArray(normals);
|
||||
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
@@ -175,7 +175,7 @@ class ReaderWriter3DC : public osgDB::ReaderWriter
|
||||
|
||||
|
||||
geometry->setUseDisplayList(true);
|
||||
geometry->setUseVertexBufferObjects(true);
|
||||
geometry->setUseVertexBufferObjects(true);
|
||||
geometry->setVertexArray(vertices);
|
||||
geometry->setNormalArray(normals);
|
||||
geometry->setNormalBinding(osg::Geometry::BIND_PER_VERTEX);
|
||||
@@ -189,19 +189,19 @@ class ReaderWriter3DC : public osgDB::ReaderWriter
|
||||
|
||||
}
|
||||
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const
|
||||
{
|
||||
if (!acceptsExtension(osgDB::getFileExtension(fileName)))
|
||||
return WriteResult(WriteResult::FILE_NOT_HANDLED);
|
||||
virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const
|
||||
{
|
||||
std::string ext = osgDB::getLowerCaseFileExtension(fileName);
|
||||
if( !acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED;
|
||||
|
||||
osgDB::ofstream f(fileName.c_str());
|
||||
|
||||
Writer3DCNodeVisitor nv(f);
|
||||
Writer3DCNodeVisitor nv(f);
|
||||
|
||||
// we must cast away constness
|
||||
(const_cast<osg::Node*>(&node))->accept(nv);
|
||||
|
||||
return WriteResult(WriteResult::FILE_SAVED);
|
||||
return WriteResult::FILE_SAVED;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield
|
||||
*
|
||||
* This application is open source and may be redistributed and/or modified
|
||||
* This application is open source and may be redistributed and/or modified
|
||||
* freely and without restriction, both in commericial and non commericial
|
||||
* applications, as long as this copyright notice is maintained.
|
||||
*
|
||||
@@ -55,7 +55,7 @@ static bool getFilenameAndParams(const std::string& input, std::string& filename
|
||||
return false;
|
||||
}
|
||||
|
||||
// clear the params sting of any brackets.
|
||||
// clear the params string of any brackets.
|
||||
std::string::size_type params_pos = params.size();
|
||||
for(; params_pos>0; )
|
||||
{
|
||||
@@ -81,10 +81,10 @@ static bool getFilenameAndParams(const std::string& input, std::string& filename
|
||||
* This pseudo-loader make it simple to change the size of a saved model
|
||||
* by specifying a correcting scale factor as part of the filename.
|
||||
*
|
||||
* Usage: <modelfile.ext>.<sx>,<sy>,<sz>.globe
|
||||
* <modelfile.ext>.<su>.globe
|
||||
* Usage: <modelfile.ext>.<sx>,<sy>,<sz>.scale
|
||||
* <modelfile.ext>.<su>.scale
|
||||
* where:
|
||||
* <modelfile.ext> = an model filename.
|
||||
* <modelfile.ext> = a model filename.
|
||||
* <sx> = scale factor along the X axis.
|
||||
* <sy> = scale factor along the Y axis.
|
||||
* <sz> = scale factor along the Z axis.
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
virtual const char* className() const { return "scaling pseudo-loader"; }
|
||||
|
||||
virtual bool acceptsExtension(const std::string& extension) const
|
||||
{
|
||||
{
|
||||
return osgDB::equalCaseInsensitive( extension, EXTENSION_NAME );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user