From 59f7e83a3fe130e39c1157bd180d2d46ea92ad77 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 14 Sep 2009 03:15:35 +0000 Subject: [PATCH] use spaces not tabs! git-svn-id: svn://anubis/misc/wfobj@133 bd8a9e45-a331-0410-811e-c64571078777 --- WFObj.hh | 100 +++++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/WFObj.hh b/WFObj.hh index 3311142..ceb8422 100644 --- a/WFObj.hh +++ b/WFObj.hh @@ -7,67 +7,67 @@ class WFObj { public: - typedef GLuint (*loadTextureFunc_t)(const char * texture); - typedef void * (*loadFileFunc_t)(const char * filename, - unsigned int * length); - bool load(const std::string & filename, - loadTextureFunc_t loadTexture = NULL, - loadFileFunc_t loadFile = NULL); - GLuint render(bool doTextureInfo = true); - const float * const getAABB() { return m_aabb; } + typedef GLuint (*loadTextureFunc_t)(const char * texture); + typedef void * (*loadFileFunc_t)(const char * filename, + unsigned int * length); + bool load(const std::string & filename, + loadTextureFunc_t loadTexture = NULL, + loadFileFunc_t loadFile = NULL); + GLuint render(bool doTextureInfo = true); + const float * const getAABB() { return m_aabb; } protected: - /* types */ - class Vertex - { - public: - float operator[](int idx) const { return data[idx]; } - float & operator[](int idx) { return data[idx]; } - float * getData() { return data; } - private: - float data[4]; - }; + /* types */ + class Vertex + { + public: + float operator[](int idx) const { return data[idx]; } + float & operator[](int idx) { return data[idx]; } + float * getData() { return data; } + private: + float data[4]; + }; - /* methods */ - void clear(); - int filesize(const char * filename); - void processInputLine(const std::string & input); - Vertex readVertex(const std::vector & parts); - void parseVertexIndices(const std::string & vtxref, int * ret); - void updateAABB(const float * const vertex); - bool load(std::istream & istr, unsigned int size); + /* methods */ + void clear(); + int filesize(const char * filename); + void processInputLine(const std::string & input); + Vertex readVertex(const std::vector & parts); + void parseVertexIndices(const std::string & vtxref, int * ret); + void updateAABB(const float * const vertex); + bool load(std::istream & istr, unsigned int size); - /* variables */ - std::vector< std::vector > m_data; - loadTextureFunc_t m_loadTexture; - loadFileFunc_t m_loadFile; - std::string m_fileName; - float m_aabb[6]; - bool m_loadedVertex; + /* variables */ + std::vector< std::vector > m_data; + loadTextureFunc_t m_loadTexture; + loadFileFunc_t m_loadFile; + std::string m_fileName; + float m_aabb[6]; + bool m_loadedVertex; }; class WFMtl { public: - bool load(const std::string & filename, - WFObj::loadTextureFunc_t loadTexture = NULL, - WFObj::loadFileFunc_t loadFile = NULL); - void renderBegin(const std::string & mtlname, bool doTextureInfo = true); - void renderEnd(const std::string & mtlname, bool doTextureInfo = true); + bool load(const std::string & filename, + WFObj::loadTextureFunc_t loadTexture = NULL, + WFObj::loadFileFunc_t loadFile = NULL); + void renderBegin(const std::string & mtlname, bool doTextureInfo = true); + void renderEnd(const std::string & mtlname, bool doTextureInfo = true); protected: - /* methods */ - void clear(); - int filesize(const char * filename); - void processInputLine(const std::string & input); - void pushAttributes(); - bool load(std::istream & istr, unsigned int size); + /* methods */ + void clear(); + int filesize(const char * filename); + void processInputLine(const std::string & input); + void pushAttributes(); + bool load(std::istream & istr, unsigned int size); - /* variables */ - std::map< std::string, std::vector< std::vector > > m_data; - std::string m_currentMaterialName; - bool m_attributesPushed; - WFObj::loadTextureFunc_t m_loadTexture; - std::string m_fileName; + /* variables */ + std::map< std::string, std::vector< std::vector > > m_data; + std::string m_currentMaterialName; + bool m_attributesPushed; + WFObj::loadTextureFunc_t m_loadTexture; + std::string m_fileName; };