root/OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/DataInputStream.h @ 13041

Revision 13041, 1.8 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version.  The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14//
15// OpenFlight® loader for OpenSceneGraph
16//
17//  Copyright (C) 2005-2007  Brede Johansen
18//
19
20#ifndef FLT_DATAINPUTSTREAM
21#define FLT_DATAINPUTSTREAM 1
22
23#include <istream>
24#include <string>
25#include <osg/Vec3f>
26#include <osg/Vec3d>
27#include <osg/Vec4f>
28#include "Types.h"
29
30namespace flt {
31
32class Record;
33
34class DataInputStream : public std::istream
35{
36    public:
37
38        explicit DataInputStream(std::streambuf* sb);
39
40        int8 readInt8(int8 def=0);
41        uint8 readUInt8(uint8 def=0);
42        int16 readInt16(int16 def=0);
43        uint16 readUInt16(uint16 def=0);
44        int32 readInt32(int32 def=0);
45        uint32 readUInt32(uint32 def=0);
46        float32 readFloat32(float32 def=0);
47        float64 readFloat64(float64 def=0);
48        void readCharArray(char* data, int size);
49        std::string readString(int size);
50        osg::Vec4f readColor32();
51        osg::Vec2f readVec2f();
52        osg::Vec3f readVec3f();
53        osg::Vec4f readVec4f();
54        osg::Vec3d readVec3d();
55
56        std::istream& forward(std::istream::off_type off);
57
58        int16 peekInt16();
59
60    protected:
61
62        bool                _byteswap;
63};
64
65} // end namespace
66
67#endif
Note: See TracBrowser for help on using the browser.