]> git.mxchange.org Git - simgear.git/blob - simgear/scene/model/model.hxx
model paging patch from Till Busch
[simgear.git] / simgear / scene / model / model.hxx
1 // model.hxx - manage a 3D aircraft model.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain, and comes with no warranty.
5
6 #ifndef __MODEL_HXX
7 #define __MODEL_HXX 1
8
9 #ifndef __cplusplus
10 # error This library requires C++
11 #endif
12
13 #include <simgear/compiler.h>
14
15 #include <vector>
16 #include <set>
17
18 SG_USING_STD(vector);
19 SG_USING_STD(set);
20
21 #include <osg/Node>
22 #include <osg/Texture2D>
23 #include <osgDB/ReaderWriter>
24
25 #include <simgear/misc/sg_path.hxx>
26
27 osg::Texture2D*
28 SGLoadTexture2D(bool staticTexture, const std::string& path,
29                 const osgDB::ReaderWriter::Options* options = 0,
30                 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1);
31
32 inline osg::Texture2D*
33 SGLoadTexture2D(const std::string& path,
34                 const osgDB::ReaderWriter::Options* options = 0,
35                 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1)
36 {
37     return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels);
38 }
39
40 inline osg::Texture2D*
41 SGLoadTexture2D(const SGPath& path,
42                 const osgDB::ReaderWriter::Options* options = 0,
43                 bool wrapu = true, bool wrapv = true,
44                 int mipmaplevels = -1)
45 {
46     return SGLoadTexture2D(true, path.str(), options, wrapu, wrapv,
47                            mipmaplevels);
48 }
49
50 inline osg::Texture2D*
51 SGLoadTexture2D(bool staticTexture, const SGPath& path,
52                 const osgDB::ReaderWriter::Options* options = 0,
53                 bool wrapu = true, bool wrapv = true,
54                 int mipmaplevels = -1)
55 {
56     return SGLoadTexture2D(staticTexture, path.str(), options, wrapu, wrapv,
57                            mipmaplevels);
58 }
59
60 #endif // __MODEL_HXX