From 34604c03acf168bdcd1afe49a142be898a14ac57 Mon Sep 17 00:00:00 2001 From: josh Date: Fri, 20 Jun 2008 01:12:53 +0000 Subject: [PATCH] wfobj-view now displays the object size on the console git-svn-id: svn://anubis/misc/wfobj-view@57 bd8a9e45-a331-0410-811e-c64571078777 --- wfobj-view.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wfobj-view.cc b/wfobj-view.cc index 5e83efc..a6620b9 100644 --- a/wfobj-view.cc +++ b/wfobj-view.cc @@ -78,6 +78,12 @@ Viewer::Viewer(const char * filename) m_dragging = false; m_obj.load(filename, &loadTexture); 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()