void PronyMethod::verifyResult(){ ivector rightside(0,this->states-1); for(int i = Lb( rightside ); i <= Ub( rightside ); i++){ rightside[i] = interval( (*this->a)[i], (*this->a)[i] ); } this->coeff = new ivector(0,this->states-1); for(int i = Lb( (*this->coeff) ); i <= Ub( (*this->coeff) ) ; i++){ (*this->coeff)[i] = interval( 0.0 , 0.0 ); } ILinSys l; l.ILinSolve(*this->imat,rightside,*this->coeff,this->err); }
void GUICharDefMenu::regenerateGui(v2u32 screensize) { m_screensize = screensize; /* Remove stuff */ removeChildren(); /* Calculate new sizes and positions */ v2s32 size(250, 500); core::rect<s32> rect( 10, screensize.Y/2 - size.Y/2, screensize.X - 10, screensize.Y/2 + size.Y/2 ); v2s32 leftside(0, 0); v2s32 rightside(screensize.X - (size.X+10), 0); DesiredRect = rect; recalculateAbsolutePosition(false); { core::rect<s32> rect(0, 0, 230, 300); rect += leftside + v2s32(10, 220); gui::IGUIStaticText *t = Environment->addStaticText( wgettext( "Here you can create your default character," " this is how other players will see you in-game." " When you join a new server you will start with" " the clothing you select here. Additional" " clothing, both protective and decorative," " can be crafted in-game.\n" "You can return here from the main menu anytime to" " change your character." ), rect, false, true, this, -1 ); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 250, 20); rect += rightside + v2s32(0, 20); gui::IGUIStaticText *t = Environment->addStaticText(wgettext("Create Your Character"), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } // gender { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(15, 50); Environment->addButton(rect, this, GUI_ID_CD_MALE_BUTTON, wgettext("Male")); } { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(130, 50); Environment->addButton(rect, this, GUI_ID_CD_FEMALE_BUTTON, wgettext("Female")); } // Yscale { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(15, 95); Environment->addButton(rect, this, GUI_ID_CD_TALLER_BUTTON, wgettext("Taller")); } { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(15, 130); Environment->addButton(rect, this, GUI_ID_CD_SHORTER_BUTTON, wgettext("Shorter")); } // XZscale { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(130, 95); Environment->addButton(rect, this, GUI_ID_CD_WIDER_BUTTON, wgettext("Wider")); } { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(130, 130); Environment->addButton(rect, this, GUI_ID_CD_THINNER_BUTTON, wgettext("Thinner")); } // skintone //185 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 170); gui::IGUIStaticText *t = Environment->addStaticText(m_skintone_types[m_parts["skintone"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 165); Environment->addButton(rect, this, GUI_ID_CD_SKINTONE_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 165); Environment->addButton(rect, this, GUI_ID_CD_SKINTONE_NEXT_BUTTON, L">>"); } // face //220 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 205); gui::IGUIStaticText *t = Environment->addStaticText(m_face_types[m_parts["face"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 200); Environment->addButton(rect, this, GUI_ID_CD_FACE_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 200); Environment->addButton(rect, this, GUI_ID_CD_FACE_NEXT_BUTTON, L">>"); } // hairtone //255 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 240); gui::IGUIStaticText *t = Environment->addStaticText(m_hairtone_types[m_parts["hairtone"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 235); Environment->addButton(rect, this, GUI_ID_CD_HAIRTONE_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 235); Environment->addButton(rect, this, GUI_ID_CD_HAIRTONE_NEXT_BUTTON, L">>"); } // hair //290 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 275); gui::IGUIStaticText *t = Environment->addStaticText(m_hair_types[m_parts["hair"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 270); Environment->addButton(rect, this, GUI_ID_CD_HAIR_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 270); Environment->addButton(rect, this, GUI_ID_CD_HAIR_NEXT_BUTTON, L">>"); } // eyes //325 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 315); gui::IGUIStaticText *t = Environment->addStaticText(m_eyes_types[m_parts["eyes"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 305); Environment->addButton(rect, this, GUI_ID_CD_EYES_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 305); Environment->addButton(rect, this, GUI_ID_CD_EYES_NEXT_BUTTON, L">>"); } // t-shirt //370 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 355); gui::IGUIStaticText *t = Environment->addStaticText(m_shirt_types[m_parts["shirt"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 350); Environment->addButton(rect, this, GUI_ID_CD_SHIRT_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 350); Environment->addButton(rect, this, GUI_ID_CD_SHIRT_NEXT_BUTTON, L">>"); } // pants //405 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 390); gui::IGUIStaticText *t = Environment->addStaticText(m_pants_types[m_parts["pants"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 385); Environment->addButton(rect, this, GUI_ID_CD_PANTS_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 385); Environment->addButton(rect, this, GUI_ID_CD_PANTS_NEXT_BUTTON, L">>"); } // shoes //440 { core::rect<s32> rect(0, 0, 160, 20); rect += rightside + v2s32(45, 425); gui::IGUIStaticText *t = Environment->addStaticText(m_shoes_types[m_parts["shoes"]].c_str(), rect, false, true, this, -1); t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(15, 420); Environment->addButton(rect, this, GUI_ID_CD_SHOES_PREV_BUTTON, L"<<"); } { core::rect<s32> rect(0, 0, 30, 30); rect += rightside + v2s32(205, 420); Environment->addButton(rect, this, GUI_ID_CD_SHOES_NEXT_BUTTON, L">>"); } // save/cancel { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(15, 460); Environment->addButton(rect, this, GUI_ID_CD_SAVE_BUTTON, wgettext("Done")); } { core::rect<s32> rect(0, 0, 105, 30); rect += rightside + v2s32(130, 460); Environment->addButton(rect, this, GUI_ID_CD_QUIT_BUTTON, wgettext("Cancel")); } }