From: <tz...@us...> - 2008-06-12 01:09:17
|
Revision: 2586 http://freeorion.svn.sourceforge.net/freeorion/revision/?rev=2586&view=rev Author: tzlaine Date: 2008-06-11 18:09:25 -0700 (Wed, 11 Jun 2008) Log Message: ----------- Added some temporary code to make flip the ship models in the scene in the z-dimension, since the Durgha model is upside down. Also scaled the Durgha mesh to be 10 units long. Modified Paths: -------------- branches/ogre-integration/UI/CombatWnd.cpp branches/ogre-integration/default/data/art/combat/meshes/durgha.mesh Modified: branches/ogre-integration/UI/CombatWnd.cpp =================================================================== --- branches/ogre-integration/UI/CombatWnd.cpp 2008-06-11 01:53:33 UTC (rev 2585) +++ branches/ogre-integration/UI/CombatWnd.cpp 2008-06-12 01:09:25 UTC (rev 2586) @@ -1201,6 +1201,10 @@ m_scene_manager->getRootSceneNode()->createChildSceneNode("ship_" + mesh_name + "_node"); node->attachObject(entity); + // TOOD: This is only here because the Durgha model is upside down. Remove + // it when this is fixed. + node->yaw(Ogre::Radian(Ogre::Math::PI)); + node->setPosition(x, y, 0.0); CollisionMeshConverter collision_mesh_converter(entity); @@ -1215,7 +1219,9 @@ m_collision_objects.push_back(new btCollisionObject); btMatrix3x3 identity; identity.setIdentity(); - m_collision_objects.back().getWorldTransform().setBasis(identity); + // TOOD: Remove z-flip scaling when models are right. + btMatrix3x3 scaled = identity.scaled(btVector3(1.0, 1.0, -1.0)); + m_collision_objects.back().getWorldTransform().setBasis(scaled); m_collision_objects.back().getWorldTransform().setOrigin(ToCollisionVector(node->getPosition())); m_collision_objects.back().setCollisionShape(&m_collision_shapes.back()); m_collision_world->addCollisionObject(&m_collision_objects.back()); Modified: branches/ogre-integration/default/data/art/combat/meshes/durgha.mesh =================================================================== (Binary files differ) |