Changeset 8578

Show
Ignore:
Timestamp:
07/14/08 00:18:59 (6 years ago)
Author:
robert
Message:

Converted plugins to use the new supportsExtension()/supportsOptions/supportsProtocl() methods
to help enable better querying of supported features

Location:
OpenSceneGraph/trunk/src
Files:
54 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgDB/ReaderWriter.cpp

    r8577 r8578  
    3838bool ReaderWriter::acceptsExtension(const std::string& extension) const 
    3939{ 
     40    // check for an exact match 
    4041    std::string lowercase_ext = convertToLowerCase(extension); 
    41     return (_supportedExtensions.count(lowercase_ext)!=0); 
     42    if (_supportedExtensions.count(lowercase_ext)!=0) return true; 
     43     
     44    // if plugin supports wildcard extension then passthrough all types 
     45    return (_supportedExtensions.count("*")!=0); 
    4246} 
    4347 
  • OpenSceneGraph/trunk/src/osgPlugins/3dc/ReaderWriter3DC.cpp

    r8300 r8578  
    1616{ 
    1717    public: 
     18     
     19        ReaderWriter3DC() 
     20        { 
     21            supportsExtension("3dc","3DC point cloud format"); 
     22            supportsExtension("asc","3DC point cloud format"); 
     23        } 
     24     
    1825        virtual const char* className() const { return "3DC point cloud reader"; } 
    1926         
    20         virtual bool acceptsExtension(const std::string& extension) const 
    21         { 
    22             return osgDB::equalCaseInsensitive(extension,"3dc") || 
    23                    osgDB::equalCaseInsensitive(extension,"asc"); 
    24         } 
    25  
    2627        virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
    2728        { 
  • OpenSceneGraph/trunk/src/osgPlugins/3ds/ReaderWriter3DS.cpp

    r7648 r8578  
    9292 
    9393        virtual const char* className() const { return "3DS Auto Studio Reader"; } 
    94         virtual bool acceptsExtension(const std::string& extension) const { return osgDB::equalCaseInsensitive(extension,"3ds"); } 
    9594 
    9695        virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const; 
     
    128127ReaderWriter3DS::ReaderWriter3DS() 
    129128{ 
     129    supportsExtension("3ds","3D Studio model format"); 
     130 
    130131    setByteOrder(); 
    131132 
  • OpenSceneGraph/trunk/src/osgPlugins/Inventor/ReaderWriterIV.cpp

    r7512 r8578  
    2828ReaderWriterIV::ReaderWriterIV() 
    2929{ 
     30    supportsExtension("iv","Inventor format"); 
     31    supportsExtension("wrl","VRML world file"); 
    3032} 
    3133 
  • OpenSceneGraph/trunk/src/osgPlugins/Inventor/ReaderWriterIV.h

    r7348 r8578  
    2020        } 
    2121 
    22         virtual bool acceptsExtension(const std::string& extension) const 
    23         { 
    24             return isInventorExtension(extension) ? true : 
    25                    osgDB::equalCaseInsensitive(extension, "wrl") ? true : false; 
    26         } 
    27          
    2822        virtual ReadResult readNode(const std::string& filename,  
    2923                                    const osgDB::ReaderWriter::Options *) const; 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ReaderWriterATTR.cpp

    r8003 r8578  
    4040{ 
    4141    public: 
     42     
     43        ReaderWriterATTR() 
     44        { 
     45            supportsExtension("attr","OpenFlight texture attribute format"); 
     46        } 
    4247     
    4348        virtual const char* className() const { return "ATTR Image Attribute Reader/Writer"; } 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp

    r8564 r8578  
    121121        FLTReaderWriter() 
    122122          : _implicitPath( "." ) 
    123         {} 
     123        { 
     124            supportsExtension("flt","OpenFlight format"); 
     125             
     126            supportsOption("clampToEdge",""); 
     127            supportsOption("keepExternalReferences",""); 
     128            supportsOption("preserveFace",""); 
     129            supportsOption("preserveObject",""); 
     130            supportsOption("dofAnimation",""); 
     131            supportsOption("billboardCenter",""); 
     132            supportsOption("noTextureAlphaForTransparancyBinning",""); 
     133            supportsOption("readObjectRecordData",""); 
     134            supportsOption("noUnitsConversion",""); 
     135            supportsOption("convertToFeet",""); 
     136            supportsOption("convertToInches",""); 
     137            supportsOption("convertToMeters",""); 
     138            supportsOption("convertToKilometers",""); 
     139            supportsOption("convertToNauticalMiles",""); 
     140        } 
    124141 
    125142        virtual const char* className() const { return "FLT Reader/Writer"; } 
  • OpenSceneGraph/trunk/src/osgPlugins/bmp/ReaderWriterBMP.cpp

    r8522 r8578  
    316316{ 
    317317    public: 
     318     
     319        ReaderWriterBMP() 
     320        { 
     321            supportsExtension("bmp","BMP Image format"); 
     322        } 
     323     
    318324        virtual const char* className() const { return "BMP Image Reader"; } 
    319         virtual bool acceptsExtension(const std::string& extension) const { return osgDB::equalCaseInsensitive(extension,"bmp"); } 
    320325 
    321326        ReadResult readBMPStream(std::istream& fin) const 
  • OpenSceneGraph/trunk/src/osgPlugins/bsp/ReaderWriterQ3BSP.cpp

    r7076 r8578  
    2323{ 
    2424public: 
    25     ReaderWriterQ3BSP() { } 
     25    ReaderWriterQ3BSP() 
     26    { 
     27        supportsExtension("bsp","Quake3 BSP model format"); 
     28    } 
    2629 
    2730    virtual const char* className() const 
    2831      { 
    2932        return "Quake3 BSP Reader"; 
    30       } 
    31  
    32     virtual bool acceptsExtension(const std::string& extension) const 
    33       {  
    34         return osgDB::equalCaseInsensitive(extension,"bsp"); 
    3533      } 
    3634 
  • OpenSceneGraph/trunk/src/osgPlugins/cfg/ReaderWriterCFG.cpp

    r8485 r8578  
    190190public: 
    191191 
     192    ReaderWriterProducerCFG() 
     193    { 
     194        supportsExtension("cfg","Producer camera configuration file"); 
     195    } 
     196 
    192197    virtual const char* className() { return "Producer cfg object reader"; } 
    193198 
    194     virtual bool acceptsExtension(const std::string& extension) const 
    195     { 
    196         return osgDB::equalCaseInsensitive(extension, "cfg"); 
    197     } 
    198199 
    199200    virtual ReadResult readObject(const std::string& fileName, const Options* options = NULL) const 
  • OpenSceneGraph/trunk/src/osgPlugins/curl/ReaderWriterCURL.cpp

    r8577 r8578  
    145145    supportsProtocol("http","Read from http port using libcurl."); 
    146146    supportsExtension("curl","Psuedo file extension, used to select curl plugin."); 
     147    supportsExtension("*","Passes all read files to other plugins to handle actual model loading."); 
    147148    supportsOption("OSG_CURL_PROXY","Specify the http proxy."); 
    148149    supportsOption("OSG_CURL_PROXYPORT","Specify the http proxy oirt."); 
  • OpenSceneGraph/trunk/src/osgPlugins/dae/ReaderWriterDAE.h

    r7664 r8578  
    1616    ReaderWriterDAE() 
    1717    { 
     18        supportsExtension(EXTENSION_NAME,"COLLADA 1.4.x DAE format"); 
    1819    } 
    1920 
    2021    const char* className() const { return "COLLADA 1.4.x DAE reader/writer"; } 
    21  
    22     bool acceptsExtension(const std::string& extension) const 
    23     {  
    24         return osgDB::equalCaseInsensitive( extension, EXTENSION_NAME ); 
    25     } 
    2622 
    2723    ReadResult readNode(const std::string&, const Options*) const; 
  • OpenSceneGraph/trunk/src/osgPlugins/dds/ReaderWriterDDS.cpp

    r8033 r8578  
    919919{ 
    920920public: 
     921 
     922    ReaderWriterDDS() 
     923    { 
     924        supportsExtension("dds","DDS image format"); 
     925    } 
     926 
    921927    virtual const char* className() const 
    922928    {  
    923929        return "DDS Image Reader/Writer";  
    924     } 
    925  
    926     virtual bool acceptsExtension(const std::string& extension) const 
    927     {  
    928         return osgDB::equalCaseInsensitive(extension,"dds");  
    929930    } 
    930931 
  • OpenSceneGraph/trunk/src/osgPlugins/dw/ReaderWriterDW.cpp

    r7076 r8578  
    793793{ 
    794794    public: 
     795     
     796        ReaderWriterDW() 
     797        { 
     798            supportsExtension("dw","Designer Workbench model format"); 
     799        } 
     800     
    795801        virtual const char* className() const { return "Design Workshop Database Reader"; } 
    796  
    797         virtual bool acceptsExtension(const std::string& extension) const 
    798         { 
    799             return osgDB::equalCaseInsensitive(extension,"dw"); 
    800         } 
    801802 
    802803        virtual ReadResult readNode(const std::string& file,const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/dxf/ReaderWriterDXF.cpp

    r7076 r8578  
    3131{ 
    3232public: 
    33     ReaderWriterdxf() { } 
     33    ReaderWriterdxf() 
     34    { 
     35        supportsExtension("dxf","Autodesk DXF format"); 
     36    } 
     37     
    3438    virtual const char* className() { return "Autodesk DXF Reader"; } 
    35     virtual bool acceptsExtension(const std::string& extension) const { 
    36         return osgDB::equalCaseInsensitive(extension,"dxf"); 
    37     } 
    3839    virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*) const; 
    3940protected: 
  • OpenSceneGraph/trunk/src/osgPlugins/gdal/ReaderWriterGDAL.cpp

    r7992 r8578  
    4949{ 
    5050    public: 
     51     
     52        ReaderWriterGDAL() 
     53        { 
     54            supportsExtension("gdal","GDAL Image reader"); 
     55        } 
     56         
    5157        virtual const char* className() const { return "GDAL Image Reader"; } 
    52         virtual bool acceptsExtension(const std::string& extension) const 
    53         { 
    54             return osgDB::equalCaseInsensitive(extension,"gdal") || osgDB::equalCaseInsensitive(extension,"gdal"); 
    55         } 
    5658 
    5759        virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/geo/ReaderWriterGEO.cpp

    r7076 r8578  
    22032203{ 
    22042204    public: 
     2205     
     2206        ReaderWriterGEO() 
     2207        { 
     2208            supportsExtension("gem","CarbonGraphics Geo model format"); 
     2209            supportsExtension("geo","CarbonGraphics Geo model format"); 
     2210        } 
     2211     
    22052212        virtual const char* className() const { return "GEO Reader/Writer"; } 
    22062213 
  • OpenSceneGraph/trunk/src/osgPlugins/gif/ReaderWriterGIF.cpp

    r8359 r8578  
    6868        : _length(0), _dataNum(0), _frameNum(0),  
    6969        _done(false), _currentLength(0), _multiplier(1.0), 
    70         osg::ImageStream() { _status=PAUSED; } 
     70        osg::ImageStream() 
     71    { 
     72        _status=PAUSED; 
     73    } 
    7174    virtual Object* clone() const { return new GifImageStream; } 
    7275    virtual bool isSameKindAs( const Object* obj ) const  
     
    560563{ 
    561564    public: 
     565     
     566        ReaderWriterGIF() 
     567        { 
     568            supportsExtension("gif","GIF Image format"); 
     569        } 
     570     
    562571        virtual const char* className() const { return "GIF Image Reader"; } 
    563         virtual bool acceptsExtension(const std::string& extension) const 
    564         { 
    565             return osgDB::equalCaseInsensitive(extension,"gif"); 
    566         } 
    567572 
    568573        ReadResult readGIFStream(std::istream& fin) const 
  • OpenSceneGraph/trunk/src/osgPlugins/glsl/ReaderWriterGLSL.cpp

    r7908 r8578  
    1111{ 
    1212    public: 
     13     
     14        ReaderWriterGLSL() 
     15        { 
     16            supportsExtension("gl","OpenGL Shader Language format"); 
     17            supportsExtension("glsl","OpenGL Shader Language format"); 
     18        } 
     19     
    1320        virtual const char* className() const { return "GLSL Shader Reader"; } 
    1421        virtual bool acceptsExtension(const std::string& extension) const 
  • OpenSceneGraph/trunk/src/osgPlugins/hdr/ReaderWriterHDR.cpp

    r7513 r8578  
    4848{ 
    4949public: 
     50    ReaderWriterHDR() 
     51    { 
     52        supportsExtension("hdr","High Dynamic Range image format"); 
     53        supportsOption("RGBMUL",""); 
     54        supportsOption("RGB8",""); 
     55        supportsOption("RAW",""); 
     56        supportsOption("YFLIP",""); 
     57        supportsOption("NO_YFLIP",""); 
     58    } 
    5059    virtual const char* className() { return "HDR Image Reader"; } 
    51     virtual bool acceptsExtension(const std::string &extension) const { return osgDB::equalCaseInsensitive(extension, "hdr"); } 
    5260 
    5361    virtual ReadResult readImage(const std::string &_file, const osgDB::ReaderWriter::Options *_opts) const 
  • OpenSceneGraph/trunk/src/osgPlugins/jp2/ReaderWriterJP2.cpp

    r7645 r8578  
    175175        ReaderWriterJP2() 
    176176        { 
     177            supportsExtension("jp2","Jpeg2000 image format"); 
     178            supportsExtension("jpc","Jpeg2000 image format"); 
     179         
    177180            // little dance here to get around warnings created by jas_image_strtofmt use of char* rather than const char* 
    178181            // as a parameted and modern compilers deprecating "jp2" string being treated as char*. 
     
    184187        virtual const char* className() const { return "RGB Image Reader/Writer"; } 
    185188         
    186         virtual bool acceptsExtension(const std::string& extension) const 
    187         { 
    188             return osgDB::equalCaseInsensitive(extension,"jp2") || 
    189                 osgDB::equalCaseInsensitive(extension,"jpc"); 
    190         } 
    191  
    192189        virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
    193190        { 
  • OpenSceneGraph/trunk/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp

    r8300 r8578  
    613613class ReaderWriterJPEG : public osgDB::ReaderWriter 
    614614{ 
     615     
    615616        WriteResult::WriteStatus write_JPEG_file (std::ostream &fout,int image_width,int image_height,JSAMPLE* image_buffer,int quality = 100) const 
    616617        { 
     
    741742        } 
    742743    public: 
     744 
     745        ReaderWriterJPEG() 
     746        { 
     747            supportsExtension("jpeg","JPEG image format"); 
     748            supportsExtension("jpg","JPEG image format"); 
     749        } 
     750 
    743751        virtual const char* className() const { return "JPEG Image Reader/Writer"; } 
    744         virtual bool acceptsExtension(const std::string& extension) const 
    745         { 
    746             return osgDB::equalCaseInsensitive(extension,"jpeg") || osgDB::equalCaseInsensitive(extension,"jpg"); 
    747         } 
    748752 
    749753        ReadResult readJPGStream(std::istream& fin) const 
  • OpenSceneGraph/trunk/src/osgPlugins/logo/ReaderWriterLOGO.cpp

    r8418 r8578  
    196196{ 
    197197    public: 
     198        LOGOReaderWriter() 
     199        { 
     200            supportsExtension("logo","Ascii logo placement format"); 
     201        } 
     202         
    198203        virtual const char* className() const { return "Logo Database Reader/Writer"; } 
    199  
    200         virtual bool acceptsExtension(const std::string& extension) const 
    201         { 
    202             return osgDB::equalCaseInsensitive(extension,"logo"); 
    203         } 
    204204 
    205205        virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/lwo/ReaderWriterLWO.cpp

    r7747 r8578  
    4747{ 
    4848public: 
    49     ReaderWriterLWO() { } 
    50  
     49    ReaderWriterLWO() 
     50    { 
     51        supportsExtension("lwo","Lightwave object format"); 
     52        supportsExtension("lw","Lightwave object format"); 
     53        supportsExtension("geo","Lightwave geometry format"); 
     54    } 
     55     
    5156    virtual const char* className() const { return "Lightwave Object Reader"; } 
    52     virtual bool acceptsExtension(const std::string& extension) const { 
    53         return osgDB::equalCaseInsensitive(extension,"lwo") || osgDB::equalCaseInsensitive(extension,"lw") || osgDB::equalCaseInsensitive(extension,"geo"); 
    54     } 
    5557 
    5658    virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/lws/ReaderWriterLWS.cpp

    r7076 r8578  
    2424{ 
    2525public: 
    26     ReaderWriterLWS() {} 
     26    ReaderWriterLWS() 
     27    { 
     28        supportsExtension("lws","Lightwave scene format"); 
     29    } 
    2730 
    2831    virtual const char* className() const { return "ReaderWriterLWS"; } 
  • OpenSceneGraph/trunk/src/osgPlugins/md2/ReaderWriterMD2.cpp

    r7076 r8578  
    4444{ 
    4545public: 
    46     ReaderWriterMD2 () { } 
     46    ReaderWriterMD2 () 
     47    { 
     48        supportsExtension("md2","Quak2 MD format"); 
     49    } 
    4750 
    4851    virtual const char* className () const { 
    4952        return "Quake MD2 Reader"; 
    50     } 
    51  
    52     virtual bool acceptsExtension (const std::string& extension) const { 
    53         return osgDB::equalCaseInsensitive (extension, "md2") ? true : false; 
    5453    } 
    5554 
  • OpenSceneGraph/trunk/src/osgPlugins/net/ReaderWriterNET.cpp

    r7984 r8578  
    8787{ 
    8888    public: 
    89         NetReader() {} 
     89        NetReader() 
     90        { 
     91            supportsProtocol("http","HTTP Protocol"); 
     92            supportsExtension("net","Psuedo loader extension for selecting NET plugin"); 
     93            supportsExtension("*","Passes all file loading onto other plugins"); 
     94        } 
    9095                                                                                             
    9196        virtual const char* className() const { return "HTTP Protocol Model Reader"; } 
  • OpenSceneGraph/trunk/src/osgPlugins/normals/ReaderWriterNormals.cpp

    r7076 r8578  
    1414{ 
    1515    public: 
    16         NormalsReader() {} 
     16        NormalsReader() 
     17        { 
     18            supportsExtension("normals","Normals Pseudo loader"); 
     19        } 
    1720 
    1821        virtual const char* className() { return "Normals Pseudo Loader"; } 
  • OpenSceneGraph/trunk/src/osgPlugins/obj/ReaderWriterOBJ.cpp

    r8570 r8578  
    5353{ 
    5454public: 
    55     ReaderWriterOBJ():_fixBlackMaterials(true) {} 
     55    ReaderWriterOBJ():_fixBlackMaterials(true) 
     56    { 
     57        supportsExtension("obj","Alias Wavefront OBJ format"); 
     58    } 
    5659 
    5760    virtual const char* className() const { return "Wavefront OBJ Reader"; } 
    58     virtual bool acceptsExtension(const std::string& extension) const { 
    59         return osgDB::equalCaseInsensitive(extension,"obj"); 
    60     } 
    6161 
    6262    virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const; 
  • OpenSceneGraph/trunk/src/osgPlugins/ogr/ReaderWriterOGR.cpp

    r7840 r8578  
    8282 
    8383public: 
    84     ReaderWriterOGR() {} 
     84    ReaderWriterOGR() 
     85    { 
     86        supportsExtension("ogr","OGR file reader"); 
     87    } 
    8588    virtual const char* className() const { return "OGR file reader"; } 
    86     virtual bool acceptsExtension(const std::string& extension) const 
    87     { 
    88         return osgDB::equalCaseInsensitive(extension,"ogr") ||  
    89             osgDB::equalCaseInsensitive(extension,"ogr"); 
    90     } 
    9189 
    9290    virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/osgShadow/ReaderWriterOsgShadow.cpp

    r7076 r8578  
    7373{ 
    7474public: 
    75     ReaderWriterOsgShadow() { } 
     75    ReaderWriterOsgShadow() 
     76    { 
     77        supportsExtension("osgShadow","OpenSceneGraph osgShadow extension to .osg ascii format"); 
     78        supportsExtension("shadow","OpenSceneGraph osgShadow extension pseudo loader"); 
     79    } 
    7680     
    7781    virtual const char* className() const { return "osgShadow pseudo-loader"; } 
    78  
    79     virtual bool acceptsExtension(const std::string& extension) const 
    80     {  
    81         return osgDB::equalCaseInsensitive( extension, "osgShadow" ) || osgDB::equalCaseInsensitive( extension, "shadow" ) ; 
    82     } 
    8382 
    8483    virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/osgTerrain/ReaderWriterOsgTerrain.cpp

    r7999 r8578  
    2020        ReaderWriterTerrain() 
    2121        { 
     22            supportsExtension("osgTerrain","OpenSceneGraph terrain extension to .osg ascii format"); 
     23            supportsExtension("terrain","OpenSceneGraph terrain ascii format"); 
    2224        } 
    2325         
    2426        virtual const char* className() const { return "Terrain ReaderWriter"; } 
    25  
    26         virtual bool acceptsExtension(const std::string& extension) const 
    27         { 
    28             return osgDB::equalCaseInsensitive( extension, "osgTerrain" ) || osgDB::equalCaseInsensitive(extension,"terrain"); 
    29         } 
    3027 
    3128        virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* opt) const 
  • OpenSceneGraph/trunk/src/osgPlugins/osgViewer/ReaderWriterOsgViewer.cpp

    r7447 r8578  
    2424{ 
    2525public: 
    26     ReaderWriterOsgViewer() { } 
     26    ReaderWriterOsgViewer() 
     27    { 
     28        supportsExtension("osgviewer","OpenSceneGraph viewer configuration format"); 
     29        supportsExtension("view","OpenSceneGraph viewer configuration format"); 
     30        supportsOption("precision","Set the floating point precision of output"); 
     31        supportsOption("OutputTextureFiles","Output texture image to file"); 
     32    } 
    2733     
    2834    virtual const char* className() const { return "osgViewer configuration loader"; } 
    29  
    30     virtual bool acceptsExtension(const std::string& extension) const 
    31     {  
    32         return osgDB::equalCaseInsensitive( extension, "osgviewer" ) || osgDB::equalCaseInsensitive( extension, "view" ) ; 
    33     } 
    34  
    3535 
    3636    void setPrecision(osgDB::Output& fout, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/osga/ReaderWriterOSGA.cpp

    r7842 r8578  
    1010{ 
    1111public: 
    12     ReaderWriterOSGA() { } 
     12    ReaderWriterOSGA() 
     13    { 
     14        supportsExtension("osga","OpenSceneGraph Archive format"); 
     15    } 
    1316 
    1417    virtual const char* className() const { return "OpenSceneGraph Archive Reader/Writer"; } 
    15     virtual bool acceptsExtension(const std::string& extension) const 
    16     { 
    17         return osgDB::equalCaseInsensitive(extension,"osga"); 
    18     } 
    1918 
    2019    virtual ReadResult openArchive(const std::string& file,ArchiveStatus status, unsigned int indexBlockSize = 4096, const Options* options=NULL) const 
  • OpenSceneGraph/trunk/src/osgPlugins/osgtgz/ReaderWriterOSGTGZ.cpp

    r7076 r8578  
    2525{ 
    2626    public: 
     27     
     28        sgReaderWriterOSGTGZ() 
     29        { 
     30            supportsExtension("osgtgz","OpenSceneGraph tar gzid'd archive format"); 
     31        } 
     32         
    2733        virtual const char* className() const { return "OSGTGZ Database Reader/Writer"; } 
    28         virtual bool acceptsExtension(const std::string& extension) const 
    29         { 
    30             return osgDB::equalCaseInsensitive(extension,"osgtgz"); 
    31         } 
    3234 
    3335        virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/pfb/ReaderWriterPFB.cpp

    r7076 r8578  
    3232 
    3333        virtual const char* className() const { return "Performer Reader/Writer"; } 
    34         virtual bool acceptsExtension(const std::string& extension) const 
    35         {  
    36             return  
    37                 osgDB::equalCaseInsensitive(extension,"3ds")     ? true : 
    38                 osgDB::equalCaseInsensitive(extension,"arcinfo") ? true : 
    39                 osgDB::equalCaseInsensitive(extension,"bin")     ? true : 
    40                 osgDB::equalCaseInsensitive(extension,"bpoly")   ? true : 
    41                 osgDB::equalCaseInsensitive(extension,"bw")      ? true : 
    42                 osgDB::equalCaseInsensitive(extension,"byu")     ? true : 
    43                 osgDB::equalCaseInsensitive(extension,"closest") ? true : 
    44                 osgDB::equalCaseInsensitive(extension,"csb")     ? true : 
    45                 osgDB::equalCaseInsensitive(extension,"ct")      ? true : 
    46                 osgDB::equalCaseInsensitive(extension,"dem")     ? true : 
    47                 osgDB::equalCaseInsensitive(extension,"doublerot") ? true : 
    48                 osgDB::equalCaseInsensitive(extension,"doublescale") ? true : 
    49                 osgDB::equalCaseInsensitive(extension,"doubletrans") ? true : 
    50                 osgDB::equalCaseInsensitive(extension,"dted")    ? true : 
    51                 osgDB::equalCaseInsensitive(extension,"dwb")     ? true : 
    52                 osgDB::equalCaseInsensitive(extension,"dxf")     ? true : 
    53                 osgDB::equalCaseInsensitive(extension,"evt")     ? true : 
    54                 osgDB::equalCaseInsensitive(extension,"flt")     ? true : 
    55                 osgDB::equalCaseInsensitive(extension,"gds")     ? true : 
    56                 osgDB::equalCaseInsensitive(extension,"gfo")     ? true : 
    57                 osgDB::equalCaseInsensitive(extension,"im")      ? true : 
    58                 osgDB::equalCaseInsensitive(extension,"irtp")    ? true : 
    59                 osgDB::equalCaseInsensitive(extension,"iv20")    ? true : 
    60                 osgDB::equalCaseInsensitive(extension,"iv")      ? true : 
    61                 osgDB::equalCaseInsensitive(extension,"lodfix")  ? true : 
    62                 osgDB::equalCaseInsensitive(extension,"lsa")     ? true : 
    63                 osgDB::equalCaseInsensitive(extension,"lsb")     ? true : 
    64                 osgDB::equalCaseInsensitive(extension,"medit")   ? true : 
    65                 osgDB::equalCaseInsensitive(extension,"m")       ? true : 
    66                 osgDB::equalCaseInsensitive(extension,"nff")     ? true : 
    67                 osgDB::equalCaseInsensitive(extension,"obj")     ? true : 
    68                 osgDB::equalCaseInsensitive(extension,"pegg")    ? true : 
    69                 osgDB::equalCaseInsensitive(extension,"pfb")     ? true : 
    70                 osgDB::equalCaseInsensitive(extension,"pfs")     ? true : 
    71                 osgDB::equalCaseInsensitive(extension,"phd")     ? true : 
    72                 osgDB::equalCaseInsensitive(extension,"poly")    ? true : 
    73                 osgDB::equalCaseInsensitive(extension,"post")    ? true : 
    74                 osgDB::equalCaseInsensitive(extension,"proc")    ? true : 
    75                 osgDB::equalCaseInsensitive(extension,"projtex") ? true : 
    76                 osgDB::equalCaseInsensitive(extension,"pts")     ? true : 
    77                 osgDB::equalCaseInsensitive(extension,"rot")     ? true : 
    78                 osgDB::equalCaseInsensitive(extension,"scale")   ? true : 
    79                 osgDB::equalCaseInsensitive(extension,"sgf")     ? true : 
    80                 osgDB::equalCaseInsensitive(extension,"sgo")     ? true : 
    81                 osgDB::equalCaseInsensitive(extension,"so")      ? true : 
    82                 osgDB::equalCaseInsensitive(extension,"spf")     ? true : 
    83                 osgDB::equalCaseInsensitive(extension,"spherepatch3") ? true : 
    84                 osgDB::equalCaseInsensitive(extension,"spherepatch") ? true : 
    85                 osgDB::equalCaseInsensitive(extension,"sphere")  ? true : 
    86                 osgDB::equalCaseInsensitive(extension,"sponge")  ? true : 
    87                 osgDB::equalCaseInsensitive(extension,"star")    ? true : 
    88                 osgDB::equalCaseInsensitive(extension,"stla")    ? true : 
    89                 osgDB::equalCaseInsensitive(extension,"stlb")    ? true : 
    90                 osgDB::equalCaseInsensitive(extension,"substclip") ? true : 
    91                 osgDB::equalCaseInsensitive(extension,"sv")      ? true : 
    92                 osgDB::equalCaseInsensitive(extension,"trans")   ? true : 
    93                 osgDB::equalCaseInsensitive(extension,"tri")     ? true : 
    94                 osgDB::equalCaseInsensitive(extension,"unc")     ? true : 
    95                 osgDB::equalCaseInsensitive(extension,"vct")     ? true : 
    96                 false; 
    97         } 
    9834 
    9935        virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
     
    196132ReaderWriterPFB::ReaderWriterPFB() 
    197133{ 
     134    supportsExtension("3ds",""); 
     135    supportsExtension("arcinfo",""); 
     136    supportsExtension("bin",""); 
     137    supportsExtension("bpoly",""); 
     138    supportsExtension("bw",""); 
     139    supportsExtension("byu",""); 
     140    supportsExtension("closest",""); 
     141    supportsExtension("csb",""); 
     142    supportsExtension("ct",""); 
     143    supportsExtension("dem",""); 
     144    supportsExtension("doublerot",""); 
     145    supportsExtension("doublescale",""); 
     146    supportsExtension("doubletrans",""); 
     147    supportsExtension("dted",""); 
     148    supportsExtension("dwb",""); 
     149    supportsExtension("dxf",""); 
     150    supportsExtension("evt",""); 
     151    supportsExtension("flt",""); 
     152    supportsExtension("gds",""); 
     153    supportsExtension("gfo",""); 
     154    supportsExtension("im",""); 
     155    supportsExtension("irtp",""); 
     156    supportsExtension("iv20",""); 
     157    supportsExtension("iv",""); 
     158    supportsExtension("lodfix",""); 
     159    supportsExtension("lsa",""); 
     160    supportsExtension("lsb",""); 
     161    supportsExtension("medit",""); 
     162    supportsExtension("m",""); 
     163    supportsExtension("nff",""); 
     164    supportsExtension("obj",""); 
     165    supportsExtension("pegg",""); 
     166    supportsExtension("pfb",""); 
     167    supportsExtension("pfs",""); 
     168    supportsExtension("phd",""); 
     169    supportsExtension("poly",""); 
     170    supportsExtension("post",""); 
     171    supportsExtension("proc",""); 
     172    supportsExtension("projtex",""); 
     173    supportsExtension("pts",""); 
     174    supportsExtension("rot",""); 
     175    supportsExtension("scale",""); 
     176    supportsExtension("sgf",""); 
     177    supportsExtension("sgo",""); 
     178    supportsExtension("so",""); 
     179    supportsExtension("spf",""); 
     180    supportsExtension("spherepatch3",""); 
     181    supportsExtension("spherepatch",""); 
     182    supportsExtension("sphere",""); 
     183    supportsExtension("sponge",""); 
     184    supportsExtension("star",""); 
     185    supportsExtension("stla",""); 
     186    supportsExtension("stlb",""); 
     187    supportsExtension("substclip",""); 
     188    supportsExtension("sv",""); 
     189    supportsExtension("trans",""); 
     190    supportsExtension("tri",""); 
     191    supportsExtension("unc",""); 
     192    supportsExtension("vct",""); 
     193 
    198194    _performerInitialised = false; 
    199195    initPerformer(); 
  • OpenSceneGraph/trunk/src/osgPlugins/pic/ReaderWriterPIC.cpp

    r7878 r8578  
    192192{ 
    193193    public: 
     194        ReaderWriterPIC() 
     195        { 
     196            supportsExtension("pic","PIC Image format"); 
     197        } 
     198         
    194199        virtual const char* className() const { return "PIC Image Reader"; } 
    195         virtual bool acceptsExtension(const std::string& extension) const { return osgDB::equalCaseInsensitive(extension,"pic"); } 
    196200 
    197201        virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options =NULL) const 
  • OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp

    r8378 r8578  
    8181{ 
    8282    public: 
     83        ReaderWriterPNG() 
     84        { 
     85            supportsExtension("png","PNG Image format"); 
     86        } 
     87         
    8388        virtual const char* className() const { return "PNG Image Reader/Writer"; } 
    84         virtual bool acceptsExtension(const std::string& extension) const { return osgDB::equalCaseInsensitive(extension,"png"); } 
    8589 
    8690        WriteResult::WriteStatus writePngStream(std::ostream& fout, const osg::Image& img, int compression_level) const 
  • OpenSceneGraph/trunk/src/osgPlugins/pnm/ReaderWriterPNM.cpp

    r8295 r8578  
    248248{ 
    249249    public: 
     250        ReaderWriterPNM() 
     251        { 
     252            supportsExtension("pnm","PNM Image format"); 
     253            supportsExtension("ppm","PNM Image format"); 
     254            supportsExtension("pgm","PNM Image format"); 
     255            supportsExtension("pbm","PNM Image format"); 
     256        } 
     257         
    250258        virtual const char* className() const { return "PNM Image Reader/Writer"; } 
    251         virtual bool acceptsExtension(const std::string& extension) const 
    252         { 
    253             return osgDB::equalCaseInsensitive(extension, "pnm") || 
    254                 osgDB::equalCaseInsensitive(extension, "ppm") || 
    255                 osgDB::equalCaseInsensitive(extension, "pgm") || 
    256                 osgDB::equalCaseInsensitive(extension, "pbm"); 
    257         } 
    258  
    259259 
    260260        virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/quicktime/ReaderWriterQT.cpp

    r8132 r8578  
    7777    ReaderWriterQT::ReaderWriterQT() 
    7878    { 
     79        supportsExtension("mov","Movie format"); 
     80        supportsExtension("mpg","Movie format"); 
     81        supportsExtension("mpv","Movie format"); 
     82        supportsExtension("mp4","Movie format"); 
     83        supportsExtension("m4v","Movie format"); 
     84        supportsExtension("dv","Movie format"); 
     85        supportsExtension("avi","Movie format"); 
     86        supportsExtension("flv","Movie format"); 
     87        supportsExtension("swf","Movie format"); 
     88 
     89        supportsExtension("live","Live video streaming"); 
     90 
     91        #ifdef QT_HANDLE_IMAGES_ALSO 
     92        supportsExtension("rgb","rgb image format"); 
     93        supportsExtension("rgba","rgba image format"); 
     94        supportsExtension("jpg","jpg image format"); 
     95        supportsExtension("jpeg","jpeg image format"); 
     96        supportsExtension("tif","tif image format"); 
     97        supportsExtension("tiff","tiff image format"); 
     98        supportsExtension("gif","gif image format"); 
     99        supportsExtension("png","png image format"); 
     100        supportsExtension("pict","pict image format"); 
     101        supportsExtension("pct","pct image format"); 
     102        supportsExtension("tga","tga image format"); 
     103        supportsExtension("psd","psd image format"); 
     104        #endif 
    79105    } 
     106 
    80107    ReaderWriterQT::~ReaderWriterQT() 
    81108    { 
  • OpenSceneGraph/trunk/src/osgPlugins/rot/ReaderWriterROT.cpp

    r7076 r8578  
    9494{ 
    9595public: 
    96     ReaderWriterROT() { } 
     96    ReaderWriterROT() 
     97    { 
     98        supportsExtension(EXTENSION_NAME,"Rotation pseudo loader"); 
     99    } 
    97100     
    98101    virtual const char* className() const { return "rotation pseudo-loader"; } 
    99  
    100     virtual bool acceptsExtension(const std::string& extension) const 
    101     {  
    102         return osgDB::equalCaseInsensitive( extension, EXTENSION_NAME ); 
    103     } 
    104102 
    105103    virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/scale/ReaderWriterSCALE.cpp

    r7076 r8578  
    9797{ 
    9898public: 
    99     ReaderWriterSCALE() { } 
     99    ReaderWriterSCALE() 
     100    { 
     101        supportsExtension(EXTENSION_NAME,"Scale Pseudo loader"); 
     102    } 
    100103     
    101104    virtual const char* className() const { return "scaling pseudo-loader"; } 
  • OpenSceneGraph/trunk/src/osgPlugins/stl/ReaderWriterSTL.cpp

    r7076 r8578  
    4646{ 
    4747public: 
    48     ReaderWriterSTL() {} 
     48    ReaderWriterSTL() 
     49    { 
     50        supportsExtension("stl","STL format"); 
     51        supportsExtension("sta","STL format"); 
     52    } 
    4953 
    5054    virtual const char* className() const { 
    51         return "STL Reader/Writer"; 
    52     } 
    53  
    54     virtual bool acceptsExtension(const std::string& extension) const {  
    55         return 
    56             osgDB::equalCaseInsensitive(extension,"stl") ? true : 
    57             osgDB::equalCaseInsensitive(extension,"sta") ? true : false; 
     55        return "STL Reader"; 
    5856    } 
    5957 
  • OpenSceneGraph/trunk/src/osgPlugins/svg/ReaderWriterSVG.cpp

    r8302 r8578  
    2323 
    2424extern "C" { 
    25         #include <librsvg/rsvg.h> 
    26         #include <librsvg/rsvg-cairo.h> 
     25        #include <librsvg/rsvg.h> 
     26        #include <librsvg/rsvg-cairo.h> 
    2727} 
    2828 
     
    3030{ 
    3131    public: 
    32         ReaderWriterSVG() 
    33         { 
    34                 rsvg_init(); 
    35         } 
    3632 
    37         virtual const char* className() const { return "SVG Image Reader"; } 
    38         virtual bool acceptsExtension(const std::string& extension) const 
    39         { 
    40                 return osgDB::equalCaseInsensitive(extension,"svg"); 
    41         } 
     33        ReaderWriterSVG() 
     34        { 
     35                supportsExtension("svg","Scalar Vector Graphics format");         
     36                rsvg_init(); 
     37        } 
    4238 
    43         virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
    44         { 
    45                 return readImage(file, options); 
    46         } 
     39        virtual const char* className() const { return "SVG Image Reader"; } 
    4740 
    48         virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
    49         { 
    50                 std::string ext = osgDB::getLowerCaseFileExtension(file); 
    51                 if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED; 
     41        virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
     42        { 
     43                return readImage(file, options); 
     44        } 
    5245 
    53                 std::string fileName = osgDB::findDataFile( file, options ); 
    54                 if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; 
     46        virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
     47        { 
     48                std::string ext = osgDB::getLowerCaseFileExtension(file); 
     49                if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED; 
    5550 
    56                 RsvgDimensionData dimensionData; 
    57                 RsvgHandle* handle = rsvg_handle_new_from_file (file.c_str(), NULL); 
    58                 rsvg_handle_get_dimensions( handle, &dimensionData); 
     51                std::string fileName = osgDB::findDataFile( file, options ); 
     52                if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; 
    5953 
    60                 osg::Image *image; 
    61                 if (options) 
    62                 { 
    63                         unsigned int w=0, h=0; 
    64                         std::string op = options->getOptionString();                     
    65                         size_t i = op.find("x"); 
     54                RsvgDimensionData dimensionData; 
     55                RsvgHandle* handle = rsvg_handle_new_from_file (file.c_str(), NULL); 
     56                rsvg_handle_get_dimensions( handle, &dimensionData); 
    6657 
    67                         std::stringstream ss1(op.substr(0, i)); 
    68                         std::stringstream ss2(op.substr(i+1, op.size())); 
    69                         ss1 >> w; 
    70                         ss1 >> h; 
    71                         if (w==0 || h==0){ 
    72                                 image = createImage(handle, dimensionData.width, dimensionData.height); 
    73                         } 
    74                         else{ 
    75                                 image = createImage(handle, w, h); 
    76                         } 
    77                 } 
    78                 else{ 
    79                         image = createImage(handle, dimensionData.width, dimensionData.height); 
    80                 } 
    81                 rsvg_handle_free(handle); 
    82                 image->setFileName(file); 
    83                 return image; 
    84         } 
     58                osg::Image *image; 
     59                if (options) 
     60                { 
     61                        unsigned int w=0, h=0; 
     62                        std::string op = options->getOptionString();                         
     63                        size_t i = op.find("x"); 
    8564 
    86         osg::Image* createImage(RsvgHandle *handle, unsigned int width, unsigned int height) const 
    87         { 
    88                 RsvgDimensionData dimensionData; 
    89                 rsvg_handle_get_dimensions( handle, &dimensionData); 
    90                 // If image resollution < 128, cairo produces some artifacts. 
    91                 // I don't know why, but we check the size... 
    92                 if (width < 128) width = 128; 
    93                 if (height < 128) height = 128; 
    94                 width = osg::Image::computeNearestPowerOfTwo(width); 
    95                 height = osg::Image::computeNearestPowerOfTwo(height); 
    96                 osg::Image *image = new osg::Image(); 
    97                 image->allocateImage(width, height, 1, GL_RGBA, GL_UNSIGNED_BYTE); 
    98                 image->setPixelFormat(GL_BGRA); 
     65                        std::stringstream ss1(op.substr(0, i)); 
     66                        std::stringstream ss2(op.substr(i+1, op.size())); 
     67                        ss1 >> w; 
     68                        ss1 >> h; 
     69                        if (w==0 || h==0){ 
     70                                image = createImage(handle, dimensionData.width, dimensionData.height); 
     71                        } 
     72                        else{ 
     73                                image = createImage(handle, w, h); 
     74                        } 
     75                } 
     76                else{ 
     77                        image = createImage(handle, dimensionData.width, dimensionData.height); 
     78                } 
     79                rsvg_handle_free(handle); 
     80                image->setFileName(file); 
     81                return image; 
     82        } 
    9983 
    100                 cairo_surface_t *cairo_surface = cairo_image_surface_create_for_data(image->data(), 
    101                                         CAIRO_FORMAT_ARGB32, width, height, image->getRowSizeInBytes()); 
    102                 cairo_t *cr = cairo_create(cairo_surface); 
    103                 cairo_scale(cr,((float)width)/dimensionData.width, ((float)height)/dimensionData.height); 
    104                 rsvg_handle_render_cairo(handle, cr); 
    105                          
    106                 cairo_destroy(cr); 
    107                 free(cairo_surface); 
     84        osg::Image* createImage(RsvgHandle *handle, unsigned int width, unsigned int height) const 
     85        { 
     86                RsvgDimensionData dimensionData; 
     87                rsvg_handle_get_dimensions( handle, &dimensionData); 
     88                // If image resollution < 128, cairo produces some artifacts. 
     89                // I don't know why, but we check the size... 
     90                if (width < 128) width = 128; 
     91                if (height < 128) height = 128; 
     92                width = osg::Image::computeNearestPowerOfTwo(width); 
     93                height = osg::Image::computeNearestPowerOfTwo(height); 
     94                osg::Image *image = new osg::Image(); 
     95                image->allocateImage(width, height, 1, GL_RGBA, GL_UNSIGNED_BYTE); 
     96                image->setPixelFormat(GL_BGRA); 
    10897 
    109                 image->flipVertical(); 
    110                 return image; 
    111         } 
    112         protected: 
    113                 virtual ~ReaderWriterSVG() 
    114                 { 
    115                         rsvg_term(); 
    116                 } 
     98                cairo_surface_t *cairo_surface = cairo_image_surface_create_for_data(image->data(), 
     99                                        CAIRO_FORMAT_ARGB32, width, height, image->getRowSizeInBytes()); 
     100                cairo_t *cr = cairo_create(cairo_surface); 
     101                cairo_scale(cr,((float)width)/dimensionData.width, ((float)height)/dimensionData.height); 
     102                rsvg_handle_render_cairo(handle, cr); 
     103                         
     104                cairo_destroy(cr); 
     105                free(cairo_surface); 
     106 
     107                image->flipVertical(); 
     108                return image; 
     109        } 
     110    protected: 
     111        virtual ~ReaderWriterSVG() 
     112        { 
     113                rsvg_term(); 
     114        } 
    117115}; 
    118116 
  • OpenSceneGraph/trunk/src/osgPlugins/tga/ReaderWriterTGA.cpp

    r7878 r8578  
    468468{ 
    469469    public: 
     470     
     471        ReaderWriterTGA() 
     472        { 
     473            supportsExtension("tga","Tga Image format"); 
     474        } 
     475         
    470476        virtual const char* className() const { return "TGA Image Reader"; } 
    471         virtual bool acceptsExtension(const std::string& extension) const { return osgDB::equalCaseInsensitive(extension,"tga"); } 
    472477 
    473478        ReadResult readTGAStream(std::istream& fin) const 
  • OpenSceneGraph/trunk/src/osgPlugins/tgz/ReaderWriterTGZ.cpp

    r7076 r8578  
    2727        virtual const char* className() const { return "TGZ Database Reader/Writer"; } 
    2828 
    29         virtual bool acceptsExtension(const std::string& extension) const 
     29        ReaderWriterTGZ() 
    3030        { 
    31             return osgDB::equalCaseInsensitive(extension,"tgz"); 
     31            supportsExtension("tgz","Tar gzip'd archive format"); 
    3232        } 
    3333 
  • OpenSceneGraph/trunk/src/osgPlugins/tiff/ReaderWriterTIFF.cpp

    r8566 r8578  
    632632{ 
    633633    public: 
     634     
     635        ReaderWriterTIFF() 
     636        { 
     637            supportsExtension("tiff","Tiff image format"); 
     638            supportsExtension("tif","Tiff image format"); 
     639        } 
     640         
    634641        virtual const char* className() const { return "TIFF Image Reader"; } 
    635642        virtual bool acceptsExtension(const std::string& extension) const 
  • OpenSceneGraph/trunk/src/osgPlugins/trans/ReaderWriterTRANS.cpp

    r7076 r8578  
    9595{ 
    9696public: 
    97     ReaderWriterTRANS() { } 
     97    ReaderWriterTRANS() 
     98    { 
     99        supportsExtension(EXTENSION_NAME,"Translation Psuedo loader."); 
     100    } 
    98101     
    99102    virtual const char* className() const { return "translation pseudo-loader"; } 
    100  
    101     virtual bool acceptsExtension(const std::string& extension) const 
    102     {  
    103         return osgDB::equalCaseInsensitive( extension, EXTENSION_NAME ); 
    104     } 
    105103 
    106104    virtual ReadResult readNode(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const 
  • OpenSceneGraph/trunk/src/osgPlugins/txf/ReaderWriterTXF.cpp

    r7742 r8578  
    2424{ 
    2525    public: 
     26        ReaderWriterTXF() 
     27        { 
     28            supportsExtension("txf","TXF Font format"); 
     29        } 
     30 
    2631        virtual const char* className() const { return "TXF Font Reader/Writer"; } 
    2732         
    28         virtual bool acceptsExtension(const std::string& extension) const 
    29         { 
    30             return osgDB::equalCaseInsensitive(extension, "txf"); // GLU texture fonts 
    31         } 
    32  
    3333        virtual ReadResult readObject(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
    3434        { 
  • OpenSceneGraph/trunk/src/osgPlugins/txp/ReaderWriterTXP.h

    r6267 r8578  
    5454{ 
    5555public: 
     56 
     57    ReaderWriterTXP() 
     58    { 
     59        supportsExtension("txp","Terrapage txp format"); 
     60    } 
     61 
    5662    virtual const char* className() const 
    5763    { 
    5864        return "TXP Reader/Writer"; 
    59     } 
    60      
    61     virtual bool acceptsExtension(const std::string& extension) const 
    62     { 
    63         return osgDB::equalCaseInsensitive(extension,"txp"); 
    6465    } 
    6566     
  • OpenSceneGraph/trunk/src/osgPlugins/vrml/ReaderWriterVRML2.h

    r8442 r8578  
    7373public: 
    7474    ReaderWriterVRML2()  
    75     {} 
     75    { 
     76        supportsExtension("wrl","VRML format"); 
     77    } 
    7678 
    7779    virtual const char* className() 
     
    8082    } 
    8183 
    82     virtual bool acceptsExtension(const std::string& extension) 
    83     { 
    84         return osgDB::equalCaseInsensitive(extension, "wrl"); 
    85     } 
    8684 
    8785    virtual ReadResult readNode(const std::string&, const osgDB::ReaderWriter::Options *options = NULL) const; 
  • OpenSceneGraph/trunk/src/osgPlugins/x/ReaderWriterDirectX.cpp

    r7076 r8578  
    4949{ 
    5050public: 
    51     ReaderWriterDirectX() { } 
     51    ReaderWriterDirectX() 
     52    { 
     53        supportsExtension("x","DirectX scene format"); 
     54    } 
    5255 
    5356    virtual const char* className() const { 
    5457        return "DirectX Reader/Writer"; 
    55     } 
    56  
    57     virtual bool acceptsExtension(const std::string& extension) const 
    58     {  
    59         return osgDB::equalCaseInsensitive(extension,"x"); 
    6058    } 
    6159 
  • OpenSceneGraph/trunk/src/osgPlugins/xine/ReaderWriterXine.cpp

    r7585 r8578  
    312312        ReaderWriterXine() 
    313313        { 
     314            supportsExtension("avi",""); 
     315            supportsExtension("db",""); 
     316            supportsExtension("flv",""); 
     317            supportsExtension("mov",""); 
     318            supportsExtension("mpg","Mpeg movie format"); 
     319            supportsExtension("mpv","Mpeg movie format"); 
     320            supportsExtension("wmv",""); 
     321            supportsExtension("xine","Xine plugin Pseduo plugin"); 
     322         
    314323            _xine = xine_new(); 
    315324 
     
    337346        virtual const char* className() const { return "Xine ImageStream Reader"; } 
    338347 
    339         virtual bool acceptsExtension(const std::string& extension) const 
    340         { 
    341             return osgDB::equalCaseInsensitive(extension,"mpg") || 
    342                    osgDB::equalCaseInsensitive(extension,"mpv") ||  
    343                    osgDB::equalCaseInsensitive(extension,"db") ||  
    344                    osgDB::equalCaseInsensitive(extension,"flv") ||  
    345                    osgDB::equalCaseInsensitive(extension,"mov") ||  
    346                    osgDB::equalCaseInsensitive(extension,"avi") || 
    347                    osgDB::equalCaseInsensitive(extension,"wmv") || 
    348                    osgDB::equalCaseInsensitive(extension,"xine"); 
    349         } 
    350  
    351348        virtual ReadResult readImage(const std::string& file, const osgDB::ReaderWriter::Options* options) const 
    352349        { 
  • OpenSceneGraph/trunk/src/osgPlugins/zip/ReaderWriterZIP.cpp

    r7370 r8578  
    2323{ 
    2424    public: 
     25     
     26        ReaderWriterZIP() 
     27        { 
     28            supportsExtension("zip","Zip archive format"); 
     29        } 
     30         
    2531        virtual const char* className() const { return "ZIP Database Reader/Writer"; } 
    26  
    27         virtual bool acceptsExtension(const std::string& extension) const 
    28         { 
    29             return osgDB::equalCaseInsensitive(extension,"zip"); 
    30         } 
    3132 
    3233        virtual ReadResult readNode(const std::string& file, const osgDB::ReaderWriter::Options* options) const