2023-04-10 00:42:27 +00:00
|
|
|
#include "esm4base.hpp"
|
|
|
|
|
|
|
|
#include <MyGUI_TextIterator.h>
|
2023-11-23 18:52:18 +00:00
|
|
|
#include <MyGUI_UString.h>
|
2023-04-10 00:42:27 +00:00
|
|
|
|
|
|
|
#include <components/sceneutil/positionattitudetransform.hpp>
|
|
|
|
|
|
|
|
#include "../mwgui/tooltips.hpp"
|
|
|
|
|
|
|
|
#include "../mwrender/objects.hpp"
|
|
|
|
#include "../mwrender/renderinginterface.hpp"
|
|
|
|
#include "../mwrender/vismask.hpp"
|
|
|
|
|
|
|
|
#include "../mwphysics/physicssystem.hpp"
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
|
|
|
namespace MWClass
|
|
|
|
{
|
|
|
|
void ESM4Impl::insertObjectRendering(
|
|
|
|
const MWWorld::Ptr& ptr, const std::string& model, MWRender::RenderingInterface& renderingInterface)
|
|
|
|
{
|
|
|
|
if (!model.empty())
|
|
|
|
{
|
|
|
|
renderingInterface.getObjects().insertModel(ptr, model);
|
|
|
|
ptr.getRefData().getBaseNode()->setNodeMask(MWRender::Mask_Static);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ESM4Impl::insertObjectPhysics(
|
|
|
|
const MWWorld::Ptr& ptr, const std::string& model, const osg::Quat& rotation, MWPhysics::PhysicsSystem& physics)
|
|
|
|
{
|
2024-10-13 20:49:26 +00:00
|
|
|
physics.addObject(ptr, VFS::Path::toNormalized(model), rotation, MWPhysics::CollisionType_World);
|
2023-04-10 00:42:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MWGui::ToolTipInfo ESM4Impl::getToolTipInfo(std::string_view name, int count)
|
|
|
|
{
|
|
|
|
MWGui::ToolTipInfo info;
|
2023-11-22 21:02:06 +00:00
|
|
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
2023-04-10 00:42:27 +00:00
|
|
|
return info;
|
|
|
|
}
|
|
|
|
}
|