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