wfobj-view now displays the object size on the console
git-svn-id: svn://anubis/misc/wfobj-view@57 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
4132557f56
commit
34604c03ac
@ -78,6 +78,12 @@ Viewer::Viewer(const char * filename)
|
|||||||
m_dragging = false;
|
m_dragging = false;
|
||||||
m_obj.load(filename, &loadTexture);
|
m_obj.load(filename, &loadTexture);
|
||||||
m_list = m_obj.render();
|
m_list = m_obj.render();
|
||||||
|
|
||||||
|
/* Print out the object's size */
|
||||||
|
const float * aabb = m_obj.getAABB();
|
||||||
|
cout << "Object width: " << (aabb[3]-aabb[0]) << endl;
|
||||||
|
cout << "Object depth: " << (aabb[4]-aabb[1]) << endl;
|
||||||
|
cout << "Object height: " << (aabb[5]-aabb[2]) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Viewer::initgl()
|
void Viewer::initgl()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user