Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/graphics/importer/md2/resource_md2.h @ 9824

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

first try to make the MD2-model a Resource… it looks quite funny… seems like everything gets loaded, but totally wrong :)

File size: 1015 bytes
Line 
1/*!
2 * @file resource_md2.h
3 * @brief Contains the ResourceMD2 class, that handles the Resource-specific loading part of the MD2.
4 *
5 */
6
7#ifndef _RESOURCE_MD2_H
8#define _RESOURCE_MD2_H
9
10#include "util/loading/resource.h"
11#include "md2Model.h"
12
13
14class ResourceMD2 : public MD2Model, public Resources::NewResource
15{
16public:
17  ResourceMD2(const std::string& modelName, const std::string& skinName = "", float scale = 1.0f);
18  static ResourceMD2 createFromString(const std::string& loadString);
19  static std::string loadString(const std::string& modelName, const std::string& skinName = "", float scale = 1.0f);
20
21private:
22class MD2ResourcePointer : public Resources::StorePointer
23  {
24  public:
25    MD2ResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const MD2Data::Pointer& data);
26    inline const MD2Data::Pointer& ptr() const { return pointer; }
27private:
28    MD2Data::Pointer pointer;
29  };
30
31private:
32  static Resources::tType<ResourceMD2> type;
33};
34
35
36#endif /* _RESOURCE_MD2_H */
Note: See TracBrowser for help on using the repository browser.