#include "static.hpp" #include #include "../mwworld/ptr.hpp" #include "../mwrender/cellimp.hpp" namespace MWClass { void Static::insertObj (const MWWorld::Ptr& ptr, MWRender::CellRenderImp& cellRender, MWWorld::Environment& environment) const { ESMS::LiveCellRef *ref = ptr.get(); assert (ref->base != NULL); const std::string &model = ref->base->model; if (!model.empty()) { MWRender::Rendering rendering (cellRender, ref->ref, true); cellRender.insertMesh ("meshes\\" + model); cellRender.insertObjectPhysics(); ref->mData.setHandle (rendering.end (ref->mData.isEnabled())); } } std::string Static::getName (const MWWorld::Ptr& ptr) const { return ""; } void Static::registerSelf() { boost::shared_ptr instance (new Static); registerClass (typeid (ESM::Static).name(), instance); } }