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/readwrite.h

    r6461 r10076  
    2828#endif 
    2929 
     30#include <iostream> 
     31using namespace std; 
     32 
    3033#ifdef __cplusplus 
    3134extern "C" { 
     
    3336 
    3437extern LIB3DSAPI void setByteOrder(); 
    35  
    36 extern LIB3DSAPI Lib3dsByte lib3ds_byte_read(FILE *f); 
    37 extern LIB3DSAPI Lib3dsWord lib3ds_word_read(FILE *f); 
    38 extern LIB3DSAPI Lib3dsDword lib3ds_dword_read(FILE *f); 
    39 extern LIB3DSAPI Lib3dsIntb lib3ds_intb_read(FILE *f); 
    40 extern LIB3DSAPI Lib3dsIntw lib3ds_intw_read(FILE *f); 
    41 extern LIB3DSAPI Lib3dsIntd lib3ds_intd_read(FILE *f); 
    42 extern LIB3DSAPI Lib3dsFloat lib3ds_float_read(FILE *f); 
    43 extern LIB3DSAPI Lib3dsBool lib3ds_vector_read(Lib3dsVector v, FILE *f); 
    44 extern LIB3DSAPI Lib3dsBool lib3ds_rgb_read(Lib3dsRgb rgb, FILE *f); 
    45 extern LIB3DSAPI Lib3dsBool lib3ds_string_read(char *s, int buflen, FILE *f); 
    46 extern LIB3DSAPI Lib3dsBool lib3ds_byte_write(Lib3dsByte b, FILE *f); 
    47 extern LIB3DSAPI Lib3dsBool lib3ds_word_write(Lib3dsWord w, FILE *f); 
    48 extern LIB3DSAPI Lib3dsBool lib3ds_dword_write(Lib3dsDword d, FILE *f); 
    49 extern LIB3DSAPI Lib3dsBool lib3ds_intb_write(Lib3dsIntb b, FILE *f); 
    50 extern LIB3DSAPI Lib3dsBool lib3ds_intw_write(Lib3dsIntw w, FILE *f); 
    51 extern LIB3DSAPI Lib3dsBool lib3ds_intd_write(Lib3dsIntd d, FILE *f); 
    52 extern LIB3DSAPI Lib3dsBool lib3ds_float_write(Lib3dsFloat l, FILE *f); 
    53 extern LIB3DSAPI Lib3dsBool lib3ds_vector_write(Lib3dsVector v, FILE *f); 
    54 extern LIB3DSAPI Lib3dsBool lib3ds_rgb_write(Lib3dsRgb rgb, FILE *f); 
    55 extern LIB3DSAPI Lib3dsBool lib3ds_string_write(const char *s, FILE *f); 
     38extern LIB3DSAPI Lib3dsByte lib3ds_byte_read(iostream *strm); 
     39extern LIB3DSAPI Lib3dsWord lib3ds_word_read(iostream *strm); 
     40extern LIB3DSAPI Lib3dsDword lib3ds_dword_read(iostream *strm); 
     41extern LIB3DSAPI Lib3dsIntb lib3ds_intb_read(iostream *strm); 
     42extern LIB3DSAPI Lib3dsIntw lib3ds_intw_read(iostream *strm); 
     43extern LIB3DSAPI Lib3dsIntd lib3ds_intd_read(iostream *strm); 
     44extern LIB3DSAPI Lib3dsFloat lib3ds_float_read(iostream *strm); 
     45extern LIB3DSAPI Lib3dsBool lib3ds_vector_read(Lib3dsVector v, iostream *strm); 
     46extern LIB3DSAPI Lib3dsBool lib3ds_rgb_read(Lib3dsRgb rgb, iostream *strm); 
     47extern LIB3DSAPI Lib3dsBool lib3ds_string_read(char *s, int buflen, iostream *strm); 
     48extern LIB3DSAPI Lib3dsBool lib3ds_byte_write(Lib3dsByte b, iostream *strm); 
     49extern LIB3DSAPI Lib3dsBool lib3ds_word_write(Lib3dsWord w, iostream *strm); 
     50extern LIB3DSAPI Lib3dsBool lib3ds_dword_write(Lib3dsDword d, iostream *strm); 
     51extern LIB3DSAPI Lib3dsBool lib3ds_intb_write(Lib3dsIntb b, iostream *strm); 
     52extern LIB3DSAPI Lib3dsBool lib3ds_intw_write(Lib3dsIntw w, iostream *strm); 
     53extern LIB3DSAPI Lib3dsBool lib3ds_intd_write(Lib3dsIntd d, iostream *strm); 
     54extern LIB3DSAPI Lib3dsBool lib3ds_float_write(Lib3dsFloat l, iostream *strm); 
     55extern LIB3DSAPI Lib3dsBool lib3ds_vector_write(Lib3dsVector v, iostream *strm); 
     56extern LIB3DSAPI Lib3dsBool lib3ds_rgb_write(Lib3dsRgb rgb, iostream *strm); 
     57extern LIB3DSAPI Lib3dsBool lib3ds_string_write(const char *s, iostream *strm); 
    5658 
    5759#ifdef __cplusplus