]> git.mxchange.org Git - simgear.git/blob - simgear/scene/model/model.hxx
Add writeLocalData functions for internal scenegraph classes
[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 #include <osg/Node>
19 #include <osg/Texture2D>
20 #include <osgDB/ReaderWriter>
21
22 #include <simgear/misc/sg_path.hxx>
23
24 osg::Texture2D*
25 SGLoadTexture2D(bool staticTexture, const std::string& path,
26                 const osgDB::ReaderWriter::Options* options = 0,
27                 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1);
28
29 inline osg::Texture2D*
30 SGLoadTexture2D(const std::string& path,
31                 const osgDB::ReaderWriter::Options* options = 0,
32                 bool wrapu = true, bool wrapv = true, int mipmaplevels = -1)
33 {
34     return SGLoadTexture2D(true, path, options, wrapu, wrapv, mipmaplevels);
35 }
36
37 inline osg::Texture2D*
38 SGLoadTexture2D(const SGPath& path,
39                 const osgDB::ReaderWriter::Options* options = 0,
40                 bool wrapu = true, bool wrapv = true,
41                 int mipmaplevels = -1)
42 {
43     return SGLoadTexture2D(true, path.str(), options, wrapu, wrapv,
44                            mipmaplevels);
45 }
46
47 inline osg::Texture2D*
48 SGLoadTexture2D(bool staticTexture, const SGPath& path,
49                 const osgDB::ReaderWriter::Options* options = 0,
50                 bool wrapu = true, bool wrapv = true,
51                 int mipmaplevels = -1)
52 {
53     return SGLoadTexture2D(staticTexture, path.str(), options, wrapu, wrapv,
54                            mipmaplevels);
55 }
56
57 #endif // __MODEL_HXX