Last change
on this file was
10147,
checked in by patrick, 17 years ago
|
merged the mount_point branche back to trunk to use the new std::* based obj file importer
|
File size:
1.1 KB
|
Rev | Line | |
---|
[3396] | 1 | /*! |
---|
[3454] | 2 | \file objModel.h |
---|
[3396] | 3 | \brief Contains the OBJ-model Class, that reads in a Model from a .obj-file |
---|
| 4 | */ |
---|
| 5 | |
---|
| 6 | #ifndef _OBJMODEL_H |
---|
| 7 | #define _OBJMODEL_H |
---|
| 8 | |
---|
[6022] | 9 | #include "static_model.h" |
---|
[3396] | 10 | |
---|
| 11 | //! A Class, that handles the parsing of an obj-file, and inclusion as a Model. |
---|
[6022] | 12 | class OBJModel : public StaticModel |
---|
[3396] | 13 | { |
---|
[9869] | 14 | ObjectListDeclaration(OBJModel); |
---|
| 15 | public: |
---|
| 16 | OBJModel(const std::string& fileName, float scaling = 1.0); |
---|
[3396] | 17 | virtual ~OBJModel(); |
---|
| 18 | |
---|
[10147] | 19 | |
---|
[9869] | 20 | private: |
---|
[3396] | 21 | ///// readin ///// |
---|
[9869] | 22 | bool importFile (const std::string& fileName); |
---|
| 23 | bool readFromObjFile (const std::string& fileName); |
---|
| 24 | bool readMtlLib (const std::string& matFile); |
---|
[4468] | 25 | |
---|
[9869] | 26 | private: |
---|
| 27 | void setIllum (Material* material, const char* illum); |
---|
| 28 | void setDiffuse (Material* material, const char* rgb); |
---|
| 29 | void setAmbient (Material* material, const char* rgb); |
---|
| 30 | void setSpecular (Material* material, const char* rgb); |
---|
| 31 | void setShininess (Material* material, const char* shini); |
---|
| 32 | void setTransparency (Material* material, const char* trans); |
---|
[8369] | 33 | |
---|
[9869] | 34 | private: |
---|
| 35 | std::string objPath; //!< The Path where the obj and mtl-file are located. |
---|
[3396] | 36 | }; |
---|
| 37 | |
---|
| 38 | #endif /* _OBJ_MODEL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.