Last change
on this file since 9833 was
9831,
checked in by bensch, 18 years ago
|
added resource_obj for new resource managed obj-loader
|
File size:
892 bytes
|
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 | |
---|
13 | class ResourceOBJ : public StaticModel, public Resources::NewResource |
---|
14 | { |
---|
15 | public: |
---|
16 | ResourceOBJ(const std::string& imageName, float scaling = 1.0f); |
---|
17 | static ResourceOBJ createFromString(const std::string& loadString); |
---|
18 | |
---|
19 | private: |
---|
20 | class OBJResourcePointer : public Resources::StorePointer |
---|
21 | { |
---|
22 | public: |
---|
23 | OBJResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const StaticModelData::Pointer& data); |
---|
24 | inline const StaticModelData::Pointer& ptr() const { return pointer; } |
---|
25 | private: |
---|
26 | StaticModelData::Pointer pointer; |
---|
27 | }; |
---|
28 | |
---|
29 | private: |
---|
30 | static Resources::tType<ResourceOBJ> type; |
---|
31 | }; |
---|
32 | |
---|
33 | |
---|
34 | #endif /* _RESOURCE_OBJ_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.