Show
Ignore:
Timestamp:
04/22/09 17:46:24 (5 years ago)
Author:
robert
Message:

From Neil Hughes, converted across to use istream for reading data from file to enable reading .3ds files over http (use OSG's libcurl plugin).

From Robert Osfield, ammendments of the above to better support reading of files from local directories.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/3ds/file.h

    r6461 r10076  
    3636#include "viewport.h" 
    3737#endif 
     38#include <osgDB/Registry> 
     39#include <iostream> 
     40using namespace std; 
    3841 
    3942#ifdef __cplusplus 
    4043extern "C" { 
    4144#endif 
     45 
     46 
    4247 
    4348/*! 
     
    6873};  
    6974 
    70 extern LIB3DSAPI Lib3dsFile* lib3ds_file_load(const char *filename); 
     75extern LIB3DSAPI Lib3dsFile* lib3ds_file_load(const char *filename, const osgDB::ReaderWriter::Options* options); 
     76extern LIB3DSAPI Lib3dsFile* lib3ds_stream_load(iostream * strm); 
    7177extern LIB3DSAPI Lib3dsBool lib3ds_file_save(Lib3dsFile *file, const char *filename); 
    7278extern LIB3DSAPI Lib3dsFile* lib3ds_file_new(); 
    7379extern LIB3DSAPI void lib3ds_file_free(Lib3dsFile *file); 
    7480extern LIB3DSAPI void lib3ds_file_eval(Lib3dsFile *file, Lib3dsFloat t); 
    75 extern LIB3DSAPI Lib3dsBool lib3ds_file_read(Lib3dsFile *file, FILE *f); 
    76 extern LIB3DSAPI Lib3dsBool lib3ds_file_write(Lib3dsFile *file, FILE *f); 
     81extern LIB3DSAPI Lib3dsBool lib3ds_file_read(Lib3dsFile *file, iostream *strm); 
     82extern LIB3DSAPI Lib3dsBool lib3ds_file_write(Lib3dsFile *file, iostream *strm); 
    7783extern LIB3DSAPI void lib3ds_file_insert_material(Lib3dsFile *file, Lib3dsMaterial *material); 
    7884extern LIB3DSAPI void lib3ds_file_remove_material(Lib3dsFile *file, Lib3dsMaterial *material);