void MainWindow::showBodyDetails( const Creature& creature, const BodyPart& body ) { getUiInspector().lst_body_details->addItem(QString( body.getName().c_str())); getUiInspector().lst_body_details->addItem(QString( (" Mass: " + TO_STRING(body.getMass())).c_str())); getUiInspector().lst_body_details->addItem(QString( (" Torque: " + TO_STRING(body.getMaxTorque())).c_str())); getUiInspector().lst_body_details->addItem(QString( std::string(" Size").c_str())); getUiInspector().lst_body_details->addItem(QString( (" [x]: " + TO_STRING(body.getSizeX())).c_str())); getUiInspector().lst_body_details->addItem(QString( (" [y]: " + TO_STRING(body.getSizeY())).c_str())); getUiInspector().lst_body_details->addItem(QString( (" [z]: " + TO_STRING(body.getSizeZ())).c_str())); //Angles BodyPart* parent = body.getParentId() == Creature::B_NONE ? NULL : &creature.getBodyPart(body.getParentId()); if (parent) { getUiInspector().lst_body_details->addItem(QString( (" Parent: " + parent->getName()).c_str())); // getUiInspector().lst_body_details->addItem(QString(std::string(" Angles:").c_str())); // getUiInspector().lst_body_details->addItem(QString( // (" XY:" + TO_STRING( // MathUtil::getAngle(MathUtil::XY, // parent->getRigidBody()->getCenterOfMassPosition(), // body.getRigidBody()->getCenterOfMassPosition()))).c_str())); // getUiInspector().lst_body_details->addItem(QString( // (" YZ:" + TO_STRING( // MathUtil::getAngle(MathUtil::YZ, // parent->getRigidBody()->getCenterOfMassPosition(), // body.getRigidBody()->getCenterOfMassPosition()))).c_str())); // getUiInspector().lst_body_details->addItem(QString( // (" ZX:" + TO_STRING( // MathUtil::getAngle(MathUtil::ZX, // parent->getRigidBody()->getCenterOfMassPosition(), // body.getRigidBody()->getCenterOfMassPosition()))).c_str())); } }