coding style update
This commit is contained in:
parent
e7f7ca4b3f
commit
3f78016e26
54
WFObj.h
54
WFObj.h
@ -23,29 +23,29 @@ public:
|
|||||||
|
|
||||||
class WFMtl
|
class WFMtl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WFMtl(WFObj * obj) { m_obj = obj; }
|
WFMtl(WFObj * obj) { m_obj = obj; }
|
||||||
bool load(const FileLoader::Path & path);
|
bool load(const FileLoader::Path & path);
|
||||||
void renderBegin(const std::string & mtlname,
|
void renderBegin(const std::string & mtlname,
|
||||||
bool doTextureInfo = true,
|
bool doTextureInfo = true,
|
||||||
bool enableBlending = false);
|
bool enableBlending = false);
|
||||||
void renderEnd(const std::string & mtlname,
|
void renderEnd(const std::string & mtlname,
|
||||||
bool doTextureInfo = true,
|
bool doTextureInfo = true,
|
||||||
bool enableBlending = false);
|
bool enableBlending = false);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* methods */
|
/* methods */
|
||||||
void clear();
|
void clear();
|
||||||
void processInputLine(const std::string & input);
|
void processInputLine(const std::string & input);
|
||||||
void pushAttributes();
|
void pushAttributes();
|
||||||
bool load(std::istream & istr, unsigned int size);
|
bool load(std::istream & istr, unsigned int size);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
std::map< std::string, std::vector< std::vector<std::string> > > m_data;
|
std::map< std::string, std::vector< std::vector<std::string> > > m_data;
|
||||||
std::string m_currentMaterialName;
|
std::string m_currentMaterialName;
|
||||||
bool m_attributesPushed;
|
bool m_attributesPushed;
|
||||||
FileLoader::Path m_path;
|
FileLoader::Path m_path;
|
||||||
WFObj * m_obj;
|
WFObj * m_obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
|
enum { VERTEX, VERTEX_TEXTURE, VERTEX_NORMAL, VERTEX_TYPES };
|
||||||
@ -64,12 +64,12 @@ protected:
|
|||||||
/* types */
|
/* types */
|
||||||
class Vertex
|
class Vertex
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
float operator[](int idx) const { return data[idx]; }
|
float operator[](int idx) const { return data[idx]; }
|
||||||
float & operator[](int idx) { return data[idx]; }
|
float & operator[](int idx) { return data[idx]; }
|
||||||
float * getData() { return data; }
|
float * getData() { return data; }
|
||||||
private:
|
private:
|
||||||
float data[4];
|
float data[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
class VertexRef
|
class VertexRef
|
||||||
|
Loading…
x
Reference in New Issue
Block a user