mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-28 18:18:52 +00:00
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
#include "esm4base.hpp"
|
|
|
|
#include <MyGUI_TextIterator.h>
|
|
|
|
#include <components/sceneutil/positionattitudetransform.hpp>
|
|
|
|
#include "../mwgui/tooltips.hpp"
|
|
#include "../mwgui/ustring.hpp"
|
|
|
|
#include "../mwrender/objects.hpp"
|
|
#include "../mwrender/renderinginterface.hpp"
|
|
#include "../mwrender/vismask.hpp"
|
|
|
|
#include "../mwphysics/physicssystem.hpp"
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
#include "classmodel.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)
|
|
{
|
|
physics.addObject(ptr, model, rotation, MWPhysics::CollisionType_World);
|
|
}
|
|
|
|
MWGui::ToolTipInfo ESM4Impl::getToolTipInfo(std::string_view name, int count)
|
|
{
|
|
MWGui::ToolTipInfo info;
|
|
info.caption
|
|
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
return info;
|
|
}
|
|
}
|