added get{Width,Depth,Height}() methods to WFObj
This commit is contained in:
parent
993d09cccb
commit
cdfc27bfbb
3
WFObj.cc
3
WFObj.cc
@ -396,6 +396,9 @@ void WFObj::updateAABB(const float * const vertex)
|
|||||||
m_aabb[2] = m_aabb[5] = vertex[2];
|
m_aabb[2] = m_aabb[5] = vertex[2];
|
||||||
m_loadedVertex = true;
|
m_loadedVertex = true;
|
||||||
}
|
}
|
||||||
|
m_width = m_aabb[3] - m_aabb[0];
|
||||||
|
m_depth = m_aabb[4] - m_aabb[1];
|
||||||
|
m_height = m_aabb[5] - m_aabb[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
WFObj::Vertex WFObj::readVertex(const vector<string> & parts)
|
WFObj::Vertex WFObj::readVertex(const vector<string> & parts)
|
||||||
|
4
WFObj.h
4
WFObj.h
@ -56,6 +56,9 @@ public:
|
|||||||
GLuint render(bool doTextureInfo = true,
|
GLuint render(bool doTextureInfo = true,
|
||||||
bool enableBlending = false);
|
bool enableBlending = false);
|
||||||
const float * const getAABB() { return m_aabb; }
|
const float * const getAABB() { return m_aabb; }
|
||||||
|
int getWidth() { return m_width; }
|
||||||
|
int getDepth() { return m_depth; }
|
||||||
|
int getHeight() { return m_height; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/* types */
|
/* types */
|
||||||
@ -83,6 +86,7 @@ protected:
|
|||||||
std::vector< std::vector<std::string> > m_data;
|
std::vector< std::vector<std::string> > m_data;
|
||||||
FileLoader::Path m_path;
|
FileLoader::Path m_path;
|
||||||
float m_aabb[6];
|
float m_aabb[6];
|
||||||
|
int m_width, m_depth, m_height;
|
||||||
bool m_loadedVertex;
|
bool m_loadedVertex;
|
||||||
FileLoader * m_fileLoader;
|
FileLoader * m_fileLoader;
|
||||||
TextureLoader * m_textureLoader;
|
TextureLoader * m_textureLoader;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user