Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/graphics/importer/resource_obj.h @ 9854

Last change on this file since 9854 was 9854, checked in by bensch, 18 years ago

more nice comments, and also updated the KeepLevel loading (if you want to load a Resource to a KeepLevel just append it at loadtime:
eg.:
Texture tex = ResourceTexture(orxonox.png, GL_TEXTURE_2D, GameEnd);
where GameEnd is the KeepLevel as defined in orxonox.cc→initResources()

File size: 1.1 KB
Line 
1/*!
2 * @file resource_obj.h
3 * @brief Contains the ResourceOBJ class, that handles the Resource-specific loading part of the OBJ.
4 *
5 */
6
7#ifndef _RESOURCE_OBJ_H
8#define _RESOURCE_OBJ_H
9
10#include "util/loading/resource.h"
11#include "objModel.h"
12
13class ResourceOBJ : public StaticModel, public Resources::Resource
14{
15public:
16  ResourceOBJ(const std::string& imageName,
17              float scaling = 1.0f,
18              const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
19  static ResourceOBJ createFromString(const std::string& loadString,
20                                      const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
21
22private:
23class OBJResourcePointer : public Resources::StorePointer
24  {
25  public:
26    OBJResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const StaticModelData::Pointer& data);
27    inline const StaticModelData::Pointer& ptr() const { return pointer; }
28    virtual bool last() const { return pointer.count() == 1; }
29private:
30    StaticModelData::Pointer pointer;
31  };
32
33private:
34  static Resources::tType<ResourceOBJ> type;
35};
36
37
38#endif /* _RESOURCE_OBJ_H */
Note: See TracBrowser for help on using the repository browser.