Last change
on this file since 10585 was
10033,
checked in by patrick, 18 years ago
|
moved some of the importer sources, probably will need to rebuild the project
|
File size:
1.1 KB
|
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" |
---|
[10033] | 11 | #include "obj/objModel.h" |
---|
[9781] | 12 | |
---|
[9847] | 13 | class ResourceOBJ : public StaticModel, public Resources::Resource |
---|
[9781] | 14 | { |
---|
[9785] | 15 | public: |
---|
[9854] | 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()); |
---|
[9781] | 21 | |
---|
| 22 | private: |
---|
[9831] | 23 | class OBJResourcePointer : public Resources::StorePointer |
---|
[9781] | 24 | { |
---|
| 25 | public: |
---|
[9831] | 26 | OBJResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const StaticModelData::Pointer& data); |
---|
| 27 | inline const StaticModelData::Pointer& ptr() const { return pointer; } |
---|
[9846] | 28 | virtual bool last() const { return pointer.count() == 1; } |
---|
[9823] | 29 | private: |
---|
[9831] | 30 | StaticModelData::Pointer pointer; |
---|
[9781] | 31 | }; |
---|
| 32 | |
---|
[9785] | 33 | private: |
---|
[9831] | 34 | static Resources::tType<ResourceOBJ> type; |
---|
[9781] | 35 | }; |
---|
| 36 | |
---|
| 37 | |
---|
[9831] | 38 | #endif /* _RESOURCE_OBJ_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.