Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/dxf/ReaderWriterDXF.cpp

    r10329 r13041  
    11/* dxfReader for OpenSceneGraph  Copyright (C) 2005 by GraphArchitecture ( grapharchitecture.com ) 
    22 * Programmed by Paul de Repentigny <pdr@grapharchitecture.com> 
    3  *  
     3 * 
    44 * OpenSceneGraph is (C) 2004 Robert Osfield 
    5  *  
     5 * 
    66 * This library is provided as-is, without support of any kind. 
    77 * 
    88 * Read DXF docs or OSG docs for any related questions. 
    9  *  
     9 * 
    1010 * You may contact the author if you have suggestions/corrections/enhancements. 
    1111 */ 
     
    3838        supportsExtension("dxf","Autodesk DXF format"); 
    3939    } 
    40      
     40 
    4141    virtual const char* className() { return "Autodesk DXF Reader/Writer"; } 
    4242    virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*) const; 
    4343 
    4444 
    45     virtual WriteResult writeObject(const osg::Object& obj,const std::string& fileName,const Options* options=NULL) const  
     45    virtual WriteResult writeObject(const osg::Object& obj,const std::string& fileName,const Options* options=NULL) const 
    4646    { 
    4747        const osg::Node* node = dynamic_cast<const osg::Node*>(&obj); 
    4848        if (node) 
    4949            return writeNode(*node, fileName, options); 
    50         else  
    51             return WriteResult(WriteResult::FILE_NOT_HANDLED);  
     50        else 
     51            return WriteResult(WriteResult::FILE_NOT_HANDLED); 
    5252    } 
    53      
    54      
    55     virtual WriteResult writeObject(const osg::Object& obj,std::ostream& fout,const Options* options=NULL) const  
     53 
     54 
     55    virtual WriteResult writeObject(const osg::Object& obj,std::ostream& fout,const Options* options=NULL) const 
    5656    { 
    5757        const osg::Node* node = dynamic_cast<const osg::Node*>(&obj); 
    5858        if (node) 
    5959            return writeNode(*node, fout, options); 
    60         else  
    61             return WriteResult(WriteResult::FILE_NOT_HANDLED);  
     60        else 
     61            return WriteResult(WriteResult::FILE_NOT_HANDLED); 
    6262    } 
    6363 
    64     virtual WriteResult writeNode(const osg::Node& node,std::ostream& fout,const Options* =NULL) const  
    65     {          
     64    virtual WriteResult writeNode(const osg::Node& node,std::ostream& fout,const Options* =NULL) const 
     65    { 
    6666 
    67          
    68         DXFWriterNodeVisitor nv(fout);  
     67 
     68        DXFWriterNodeVisitor nv(fout); 
    6969 
    7070        (const_cast<osg::Node*>(&node))->accept(nv); // first pass is to get all node names and types -> layers 
     
    7474            nv.writeFooter(); 
    7575        } 
    76      
    77         return WriteResult(WriteResult::FILE_SAVED);  
     76 
     77        return WriteResult(WriteResult::FILE_SAVED); 
    7878    } 
    7979 
    80     virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const  
    81     {  
     80    virtual WriteResult writeNode(const osg::Node& node,const std::string& fileName,const Options* options =NULL) const 
     81    { 
    8282        if (!acceptsExtension(osgDB::getFileExtension(fileName))) 
    8383            return WriteResult(WriteResult::FILE_NOT_HANDLED); 
    8484 
    8585        osgDB::ofstream f(fileName.c_str()); 
    86          
     86 
    8787        if (!f.is_open() ) { 
    8888            return WriteResult(WriteResult::ERROR_IN_WRITING_FILE); 
    8989        } 
    90         DXFWriterNodeVisitor nv(f);  
    91                  
     90        DXFWriterNodeVisitor nv(f); 
     91 
    9292        (const_cast<osg::Node*>(&node))->accept(nv); // first pass is to get all node names and types -> layers 
    9393 
     
    9797        } 
    9898 
    99         return WriteResult(WriteResult::FILE_SAVED);  
     99        return WriteResult(WriteResult::FILE_SAVED); 
    100100    } 
    101101 
     
    108108 
    109109// read file and convert to OSG. 
    110 osgDB::ReaderWriter::ReadResult  
     110osgDB::ReaderWriter::ReadResult 
    111111ReaderWriterdxf::readNode(const std::string& filename, const osgDB::ReaderWriter::Options* options) const 
    112112{ 
     
    120120        bool improveAccuracyOnly=false; // if true only use the given accuracy if it would improve the curve compared to the previous implementation 
    121121                                        // Thus you can ensure that large curves get rendered better but small ones don't get worse 
    122          
     122 
    123123        std::string optionsstring=options->getOptionString(); 
    124          
     124 
    125125        size_t accstart=optionsstring.find("Accuracy("); 
    126126        if (accstart>=0) { 
     
    132132            if (optionsstring.find("ImproveAccuracyOnly") != std::string::npos) { 
    133133                improveAccuracyOnly=true; 
    134             }  
    135             // Pull out the initial dxfArc copy from the registry and set accuracy there.  
     134            } 
     135            // Pull out the initial dxfArc copy from the registry and set accuracy there. 
    136136            // When actual dxfArcs/Circles are created they will inherit these parameters from the exemplar 
    137137            dxfEntity::getRegistryEntity("ARC")->setAccuracy(true,maxError,improveAccuracyOnly); 
    138             dxfEntity::getRegistryEntity("CIRCLE")->setAccuracy(true,maxError,improveAccuracyOnly);  
     138            dxfEntity::getRegistryEntity("CIRCLE")->setAccuracy(true,maxError,improveAccuracyOnly); 
    139139        } // accuracy options exists 
    140140    } // options exist